Skip to content

Instantly share code, notes, and snippets.

View ericmjl's full-sized avatar
🎯
Focusing

Eric Ma ericmjl

🎯
Focusing
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ericmjl
ericmjl / slides.md
Created December 15, 2016 01:37 — forked from aaronwolen/slides.md
Pandoc template to generate reveal.js slideshows.

% Title % Name % Date

My first slide

List

@ericmjl
ericmjl / pandoc.css
Created January 13, 2017 17:53 — 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.)
/*
* 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
ericmjl / shell-command-cheatsheet.md
Last active January 26, 2017 15:07
Shortcuts for Bash Shell

Bash Shell Command Cheat Sheet

ssh: Access a remote computer.

Examples:

$ ssh my_username@my.server.address
$ ssh dcuser@ip-address-at-amazonaws.com
@ericmjl
ericmjl / tmux-cheatsheet.markdown
Created July 9, 2017 15:37 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ericmjl
ericmjl / .theanorc
Created August 7, 2017 17:33
Eric's .theanorc
[global]
device = cuda
floatX = float32
compute_test_value = off
[cuda]
root = /usr/local/cuda
// 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
ericmjl / gist:4234935dd5f06f34640ef9696f623550
Created May 9, 2018 20:38
CuPy arrays have shapes but cupy doesn't have shape()
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
ericmjl / download_causality.sh
Last active April 22, 2019 05:19
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
ericmjl / jupyter_magic.md
Last active June 4, 2018 12:55
Jupyter magic imports
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'