I hereby claim:
- I am jboynyc on github.
- I am jboy (https://keybase.io/jboy) on keybase.
- I have a public key whose fingerprint is C481 C66B 553D 9DC4 3A38 0164 74A7 A4B3 3DE1 D395
To claim this, I am signing this object:
import shelve | |
from contextlib import closing | |
class Store: | |
'''Simple persistent key-value store.''' | |
def __init__(self, shelf='data.shelf'): | |
self.shelf = shelf | |
def store(self, key, value): | |
with closing(shelve.open(self.shelf)) as db: | |
db[key] = value |
I hereby claim:
To claim this, I am signing this object:
Following the announcement about the migration of Graduate Center email to the
hosted Microsoft Office365 service (and thus the gradcenter.cuny.edu
domain),
I inquired with GC IT about when our old gc.cuny.edu
addresses will expire,
since the announcement sent out by IT was unclear on this point.
According to the help desk, our old addresses will not be phased out so much as killed:
Once June 1st comes around, the @gc.cuny.edu accounts will be removed from our
(def *possible-dates* | |
["May 15" "May 16" "May 19" "June 17" "June 18" "July 14" "July 16" | |
"August 14" "August 15" "August 17"]) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(defn cheryls-birthday [possible-dates] | |
(filter all-statements possible-dates)) | |
(defn month [date] |
import beanstalkc | |
from redis import Redis | |
class UniqueQueue(object): | |
'''Stores a persistent set of added jobs in Redis to keep jobs from being | |
added to the Beanstalkd queue more than once.''' | |
def __init__(self, tube_name='default', host='localhost'): | |
self.beanstalk = beanstalkc.Connection(host=host) | |
self.beanstalk.use(tube_name) | |
self.tube = self.beanstalk.using() |
/* if you want images to drop a shadow */ | |
img { | |
box-shadow: 10px 10px 5px #888; | |
} | |
/* if you want "fleurons" instead of bullets in unordered lists */ | |
ul { | |
padding-left:1em; | |
list-style:none; | |
margin-left:0; |
I moved my solutions to a full-fledged repo, so that's where you should go looking for my latest kludges.
#!/usr/bin/env csi -ss | |
(use srfi-42) | |
(define (range from upto) | |
(list-ec (:range n from upto) n)) | |
(define (zero-length? l) | |
(= (length l) 0)) |
(use srfi-42) | |
(define (range from upto) | |
(list-ec (:range n from upto) n)) | |
(define (zero-length? l) | |
(= (length l) 0)) | |
(define (no-remainder? n d) | |
(= (remainder n d) 0)) | |
(define (rounded-sqrt n) | |
(inexact->exact (round (sqrt n)))) |