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
| rsync -rtvu --delete source_folder/ destination_folder/ |
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
| from tqdm import tqdm | |
| from time import sleep | |
| for i in tqdm(range(1000)): | |
| sleep(.01) |
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
| " plugins | |
| let need_to_install_plugins = 0 | |
| if empty(glob('~/.vim/autoload/plug.vim')) | |
| silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
| \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
| let need_to_install_plugins = 1 | |
| endif | |
| call plug#begin() | |
| Plug 'tpope/vim-sensible' |
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
| In [41]: df.c_str.str.len().max() | |
| Out[41]: 13 | |
| In [42]: df.to_sql('test', engine, index_label='id', if_exists='replace', | |
| ....: dtype={'c_str': types.VARCHAR(df.c_str.str.len().max())}) |
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
| # terminálem na vzdáleném serveru | |
| ssh-keygen -o -t rsa -b 4096 | |
| --- | |
| # zkopírovat public key v do souboru na lokále | |
| # /home/USER !!! pod kterým byl klíč generován | |
| ssh root@dwhetl "cat /home/etl/.ssh/id_rsa.pub" > etl_dwhetl_public_key.pub |
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
| # vypiš připojené disky | |
| sudo fdisk -l | |
| # odpoj disk | |
| sudo umount /dev/sd<?><?> | |
| # nahrej ISO na disk | |
| sudo dd bs=4M if=input.iso of=/dev/sd<?> conv=fdatasync |
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
| pd.set_option('display.max_columns', None) | |
| pd.set_option('display.max_colwidth', -1) | |
| #pd.set_option('display.max_columns', None) | |
| #pd.set_option('display.expand_frame_repr', False) | |
| #pd.set_option('max_colwidth', -1) | |
| #pd.set_option('display.width', 80) | |
| #pd.reset_option("all") |
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
| int(df[df_col_name].str.encode(encoding='utf-8').str.len().max()) | |
| # nebo | |
| df.col1.str.len().max() | |
| # nebo | |
| df.col1.map(lambda x: len(x)).max() | |
| # nebo | |
| df.col1.map(len).max() | |
| for col in df.columns: |
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 -S | |
| # nebo | |
| neofetch |
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
| echo 'systemctl suspend' | at now + 30 minutes |
OlderNewer