Skip to content

Instantly share code, notes, and snippets.

View AngelBerihuete's full-sized avatar
🌳

A. Berihuete AngelBerihuete

🌳
View GitHub Profile
@AngelBerihuete
AngelBerihuete / .tmux.conf
Created March 1, 2021 21:03 — forked from tsl0922/.tmux.conf
vim style tmux config
# 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."
#!/bin/bash
#------- Descripción del trabajo -------
#SBATCH --job-name='test_cross_gpu'
#SBATCH --qos=debug
#------- Avisos -------
#SBATCH --mail-user=angel.berihuete@uca.es
#SBATCH --mail-type=END,FAIL,TIME_LIMIT_80

VIM KEYBOARD SHORTCUTS

MOVEMENT

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)
@AngelBerihuete
AngelBerihuete / AfterArchInstallation.txt
Last active December 31, 2019 20:44
Things to do after install Arch Linux on my laptop
# 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/
@AngelBerihuete
AngelBerihuete / _Nvim-R-Tmux.md
Created October 13, 2019 21:31 — forked from tgirke/_Nvim-R-Tmux.md
Nvim-R-Tmux: An Integrated Working Environment for R
# 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))
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
@AngelBerihuete
AngelBerihuete / plot_ellipses.py
Created April 5, 2019 08:26
plotting ellipsese
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
@AngelBerihuete
AngelBerihuete / example001.py
Created March 18, 2019 21:08
pymc3: hierarchical model with multiple obsesrved variables
# 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 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: