Skip to content

Instantly share code, notes, and snippets.

import sys
class Passage:
def __init__(self, raw):
self.raw = raw
self.title = raw[0][3:].split("{.prepub_hidden}")[0].strip() # ## Summit {.prepub_hidden}
self.no = raw[1][4:].strip() # ### 21
self.text = ''.join(raw[3:])

Keybase proof

I hereby claim:

  • I am carl-ellis on github.
  • I am carlc75 (https://keybase.io/carlc75) on keybase.
  • I have a public key ASCjywuOrWqR_zZsQitRCrQRLLylSB5NYLxhQ3GTm2p2KAo

To claim this, I am signing this object:

@carl-ellis
carl-ellis / README.md
Last active August 29, 2015 14:09
Simple code review

Simple code review for git projects

Works really well if you are working on forks of the project, but not essential. Remote name conventions: origin -> Your fork, upstream -> Master Repo

7 simple steps:

  1. Checkout a feature branch
  2. Do your changes
  3. Bonus: Ensure your changes are covered by tests
@carl-ellis
carl-ellis / README
Created June 27, 2011 15:49
Code Brawl #2
Pixelise!
=========
This has two pixelising function, a straight average of the colour channels in a given block, or a weighted mean based
upon a two dimensional normal distribution.
The code uses the weighted version, but the other is kept on for display purposes.
Name your image "input.png" and run the program.