Skip to content

Instantly share code, notes, and snippets.

View msultan's full-sized avatar

msultan

View GitHub Profile
import time
import random
from IPython import parallel
# create client & view
rc = parallel.Client()
dv = rc[:]
# scatter 'id', so id=0,1,2 on engines 0,1,2
import mdtraj as md
import numpy as np
n_frames = 100
coords = np.random.multivariate_normal(mean=[0, 0, 0], cov=[[2, 1, 0], [0, 1, 0], [0 ,0, 1]], size=n_frames)
coords = np.reshape(coords, (n_frames, 1, 3))
with md.XTCTrajectoryFile('output.xtc', 'w') as f:
f.write(coords)
@calstad
calstad / TDA_resources.md
Last active May 30, 2024 04:46
List of resources for TDA

Quick List of Resources for Topological Data Analysis with Emphasis on Machine Learning

This is just a quick list of resourses on TDA that I put together for @rickasaurus after he was asking for links to papers, books, etc on Twitter and is by no means an exhaustive list.

Survey Papers

Both Carlsson's and Ghrist's survey papers offer a very good introduction to the subject

Other Papers and Web Resources

@msultan
msultan / 1-ffmpeg.sh
Created November 23, 2015 23:16 — forked from mpharrigan/1-ffmpeg.sh
Make a quality movie using ffmpeg
ffmpeg -i molecule.%5d.ppm -c:v libx264 -preset slow -crf 18 molecule.mkv
# -i input filenames
# -c:v codec (libx264 --> H.264)
# -preset duh
# -crf quality factor, lower = better, 18 = practically lossless
# output filename
# For colors, make sure you're using yuv444 which should be the default in newer ffmpeg