Skip to content

Instantly share code, notes, and snippets.

View zhangfeiran's full-sized avatar

Feiran Zhang zhangfeiran

  • Company
  • Location
View GitHub Profile
@Roardom
Roardom / qbit-fastresume-path-changer.py
Created December 7, 2021 15:55
Replace paths easily in qBittorrent .fastresume (useful when switching from windows to linux)
import os
import re
# Insert the path where you keep your fast resume files here.
# Make a backup first!!!
torrentsDir = r'/torrents/'
# Insert paths to be replaced here. Dictionary key is current path. Dictionary value is new path
# If left empty, the script will only detect paths
@2torus
2torus / monitor_notebooks.py
Last active July 1, 2022 07:09
Get operating system information about jupyter notebooks from https://stackoverflow.com/a/44936664/996379
"""
Prints notebook's pid, memory and gpu memory utilization
The code is from https://stackoverflow.com/a/44936664/996379
Also gpu code is from https://gist.github.com/takuseno/2958caf1cb5e74314a9b5971999182b2
Usage:
python monitor_notebooks.py $notebook_token
if token is not supplied, it will prompt you for a token.
"""
import os
import os.path
@victor-perez
victor-perez / git.bat
Last active June 5, 2025 20:47
Use WSL git inside VS Code from Windows 10 17046
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
::this also support calls that contains a absolute windows path
::check of one of the params contain a absolute windows path
echo.%* | findstr /r /c:"[a-z]:[\\/]" > nul
if %errorlevel% == 1 (
::if not just git with the given parameters
call :git %*
@idbrii
idbrii / botw-cedec2017.md
Last active August 31, 2025 13:12
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo