Skip to content

Instantly share code, notes, and snippets.

View Anirudh257's full-sized avatar
💭
Hustling

Anirudh Thatipelli Anirudh257

💭
Hustling
View GitHub Profile
@TengdaHan
TengdaHan / ddp_notes.md
Last active July 2, 2024 06:39
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.
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@zhanwenchen
zhanwenchen / Install NVIDIA Driver and CUDA.md
Last active March 13, 2024 23:42 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
@thanasi
thanasi / jupyter_local_video.py
Last active February 15, 2022 08:48
Embed a local video file in a Jupyter Notebook
#########################################
# using cell magic
#########################################
%%HTML
<div align="middle">
<video width="80%" controls>
<source src="path/to/my.mp4" type="video/mp4">
</video></div>
#########################################
@frfahim
frfahim / install virtualenv ubuntu 16.04.md
Last active May 20, 2024 06:45
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@akiross
akiross / Convolutional Arithmetic.ipynb
Last active March 12, 2024 16:31
Few experiments on how convolution and transposed convolution (deconvolution) should work in tensorflow.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mstankie
mstankie / import-plt.py
Created June 15, 2016 19:33
Two images side-by-side using matplotlib (pylab)
import matplotlib.pyplot as plt
@bearpaw
bearpaw / LMDB_val_patches.txt
Last active January 26, 2024 06:50
Read LMDB in python
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000001.jpg 1
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000002.jpg 1823
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000003.jpg 2903
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000004.jpg 4470
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000005.jpg 4698
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000006.jpg 4797
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000007.jpg 4917
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000008.jpg 5072
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000009.jpg 5177
./cache/flic_win/LMDB/LMDB_val_patches/casino-royale-00039871_00000001_000010.jpg 5271
@nhmc
nhmc / calc_bg.py
Created November 16, 2012 10:43
Calculate the background and RMS of an astronomical image
import numpy as np
def calc_bg(a):
""" Estimate the background level and rms. """
good = ~np.isnan(a)
assert good.sum(), 'no good pixels!'
# poor man's source detection...
vmax = np.percentile(a[good], 80)
c0 = a[good] < vmax
temp = a[good][c0]