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
apt update | |
apt install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb ffmpeg xorg-dev python-opengl libboost-all-dev libsdl2-dev swig | |
pip3 install pyvirtualdisplay piglet gym torch torchvision | |
pip3 install "gym[atari]" | |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
[summary] | |
mm 単位になっているstlファイルを m 単位に変換する | |
[description] | |
python mm_to_m.py sample.stl | |
のように実行すると、sample_m.stlという名前の m 単位に変換したファイルを保存する。 |
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
export DefaultImModule=fcitx | |
export GTK_IM_MODULE=fcitx | |
export QT_IM_MODULE=fcitx | |
export XMODIFIERS="@im=fcitx" |
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
#!/bin/bash | |
sudo apt update && sudo apt upgrade -y | |
# install tmux and mosh | |
sudo apt install tmux mosh curl | |
# install docker | |
# sudo apt install nvidia-container-toolkit # uncomment if you want to use gpus | |
sudo curl -fsSL https://get.docker.com -o get-docker.sh |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Python: Remote Attach", | |
"type": "python", | |
"request": "attach", |
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
for file in *.png; do | |
convert $file eps2:${file%.*}.eps ; | |
done | |
for file in *.jpg; do | |
convert $file eps2:${file%.*}.eps ; | |
done |
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
# after run sh 'build_env_colab.sh', run | |
# import sys | |
# sys.path.append('/usr/local/lib/python3.6/site-packages/') | |
# in the python. | |
# To run the gym in server, pyvirtualdisplay is the best solution | |
# see https://qiita.com/ikeyasu/items/ec3c88ce13a2d5e41f26 | |
# install anaconda | |
wget https://repo.anaconda.com/archive/Anaconda3-5.1.0-Linux-x86_64.sh |
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 |
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 |
NewerOlder