Skip to content

Instantly share code, notes, and snippets.

View jonasschneider's full-sized avatar

Jonas Schneider jonasschneider

View GitHub Profile
@jonasschneider
jonasschneider / [email protected]
Last active October 15, 2020 20:46
python with speed
class PythonAT38 < Formula
desc "Interpreted, interactive, object-oriented programming language"
homepage "https://www.python.org/"
url "https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz"
sha256 "2646e7dc233362f59714c6193017bb2d6f7b38d6ab4a0cb5fbac5c36c4d845df"
bottle do
sha256 "4bd9406b5d69313fcef3e572f85398ff9d7e2ab34eaf40c087bd0b4e87439ea8" => :catalina
sha256 "511b4f2c3993f000516938ed0700936c8a7d8c054b5171fa733ac7d344291c30" => :mojave
sha256 "86652428afa471b42ddba7028de02767d933f35f55e538b362c9cc219e972405" => :high_sierra
{"trackers": {"id": 0, "markers": [{"id": 0, "name": "0", "options": "pos=11.7,15.0,-6.3"}, {"id": 1, "name": "1", "options": "pos=88.3,15.0,-6.3"}, {"id": 2, "name": "2", "options": "pos=111.7,15.0,-6.3"}, {"id": 3, "name": "3", "options": "pos=188.3,15.0,-6.3"}, {"id": 4, "name": "4", "options": "pos=11.7,6.258,5.0"}, {"id": 5, "name": "5", "options": "pos=188.3,6.258,5.0"}, {"id": 6, "name": "6", "options": "pos=11.7,3.742,-15.084"}, {"id": 7, "name": "7", "options": "pos=188.3,3.742,-15.084"}]}}
class Bazel < Formula
desc "Google's own build tool"
homepage "https://bazel.build/"
url "https://github.com/bazelbuild/bazel/releases/download/0.18.0/bazel-0.18.0-dist.zip"
sha256 "d0e86d2f7881ec8742a9823a986017452d2da0dfe4e989111da787cb89257155"
bottle do
cellar :any_skip_relocation
sha256 "7360b538438b92a875b46470b3f0a677917252e3b4e070b5cc7a0d6a7a05ff17" => :mojave
sha256 "0b1f98a379e433b88ee3270d9e62614137cf9bed4ab51122dd5271ad24644e2f" => :high_sierra
class Protobuf < Formula
desc "Protocol buffers (Google's data interchange format)"
homepage "https://github.com/google/protobuf/"
url "https://github.com/google/protobuf/archive/v3.5.1.tar.gz"
sha256 "826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f"
head "https://github.com/google/protobuf.git"
bottle do
sha256 "5f55e9d369bfc4b6c910010ecfa549ddeb394e1934f3b231295d30348f8823ca" => :high_sierra
sha256 "c354f6c84d6454be78a8cec4e26726f87ff8c9322a834a215e162ba07e6fc9fc" => :sierra
@jonasschneider
jonasschneider / bench_new.py
Last active June 27, 2017 19:18
mujoco-py 0.5.7 vs 1.50.0.1
import mujoco_py
import timeit
T = 1000
NSIM = 100
def test():
model = mujoco_py.load_model_from_path(
2017-02-23 12:29:01.517696 PST | [conopt-particle-4-2_2017_02_23_12_25_06_0001] -------------------- --------------
2017-02-23 12:29:01.517800 PST | [conopt-particle-4-2_2017_02_23_12_25_06_0001] Epoch 26
2017-02-23 12:29:01.517858 PST | [conopt-particle-4-2_2017_02_23_12_25_06_0001] CurriculumIdx 0
2017-02-23 12:29:01.517907 PST | [conopt-particle-4-2_2017_02_23_12_25_06_0001] LearningRate 0.01
2017-02-23 12:29:01.517956 PST | [conopt-particle-4-2_2017_02_23_12_25_06_0001] NoImprovementEpochs 0
2017-02-23 12:29:01.518003 PST | [conopt-particle-4-2_2017_02_23_12_25_06_0001] AverageTrainLoss 3.43236e-05
2017-02-23 12:29:01.518049 PST | [conopt-particle-4-2_2017_02_23_12_25_06_0001] AverageTestLoss 0.0115927
2017-02-23 12:29:01.518097 PST | [conopt-particle-4-2_2017_02_23_12_25_06_0001] NPolicyParams 1346
2017-02-23 12:29:01.518143 PST | [conopt-particle-4-2_2017_02_23_12_25_06_0001] AvgPolicyParamNorm 0.00775844
2017-02-23 12:29:01.5
@jonasschneider
jonasschneider / gist:9e0bf96429444c89da1749225d89750a
Created January 19, 2017 06:40
Docker --cache-from not working as expected
$ docker run -ti --privileged docker:1.13.0-dind &
$ docker run -ti --privileged docker:1.13.0-dind &
(they have IPs 172.17.0.{27,28})
$ DOCKER_HOST=tcp://172.17.0.27:2375 docker/docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
$ cat sleep/Dockerfile
FROM ubuntu:14.04
RUN sleep 10
root@cbb77e9ace8b:/app# cat tftest2.py
import tensorflow as tf
xs = []
for i in range(16):
with tf.device('/gpu:1'):
xs.append(tf.ones(()))
from functools import reduce
from operator import add
jonas@31:~$ cat tftest.py
import tensorflow.python.client.device_lib
tensorflow.python.client.device_lib.list_local_devices()
jonas@31:~$ bfboost client -l "172.16.2.26;172.16.1.2" gdb python
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
FROM nvidia/cuda:7.5-cudnn4-devel-ubuntu14.04
# ========== Anaconda ==========
# https://github.com/ContinuumIO/docker-images/blob/master/anaconda/Dockerfile
RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 \
git mercurial subversion
RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
wget --no-check-certificate --quiet https://repo.continuum.io/archive/Anaconda2-2.5.0-Linux-x86_64.sh && \
/bin/bash /Anaconda2-2.5.0-Linux-x86_64.sh -b -p /opt/conda && \