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 | |
# encoding: utf-8 | |
""" | |
berlin_marathon_participants_2014.py | |
Created by Christian Stade-Schuldt on 2013-11-12. | |
""" | |
import urllib | |
import json |
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
{ | |
"identifier": "7235481C-546B-4E32-B068-F24B1FAC0D42", | |
"name": "HERE Theme", | |
"customizations": {}, | |
"baseTheme": { | |
"variantIdentifier": "scheme2", | |
"identifier": "next" | |
}, | |
"creationDate": 1525381263.4608269, | |
"importDate": 1525442729.7030401, |
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
decodeLine <- function(encoded){ | |
require(bitops) | |
vlen <- nchar(encoded) | |
vindex <- 0 | |
varray <- NULL | |
vlat <- 0 | |
vlng <- 0 | |
while(vindex < vlen){ |
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 json | |
import re | |
import requests | |
from lxml import html | |
BASEURL = 'https://www.packtpub.com' | |
HEADER = {'User-Agent': 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'} | |
OUTPUT = {'pav': {'channel': "#ebook-monkey", |
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
### Keybase proof | |
I hereby claim: | |
* I am tafkas on github. | |
* I am tafkas (https://keybase.io/tafkas) on keybase. | |
* I have a public key whose fingerprint is 7B9C 21AC AE24 13D8 CD42 C5CE 4B01 E33B 1795 4301 | |
To claim this, I am signing this object: |
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 bash | |
rrdtool create temperatures.rrd \ | |
--start N \ | |
--step 300 \ | |
DS:temps1:GAUGE:1200:-40:50 \ | |
DS:temps2:GAUGE:1200:-40:50 \ | |
DS:temps3:GAUGE:1200:-40:50 \ | |
DS:temps4:GAUGE:1200:-40:50 \ | |
DS:temps5:GAUGE:1200:-40:50 \ |
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 bash | |
# Receive weather data from remote USB WDE1 and store it into database | |
# Loop forever to read data from USB WDE1 | |
socat / dev/ttyUSB0, B9600 STDOUT | \ | |
while read line | |
do | |
if [["$ {line%% *}" == '$ 1']] then | |
# Format data | |
"{? line # 1, 1,} $" tmp = `echo | tr ',' ','`. |
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 bash | |
rrdtool xport -s now-3h -e now --step 300 \ | |
DEF:a=/home/pi/weather/temperatures.rrd:temps1:AVERAGE \ | |
DEF:b=/home/pi/weather/temperatures.rrd:temps2:AVERAGE \ | |
DEF:c=/home/pi/weather/temperatures.rrd:temps3:AVERAGE \ | |
DEF:d=/home/pi/weather/temperatures.rrd:temps4:AVERAGE \ | |
DEF:e=/home/pi/weather/temperatures.rrd:temps5:AVERAGE \ | |
DEF:f=/home/pi/weather/temperatures.rrd:temps6:AVERAGE \ | |
XPORT:a:"Livingroom" \ |
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
$.ajax({ | |
type: "GET", | |
url: "data/temperature24h.xml", | |
dataType: "xml", | |
success: function(xml) { | |
var series = [] | |
//define series | |
$(xml).find("entry").each(function() { | |
var seriesOptions = { |
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 | |
# encoding: utf-8 | |
""" | |
collect_meter.py | |
Created by Christian Stade-Schuldt on 2014-10-25. | |
""" | |
import sys | |
import os |