Skip to content

Instantly share code, notes, and snippets.

View hownowstephen's full-sized avatar
🥔

Stephen Young hownowstephen

🥔
View GitHub Profile
h1 {
color: red;
font-size: 3em;
text-decoration: underline;
}

Keybase proof

I hereby claim:

  • I am hownowstephen on github.
  • I am hownowstephen (https://keybase.io/hownowstephen) on keybase.
  • I have a public key whose fingerprint is 2CE3 342A 2DA0 15F1 357C CCEC 6A23 23F4 3206 E3A4

To claim this, I am signing this object:

@hownowstephen
hownowstephen / gevent-queueing.py
Last active December 3, 2020 23:53
Overview of the gevent.queue module
import gevent.queue
queue = gevent.queue.Queue()
# Basic gevent.queue.Queue operations
# Put to the queue
# Good practice is to communicate across the queue using tuples
queue.put((0, 'message',))
@hownowstephen
hownowstephen / embedly.py
Created February 12, 2012 18:23
Embedly Challenge
import requests,re,math
# Factorial function basic
def factorial(size,start=0):
'''Determines the min n! where sum(digits(n)) == 8001'''
result = 0
while result != size:
start += 1
result = sum([int(x) for x in str(math.factorial(start))])
return start
@hownowstephen
hownowstephen / server.py
Created December 1, 2011 01:59
Sample APY server
from apy import Endpoint, app
@Endpoint('/main')
class MainEndpoint:
def get(*args,**kwargs):
return {'response': ['hello','world']}
def post(*args,**kwargs):
return {'response': ['you','posted']}
@hownowstephen
hownowstephen / csvbrowse.py
Created March 25, 2011 17:01
Python command line CSV browser
#!/usr/bin/python
"""
csvbrowse.py
Acts as a command line csv browser, allows you to view only a select set of columns
and open from a particular line
Usage:
csvbrowse.py -f <csvfile> -H
displays a listing of the headers of the file