Skip to content

Instantly share code, notes, and snippets.

Jonathan de Bruin J535D165

Block or report user

Report or block J535D165

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jupyter_notebook_w_nohup.md

Running jupyter notebook with nohup

This is helpful when running jupyter notebook on remote server (AWS) and tunneling into it, because with nohup the notebook process continues to run on the server even if you get disconnected from it (any running notebook code continues to run on the server without interruption, and just needs to be re-tunneled into).

Start jupyter notebook on remote server

In the remote server terminal, run:

nohup jupyter notebook &
@J535D165
J535D165 / .gitconfig
Created Apr 3, 2019
Git alias configuration
View .gitconfig
[alias]
st = status
cm = commit -m
co = checkout
master = checkout master
br = branch
branches = branch -a
remote-tags = ls-remote --tags origin
@J535D165
J535D165 / crop_resize.py
Created Jan 7, 2018
crop and resize numpy array
View crop_resize.py
from scipy import interpolate
def crop_and_resample_2darray(arr, x_crop, y_crop, resample, *args, **kwargs):
"""Crop a 2darray and resize the data"""
len_x_crop = x_crop[1]-x_crop[0]
len_y_crop = y_crop[1]-y_crop[0]
arr_crop = arr[x_crop[0]:x_crop[1], y_crop[0]:y_crop[1]]
f = interpolate.interp2d(np.arange(len_y_crop),
@J535D165
J535D165 / python_re.py
Last active Mar 6, 2017
Python Regular Expressions
View python_re.py
# Dutch zip code matcher
r"[\bNL-]*(?P<pc4>\d{4})\s*(?P<pc6>[A-Za-z]{2})\b"
# Email matcher
r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
@J535D165
J535D165 / install_packages.R
Last active Mar 11, 2018
Install useful R packages data science
View install_packages.R
install.packages(
c(
"dplyr", # data manipulation
"tidyr", # data manipulation
"rmarkdown", # data presentation
"knitr", # data presentation
"RODBC", # database tools
"RMySQL", # database tools
"RPostgreSQL", # database tools
"RSQLite", # database tools
You can’t perform that action at this time.