Skip to content

Instantly share code, notes, and snippets.

💭
in autodiff we trust

Yutong Zhao proteneer

💭
in autodiff we trust
Block or report user

Report or block proteneer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@proteneer
proteneer / ensembles.py
Last active Jul 30, 2019
Comparison of various ensemble stabilities
View ensembles.py
# processed from https://raw.githubusercontent.com/proteneer/timemachine/8ff69ee3c7bf248a7bdc5caf9fcae2e37fdb86ac/jax/harmonic_dij.py
import functools
import time
from tqdm import tqdm
import numpy as onp
from jax.config import config; config.update("jax_enable_x64", True)
import jax
import jax.numpy as np
@proteneer
proteneer / test.py
Created May 20, 2019
Implement HVPs as batched JVPs
View test.py
import functools
import numpy as onp
import jax
import jax.numpy as np
from timemachine.potentials import bonded
param_idxs = np.array([
[0,1],
View keybase.md

Keybase proof

I hereby claim:

  • I am proteneer on github.
  • I am yutong (https://keybase.io/yutong) on keybase.
  • I have a public key whose fingerprint is A3DD C50A 4524 96E9 2A4F CFB3 91CE ACDB 2605 E878

To claim this, I am signing this object:

View gist:390ddd4ed4d165141a19
#include <OpenMM.h>
#include <iostream>
#include <fstream>
#include <limits>
using namespace OpenMM;
using namespace std;
extern "C" void registerSerializationProxies();
extern "C" void registerOpenCLPlatform();
View gist:a1bd29592809e1457f8d
import tornado.web
import tornado.httpserver
import tornado.ioloop
import process2
import tornado.netutil
import redis
import signal
import time
import sys
import os
View gist:cf5f480138d2f67cbcc1
import simtk.openmm
import simtk.unit as unit
import math
state = simtk.openmm.XmlSerializer.deserialize(open('state.xml').read())
system = simtk.openmm.XmlSerializer.deserialize(open('system.xml').read())
for i, force in enumerate(system.getForces()):
force.setForceGroup(i)
system.getForce(3).setReciprocalSpaceForceGroup(6)
@proteneer
proteneer / gist:8839171
Created Feb 6, 2014
Keyboard events Linux
View gist:8839171
#define LINUX
#ifndef LINUX
#include <conio.h> /* kbhit(), getch() */
#else
#include <sys/time.h> /* struct timeval, select() */
/* ICANON, ECHO, TCSANOW, struct termios */
#include <termios.h> /* tcgetattr(), tcsetattr() */
#include <cstdlib> /* atexit(), exit() */
View gist:7937406
count = 10000
start = time.time()
for i in range(count):
rc.set('bar',1)
rc.set('bar',1)
rc.set('bar',1)
rc.set('bar',1)
print time.time()-start
@proteneer
proteneer / gist:7916922
Last active Dec 31, 2015
python redis hash+set wrapper
View gist:7916922
import redis
rc = redis.Redis(port=6782)
rc.flushdb()
class HashSet(object):
_rc = None
_rmaps = []
@classmethod
View Polling redis
import redis
import threading
class Listener(threading.Thread):
def __init__(self, r, channels):
threading.Thread.__init__(self)
self.redis = r
self.pubsub = self.redis.pubsub()
self.pubsub.subscribe(channels)
You can’t perform that action at this time.