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
@jit | |
def forward(state): | |
return forward_ik(state["angles"], state["lengths"]) | |
@jit | |
def checker(state): | |
end_location = forward(state) | |
distance = jnp.linalg.norm(end_location - state["target"]) | |
return distance > 0.00001 |
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
@jit | |
def forward_ik(angles, lengths): | |
x = jnp.cos(angles) | |
y = jnp.sin(angles) | |
d = jnp.stack([x,y], axis=0) | |
return jnp.dot(d, lengths) | |
@jit | |
def forward(state): | |
return forward_ik(state["angles"], state["lengths"]) |
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
import numpy as np | |
# forward kinematics | |
def forward(theta, l): | |
ex = np.dot(l, np.cos(theta)) | |
ey = np.dot(l, np.sin(theta)) | |
return np.array([ex, ey]) | |
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
job "toaster-mnist" { | |
datacenters = ["us-aep-1-prod-multipaas-1"] | |
type = "batch" | |
group "toaster-mnist-group" { | |
task "toaster-mnist-task" { | |
driver = "docker" |
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
cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=/usr/local \ | |
-D INSTALL_PYTHON_EXAMPLES=ON \ | |
-D WITH_CUDA=ON \ | |
-D ENABLE_FAST_MATH=1 \ | |
-D CUDA_FAST_MATH=1 \ | |
-D WITH_CUBLAS=1 \ | |
-D INSTALL_C_EXAMPLES=OFF \ | |
-D OPENCV_ENABLE_NONFREE=ON \ | |
-D OPENCV_EXTRA_MODULES_PATH=~/Libraries/opencv_contrib-4.0.1/modules \ |
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 <iostream> | |
#include <algorithm> | |
#include <vector> | |
#include <iterator> | |
#include <memory> | |
using namespace std; | |
typedef vector<float> Point; |
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
name: travelbug | |
channels: | |
- anaconda | |
- conda-forge | |
- defaults | |
dependencies: | |
- pandas | |
- pyarrow | |
- arrow-cpp | |
- parquet-cpp |
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
\documentclass{amsart} | |
\usepackage{amssymb} | |
\usepackage[no-math]{fontspec} | |
%\usepackage[mathlf,footnotefigures]{MinionPro} | |
\usepackage{amsmath} | |
\usepackage{MnSymbol} | |
\usepackage[USenglish]{babel} |
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
width = 1024; | |
height = 1024; | |
numpixels = width * height; | |
x = linspace(-1, 1, width); | |
y = linspace(-1, 1, height); |
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 datetime import datetime | |
import tensorflow as tf | |
now = datetime.utcnow().strftime("%Y%m%d%H%M%S") | |
root_logdir = "tf_logs" | |
logdir = "{}/run-{}/".format(root_logdir, now) | |
n_epochs = 20 | |
time_step = 0.1 |
NewerOlder