Skip to content

Instantly share code, notes, and snippets.

View mdornseif's full-sized avatar

Maximillian Dornseif mdornseif

View GitHub Profile
rapid:local md$ brew install haxe
ocaml is an alias for objective-caml
==> Downloading http://nekovm.org/_media/neko-1.8.1.tar.gz
File already downloaded and cached to /Users/md/Library/Caches/Homebrew
==> Patching
######################################################################## 100.0%
patching file src/tools/install.neko
Hunk #1 succeeded at 123 with fuzz 1.
Hunk #2 succeeded at 133 with fuzz 1.
Hunk #3 succeeded at 232 with fuzz 1.
// This is a ANTLR3 Grammar for slidescript
grammar Slidescript;
options {
language=Python;
output=AST;
}
tokens { ASSIGNMENT;
CODE; }
AnzahlBesucher = 500
KostenRaum = 3000
DauerParty = 9
StundenlohnHelfer = 15
KostenDJ = 300 + (DauerParty * StundenlohnHelfer * 2)
#!/usr/bin/env python
# encoding: utf-8
"""
search_sites.py - basic configuration for the haystack engine
"""
import haystack
import haystack.indexes
import django.contrib.flatpages.models

Notes on using Silverlining

silver run

For some reason silver run $(DNS) -vvvv manage.py loaddata [fixture] does not work as expected. I now I use [app_name]/fixtures/initial_data.json which gets loaded during syncdb. Not the same but works.

Somethings like this in settings.py helps finding fixtures:

khi00 29 columns, 362 rows
khi00: 250 rows, 151.9 rows/s
khd00 58 columns, 8 rows
khd00: 0 rows, 0.0 rows/s
kgk00 No rows for table kgk00 leer
kfv00 No rows for table kfv00 leer
kdx00 No rows for table kdx00 leer
kdn00 No rows for table kdn00 leer
kdb00 No rows for table kdb00 leer
kda00 12 columns, 5 rows
# Irgendwo hatten wir dieses snippet in eleganter = aber wo?
class DictObj(object):
def __init__(self, d):
self.d = d
def __getattr__(self, m):
return self.d.get(m, None)
#!/usr/bin/env python
# encoding: utf-8
import httplib
import urllib
import base64
def send_fax_sipgate(uploadfiles, dest_number, guid='', username=None, password=None):
sip = Sipgate(username, password)
return sip.sendFax(uploadfiles, dest_number)
9 GET /bigwheel/ HTTP/1.1
9 GET /overview/laufraeder/ HTTP/1.1
10 GET /overview/trampoline/ HTTP/1.0
28 GET /overview/bigwheel/ HTTP/1.1
40 GET /garantiekarte/ HTTP/1.1
121 GET /overview/tore/
7824 GET /overview/trampoline/ HTTP/1.1
#!/usr/bin/env python
"""
Credit System for Python Code
This program analyzes Python code with pylint
and calculates a credit for the code, depending
on a miimum required score and the previous run.
"""
import sys