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
| #one easy way by using Pandas: (here I want to use mean normalization) | |
| normalized_df=(df-df.mean())/df.std() | |
| #to use min-max normalization: | |
| normalized_df=(df-df.min())/(df.max()-df.min()) |
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
| # změna velikosti jednoho obrázku | |
| import matplotlib.pyplot as plt | |
| fig=plt.figure(figsize=(15, 15)) | |
| # To change the default settings, and therefore all your plots: | |
| import matplotlib.pyplot as plt | |
| plt.rcParams['figure.figsize'] = [15, 15] |
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
| # https://stackoverflow.com/questions/49280261/jupyter-lab-shortcuts | |
| { | |
| // Move cell up | |
| "notebook:move-cell-up": { | |
| "selector": ".jp-Notebook:focus", | |
| "command": "notebook:move-cell-up", | |
| "keys": [ | |
| "Ctrl ArrowUp" | |
| ] |
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
| %whos # magic - vypíše alokované proměnné | |
| del var1 # smaže proměnnou var1 | |
| import gc | |
| gc.collect() # uvolní paměť po smazaných proměnných (okamžitě, jinak řeší Garbage Collector až když je potřeba...) |
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
| # vypsat obsah seznamu (list) oddělený čárkami bez uvozovek | |
| print('[%s]' % ', '.join(map(str, my_list))) |
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
| grep --include='*.ipynb' --exclude-dir='.ipynb_checkpoints' -rliw . -e 'SEARCH QUERY ...' | |
| # https://groups.google.com/forum/#!topic/jupyter/Qi9b7z_sgRU | |
| # https://stackoverflow.com/questions/16956810/how-do-i-find-all-files-containing-specific-text-on-linux | |
| # možno spustit i v integrovaném terminále |
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
| crontab -l # LIST | |
| crontab -e # EDIT |
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
| grep CRON /var/log/syslog |
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
| df['sex_letter] = df.sex.map({'Male': 'M', 'Female': 'F'}).fillna('O') |
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
| $ jupyter notebook stop 8889 |