This file contains 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
module RndCrap where | |
import System.Random | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as TIO | |
boxm :: Float -> Float -> (Float, Float) | |
boxm u v = (r*cos(t), r*(sin(t))) | |
where r = sqrt (-2 * log u) | |
t = 2*pi*v |
This file contains 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
(global-linum-mode t) | |
(setq prelude-guru nil) | |
(setq mac-option-modifier 'nil) | |
(setq mac-right-option-modifier 'nil) | |
(setq mac-right-command-modifier 'meta) | |
(define-key smartparens-mode-map (kbd "C-<left>") 'backward-word) | |
(define-key smartparens-mode-map (kbd "C-<right>") 'forward-word) |
This file contains 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
PROMPT='%{$fg[magenta]%}★ %B%c%b $(git_prompt_info)% %{$fg[white]%}> %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}#%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[green]%} " |
This file contains 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
# remap prefix to Control + a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf | |
unbind C-v |
This file contains 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
source ~/.zplug/init.zsh | |
zplug "lib/git", from:oh-my-zsh | |
zplug "lib/history", from:oh-my-zsh | |
zplug "plugins/colored-man-pages", from:oh-my-zsh, defer:2 | |
zplug "zsh-users/zsh-history-substring-search", defer:2 | |
zplug "zsh-users/zsh-syntax-highlighting", defer:2 | |
zplug "zsh-users/zsh-autosuggestions", defer:2 |
This file contains 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
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
import platform | |
import os.path | |
import os | |
import subprocess | |
from distutils import spawn |
This file contains 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
#!/usr/bin/env zsh | |
log=/tmp/pybs.log | |
pip=/opt/local/bin/pip3.6 | |
pkgs=("pip" "numpy" "scipy" "pandas" "matplotlib" "seaborn") | |
autoload -Uz colors && colors | |
function y() { | |
echo "[$fg[$1]$2$reset_color]\t" |
This file contains 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 url("base.css"); /* Happy16 Light theme */ | |
body {background-color: #f9f9f9;} | |
.container { min-width:60% !important; } | |
.output_svg div { | |
width: 100% !important; | |
height: 100% !important; | |
} |
This file contains 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 functools import wraps | |
def c(f): | |
@wraps(f) | |
def w(k): | |
if k in d: | |
return d[k] | |
else: | |
d[k] = f(k) | |
return d[k] |
This file contains 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 pandas as pd | |
import numpy as np | |
import seaborn as sns | |
from ipywidgets import interact, RadioButtons as RB | |
fs = [("Barcelona", "ESP","D"), ("Beşiktaş", "TUR","G"), | |
("Liverpool", "ENG","E"), | |
("City", "ENG","F"), ("Man U", "ENG","A"), | |
("PSG","FRA","B"), ("Roma", "ITA","C"), | |
("Tottenham", "ENG","H")] |
OlderNewer