Skip to content

Instantly share code, notes, and snippets.

View SamKChang's full-sized avatar

Kuang-Yu Samuel Chang SamKChang

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SamKChang
SamKChang / parallelize.py
Last active June 23, 2016 13:03
python parallel wrapper
#!/usr/bin/env python
# python parallel wrapper for simply defined functions
# it returns a list of output corresponding to each input entry
import multiprocessing as mp
import operator
from compiler.ast import flatten
import numpy as np
import sys, os
import copy_reg