I hereby claim:
- I am wespatrocinio on github.
- I am wespatrocinio (https://keybase.io/wespatrocinio) on keybase.
- I have a public key ASC0k-9go5xnhUW0gsfUwXqHlLOcGyuJF4QxQk_W92i7Cwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
export GTK_IM_MODULE=uim
uim-xim &
export XMODIFIERS=@im=uim
| #-#-#-#-#-#-#-# | |
| # ~/.XCompose | |
| # To change the US International keyboard layout to behave like the | |
| # Microsoft Windows (TM) version of the layout | |
| # by @tamh [48bytes at gmail com] | |
| # | |
| # Released under GPL v3+. Please refer to it by going to: | |
| # <http://www.gnu.org/licenses/gpl-3.0.html> | |
| #-#-#-# |
| jupyter lab --port=8866 --NotebookApp.token='' --no-browser --NotebookApp.disable_check_xsrf=True | |
| jupyter-notebook --port=8866 --NotebookApp.token='' --no-browser --NotebookApp.disable_check_xsrf=True |
| # pip install pybktree && pip install python-Levenshtein | |
| from pybktree import BKTree | |
| from Levenshtein import distance as levenshtein_distance | |
| WORDS_LIST = ['car', 'house', 'jar', 'mouse', 'engineer', 'pioneer', 'Jamaica'] | |
| tree = BKTree(levenshtein_distance, WORDS_LIST) |
| jupyter lab --port=<PORT> --NotebookApp.token='' --no-browser |
| # Install it by "pip install python-Levenshtein" | |
| from Levenshtein import distance | |
| def calculate_distance(str_1, str_2): | |
| """ Given two string, applies the Levenshtein's method to calculate the | |
| editon distance | |
| """ | |
| return distance(str_1, str_2) |
| import random | |
| import pandas as pd | |
| import numpy as np | |
| def generate_random_df_2d(x_size: int, y_size: int) -> pd.DataFrame: | |
| """ Generate a dataframe with dimensions 'x_size' and 'y_size' filled with | |
| random float numbers between 0 and 1 | |
| """ | |
| return pd.DataFrame(np.random.random_sample(size=(x_size, y_size))) |
| from pyspark import SparkContext | |
| import random | |
| def inside(p): | |
| x, y = random.random(), random.random() | |
| return x*x + y*y < 1 | |
| NUM_SAMPLES = 1000 | |
| SELECT tbl, name, size_mb FROM | |
| ( | |
| SELECT tbl, count(*) AS size_mb | |
| FROM stv_blocklist | |
| GROUP BY tbl | |
| ) | |
| LEFT JOIN | |
| (select distinct id, name FROM stv_tbl_perm) | |
| ON id = tbl | |
| ORDER BY size_mb DESC |