This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Dan Connolly' | |
__contact__ = 'http://www.madmode.com/' | |
__license__ = 'dedicated to the public domain, aka CC0' | |
from base64 import b64encode | |
from hashlib import md5 | |
import re | |
def gp2_generate_passwd(Passwd, Len): | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import Table, Column, text | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.types import INTEGER, VARCHAR, TEXT | |
from sqlalchemy.sql import select, and_, func | |
Base = declarative_base() | |
institutions = ('kuh', 'kupi', 'kumc') | |
redcap_data = Table('redcap_data', Base.metadata, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compare with https://bitbucket.org/DanC/coffee-craft/src/682d06f02e99/money.coffee | |
// ugh... no nested classes? gotta pass thunks around? | |
class SealedBox { | |
final capture; | |
SealedBox(this.capture); | |
shareContent() { capture(); } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** transcription of money example from "Smart Contracts" | |
http://www.erights.org/smart-contracts/index.html | |
http://www.erights.org/elib/capability/ode/ode-capabilities.html | |
*/ | |
abstract class Purse { // should this go inside Mint somehow? | |
def getBalance(): Int // hmm... num type? typeclass trick? | |
def sprout(): Purse | |
def getDecr(): Object | |
def deposit(amount: Int, src: Purse) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import sys | |
import logging | |
import sqlalchemy | |
def main(): | |
logging.basicConfig(level=logging.DEBUG, stream=sys.stderr) | |
sl = logging.getLogger('sqlalchemy') | |
sl.setLevel(logging.DEBUG) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
********************************************************************** | |
File "heron_policy.py", line 77, in heron_policy | |
Failed example: | |
facreq.user.repository_authz() | |
Exception raised: | |
Traceback (most recent call last): | |
File "/usr/lib/python2.6/doctest.py", line 1253, in __run | |
compileflags, 1) in test.globs | |
File "<doctest heron_policy[20]>", line 1, in <module> | |
facreq.user.repository_authz() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''url_update -- assist in migrating URLs of Frontiers Research pages | |
>>> web_ua = _MostPagesOKButSome404(('20-million-clinical', 'out-big-5')) | |
>>> site = Frontiers(web_ua) | |
>>> src, dest = site.redirects[0] | |
>>> print site.verified_redirect(src, dest) | |
Redirect permanent /news.html http://frontiersresearch.org/frontiers/news | |
>>> print site.gone(site.retired[0]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://dl.rust-lang.org/doc/0.4/tutorial.html#getting-started | |
// http://www.madmode.com/2011/11/capability-security-in-e-coffescript.html | |
// http://gitorious.org/repo-roscidus/e-core/blobs/fdf9643e419eea182b4d8d983f5b9955c7b73967/src/jsrc/org/erights/e/elib/sealing/SealedBox.java | |
extern mod std; | |
use cmp::{Eq}; | |
mod sealing { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern mod std; // else --test goes wonky | |
extern mod rparse; // https://github.com/jesse99/rparse or: cargo install rparse | |
use rparse::{Parser, Combinators, ParseFailed, match0 }; | |
pub fn space() -> Parser<@~str> { match0(|ch| ws_char.contains_char(ch)) } | |
const ws_char: &str = &" \t\r\n\x0A"; | |
#[cfg(test)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connolly@pav:~/src/rust$ git pull origin | |
remote: Counting objects: 5323, done. | |
remote: Compressing objects: 100% (1656/1656), done. | |
remote: Total 4469 (delta 3494), reused 3682 (delta 2804) | |
Receiving objects: 100% (4469/4469), 1.26 MiB | 783 KiB/s, done. | |
Resolving deltas: 100% (3494/3494), completed with 396 local objects. | |
From https://github.com/mozilla/rust | |
4dc67c5..de0268b incoming -> origin/incoming | |
07edf90..68c73dc master -> origin/master | |
cd6f24f..be6613e snap-stage3 -> origin/snap-stage3 |
OlderNewer