Skip to content

Instantly share code, notes, and snippets.

View psicobloc's full-sized avatar
πŸ¦”

Hugo Valencia Vargas psicobloc

πŸ¦”
View GitHub Profile
@psicobloc
psicobloc / legion.settings.json
Last active August 23, 2023 03:21
another settings.json for vs code,
{
"git.autofetch": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"C_Cpp.default.compilerPath": "/usr/bin/gcc",
"terminal.integrated.enableMultiLinePasteWarning": false,
"jupyter.askForKernelRestart": false,
"editor.fontSize": 15,
"editor.renderWhitespace": "boundary",
"editor.bracketPairColorization.enabled": true,
@psicobloc
psicobloc / keymapLinux.c
Created July 16, 2023 21:51
Keymap for my lily58 keyborad - on Linux, changes on the bottom row
/* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
@psicobloc
psicobloc / vscodeConfigs.json
Last active June 28, 2023 16:50
This is my custom configs for vs code
{
"Theme stuff": {
"workbench.colorCustomizations": {
"[Tokyo Night Storm]": {
"foreground": "#959cbd",
"editorLineNumber.foreground": "#5a3e85",
"editorLineNumber.activeForeground": "#d0d560",
"editor.findMatchHighlightBackground": "#f10bbb66",
},
},
/* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
@psicobloc
psicobloc / PandaMapsAndSumaries.py
Created January 30, 2021 00:09
resumenes y mapas en pandas
ej_uno = pd.DataFrame({ 'atributo1': [2,5,3,67,8,9],'atributo2': [5,8,79,21,6,5],'atributo3': [3,6,89,4,1,6],
'atributo4': [5,7,5,3,65,4],'atributo5': ['uno','dos','tres','cuatro','cinco','seis']}, index=['inst1','inst2','inst3','inst4','inst5','inst6'])
ej_uno.atributo1.describe()
ej_uno.atributo5.describe()
"""To interpret the min, 25%, 50%, 75% and max values, imagine sorting each column from
lowest to highest value. The first (smallest) value is the min. If you go a quarter
way through the list, you'll find a number that is bigger than 25% of the values and
smaller than 75% of the values. That is the 25% value (pronounced "25th percentile").
The 50th and 75th percentiles are defined analogously, and the max is the largest number. """
@psicobloc
psicobloc / selectpandas.py
Last active January 29, 2021 23:57
index, select y assign en pandas
"""iloc uses the Python stdlib indexing scheme, where the first element of the range is included and the last one excluded.
So 0:10 will select entries 0,...,9. loc, meanwhile, indexes inclusively. So 0:10 will select entries 0,...,10.
If we have a DataFrame with index values Apples, ..., Potatoes, ..., and we want to select
"all the alphabetical fruit choices between Apples and Potatoes", then it's a lot more convenient to index df.loc['Apples':'Potatoes']
than it is to index something like df.loc['Apples', 'Potatoet] (t coming after s in the alphabet).
when the DataFrame index is a simple numerical list, e.g. 0,...,1000.
In this case df.iloc[0:1000] will return 1000 entries, while df.loc[0:1000] return 1001 of them!"""
import pandas as pd
ej_uno = pd.DataFrame({ 'Yes':[50,21,89,15] , 'No':[131,2,54,69] })