Skip to content

Instantly share code, notes, and snippets.

View CamDavidsonPilon's full-sized avatar
:shipit:
Learning bio brb

Cameron Davidson-Pilon CamDavidsonPilon

:shipit:
Learning bio brb
View GitHub Profile
@radugrosu
radugrosu / named_array.py
Created October 20, 2020 17:48
named array proof of concept
import numpy as np
from typing import Sequence
class NamedArray(np.ndarray):
def __new__(cls, array: np.ndarray, names: Sequence[str]):
assert array.shape[-1] == len(names)
obj = np.asarray(array).view(cls)
obj.names = names
obj._lookup = dict(zip(names, range(len(array))))
return obj
@CamDavidsonPilon
CamDavidsonPilon / snapple.py
Last active December 16, 2015 12:58
using data from https://gist.github.com/shanselman/5422230 as `filename`, will create a random comment.
import re
import random
CURLY_RE = re.compile( "\{(.*?)\}" )
def spam( filename ):
file = open(filename, "r")
@mbostock
mbostock / .block
Last active June 29, 2016 01:44
Lorenz System
license: gpl-3.0
@jiffyclub
jiffyclub / game_of_life.ipynb
Created September 24, 2012 21:15
Conway's Game of Life in an IPython Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JerrySievert
JerrySievert / make
Created July 18, 2012 03:40
Redis on Raspberry Pi
jerry@pi:/tmp/redis-2.4.15$ make -j 2
cd src && make all
make[1]: Entering directory `/tmp/redis-2.4.15/src'
MAKE hiredis
MAKE jemalloc
make[2]: Entering directory `/tmp/redis-2.4.15/deps/hiredis'
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
checking for xsltproc... no
checking for gcc... gcc
checking whether the C compiler works... yes
@paulmillr
paulmillr / active.md
Last active December 26, 2024 08:16
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers