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
| #!/opt/local/bin/python2.7 | |
| # encoding: utf-8 | |
| """ | |
| couchimport.py | |
| Created by Marian Steinbach on 2011-11-10. | |
| """ | |
| import sys | |
| import os | |
| import datetime |
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
| CREATE TABLE `stations` ( | |
| `id` varchar(9) COLLATE latin1_general_ci NOT NULL, | |
| `postalcode` varchar(5) COLLATE latin1_general_ci NOT NULL, | |
| `name` varchar(255) COLLATE latin1_general_ci NOT NULL, | |
| `longitude` decimal(5,2) NOT NULL, | |
| `latitude` decimal(5,2) NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='BfS Sensor Stations'; | |
| CREATE TABLE `values_2h` ( |
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
| #!/bin/bash | |
| # Assuming that you have a number of | |
| # PNGs in a folder pngs/, this script | |
| # will rename them to a file sequence | |
| # like 0001.png, 0002.png, ... | |
| n=0 | |
| for f in pngs/*.png; do | |
| n=`expr $n + 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
| /* by Joder Illi, Snowball mailing list */ | |
| function stemm(word) { | |
| /* | |
| Put u and y between vowels into upper case | |
| */ | |
| word = word.replace(/([aeiouyäöü])u([aeiouyäöü])/g, '$1U$2'); | |
| word = word.replace(/([aeiouyäöü])y([aeiouyäöü])/g, '$1Y$2'); | |
| /* | |
| and then do the following mappings, |
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/python | |
| # -*- coding: utf-8 -*- | |
| ''' | |
| This script extracts CSV dumps from my local database | |
| Author: Marian Steinbach, marian@sendung.de, http://www.sendung.de/japan-radiation-open-data/ | |
| ''' | |
| import csv |
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/perl | |
| # This script concatenates and minifies a given set of CSS and JavaScript files | |
| # so that only one JS and one CSS file are the result. | |
| # | |
| # In order to make it work for your project, configure the path settings and the | |
| # file names both for input and output files. | |
| # | |
| # by Marian Steinbach <marian@sendung.de> |
NewerOlder