Skip to content

Instantly share code, notes, and snippets.

View metaperl's full-sized avatar

Structure and Interpretation of Computer Programs metaperl

View GitHub Profile
@metaperl
metaperl / gist:c87ed65397704e949886
Created October 10, 2014 15:21
parameter binding
I'm wondering if there is a Python module/class which aids parameter binding. The parameters will be bound from the command line and presumably set the parameters within a module, with the correct type, converting from the command line string to actual type
Here is a an example:
shell> share_trader.py
Welcome to Share Trader
=======================
parms: amount_to_spend=1000, symbol=None, stop_loss_percent=10, profit_percent=5
@metaperl
metaperl / gist:aedc900156b8f025539a
Created October 10, 2014 15:22
parameter binding
I'm wondering if there is a Python module/class which aids parameter binding. The parameters will be bound from the command line and presumably set the parameters within a module, with the correct type, converting from the command line string to actual type
Here is a an example:
shell> share_trader.py
Welcome to Share Trader
=======================
parms: amount_to_spend=1000, symbol=None, stop_loss_percent=10, profit_percent=5
@metaperl
metaperl / gist:80bfc26c01121e0d9ca6
Created October 10, 2014 15:23
parameter binding
I'm wondering if there is a Python module/class which aids parameter binding.
The parameters will be bound from the command line and presumably set the
parameters within a module, with the correct type, converting from the
command line string to actual type
Here is a an example:
shell> share_trader.py
Welcome to Share Trader
@metaperl
metaperl / gist:68af6ca5cfb29d943103
Created October 21, 2014 02:50
Debian packages on my box
0ad
0ad-data
0ad-data-common
0ad-dbg
0install
0install-core
0xffff
2048-qt
2ping
2vcard
<VirtualHost *:80>
Define docroot /home/schemelab/domains/info/cashbackprograms/www/wordpress
ServerName cashbackprograms.info
ServerAlias www.cashbackprograms.info
DocumentRoot ${docroot}
<Directory ${docroot}>
import collections
import re
import sys
class Command:
"""
A Command is an object consisting of a start_floor
and a list of Transition instances
"""
@metaperl
metaperl / gist:2738efb184631fa9c91e
Last active August 29, 2015 14:11
Setting up Gnus to read my local mbox on Mac OS X
```
(setq
nnmail-spool-file "/var/mail/anicca"
gnus-select-method '(nntp "news")
gnus-secondary-select-methods '((nnml ""))
)
(setq nnmail-split-methods
'(
("Other" "")))
Free cell phone and free cell service - just bring me 3 people -
http://danny990997.tempowireless.com/intro.html
http://academyofancientdance.com,http://afterlife3d.com/,http://akashiclibrary.com/,http://angelicembassy.com/,http://answ3r.com/,http://artistswholesaleoutlet.com/,http://askmatrix.org/,http://astraltravelagency.com/,http://attentionpower.com/,http://b--ks.com/,http://bardotrainingcenter.com/,http://beadsinbondage.com/,http://brane-power.com,http://bubbleofgoodness.com/,http://chocolateobsessions.com/,http://cloister-recordings.com/,http://cloisterkitchen.com/,http://cloisterrecordings.com/,http://coinology.org/,http://d3ad.com/,http://deadelvis.com/,http://domexx.com/,http://dreamlucid.com/,http://ejgold.com/,http://ejgold.org/,http://ellenskitchen.com/,http://fairgame.org/,http://faxl.com/,http://galaxyezine.org/,http://galaxywebsitedesign.com/,http://gamexx.com/,http://gatewaysapps.com/,http://gatewaysbooksandtapes.com/,http://ghostville.com/,http://godd.org/,http://goddgames.com/,http://gorebagg.com/,http://gorebaggsworld.com/,http://hei-art.com/,http://hei-jazzart.com/,http://idhhb.com/,http://idhhb.org
@metaperl
metaperl / gist:2f6d088dd9a718e305df
Created April 10, 2015 21:22
nagare select box
from __future__ import with_statement
from nagare import editor, presentation, component, validator
class Option:
def __init__(self):
self.option2 = 'opt1'
self.option_result = ''
class OptionEditor(editor.Editor):
def __init__(self, option):
self.list1 = ['a', 'b', 'c']