This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import numpy as np | |
| #from ipywidgets import widgets | |
| from pandas_profiling import ProfileReport | |
| #from pandas_profiling.utils.cache import cache_file | |
| profile = ProfileReport(df, title="#### Title ####", html={'style': {'full_width': True}}, sort="None") | |
| # HTML report in a iframe | |
| profile.to_notebook_iframe() | |
| # nebo samotné `profile` také funguje | |
| profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sys.path.append("/etc/scripts/etl/etl_scripts/") | |
| from etl_utils_package.edison import edison_connect, edison_programy2df | |
| from etl_utils_package.dwh import conn_close |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fuzzymatcher | |
| left_on = ["Facility Name", "Address", "City", "State"] | |
| right_on = [ | |
| "Provider Name", "Provider Street Address", "Provider City", | |
| "Provider State" | |
| ] | |
| matched_results = fuzzymatcher.fuzzy_left_join(hospital_accounts, | |
| hospital_reimbursement, | |
| left_on, | |
| right_on, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def color_neprijat_red(val): | |
| color = 'red' if val == 'Nepřijat' else 'black' | |
| return 'color: %s' % color | |
| df.style.applymap(color_neprijat_red) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cisla = df.groupby(['ID_PERSON'])['CISLO_PRIHLASKY'].apply(lambda x: ', '.join(x)) | |
| #obecně: | |
| df.groupby("content_id")['tag'].apply(lambda tags: ','.join(tags)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grr = pd.plotting.scatter_matrix(df, figsize=(15, 15), marker='o') | |
| # nebo | |
| import seaborn as sns | |
| sns.pairplot(piv, kind = "reg") | |
| plt.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| coocc = df.T.dot(df) | |
| #optionaly - fill diagonal with 0s | |
| np.fill_diagonal(coocc.values, 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cvt -r -v 3200 1800 60 | |
| # 3200x1800 59.94 Hz (CVT 5.76M9-R) hsync: 111.01 kHz; pclk: 373.00 MHz | |
| Modeline "3200x1800R" 373.00 3200 3248 3280 3360 1800 1803 1808 1852 +hsync -vsync | |
| $ xrandr --newmode "3200x1800R" 373.00 3200 3248 3280 3360 1800 1803 1808 1852 +hsync -vsync | |
| $ xrandr --addmode eDP-1 3200x1800R | |
| #$ xrandr --output eDP-1 --mode 3200x1800R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inxi -Fxz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone git@gitlab.vsb.cz:sam029/p000-sam029-test.git temp | |
| mv temp/.git test/.git | |
| rm -rf temp |