Skip to content

Instantly share code, notes, and snippets.

Avatar
👁️

Shyue Ping Ong shyuep

👁️
View GitHub Profile
View qtools.py
#!/usr/bin/env python
"""
Script for managing PBS queue systems. Only dependencies required are
xmltodict and tabulate, which are easily pip installable.
"""
import os
import sys
import re
@shyuep
shyuep / collaborators_list.py
Last active Jun 15, 2019
Generates a NSF collaborator list from a bibtex.
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
@shyuep
shyuep / reqman
Last active Aug 21, 2019
Requirements.txt manager
View reqman
#!/usr/bin/env python
import subprocess
import sys
import argparse
import warnings
import re
from pkg_resources import get_distribution, parse_version, DistributionNotFound
@shyuep
shyuep / SP's Approved Eating Places in SoCal.md
Last active May 13, 2017
SP's Approved Eating Places in SoCal
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.

@shyuep
shyuep / cleangd
Last active Dec 13, 2015
Clean Google Drive
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)
@shyuep
shyuep / pyltx
Last active Jun 11, 2017
pyltx is a script with some useful tools to working with LaTeX. Download or clone it, give it executable permissions, and then run "pyltx -h" to see what it can do.
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.
@shyuep
shyuep / convert_struct.py
Last active Dec 21, 2015
A simple, no-dependencies script to convert a structure to and from various formats using the MAVRL's matgenie REST interface.
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')
@shyuep
shyuep / mp_reaction.py
Created Sep 1, 2012
Getting calculated and experimental reaction energies using the Materials API + pymatgen.
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")
@shyuep
shyuep / mp_phase_diagram.py
Created Sep 1, 2012
Phase stability using the Materials API + pymatgen.
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.
You can’t perform that action at this time.