Skip to content

Instantly share code, notes, and snippets.

View somefunAgba's full-sized avatar
💡
working on new tools

Oluwasegun Somefun somefunAgba

💡
working on new tools
View GitHub Profile
@evandrix
evandrix / gist:1130954
Created August 7, 2011 23:57
Programmer's Links: Basics
@ http://altdevblogaday.com/2011/08/06/demise-low-level-programmer/
Floating Point Numbers
They are very useful but often used in situations where they simply don’t suit the solution the programmer is attempting to write. The following links should provide some background and info on where they are not so useful, what the pitfalls are and sometimes even how to avoid them.
http://www.cprogramming.com/tutorial.html#fptutorial
http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/
http://www.codeproject.com/KB/recipes/float_point.aspx
http://drdobbs.com/184402741?pgno=4
http://users.tkk.fi/jhi/infnan.html
@mhitza
mhitza / Makefile
Last active November 14, 2024 15:44
Programming Arduino Uno (ATmega386P) in assembly
%.hex: %.asm
avra -fI $<
rm *.eep.hex *.obj *.cof
all: $(patsubst %.asm,%.hex,$(wildcard *.asm))
upload: ${program}.hex
avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$<
monitor:
@lukas-h
lukas-h / license-badges.md
Last active November 11, 2024 03:22
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@goerz
goerz / Elements of Statistical Learning.md
Last active June 21, 2024 04:08
PDF bookmarks for "Hastie, Tibshirani, Friedman - The Elements of Statistical Learning" (LaTeX)

This gist contains out.tex, a tex file that adds a PDF outline ("bookmarks") to the freely available pdf file of the book

The Elements of Statistical Learning (2nd ed), by Trevor Hastie, Robert Tibshirani, and Jerome Friedman

https://web.stanford.edu/~hastie/ElemStatLearn/

The bookmarks allow to navigate the contents of the book while reading it on a screen.

Usage

@rasbt
rasbt / vgg16.py
Created March 3, 2019 06:34
Speed comparison DataLoader vs in-memory
import time
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision import datasets
from torchvision import transforms
from torch.utils.data import DataLoader
if torch.cuda.is_available():
@botforge
botforge / gym_to_gif.py
Last active August 19, 2024 21:55
Save OpenAI Gym renders as GIFS
from matplotlib import animation
import matplotlib.pyplot as plt
import gym
"""
Ensure you have imagemagick installed with
sudo apt-get install imagemagick
Open file in CLI with:
xgd-open <filelname>

Sizes

(html+js+wasm)

Non-emscripten: 19,964 bytes
Emscripten:     11,086 bytes

a conversation about the einops lib and why it's hard to optimize ML:

<PapuaHardyNet> the solution is obviously jax acc to shawn

which is why i'm thinking to also build a jax equivalent and compare all three: pytorch, pytorch + einops, jax. Let's see if I have the bandwidth to do so

<nshepperd2> einops is really cool imo