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
## 安装依赖包 | |
sudo apt-get install -y emacs24 python-pip clang git | |
## 安装pip依赖 | |
sudo pip install elpy jedi flake8 virtualenv rope | |
## 下载配置文件 | |
cd ~ | |
mv .emacs.d emacs.d.backup | |
mv .emacs emacs.backup |
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 timeit | |
from time import time | |
def naive(): | |
ss = [] | |
for i in range(1000): | |
ss.append("a" + str(i) + "b" + str(i+1)\ | |
+ str(i+2) + str(i+2) + str(i+2) + str(i+2) + str(i+2) + str(i+2) + str(i+2) + str(i+2) + str(i+2)) | |
return ss |
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 os | |
import time | |
import torchvision as tv | |
import torch | |
import threading | |
class GPU(object): | |
def __init__(self): | |
self.header = "nvidia-smi" | |
self.tail = "--format=csv,nounits,noheader" |
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 onnx | |
import struct | |
import torch | |
import torch.nn as nn | |
import torchvision as tv | |
import warnings | |
# enum DataType { | |
# UNDEFINED = 0; |