Skip to content

Instantly share code, notes, and snippets.

View vinjn's full-sized avatar

Jing Zhang vinjn

View GitHub Profile
@mcarilli
mcarilli / nsight.sh
Last active April 9, 2024 08:28
Favorite nsight systems profiling commands for Pytorch scripts
# This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting.
# https://developer.nvidia.com/nsight-systems
# https://docs.nvidia.com/nsight-systems/profiling/index.html
# My preferred nsys (command line executable used to create profiles) commands
#
# In your script, write
# torch.cuda.nvtx.range_push("region name")
# ...
@banyudu
banyudu / free-docker-space-in-wsl2.blog.md
Last active May 3, 2024 20:14
WSL2 Docker释放磁盘空间

WSL2 Docker释放磁盘空间

Docker使用久了,会残留很多中间生成的镜像,占用磁盘空间。

要清理Docker镜像,本来是挺简单的,一条命令就搞定了:

@TengdaHan
TengdaHan / ddp_notes.md
Last active April 22, 2024 00:19
Multi-node-training on slurm with PyTorch

Multi-node-training on slurm with PyTorch

What's this?

  • A simple note for how to start multi-node-training on slurm scheduler with PyTorch.
  • Useful especially when scheduler is too busy that you cannot get multiple GPUs allocated, or you need more than 4 GPUs for a single job.
  • Requirement: Have to use PyTorch DistributedDataParallel(DDP) for this purpose.
  • Warning: might need to re-factor your own code.
  • Warning: might be secretly condemned by your colleagues because using too many GPUs.
@codewings
codewings / __init__.py
Last active August 16, 2023 07:18
Intel GPA plugin used for asset dumping
import json
import os
import plugin_api
#
def IsUsefulInput(viewtype):
return viewtype == "CBV" or viewtype == "IBV" or viewtype == "VBV" or viewtype == "SRV"
def DumpBufferByDrawcall(folder, call, res, id, texture):
if not os.path.exists(folder):
commit 6fac225de0575b18550f9421196f90a2279c44af
Author: Tiago Koji Castro Shibata <tiago.shibata@gmail.com>
Date: Fri Dec 28 23:13:14 2018 -0200
Fix compilation with latest OpenCV
C APIs were removed and must be replaced with C++ calls
diff --git a/Makefile b/Makefile
index 63e15e6..c148d4b 100644
@Mxhmovd
Mxhmovd / cap.py
Created October 22, 2018 20:36
Read Youtube videos with OpenCV without downloading it locally.
#pip install pafy
#sudo pip install --upgrade youtube_dl
import cv2, pafy
url = "https://www.youtube.com/watch______"
video = pafy.new(url)
best = video.getbest(preftype="webm")
#documentation: https://pypi.org/project/pafy/
capture = cv2.VideoCapture(best.url)
@cebolan
cebolan / darknet53.cfg
Created June 12, 2018 04:53
Darknet53 classification model
[net]
# Training
# batch=128
# subdivisions=2
# Testing
batch=1
subdivisions=1
height=256
// ==UserScript==
// @name sketchfab2obj
// @description Save Sketchfab models as obj
// @author <anonimus>
//
// Version Number
// @version 1.62
//
// Urls process this user script on
// @include /^https?://(www\.)?sketchfab\.com/models/.*
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
rem choco install visualstudio2013professional %1 -y
rem choco install visualstudio2015professional %1 -y
rem choco install teamviewer9 %1 -y
chocolatey install paint.net %1 -y
chocolatey install tortoisegit %1 -y
chocolatey install tortoisesvn %1 -y
chocolatey install autodesk-fusion360 %1 -y
chocolatey install f.lux %1 -y
chocolatey install sysinternals %1 -y