Skip to content

Instantly share code, notes, and snippets.

extern crate chrono;
extern crate structopt;
extern crate time;
#[macro_use]
extern crate structopt_derive;
use chrono::prelude::*;
use time::Duration;
use structopt::StructOpt;

Keybase proof

I hereby claim:

  • I am skorgu on github.
  • I am skorgu (https://keybase.io/skorgu) on keybase.
  • I have a public key whose fingerprint is 3A42 ED68 99C5 7FB5 8A46 140B 54BE 7BDE 8E73 9B86

To claim this, I am signing this object:

@skorgu
skorgu / crayola.py
Created June 10, 2011 17:18
Crayola Madness ideas
#!/usr/bin/python
import string
d = dict(zip(string.lowercase, range(1, 28)))
crayons = ['jungle green', 'sky blue', 'cotton candy', 'outer space', 'macaroni and cheese', 'lemon yellow']
for c in crayons:
t = 0
for l in c:
@skorgu
skorgu / extract_edgar.py
Created March 27, 2011 03:22
Extract individual files from edgar's 'txt' files
#!/usr/bin/python
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#!/usr/bin/sh
sudo apt-get install php5-cli
wget -c http://www.symfony-project.org/get/symfony-1.4.1.tgz
mkdir in_symfony/lib/vendor/ -p
tar xzvf symfony-1.4.1.tgz -C in_symfony/lib/vendor/
mv in_symfony/lib/vendor/symfony-1.4.1/ in_symfony/lib/vendor/symfony
cd in_symfony
php lib/vendor/symfony/data/bin/symfony generate:project marginalmemory
php symfony generate:app frontend
php symfony generate:module frontend mm