Instantly share code, notes, and snippets.

View collaborators_list.py
#!/usr/bin/env python
"""
Script for generating collaborators in a csv file from a bibtex, for easy
insertion into the new NSF format.
"""
from __future__ import division
import datetime
View reqman
#!/usr/bin/env python
import subprocess
import sys
import argparse
import warnings
import re
import pkg_resources
View SP's Approved Eating Places in SoCal.md

SP's Approved Eating Places in SoCal

List is not ranked. At this level, food preference dominates.

Chinese

  1. Chun's Seafood and Grill - 9355 Kearny Mesa Rd, San Diego, CA 92126. Good Shanghainese. The Lion's Head Casserole is decent. On weekends, the brunch is excellent with reasonable soy bean curd and deep fried fritters.

  2. China Max - 4698 Convoy St C101, San Diego, CA 92111. The only reasonable dim sum place in SD. Jasmine down the street is ok and offers an authentic "cart-style" experience, but extremely busy. Personally, think China Max is better food-wise.

View cleangd
#!/usr/bin/env python
import os
import glob
import re
import shutil
import filecmp
"""
Simple script for cleaning Google Drive of bad renames (e.g., add " (1)" to file or folder names)
View pyltx
#!/usr/bin/env python
"""
pyltx is a script with some useful tools to working with LaTeX.
Run "pyltx -h" to see what it can do.
Some basic functionality include:
1. Compiling latex with multiple repetitions to ensure correct references,
with options to clean previous output files and build a file with an
integrated bibliography.
View convert_struct.py
#!/usr/bin/env python
import json
import urllib
import urllib2
import sys
if len(sys.argv) != 4:
print('Usage is "python convert_struct.py filename input_format output_format".'
'Input/output formats should be any one of poscar, cif, cssr or mson')
View mp_reaction.py
#!/usr/bin/env python
from pymatgen.matproj.rest import MPRester
from pymatgen import Composition
from pymatgen.entries.computed_entries import ComputedEntry
from pymatgen.core.physical_constants import EV_PER_ATOM_TO_KJ_PER_MOL
from pymatgen.analysis.reaction_calculator import ComputedReaction
#This initializes the REST adaptor. Put your own API key in.
a = MPRester("YOUR_API_KEY")
View mp_phase_diagram.py
#!/usr/bin/env python
from pymatgen.matproj.rest import MPRester
from pymatgen.phasediagram.pdmaker import PhaseDiagram
from pymatgen.phasediagram.plotter import PDPlotter
#This initializes the REST adaptor. Put your own API key in.
a = MPRester("YOUR_API_KEY")
#Entries are the basic unit for thermodynamic and other analyses in pymatgen.