Skip to content

Instantly share code, notes, and snippets.

View yunhan0's full-sized avatar
:octocat:
Creating

Yunhan Li yunhan0

:octocat:
Creating
View GitHub Profile
@yunhan0
yunhan0 / Multiprocessing.py
Created July 20, 2017 02:50
MultiprocessingPython
from multiprocessing import Process
def func1():
for i in range(0, 1000):
print i
def func2():
print "hello world"
if __name__ == '__main__':
@yunhan0
yunhan0 / LargeFileProcessing.py
Last active July 13, 2017 06:07
Example of processing large data file without running out of memory.
#!/usr/bin/python
# Yunhan Li
# Example of processing large data file without running out of memory.
import sys, os, time
def processFile(filename, output):
bufferlimit = 10000
buffer = []
start_tic = time.clock()