Skip to content

Instantly share code, notes, and snippets.

import requests
import csv
import datetime
import calendar
import time
i=0
# Change the range depending on how long you like to record the data
for i in range (0,50):
@BjoernSchilberg
BjoernSchilberg / bash_prompt.sh
Created November 30, 2017 09:13 — forked from gryf/bash_prompt.sh
Set color bash prompt according to active virtualenv, Git, Mercurial or Subversion branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the active nodejs virtualenv[1]
# * the branch/status of the current Git, Mercurial or Subversion repository
# * the return value of the previous command
# * one line prompt
@BjoernSchilberg
BjoernSchilberg / xmlToJson.js
Created November 10, 2017 15:39 — forked from chinchang/xmlToJson.js
Function to convert XML to JSON
// Changes XML to JSON
// Modified version from here: http://davidwalsh.name/convert-xml-json
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) { // element
// do attributes
if (xml.attributes.length > 0) {
@BjoernSchilberg
BjoernSchilberg / blindtiffs.go
Created November 1, 2017 12:37 — forked from s-l-teichmann/blindtiffs.go
A small tool to create a copy of a directory tree with all GeoTIFFs 'blinded' (all values zero) by gdal_calc.py preserving the meta data.
// blindtiffs
// ----------
// Usage: blindtiffs <src> <dst>
// Recursively copies folder <src> to folder <dst>.
// All GeoTIFFs in the source tree are 'blinded' by
// gdal_calc.py to have zero channels but still contain
// all the meta data.
//
// (c) 2017 by Sascha L. Teichmann