Skip to content

Instantly share code, notes, and snippets.

View SahilC's full-sized avatar

Sahil Chelaramani SahilC

View GitHub Profile
@SahilC
SahilC / Visualize.ipynb
Last active March 8, 2017 08:48
Gist to itorch notebook to help visualize weights for CNN.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SahilC
SahilC / vimrc
Created January 4, 2018 08:11
My vimrc file tweaked heavily for productivity in python.
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@SahilC
SahilC / hbd.py
Created October 23, 2022 19:18
Using `pyaudio` to sound the happy birthday tune.
#!/usr/bin/env python3
# pip install pyaudio
import pyaudio
import struct
import math
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
@SahilC
SahilC / octopong.py
Created October 24, 2022 06:55
Use `pygame` to render custom pong env. Goal is to have a controllable env to train RL agents.
#!/usr/bin/env python
# coding: utf-8
import pygame
import time
import random
from joblib import load
pygame.init()
# Run on either ubuntu or Powershell, don't use wsl2 as it's not supported
@SahilC
SahilC / intro.py
Last active November 2, 2022 13:55
Due to recent events, I've decided to make this script to help you get to know me better. Please run the script to find out more.
'''
Due to recent events, I've made this script to help you get to know me better.
Please run the script to find out more.
'''
import base64
# pip install pillow
# pip install requests
from PIL import Image, ImageDraw, ImageFont
import numpy as np
import requests