Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Eric Ma ericmjl

🎯
Focusing
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
ericmjl / slides.md
Created Dec 15, 2016 — forked from aaronwolen/slides.md
Pandoc template to generate reveal.js slideshows.
View slides.md

% Title % Name % Date

My first slide

List

@ericmjl
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
ericmjl / shell-command-cheatsheet.md
Last active Jan 26, 2017
Shortcuts for Bash Shell
View shell-command-cheatsheet.md

Bash Shell Command Cheat Sheet

ssh: Access a remote computer.

Examples:

$ ssh my_username@my.server.address
$ ssh dcuser@ip-address-at-amazonaws.com
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ericmjl
ericmjl / .theanorc
Created Aug 7, 2017
Eric's .theanorc
View .theanorc
[global]
device = cuda
floatX = float32
compute_test_value = off
[cuda]
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
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
ericmjl / download_causality.sh
Last active Apr 22, 2019
Download causality lectures by Jonas Peters
View download_causality.sh
# 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 Jun 4, 2018
Jupyter magic imports
View jupyter_magic.md
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'