Skip to content

Instantly share code, notes, and snippets.

View Drvanon's full-sized avatar
😀
Ready to get working

Robin Alexander Dorstijn Drvanon

😀
Ready to get working
  • Groningen
View GitHub Profile
@Drvanon
Drvanon / mine.cpp
Last active August 29, 2015 14:08 — forked from anonymous/mine.cpp
#include <EEPROM.h>
float tempC;
int reading;
int tempPin = 0;
int EAdress = 0;
void setup () {
analogReference(INTERNAL);
}
Als haar adem plaats maakt voor de scherpe wind, stapt zij uit reflex naar achteren om zich te beschermen tegen de kou die de trein met zich meebrengt.
Ze zucht en slentert naar het rokershokje.
Ze rookt niet, maar het is overdekt en op een jongeman na is de ruimte leeg.
Dat verbaast haar niet, gezien het tijdstip. Als de piepende deur achter haar dichtvalt, kijkt de jongeman schichtig op.
Ze groeten elkaar en de jongen steekt een nieuwe sigaret op.
Zij sluit haar ogen en luistert naar het getrommel van de regen op het dak.
"Waarom doe je dat?"
"Wat doe ik?"
"Je hebt je ogen dicht."
"Ik luister naar de regen. Dat vind ik rustgevend."
@Drvanon
Drvanon / main.py
Created May 1, 2012 18:22
module questions
import module
e = 10
def main():
while Trye
h = module.do_shitty_things(e)
print h
import twisted
import pygame
import amp
# the game
# sell items
# here comes the amp protocol
# buy items
@Drvanon
Drvanon / main.py
Created May 2, 2012 13:05
**kargs
class FingerFactory(protocol.ServerFactory):
def __init__(self, **kwargs):
self.users = kwargs
users = {'moshez':'happy and well', 'Rob':'Programming','Danny':'being happy'}
factory = FingerFactory(users)
Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
Done with math: [(True, 94), (False, <twisted.python.failure.Failure <class 'twisted.internet.error.ConnectionRefusedError'>>)]
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from ampserver import Sum, Divide
def doMath():
try:
a = raw_input('What number for a ? \n >')
b = raw_input('What number for b? \n >')
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2008 Dec 17
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
from twisted.application import internet, service
from twisted.internet.protocol import ServerFactory, Protocol
from twisted.python import log
# Normally we would import these classes from another module.
class PoetryProtocol(Protocol):
def connectionMade(self):
poem = self.factory.service.poem