Skip to content

Instantly share code, notes, and snippets.

View theavey's full-sized avatar

Thomas Heavey theavey

View GitHub Profile
@theavey
theavey / wordle_helper.py
Created July 14, 2022 18:24
some simple code to narrow down remaining wordle solutions
import pandas as pd
words = pd.read_table(
"https://static.nytimes.com/newsgraphics/2022/01/25/wordle-solver/assets/solutions.txt",
header=None,
)[0]
letters = "[qwtyuiopdfghjkzxvbnm]"
words[
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@theavey
theavey / convert_Universe_to_nmd.py
Created January 28, 2019 19:10
Convert trajectory of normal modes to nmd format for visualizing with NMWiz
def convert_univ_to_nmd(u, nmd_name, title='generic_title'):
"""
Convert MDAnalysis.Universe normal mode trajectory to nmd format
u should be a MDAnalysis.Universe with each frame of the trajectory
being the cartesian displacements for a single normal mode.
For example, the trajectory written by the nmeig tool of GROMACS
(http://manual.gromacs.org/documentation/2018/onlinehelp/gmx-nmeig.html)
gives an appropriate trajectory with the -v option.
The file written with nmd_name will be in the nmd format that
@theavey
theavey / dynamics_metaclass.ipynb
Last active December 11, 2018 16:19
Use a metaclass to self-register subclasses to easily instatiate new objects and use an abstract base class
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@theavey
theavey / check_garmin_fit_file.ipynb
Created June 11, 2018 20:31
Plot GPS data points from a Garmin FIT file to check for possible errors
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.