Skip to content

Instantly share code, notes, and snippets.

Nathan Baker sobolevnrm

View GitHub Profile
sobolevnrm /
Created Aug 21, 2016
A very simple RIS file parser
""" Process RIS format following the standard at", """
import re
ALLOWED_TAGS = {"TY" : "Record start",
"ER" : "Record end",
"A2" : "Secondary author",
"A3" : "Tertiary Author",
"A4" : "Subsidiary Author",
"AB" : "Abstract",
sobolevnrm / pdb-query.xml
Created Dec 23, 2015
Find PDB structures which are good candidates for pKa calculations.
View pdb-query.xml
<orgPdbCompositeQuery version="1.0">
<description>Number of Chains Search : Min Number of Chains=1 Max Number of Chains=1</description>
sobolevnrm /
Created Nov 24, 2015
I am trying to create the object of a class when I have only the string of the class name avoiding a bunch of conditionals
# I have lots of classes with very similar constructors. I'd like to avoid a huge if elseif ... statement
# This works when all classes are specified in the global scope but breaks across modules -- it also doesn't seem very safe
class Foo:
def __init__(self): = "FOOBAR"
class_name = "Foo"
ctor = globals()[class_name]
obj = ctor()
Transform exported data from OmniFocus into RememberTheMilk Smart Add file. Fields from
OmniFocus are expected to be:
Task ID,Type,Name,Status,Project,Context,Start Date,Due Date,Completion Date,Duration,Flagged,Notes
import csv
import sys
from datetime import datetime
sobolevnrm / Things extractor.scpt
Created Oct 25, 2015
Applescript to extract tasks from
View Things extractor.scpt
tell application "Things"
set todo_output to "
repeat with the_list in lists
set list_name to name of the_list
set list_todos to to dos of the_list
repeat with the_todo in list_todos
if status of the_todo is open then
set todo_name to name of the_todo
set todo_due to due date of the_todo
You can’t perform that action at this time.