Skip to content

Instantly share code, notes, and snippets.

View nravic's full-sized avatar

Niranjan Ravichandra nravic

View GitHub Profile
@TengdaHan
TengdaHan / ddp_notes.md
Last active April 3, 2024 21:36
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.
@svaksha
svaksha / pythontojulia.md
Created May 12, 2017 12:27 — forked from cuckookernel/pythontojulia.md
Python to Julia Quick translation / conversion reference Guide

A quick and dirty syntax translation / conversion reference guide to ease the transition between Python and Julia. This is not meant as a reference to the language. For that you should read the manual.

Some important differences

  • Arrays in Julia are indexed starting from 1.
  • In Julia classes (i.e. types) don't own methods. Methods are implementations of generic functions and are invoked in a "static style", i.e. instead of Python's str1.rstrip(), we will have rstrip( str1 ), instead of file1.close(), close( file1 ).

Some important similarities.

@nravic
nravic / html2pdf.sh
Last active July 14, 2016 16:21
wkhtmltopdf wrapper for downloading entire websites and saving 'em as pdfs
#wkhtmltopdf wrapper for multiple html input and other oddities
#requires wkhtmltopdf with patched QT library
#!bin/bash
echo "Enter webpage url to download and save as pdf, followed by [ENTER]:"
read url
echo "Enter name to save pdf as, followed by [ENTER]:"
read output
wget -r --no-parent -P temp_dir/ $url && cd "$_" > /dev/null 2&>1
temp=""
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation