This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from bs4 import BeautifulSoup | |
import requests | |
import re | |
account_no = '000000' #LJ Account number, zero prefixed | |
baseurl = 'https://secure2.linuxjournal.com' | |
def get_filename_from_cd(cd): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import json | |
import re | |
import argparse | |
import sys | |
import os | |
def read_file(filename): | |
with open(filename, 'rt') as f: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" import needed classes from rrd libraries""" | |
from pyrrd.rrd import RRD, RRA, DS | |
from pyrrd.graph import DEF, CDEF, VDEF | |
from pyrrd.graph import LINE, AREA, GPRINT | |
from pyrrd.graph import ColorAttributes, Graph | |
""" import subprocess to launch external commands like sar""" | |
import subprocess | |
""" import os.path to test if files exist""" | |
import os.path | |
""" import sys to handle error exits""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import twitter | |
api = twitter.Api(consumer_key=consumer_key, | |
consumer_secret=consumer_secret, | |
access_token_key=access_token, | |
access_token_secret=access_secret) | |
u1 = api.GetFollowerIDs(screen_name='foosel') | |
u2=api.GetFollowerIDs(screen_name='OctoPrint3D') | |
print("@foosel follower count : {0}".format(len(u1))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updating, please wait. | |
+++++++++++++++++++++++++++++++ | |
Now updating OctoPrint to 1.3.2 | |
+++++++++++++++++++++++++++++++ | |
/home/pi/oprint/bin/python "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.1-py2.7.egg/octoprint/plugins/softwareupdate/scripts/update-octoprint.py" --branch= --force=false "/home/pi/OctoPrint" 1.3.2 | |
'build/scripts-2.7' does not exist -- can't clean it | |
Python executable: '/home/pi/oprint/bin/python' | |
>>> Running: git diff --shortstat | |
> git diff --shortstat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updating, please wait. | |
+++++++++++++++++++++++++++++++ | |
Now updating OctoPrint to 1.3.2 | |
+++++++++++++++++++++++++++++++ | |
/home/pi/oprint/bin/python "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.1-py2.7.egg/octoprint/plugins/softwareupdate/scripts/update-octoprint.py" --branch= --force=false "/home/pi/OctoPrint" 1.3.2 | |
'build/scripts-2.7' does not exist -- can't clean it | |
Python executable: '/home/pi/oprint/bin/python' | |
>>> Running: git diff --shortstat | |
> git diff --shortstat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import sys | |
import datetime | |
import os.path | |
with open(sys.argv[1]) as f: | |
data = json.load(f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import logging | |
import hashlib | |
def prune(dic): | |
return {key:value for key, value in dic.iteritems() if len(value) > 1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import time | |
import astral | |
import logging | |
import datetime | |
from dateutil import parser | |
from threading import Thread |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" Let Vundle manage Vundle | |
Bundle 'gmarik/vundle' | |
" My Bundles |
NewerOlder