Skip to content

Instantly share code, notes, and snippets.

View bikemule's full-sized avatar

bikemule

  • Kraken Technologies
  • Brooklyn, NY
View GitHub Profile
@gregsadetsky
gregsadetsky / settings.py
Last active May 28, 2021 18:37
See: http://stackoverflow.com/questions/13705328/ -- I was looking for a way to run Selenium tests for a Django app on a staging server hosted on Heroku using a PostgreSQL database. The DjangoTestSuiteRunner creates and destroys the whole database before/after testing, which would not work on Heroku where databases are added via other means (her…
import dj_database_url
TEST_DATABASES = {
'default': dj_database_url.config(env='TEST_DATABASE_URL')
}
# replace path below to point to HerokuTestSuiteRunner class
TEST_RUNNER = 'python.path.to.test_suite_runner.HerokuTestSuiteRunner'
@shobhit
shobhit / k-means.py
Created October 25, 2012 07:12
Using python and k-means to find the dominant colors in images
from collections import namedtuple
from math import sqrt
import random
try:
import Image
except ImportError:
from PIL import Image
Point = namedtuple('Point', ('coords', 'n', 'ct'))
Cluster = namedtuple('Cluster', ('points', 'center', 'n'))
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@kolber
kolber / pandoras_vox.mdown
Created March 20, 2012 05:23
pandora’s vox: on community in cyberspace

pandora’s vox: on community in cyberspace

by humdog (1994)

when i went into cyberspace i went into it thinking that it was a place like any other place and that it would be a human interaction like any other human interaction. i was wrong when i thought that. it was a terrible mistake.

the very first understanding that i had that it was not a place like any place and that the interaction would be different was when people began to talk to me as though i were a man. when they wrote about me in the third person, they would say “he.” it interested me to have people think i was “he” instead of “she” and so at first i did not say anything. i grinned and let them think i was “he.” this went on for a little while and it was fun but after a while i was uncomfortable. finally i said unto them that i, humdog, was a woman and not a man. this surprised them. at that moment i realized that the dissolution of gender-category was something that was happening everywhere, and perhaps it was only just very obvious on the ne