Skip to content

Instantly share code, notes, and snippets.

View jdidion's full-sized avatar

John Didion jdidion

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-US">
<info>
<title>National Library of Medicine (grant proposals with PMCID/PMID) - Author, Year</title>
<title-short>NLMAuthorYear</title-short>
<id>http://www.zotero.org/styles/national-library-of-medicine-grant-proposals</id>
<link href="http://www.zotero.org/styles/national-library-of-medicine-grant-proposals" rel="self"/>
<link href="http://www.nlm.nih.gov/pubs/formats/recommendedformats1991-full.pdf" rel="documentation"/>
<link href="http://publicaccess.nih.gov/citation_methods.htm" rel="documentation"/>
<link href="http://grants.nih.gov/grants/funding/424/SF424_RR_Guide_General_Adobe_VerC.pdf" rel="documentation"/>
@jdidion
jdidion / multiprocessing-test.py
Created February 29, 2016 21:13
A test of two different ways to implement a multiprocessing architecture for the problem "Read lines from a file, split them into chunks, have workers process the chunks in parallel, and have a writer thread write the results to an output file."
# Example of two different structures for multiprocessing code.
# The first uses queues to move chunks of data between the reader
# thread (which is the main process), the worker threads (which
# do the actual computation), and the writer thread (which writes
# the results to a file). The second using shared memory Values
# and Arrays: the reader thread reads data directly into shared
# memory char arrays, and each worker process the data in an array
# and writes the result back to that array; the writer thread
# copies the data from the finished char arrays to the output file.
#