Skip to content

Instantly share code, notes, and snippets.


Eric Ma ericmjl

View GitHub Profile
View Simple GP.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ericmjl /
Created Dec 15, 2016 — forked from aaronwolen/
Pandoc template to generate reveal.js slideshows.

% Title % Name % Date

My first slide


ericmjl / pandoc.css
Created Jan 13, 2017 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
View pandoc.css
* I add this to html files generated with pandoc.
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
ericmjl /
Last active Jan 26, 2017
Shortcuts for Bash Shell

Bash Shell Command Cheat Sheet

ssh: Access a remote computer.


$ ssh my_username@my.server.address
$ ssh
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
ericmjl / .theanorc
Created Aug 7, 2017
Eric's .theanorc
View .theanorc
device = cuda
floatX = float32
compute_test_value = off
root = /usr/local/cuda
View DigitalOcean_NoVNC_Paste.js
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
ericmjl / gist:4234935dd5f06f34640ef9696f623550
Created May 9, 2018
CuPy arrays have shapes but cupy doesn't have shape()
View gist:4234935dd5f06f34640ef9696f623550
In [1]: import cupy as cp
In [2]: a = cp.array([1, 2, 3])
In [3]: cp.shape(a)
AttributeError Traceback (most recent call last)
<ipython-input-3-e2f1392629a9> in <module>()
----> 1 cp.shape(a)
ericmjl /
Last active Apr 22, 2019
Download causality lectures by Jonas Peters
# This script is intended for downloading all four videos on causality by
# Jonas Peters (University of Copenhagen) from YouTube.
# Copyright belongs to their appropriate copyright holders. I am only
# providing this script for convenience.
# To run this script, first ensure that you have the Python package
# `youtube-dl` installed. Assuming you are able to install it into your
# favourite computing environment, it should be a single command:
ericmjl /
Last active Jun 4, 2018
Jupyter magic imports
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'