Skip to content

Instantly share code, notes, and snippets.

View qinjian623's full-sized avatar

Qin Jian qinjian623

View GitHub Profile
@qinjian623
qinjian623 / jec.install
Last active August 29, 2015 14:03
Install my emacs config for python/c/c++/emacs lisp development on ubuntu.
## 安装依赖包
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
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
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"
@qinjian623
qinjian623 / onnx2pytorch.py
Last active September 26, 2024 13:55
ONNX file to Pytorch model
import onnx
import struct
import torch
import torch.nn as nn
import torchvision as tv
import warnings
# enum DataType {
# UNDEFINED = 0;