This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 80; | |
server_name 127.0.0.1; | |
charset utf-8; | |
client_max_body_size 10M; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[program:jupyterhub] | |
environment=HOME='/home/user' | |
directory=/home/user/PythonProjects/jupyterhub | |
command=/bin/bash -c 'source ~/.nvm/nvm.sh && source ~/.bashrc && nvm use default && source venv/bin/activate && jupyterhub' | |
user=user | |
autostart=true | |
autorestart=true | |
startretries=3 | |
stderr_logfile = /var/log/supervisor/jupyterhub-stderr.log | |
stdout_logfile = /var/log/supervisor/jupyterhub-stdout.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_preliminary(ax, color='0.5', alpha=0.4): | |
""" Add the 'Preliminary' legend into a plot | |
ax: Must be a matplotlib.axes._subplots.AxesSubplot | |
In practice ax is a Seaborn's plot. | |
""" | |
sizes = ax.figure.get_size_inches() | |
size = 6.0 * np.sqrt(sizes[0]**2.0 + sizes[1]**2.0) | |
ax.figure.text(0.5, 0.5, 'Preliminary', | |
fontsize=size, color=color, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from azureml import Workspace | |
ws = Workspace() | |
ds = ws.datasets['data.csv'] | |
frame = ds.to_dataframe() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyinspire import pyinspire | |
from PyPDF2 import PdfFileReader | |
import re | |
import sys | |
pdf_file = 'paper_from_prd.pdf' # local file | |
doi_re = re.compile('10.(\d)+/([^(\s\>\"\<)])+') | |
input = PdfFileReader(file(pdf_file, "rb")) | |
text = input.getPage(0).extractText() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL := /bin/bash | |
#----------------------------------------------- | |
# __ __ _ __ _ _ | |
# | \/ | __ _| | _____ / _(_) | ___ | |
# | |\/| |/ _ | |/ / _ \ |_| | |/ _ \ | |
# | | | | (_| | < __/ _| | | __/ | |
# |_| |_|\__,_|_|\_\___|_| |_|_|\___| | |
# | |
#----------------------------------------------- | |
# VIM INSTALLER FROM SOURCE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def latex_clean(f): | |
_latex = re.sub('\\\\left\([{}\w\s\\\\,]+\s\\\\right\)\s\\\\\s\{\\\\mapsto\}\s\\\\\s', '', f._latex_()) | |
return _latex | |
def show_clean(f): | |
_latex = r"$" + latex_clean(f) + "$" | |
show(_latex) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias pp="playerctl play-pause && playerctl metadata title" | |
alias pn="playerctl next && playerctl metadata title" | |
alias pb="playerctl previous && playerctl metadata title" | |
alias p+="playerctl volume" | |
alias pv="playerctl volume" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias k='amixer -D pulse sset Master 10%+ |sed -n "s/.*\[\([^]]*\%\)\].*/Volume:\1/p" | head -1' | |
alias j='amixer -D pulse sset Master 10%- |sed -n "s/.*\[\([^]]*\%\)\].*/Volume:\1/p" | head -1' | |
alias kk='k && k' | |
alias jj='j && j' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check this ys.zsh-theme fork: | |
# https://github.com/elchinot7/dotfiles/blob/master/ys-modified-chinot7.zsh-theme | |
# This can be used to show the Odrive Sync status in Linux/OSX | |
# Add the line: | |
# ${odrive_info} \ | |
# to the string PROMPT | |
# Odrive status | |
local odrive_info='$(ys_prompt_odrive)' |
NewerOlder