This file contains 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 " be iMproved | |
filetype on "Avoid errors on close | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" Bundles {{{- | |
" let Vundle manage Vundle | |
" required! |
This file contains 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 urllib2 | |
countries={'DK':'denmark'} | |
os.system("/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper begin") | |
for country in countries.keys(): |
This file contains 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 paho.mqtt.client as paho | |
import http.client, urllib | |
import argparse | |
import logging | |
import json | |
import sys | |
def parse_message(self, message): |
This file contains 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/python | |
import sys,getopt | |
filename = None | |
blocksize = 1024 | |
opts,args = getopt.getopt(sys.argv[1:],'f:b:') | |
for o,a in opts: | |
if o == '-f': |
This file contains 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 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 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 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 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 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 |
NewerOlder