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 gym | |
from gym import wrappers | |
import numpy as np | |
import matplotlib.pyplot as plt | |
""" | |
For practicing reinforcement learning | |
observation: | |
(position,velocity) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 bash | |
function _func_create_md(){ | |
kyo=`date +%y%m%d` | |
kyo_md="${kyo}.md" | |
if ! [ -e "${kyo_md}" ]; then | |
: > "${kyo_md}" | |
fi | |
} |
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 bash | |
mass=`grep ^質量 "$1" | sed -e "s/[^0-9.]//g"` | |
echo "<mass value=\"$mass\"/>" | |
# extract ixx, ixy, ixz | |
temp=`grep Ixx "$1" | sed -e "s/[a-z = A-Z]//g"` | |
declare xx=() # declare matrix |
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
% Simulation of Kalman_Filter | |
% In this script, error_ellipse function is used. Please download here: | |
% https://www.mathworks.com/matlabcentral/fileexchange/4705-error-ellipse | |
clear; close all; | |
fig = figure; | |
hold on; | |
% Initial State | |
x0 = [0, 0].'; |
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
% Simulation of Kalman_Filter | |
% In this script, error_ellipse function is used. Please download here: | |
% https://www.mathworks.com/matlabcentral/fileexchange/4705-error-ellipse | |
clear; close all; | |
fig = figure; | |
hold on; | |
% Initial State | |
x0 = [0, 0].'; |
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
docker run -it --rm \ | |
--net=host \ | |
-e DISPLAY=$DISPLAY \ | |
-v /home/syuntoku/.Xauthority:/headless/.Xauthority:rw \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
--entrypoint=/bin/bash \ | |
lucasfischerberkeley/flowdesktop | |
# inside the container, run "conda activate flow-rllab" |
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
# install python packages | |
conda config --add channels conda-forge | |
conda install -y jupyter pytorch torchvision -c pytorch | |
conda install -y pyvirtualdisplay | |
yes | pip3 install torchvision | |
yes | pip3 install gym "gym[atari]" | |
# Configure jupyter notebook server | |
jupyter notebook --generate-config | |
echo "c = get_config()" >> ~/.jupyter/jupyter_notebook_config.py |
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 argparse | |
import torch | |
import torch.nn as nn | |
import numpy as np | |
from torch.utils.data import Dataset, DataLoader | |
import sys | |
from torch.nn.utils import clip_grad_norm_ | |
import parser | |
import torch | |
import os |
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 argparse | |
import torch | |
import torch.nn as nn | |
import numpy as np | |
from torch.utils.data import Dataset, DataLoader | |
from pytorch_pretrained_bert import BertModel, BertTokenizer | |
import torch.nn.utils.rnn as rnn | |
import torch.nn.functional as F | |
import torch.utils.data as data | |
import sys |
OlderNewer