- Use
python2notpython3 - Suppose the current working directory is
$CWD - Suppose the data path is
$DATA_PATH - Suppose the current shell is
bash - Download following
requirements.txtto current working directory - Old version of
cudainstalled(tested onv8.0.44) - Old version of
cudnninstalled(tested on7.0v4.0)
This file contains hidden or 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 | |
| def _read(dimensions, stream): | |
| if len(dimensions) == 0: | |
| return ord(stream.read(1)) | |
| elif len(dimensions) == 1: | |
| return [val for val in stream.read(dimensions[0])] | |
| else: | |
| res = [] | |
| for _ in range(dimensions[0]): |
- If you don't have a virtual environment, download
create_venv.shand do this in your working directory:source create_venv.sh - Run
run-jupyter.sbatchand follow the instructions in NYU Prince Tutorial on how to run Jupyter Notebook:sbatch run-jupyter.sbatch
- Load singularity module:
module load singularity/2.4.4- Download and unzip StarCraft II for Linux: here I take
StarCraft II 3.16for example, you could replace the link and zip file name according to SC2 Official Linux Downloads- Download zip
wget http://blzdistsc2-a.akamaihd.net/Linux/SC2.3.16.1.zip
This file contains hidden or 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
| # activate existed python3 module to get virtualenv | |
| module load python3/intel/3.6.3 | |
| # create virtual environment with python3 | |
| virtualenv -p python3 $HOME/py3tf | |
| # activate virtual environment | |
| source $HOME/py3tf/bin/activate | |
| # install tensorflow-gpu |
This file contains hidden or 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 java.util.*; | |
| // a DisjointSet instance stands for a disjoint set that knows all its nodes | |
| public class DisjointSet<T> { | |
| // the nodes in each DisjointSet instance | |
| public static class Node<T> { | |
| // the value of each node | |
| public final T val; | |
| // the parent of each node, defaut itself |