Skip to content

Instantly share code, notes, and snippets.

View Saigesp's full-sized avatar
🙄

Santiago Espinosa Saigesp

🙄
View GitHub Profile
@Saigesp
Saigesp / bashrc
Last active September 3, 2023 16:21
# Virtualenv
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
# Add git branch if its present to PS1
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\] $(parse_git_branch)\[\033[00m\]\$ '
@Saigesp
Saigesp / .block
Last active October 22, 2018 04:06
D3v4 barchart with js classes
f906ae2bab36f03a59c78e8d669aa68c
@Saigesp
Saigesp / translate_ine_projection.py
Created September 19, 2018 18:29
Convert between projections epsg:25830 and epsg:4326 used in INE (Instituto Nacional de Estadística, Spain)
# returns latlng
def get_maxmin_latlon_region(region):
lon_max = -180
lon_min = 180
lat_max = -90
lat_min = 90
if region['type'] == 'Polygon':
for polygon in region['coordinates']:
for point in polygon:
@Saigesp
Saigesp / .block
Last active July 9, 2021 00:36
D3v4 Warming stripes
eda813560c801474904004d6b6b1cc4c
@Saigesp
Saigesp / .block
Last active October 19, 2018 18:11
D3v4 linear calendar
a0b505c3d0e42cfbdf39b0d2c19ada0c
@Saigesp
Saigesp / .block
Last active October 19, 2018 18:11
D3v4 feverchart with linear regression
281f92fae4192c4a569fc992d10a9914
@Saigesp
Saigesp / .block
Last active October 19, 2018 18:11
D3v4 calendar heatmap
0b0995536ec3e691cec6725783870a70
@Saigesp
Saigesp / .block
Last active October 26, 2018 17:59
D3v4 Stacked barchart
f2605e92dff3a976d97ae6027d07f6b5
@Saigesp
Saigesp / .block
Last active October 19, 2018 18:11
D3v4 piechart with js classes
ab01821e77d2f1c44e9d71c826e54db6
@Saigesp
Saigesp / .block
Last active October 22, 2018 04:07
D3v4 Multiple Linechart
13029d084201f5012391e231215961f0