This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# https://karpathy.github.io/2015/05/21/rnn-effectiveness/ | |
import numpy as np | |
def rnn_fwd(x, h_in, Wxh, Whh, Why, bh, by): | |
h_out = np.tanh(x.dot(Wxh) + h_in.dot(Whh) + bh) | |
y = h_out.dot(Why) + by | |
cache = (x, h_in, Wxh, Whh, Why, bh, by, h_out) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import tensorflow as tf | |
from scipy.stats import norm, gaussian_kde | |
def get_generator(*, | |
x_size, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import tensorflow as tf | |
def get_model(hidden_units=[64, 64], | |
activation=tf.tanh, | |
inner_optimizer=tf.train.GradientDescentOptimizer, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import numpy as np | |
from mujoco_py import load_model_from_xml, MjSim, MjViewer | |
XML = ''' | |
<mujoco> | |
<worldbody> | |
<geom name='floor' pos='0 0 0' size='5 5 .125' type='plane' condim='3'/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import RPi.GPIO as GPIO | |
import time | |
import subprocess | |
import glob | |
import os | |
import shutil | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf | |
import hashlib | |
import json | |
import random | |
import requests | |
import time | |
from collections import deque | |
from concurrent.futures import ThreadPoolExecutor | |
from http.server import BaseHTTPRequestHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM fedora:26 | |
RUN mkdir -p ~/.mujoco | |
RUN yum install -y make gcc-c++ mesa-libGL-devel mesa-libOSMesa-devel glfw redhat-rpm-config patchelf | |
RUN dnf install -y python35 | |
WORKDIR /root | |
RUN python3.5 -m venv env | |
RUN /bin/bash -c "source env/bin/activate && pip install numpy cython pillow" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rotation.py - rotation methods for GPR | |
# Many methods borrow heavily or entirely from transforms3d | |
# eventually some of these may be upstreamed, but credit to transforms3d | |
# authors for implementing the many of the formulations we use here. | |
import numpy as np | |
''' | |
Rotations | |
========= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-----------------------------------// | |
// This file is part of MuJoCo. // | |
// Copyright (C) 2016 Roboti LLC. // | |
//-----------------------------------// | |
#include "mujoco.h" | |
#include "stdio.h" | |
#include "stdlib.h" | |
#include "string.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <elf.h> | |
#include <linux/auxvec.h> | |
#include <stdio.h> | |
#include <sys/syscall.h> | |
#include <time.h> | |
void drop_vdso(char *envp[]) { | |
Elf64_auxv_t *auxv, *ehdr, *last; | |
while(*envp++ != NULL); // skip the environment vars |