Skip to content

Instantly share code, notes, and snippets.

View JustinTArthur's full-sized avatar

Justin Turner Arthur JustinTArthur

View GitHub Profile
from typing import Callable
import vsdenoise
import vsrgtools
import vstools
vs, core = vstools.vs, vstools.core
# requires vsdenoise commit 2d7fed4 or newer
def temporal_lehmer_merge(
@j2labs
j2labs / gist:1088546
Created July 18, 2011 04:31
Concurrent pymongo inserts with Eventlet
#!/usr/bin/env python
###
### Concurrent pymongo inserts
###
import eventlet
pymongo = eventlet.import_patched('pymongo')
### Setup database connection
@amcclosky
amcclosky / gist:994139
Created May 26, 2011 21:34
This will return a list of alter table statements which drop all foreign keys from the given database in MySQL. (via http://goo.gl/9ZD9N)
SELECT concat('alter table ',table_schema,'.',table_name,' DROP FOREIGN KEY ',constraint_name,';') from information_schema.table_constraints WHERE constraint_type='FOREIGN KEY' AND table_schema='<database_name>';