Skip to content

Instantly share code, notes, and snippets.

View kurianbenoy's full-sized avatar
🖥️
Building things!!

Kurian Benoy kurianbenoy

🖥️
Building things!!
View GitHub Profile
@jph00
jph00 / pull-all.sh
Last active September 25, 2022 15:42
Update in parallel all repos listed in ~/git/repos, and print status of any that are dirty
View pull-all.sh
#!/usr/bin/env bash
for f in $(<~/git/repos); do
cd ~/git/$f
git pull > /dev/null &
cd - > /dev/null
done
wait < <(jobs -p)
for f in $(<~/git/repos); do
@rwightman
rwightman / vit-aot.csv
Created July 13, 2022 05:22
timm vit models, eager vs aot vs torchscript, AMP, PyTorch 1.12
View vit-aot.csv
model infer_samples_per_sec infer_step_time infer_batch_size infer_img_size train_samples_per_sec train_step_time train_batch_size train_img_size param_count
vit_small_patch16_224 2444.7 104.691 256 224 955.88 267.078 256 224 22.05
vit_relpos_medium_patch16_224 1107.38 231.158 256 224 502.75 253.69 128 224 38.75
vit_base_patch16_224 1013.88 252.477 256 224 358.36 356.433 128 224 86.57
vit_base_patch16_384 288.27 888.045 256 384 102.82 300.795 31 384 86.86
View install-lfs.sh
mkdir lfs
cd lfs
curl -L $(curl https://latest.fast.ai/git-lfs/git-lfs/linux-amd64) | tar xz
sudo ./install.sh
cd ..
rm -rf lfs
@amaarora
amaarora / exp_01_Optimizers.ipynb
Created March 14, 2021 00:55
Notebook to compare performance b/w various Optimizers including implementations from scratch.
View exp_01_Optimizers.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View cache_requests.py
"""
A simple get function which caches responses for a URL
using a LFU cache
"""
import requests
from collections import Counter
class LFUCache(object):
""" Least frequently used cache with caching done on SET """
@gilrosenthal
gilrosenthal / Fast.ai install script
Created July 4, 2018 20:14
Fast.ai Install on Google Colab
View Fast.ai install script
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
@gnprice
gnprice / .gitconfig
Last active December 22, 2023 20:53
gitconfig
View .gitconfig
# This is a snapshot of my ~/.gitconfig file, minus a few bits
# that are obsolete or non-reusable.
#
# For explanation of each setting, see `git help config`
# or https://git-scm.com/docs/git-config .
#
[user]
name = Greg Price
email = gnprice@gmail.com
[alias]
@kurianbenoy
kurianbenoy / installation.md
Last active May 29, 2018 16:22
Django Installation
View installation.md

Prerequisites

We higly recommend You to install a Linux Distro, preferably it can any Debian based distros like:

  1. Ubuntu
  2. Debian
  3. Linux Mint
  4. Kali Linux

We highly recommend you not to bring Windows Laptops as Django is a free open software and its always nice to work best on Free Open Souce Software instead for Properietary software as it guarantees freedom and is also Free

@karpathy
karpathy / pg-pong.py
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
View pg-pong.py
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward