Skip to content

Instantly share code, notes, and snippets.

View mrtopf's full-sized avatar

Christian Scholz mrtopf

View GitHub Profile
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
var ball = {
x: 100,
y: 100,
dx : 4,
dy : 4,
};
labertasche:openid cs$ /opt/python/2.6/bin/virtualenv test
New python executable in test/bin/python
Please make sure you remove any previous custom paths from your /Users/cs/.pydistutils.cfg file.
Installing setuptools............done.
labertasche:openid cs$ . test/bin/activate
(test)labertasche:openid cs$ easy_install repoze.who.plugins.openid
Searching for repoze.who.plugins.openid
Reading http://pypi.python.org/simple/repoze.who.plugins.openid/
Reading http://quantumcore.org/docs/repoze.who.plugins.openid
Best match: repoze.who.plugins.openid 0.5.2
import sys
from elementtree.ElementTree import parse
class Record(object):
"""the final record"""
def _toint(self, s):
"""convert a financial number to int"""
if s=="-":
return -1
input price 1: 410 ISK
input price 2: 676 ISK
output price : 12,525 ISK
net profit per installation per hour: 19,184 ISK
P1 items to import per batch: 80
P2 items to export per batch: 5
Import fee per batch 2,000 ISK
Export fee per batch 4,500 ISK
@mrtopf
mrtopf / gist:5228439
Last active December 15, 2015 08:09
python script to compute profit for planetary interaction converting toxic metals and precious metals to enriched uranium
#coding=utf-8
import locale
locale.setlocale(locale.LC_ALL, 'en_US')
"""
Compute the profit per day for enriched uranium or other stuff
"""
@mrtopf
mrtopf / .vimrc
Created May 4, 2013 15:37
meine .vimrc #cool
filetype off
"call pathogen#runtime_append_all_bundles()
"filetype plugin indent on
set nocompatible
set modelines=0
set softtabstop=4
set tabstop=4
{'_id': '11199',
'betreff': 'Industriepark Rothe Erde - Stand der Altlastensanierung',
'consultation': [{'action': 'Kenntnisnahme',
'committee': u'Ausschuss f\xfcr Umwelt und Klimaschutz',
'date': time.struct_time(tm_year=2013, tm_mon=7, tm_mday=2, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=1, tm_yday=183, tm_isdst=-1),
'decision': u'',
'meeting': u'UmA/36/WP.16\xa0\xf6ffentliche/nicht\xf6ffentliche Sitzung des Ausschusses f\xfcr Umwelt und Klimaschutz',
'silfdnr': '2846',
'status': 'erledigt',
'toplfdnr': None}],
@mrtopf
mrtopf / top.json
Created July 3, 2013 14:47
Beispiel für einen TOP
{ "_id" : "57508", "selfName" : "Musterstadt", "link_to" : "to010.asp?SILFDNR=2879&options=8", "nowTime" : "16:18:41", "rtfBS" : null, "nowDate" : "2456466", "selfNameFull" : "Stadt Musterstadt", "sbtele" : "92034532 ", "selfBase" : "http://ratsinfo.aachen.de/bi/", "selfUrl" : "to020.asp?selfaction=ws&template=xyz&TOLFDNR=57508", "sbname" : "Gunkelmann ", "nowTimeUTC" : "14:18:41", "grname" : "Bezirksvertretung Aachen-Brand", "sbemail" : " ", "selfMail" : "info@musterstadt.de", "saname" : "Öffentliche/Nichtöffentliche Sitzung", "sisbe" : "17:00 - 19:10", "rtfAE" : null, "description" : "Exportiert aus ALLRIS am 22.06.2013\\n\\n\\nDie Sitzung in ALLRIS net:\\nhttp://ratsinfo.aachen.de/bi/to010.asp?SILFDNR=2879&options=8", "sise" : "19:10", "toostKurz" : "Ö", "sisb" : "17:00", "count0" : "0", "totyp" : "(offen)", "transcript" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p style=\"font-size:10pt; line-height:150%; margin:0pt\"><span
@mrtopf
mrtopf / meeting.json
Created July 3, 2013 14:53
Sitzung in JSON
{
"_id" : 2839,
"link_to" : "to010.asp?SILFDNR=2839options=8",
"sisbvcs" : "20130626T150000Z",
"siseo" : "0",
"sblfdnr" : "200",
"sbtele" : "0241-4327233",
"special" : {
"siseo" : "0",
"siost" : "öffentlich/nichtöffentlich",
@mrtopf
mrtopf / committee.json
Created July 3, 2013 14:58
committee-Beispiel
{
"_id" : 30,
"last_session_id" : null,
"name" : "Betriebsausschuss Aachener Stadtbetrieb",
"next_session" : ISODate("2013-06-05T00:00:00Z"),
"address" : {
"name" : "Michaela Landskron",
"url" : "http://www.aachen.de",
"lines" : [
"Aachener Stadtbetrieb",