Skip to content

Instantly share code, notes, and snippets.

@edhiley
edhiley / afeeder.cs
Created July 6, 2011 11:23
something to look at ....
class AFeeder
{
enum TypesOfInformation
{
PatientInformation,
SomethingElse
}
public Feeder()
@edhiley
edhiley / scheduler.rb
Created November 18, 2011 20:26
scheduler - ryan's task
# scheduler.rb
class Scheduler
class CyclicalDependsError < StandardError
end
attr_accessor :tasks, :queue, :runables
def initialize(tasks, depends = [])
@edhiley
edhiley / Fullpage.html
Created April 27, 2012 15:58
A web page created at CodePen.io
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Code Pen &middot; 1</title>
<style>
body {
position: absolute; font-family: helvetica;
@edhiley
edhiley / scheduler_README.rst
Created March 17, 2013 22:00
screening test python (first time)

Scheduler

  1. Clone the repo to local dir

  2. Install required modules, e.g. Behave

  3. Run the BDD tool:

    $ behave
    
@edhiley
edhiley / app.py
Created July 16, 2013 22:44
Creates gmail-app like icons, very limited ... get the font from google fonts.
from PIL import Image, ImageDraw, ImageFont
import string
import math
# colours from www.flatuicolors.com
COLOURS = dict(turquoise="#1abc9c",
emerald="#2ecc71",
peterRiver="#3498db",
amethyst="#9b59b6",
wetAsphalt="#34495e",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am edhiley on github.
  • I am edhiley (https://keybase.io/edhiley) on keybase.
  • I have a public key whose fingerprint is A31E 4773 8142 E5C2 3BC8 C2FF 1D83 B09E 6B62 7DF0

To claim this, I am signing this object:

@edhiley
edhiley / mrpythonclient.py
Last active August 29, 2015 14:02
Two examples of Riak map reduce, curl and python client
from riak import RiakClient, RiakNode
host, port = 'localhost', '10091'
timeout = 6000000
client = RiakClient(protocol='http', hosts=host, http_port=port)
if not client.ping():
print "Cannot connect to riak on {}:{}".format(host, port)
exit()
@edhiley
edhiley / TestDataStrategies.py
Created July 16, 2014 22:18
fetchmany ....
import unittest, sqlite3
from contextlib import closing
class TestDataStrategies(unittest.TestCase):
SQLCMD = """SELECT lid
from person_table
GROUP BY lid
ORDER BY lid"""