Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

dongzhuoyao dongzhuoyao

💭
I may be slow to respond.
  • Peking University
View GitHub Profile
View gist:9d4f0e75904f47b941bef958080d3220
import torch
from torch import nn
from torch.nn import functional as F
import math
class LayerNorm(nn.Module):
def __init__(self, eps=1e-6):
super().__init__()
self.eps = eps
View ivi-install-gcc5.4.md

1GPU:

srun -u --pty --gres=gpu:1 --mem=60G --cpus-per-task=10 --time=6-23 bash -i

4GPU--das5:

srun -u --pty --gres=gpu:4 --time=6-23 bash -i

4GPU--ivi:

View gist:b1c0eb9b7596efd90f919f2233a045b0
srun -u --pty --gres=gpu:1 --mem=60G --cpus-per-task=20 --time=6-23 bash -i
srun -u --pty --gres=gpu:1 --mem=60G --cpus-per-task=20 --time=6-23 python myscript.py
@dongzhuoyao
dongzhuoyao / music_oversea.txt
Created Nov 17, 2018 — forked from 0x5e/music_oversea.txt
绕过海外音乐版权限制(网易云音乐、QQ音乐、酷狗音乐、酷我音乐、百度音乐)
View music_oversea.txt
Iee9keaYk+mfs+S5kAp8fG11c2ljLjE2My5jb20KQEAqLm11c2ljLjEyNi5uZXQKCiFRUemfs+S5kAp8
fHkucXEuY29tXgp8fGkueS5xcS5jb20vdjgvcGxheXNvbmcuaHRtbAp8fGMueS5xcS5jb20vdjgvZmNn
LWJpbi9mY2dfcGxheV9zaW5nbGVfc29uZy5mY2cKQEBkbC5zdHJlYW0ucXFtdXNpYy5xcS5jb20KCiHp
hbfni5fpn7PkuZAKfHxrdWdvdS5jb21eCnx8aXAua3Vnb3UuY29tL2NoZWNrL2lzY24KQEBmcy5vcGVu
Lmt1Z291LmNvbQoKIemFt+aIkemfs+S5kAp8fGt1d28uY25eCnx8aXBjaGVjay5rdXdvLmNuL2lwX2No
ZWNrLmt1d28KQEBzeWNkbi5rdXdvLmNuXgoKIeeZvuW6pumfs+S5kAp8fG11c2ljLmJhaWR1LmNvbS9k
YXRhL3VzZXIvbG9jYXRpb24KQEB5aW55dWVzaGl0aW5nLmJhaWR1LmNvbQo=
View gist:16a937053bff06e074cf272f2e2e4c91
###LIST
###DAS
1. install conda locally(very easy)
2. change .bashrc
@dongzhuoyao
dongzhuoyao / install_opencv3.sh
Last active Jul 21, 2018
Install OpenCV 3 with Python 2.7 on Ubuntu
View install_opencv3.sh
# Configuration
HOME_DIR=/home/[user]/
VERSION=3.1.0
# Installation
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y build-essential cmake pkg-config
sudo apt-get install -y libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
View install_opencv2_ubuntu.sh
#!/bin/bash
################################################################################
### OpenCV2 Installation Script ###
################################################################################
# Source code at https://github.com/arthurbeggs/scripts #
################################################################################
# #
# Feel free to copy and modify this file. Giving me credit for it is your #
# choice, but please keep references to other people's work, which I don't #
View gist:3d5957a349c506cb7ad0022e1df0e26e
```
sudo fdisk -l
sudo mount -t ext4 /dev/sda1 /data1 &&
sudo mount -t ext4 /dev/sdb1 /data2 &&
sudo mount -t ext4 /dev/sdc1 /data3 &&
sudo mount -t ext4 /dev/sde1 /data4 &&
sudo mount -t ext4 /dev/sdf1 /data5 &&
sudo mount -t ext4 /dev/sdg1 /data6
```
@dongzhuoyao
dongzhuoyao / Install NVIDIA Driver and CUDA.md
Last active Jun 7, 2018 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
View Install NVIDIA Driver and CUDA.md
@dongzhuoyao
dongzhuoyao / py3.5_ubuntu_14.04.txt
Created May 29, 2018 — forked from larainema/py3.5_ubuntu_14.04.txt
how to install python3.5 on ubuntu 14.04
View py3.5_ubuntu_14.04.txt
Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at
https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes
Do the usual:
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.5
It will not overwrite your existing python3.4 which is still symlinked as python3. If you want python3.5 to be the default python3, change the symlink
You can’t perform that action at this time.