Skip to content

Instantly share code, notes, and snippets.

View GzuPark's full-sized avatar
🍀
just enjoy your playing

Jongmin Park GzuPark

🍀
just enjoy your playing
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
# Check for CUDA and try to install.
# https://gitlab.com/nvidia/cuda/blob/ubuntu16.04/9.0/base/Dockerfile
apt-get update && apt-get install -y --no-install-recommends ca-certificates apt-transport-https gnupg-curl && \
rm -rf /var/lib/apt/lists/* && \
NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \
#!/bin/bash
# download from a package
# https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-from-a-package
# https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/
wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_18.06.0~ce~3-0~ubuntu_amd64.deb
wget https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
sudo dpkg -i docker-ce_*.deb
#!/bin/bash
sudo apt-get update
sudo apt-get install curl
# latest version
# https://repo.continuum.io/archive/
curl -O https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
# recommend install directory
@GzuPark
GzuPark / .screenrc
Created July 18, 2018 17:45
screen setting
defscrollback 5000
termcapinfo xterm* ti@:te@
startup_message off
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n*%t%{-}%+w %= %c ${USER}@%H"
bindkey -k k1 select 0
bindkey -k k2 select 1
bindkey -k k3 select 2
@GzuPark
GzuPark / setup.sh
Last active July 18, 2018 17:46
CUDA, NCCL, CUDNN, TensorFlow, and PyTorch
#!/bin/bash
# Check for CUDA and try to install.
# https://gitlab.com/nvidia/cuda/blob/ubuntu16.04/9.0/base/Dockerfile
apt-get update && apt-get install -y --no-install-recommends ca-certificates apt-transport-https gnupg-curl && \
rm -rf /var/lib/apt/lists/* && \
NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \
@GzuPark
GzuPark / jupyter_notebook_config.py
Last active July 18, 2018 17:11
No token, No password jupyter notebook
c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.port = 8888
c.NotebookApp.open_browser = False
c.NotebookApp.token = u''
#!/bin/bash
echo "Kind: $1"
echo "Session: $2"
echo "Epochs Start: $3"
echo "Epochs End: $4"
echo "Account: $name"
if [ $name -eq ""]; then
name="깃계정"
fi
@GzuPark
GzuPark / data_loader.py
Created April 12, 2018 12:09 — forked from kevinzakka/data_loader.py
Train, Validation and Test Split for torchvision Datasets
"""
Create train, valid, test iterators for CIFAR-10 [1].
Easily extended to MNIST, CIFAR-100 and Imagenet.
[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4
"""
import torch
import numpy as np
@GzuPark
GzuPark / Excercise_SQL.md
Created March 6, 2018 15:32
SQL 실습, Big Data (2018 spring), Postechx

1. Write a SQL query that is equivalent to the following relational albebra expression.

  • π_{term} (σ_{docid=2}(Documents)) U π_{term} (σ_{count=3}(Documents))
  • Try both union and union all to see the difference
  • Try "or" instead of "union" and compare results with using union

Answer

  • input