Skip to content

Instantly share code, notes, and snippets.

View efosong's full-sized avatar

Elliot Fosong efosong

View GitHub Profile
@efosong
efosong / chase_s7.txt
Last active January 22, 2016 12:43
Reformats data found on 'the-chase.wikia.com' into a CSV file
|1
|Anne Hegerty
|2 contestants banked £6,000.
|Target of 14 caught with 0:47 remaining.
|-
|2
|Mark Labbett
|4 contestants banked £60,000.
|Target of 19/Chaser scored 18<br />Each player wins '''£15,000'''.
|-
@efosong
efosong / julia_set.py
Created January 22, 2016 12:47
Generate julia set images.
# Requires PIL
import math
class Complex(object):
def __init__(self, real, img):
self.real = real
self.img = img
def __mul__(self, comp):
# 'Explanation' here : http://einf2.user.srcf.net/function_lobf_explanation.pdf
# Entirely my own work, so definitely not guaranteed to be correct
import math
def integrate(f, low, upp, n=100):
""" INTEGRATES A FUNCTION f BETWEEN low AND upp USING SIMPSON'S RULE """
#split the interval into 2n strips
h = (upp-low)/(2.0*n)
// Written by Elliot Fosong
// 'Player first' version of code
// Must be compiled with C++11 (e.g. -std=c++11)
// Program 'length' : 13 semicolons + 8 commas = 21
// *** Goal is to minimise 'length', NOT to produce clean/readable code ***
// Board positions:
// 00 | 10 | 20
// 01 | 11 | 21
// 02 | 12 | 22
@efosong
efosong / vim_digraphs.txt
Created July 21, 2017 21:12
Useful vim digraphs
USEFUL VIM DIGRAPHS
Modified from http://www.alecjacobson.com/weblog/?p=443
GENERAL
Rg ®
Co ©
TM ™
/- †
/= ‡
<- ←

Keybase proof

I hereby claim:

  • I am efosong on github.
  • I am efosong (https://keybase.io/efosong) on keybase.
  • I have a public key whose fingerprint is 7044 DAE1 0314 3E14 A2E2 5D4E B9A7 743D 9826 7C42

To claim this, I am signing this object: