Skip to content

Instantly share code, notes, and snippets.

@bishboria
bishboria / springer-free-maths-books.md
Last active May 10, 2025 04:28
Springer made a bunch of books available for free, these were the direct links
@rossant
rossant / ipyparallel_test.py
Created September 29, 2015 19:06
Fixture for IPython.parallel and pytest
import os
from pytest import yield_fixture
@yield_fixture(scope='module')
def ipy_client():
def iptest_stdstreams_fileno():
return os.open(os.devnull, os.O_WRONLY)
@karpathy
karpathy / min-char-rnn.py
Last active May 12, 2025 17:28
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
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)
@maxtruxa
maxtruxa / Antonyms.md
Last active April 1, 2025 08:34
A list of common terms used in programming and their respective antonyms.

Antonym List

Note: The table headings (positive/negative) are not necessarily meaningful.

Positive Negative
acquire release
add remove (e.g. an item), subtract (arithmetic)
advance retreat
allocate deallocate (correct), free (common)
allow deny

Visualizing static and dynamic networks in Vispy

Abstract

Vispy is a high performance 2D/3D visualization library which uses the GPU intensively through OpenGL. This Google Summer of code project proposes to add an API to Vispy to visualize static and dynamic (boolean, linear and Bayesian)

@hadley
hadley / ds-training.md
Created March 13, 2015 18:49
My advise on what you need to do to become a data scientist...

If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?

I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:

  • Statistical knowledge
  • Programming/hacking skills
  • Domain expertise

Statistical knowledge

@rossant
rossant / index.md
Last active August 29, 2015 14:12
IPython notebook ==> Python function

Notebooks are great for interactive use, not so much for being reused in an automatic fashion. How to make a notebook reusable (for example in an analysis pipeline)?

Write your notebook 'mynotebook.ipynb' as usual. Then add a special comment in some cells:

### input
x = 0
y = 0
@dhbradshaw
dhbradshaw / gist:e2bdeb502b0d0d2acced
Last active August 16, 2023 17:50
Rename field using migrations in django 1.7
To change a field name in django 1.7+
1. Edit the field name in the model (but remember the old field name: you need it for step 3!)
2. Create an empty migration
$ python manage.py makemigrations --empty myApp
3. Edit the empty migration (it's in the migrations folder in your app folder, and will be the most recent migration) by adding
migrations.RenameField('MyModel', 'old_field_name', 'new_field_name'),
to the operations list.
@rossant
rossant / linux_commands.md
Last active August 29, 2015 14:08
Useful Linux commands (tested on Ubuntu 14.04)

Useful Linux commands

Check drive speed

Read

sudo hdparm -t /dev/sda