Skip to content

Instantly share code, notes, and snippets.

@carlosasj
carlosasj / spread.py
Created May 23, 2017 21:34
Dynamic Spread-dot Operator in Python
'''
This function allow you to describe a "path" on the iterator (itr)
and then create a generator that yields all elements that match
the path. You can use the token "[*]" do describe an iteration over
the list.
Example:
itr = {"foo": {
"bar": ["baz", "foz"]
}}
@RenSys
RenSys / scipy - stats zscore.ipynb
Created May 21, 2017 03:45
Scipy - stats zscore
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RenSys
RenSys / Keras - Logistic Regression with Pandas.ipynb
Created May 19, 2017 05:53
Keras - Logistic Regression with Pandas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@max-mapper
max-mapper / bibtex.png
Last active November 6, 2024 09:03
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@nikhita
nikhita / install-firacode.sh
Created April 24, 2017 17:32
How to install FiraCode font on Linux
mkdir -p ~/.local/share/fonts
for type in Bold Light Medium Regular Retina; do wget -O ~/.local/share/fonts/FiraCode-$type.ttf "https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-$type.ttf?raw=true"; done
fc-cache -f
@RenSys
RenSys / Standard - Closures functions return functions.ipynb
Created April 22, 2017 21:45
Standard - Closures functions return functions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RenSys
RenSys / Standard - Decorators nested function calling.ipynb
Last active October 17, 2021 13:13
[Decorators function] #builtin #python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RenSys
RenSys / Pandas - Datetime Index.py
Last active June 22, 2018 12:07
Pandas - Datetime Index
d.DataFrame(data={'value_1': value_series_1,
'value_2': value_series_2,
'timestamp': date_time_list},
index=[0, 1, 2, 3, 4])
df.set_index(pd.to_datetime(df.timestamp), inplace=True)
del df['timestamp']
# index column now has time functions e.g.
df.index.year
@bynil
bynil / config-git-proxy.txt
Last active April 30, 2025 00:27
Use git over socks5 proxy
Port: 1080
1. Create a file /YOUR PATH/gitproxy.sh with content:
#!/bin/sh
nc -X 5 -x 127.0.0.1:1080 "$@"
2. Edit your ~/.gitconfig
# For git://