h - Move left
j - Move down
k - Move up
l - Move right
$ - Move to end of line
0 - Move to beginning of line (including whitespace)
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
# vim style tmux config | |
# use C-a, since it's on the home row and easier to hit than C-b | |
set-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
# Easy config reload | |
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." |
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
#!/bin/bash | |
#------- Descripción del trabajo ------- | |
#SBATCH --job-name='test_cross_gpu' | |
#SBATCH --qos=debug | |
#------- Avisos ------- | |
#SBATCH [email protected] | |
#SBATCH --mail-type=END,FAIL,TIME_LIMIT_80 |
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
# Change keymap layout to spanish | |
localectl set-x11-keymap es | |
# Install Spotify | |
https://snapcraft.io/install/spotify/arch | |
# After install Anaconda add the line in .zshrc | |
export PATH="/Users/username/miniconda3/bin:$PATH" | |
# Because I use the LARBS (Luke Smith) | |
# https://larbs.xyz/ |
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 https://www.quora.com/How-can-I-ensure-that-my-TensorFlow-is-running-by-GPU-or-not-by-GPU | |
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) |
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 numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.patches import Ellipse | |
def plot_point_cov(points, nstd=2, ax=None, **kwargs): | |
""" | |
Plots an `nstd` sigma ellipse based on the mean and covariance of a point | |
"cloud" (points, an Nx2 array). | |
Parameters |
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 numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.patches import Ellipse | |
def plot_point_cov(points, nstd=2, ax=None, **kwargs): | |
""" | |
Plots an `nstd` sigma ellipse based on the mean and covariance of a point | |
"cloud" (points, an Nx2 array). | |
Parameters |
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 https://stackoverflow.com/questions/33661064/pymc3-hierarchical-model-with-multiple-obsesrved-variables | |
import matplotlib.pyplot as plt | |
model = pm.Model() | |
with model: | |
hyper_mean = pm.Normal('hyper_mean', mu=0, sd=100) | |
hyper_sigma = pm.HalfNormal('hyper_sigma', sd=3) | |
means = pm.Normal('means', mu=hyper_mean, sd=hyper_sigma, shape=n_individuals) | |
sigmas = pm.HalfNormal('sigmas', sd=100) |
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
# This file was obtained from StackOverflow: | |
# | |
# How to switch backends in matplotlib / Python | |
# https://stackoverflow.com/questions/3285193/how-to-switch-backends-in-matplotlib-python | |
import matplotlib | |
gui_env = ['TKAgg','GTKAgg','Qt4Agg','WXAgg'] | |
for gui in gui_env: | |
try: |
NewerOlder