Skip to content

Instantly share code, notes, and snippets.

View syoh's full-sized avatar

Sang-Yun Oh syoh

  • University of California, Santa Barbara
  • Santa Barbara, CA, USA
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@syoh
syoh / control_print_precision.py
Created April 27, 2015 05:24
Control screen output precision
import numpy as np
import contextlib
@contextlib.contextmanager
def printoptions(*args, **kwargs):
original = np.get_printoptions()
np.set_printoptions(*args, **kwargs)
yield
np.set_printoptions(**original)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@syoh
syoh / install-jupyter-vim-binding.sh
Last active April 20, 2019 11:44
Install and activate jupyter-vim-binding
#!/bin/bash
mkdir -p $(jupyter --data-dir)/nbextensions
git clone https://github.com/lambdalisue/jupyter-vim-binding \
$(jupyter --data-dir)/nbextensions/vim_binding
jupyter nbextension enable vim_binding/vim_binding
@syoh
syoh / install-jupyter-rise-slideshow.sh
Last active April 18, 2019 18:17
Install and activate jupyter slideshow extension
#!/bin/bash
pip install rise
jupyter nbextension install rise --py --sys-prefix
pip install hide_code
jupyter nbextension install hide_code --py --sys-prefix
jupyter nbextension enable hide_code --py --sys-prefix
jupyter serverextension enable hide_code --py --sys-prefix
% Encoding: UTF-8
@TechReport{AlzhimersAssociation2012,
author = {{Alzhimer's~Association},{}},
title = {Alzheimer's Disease: Facts and Figures},
institution = {Alzhimer's Association},
year = {2012},
file = {:papers/Association2012 - Alzheimer's Disease_ Facts and Figures.pdf:PDF},
groups = {Neuroscience, [syoh:]},
owner = {syoh},