Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active Jun 18, 2021
The introduction to Reactive Programming you've been missing
View introrx.md
View how-to-make-a-racist-ai-without-really-trying.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stared
stared / software_for_scientists.md
Last active Jun 16, 2021
Software for scientists: community-edited list of general-purpose software for scientists.
View software_for_scientists.md

Software for scientists

Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.

Text editors

in General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.

@karpathy
karpathy / min-char-rnn.py
Last active Jun 15, 2021
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active Jun 15, 2021
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View bash-cheatsheet.sh
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@bishboria
bishboria / springer-free-maths-books.md
Last active Jun 13, 2021
Springer made a bunch of books available for free, these were the direct links
@paulochf
paulochf / ipython_notebook_large_width.py
Last active Jun 8, 2021
IPython/Jupyter Notebook enlarge/change cell width
View ipython_notebook_large_width.py
from IPython.display import display, HTML
display(HTML(data="""
<style>
div#notebook-container { width: 95%; }
div#menubar-container { width: 65%; }
div#maintoolbar-container { width: 99%; }
</style>
"""))
View jacobian_hessian.py
import torch
def jacobian(y, x, create_graph=False):
jac = []
flat_y = y.reshape(-1)
grad_y = torch.zeros_like(flat_y)
for i in range(len(flat_y)):
grad_y[i] = 1.
grad_x, = torch.autograd.grad(flat_y, x, grad_y, retain_graph=True, create_graph=create_graph)
jac.append(grad_x.reshape(x.shape))
@ericdill
ericdill / render_env.py
Last active May 6, 2021
Render the dependency graph for your conda environment (needs graphviz!)
View render_env.py
import json
import glob
from os.path import join, basename
# install this with "conda install -c conda-forge python-graphviz"
import graphviz as gv
# path to your conda environment
path = '/tmp/foo'
dg = gv.Digraph(filename='env-%s' % basename(path), format='svg')
@Macorreag
Macorreag / animacionconmani.ipynb
Last active Apr 3, 2021
Configuración de Colab para crear animaciones con la librería de manim
View animacionconmani.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.