Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
– The Git website
Choose one of the following options.
| import pandas as pd | |
| def read_json_to_df(file_path): | |
| # df = pd.read_json(path_or_buf=file_path,orient='records',lines=True) | |
| df = pd.read_json(path_or_buf=file_path, orient='records') | |
| return df | |
| def read_json_list_to_df(json_list): | |
| df = pd.DataFrame.from_records(json_list) |
| # Thanks to https://github.com/andreavanzo for figuring this out | |
| # device should be integer here and not torch.device | |
| # do | |
| torch.cuda.set_device(device) | |
| # before | |
| torch.cuda.empty_cache() | |
| # Also do empty cache after every epoch |
| # Taken from https://datascience.stackexchange.com/a/46451 | |
| # https://stackoverflow.com/questions/57334052/how-to-fix-pandas-compat-has-no-attribute-string-types-error-in-python3 | |
| # https://github.com/pydata/pandas-datareader/issues/655 | |
| # pip install --upgrade pandas==0.24.2 | |
| # pip install xlswriter | |
| import pandas as pd |
| # Check number of cpus | |
| grep -c ^processor /proc/cpuinfo | |
| sudo apt-get install tmux | |
| sudo apt-get install htop | |
| sudo apt install git | |
| # Conda | |
| sudo mkdir -p /scratch/shubham/packages | |
| sudo chown -R shubham /scratch/shubham |
| pip install --no-cache-dir <pkg> | |
| # Currently conda doesnt allow ignoring cache | |
| # https://github.com/conda/conda/issues/7741 | |
| conda clean --all --force-pkgs-dirs | |
| # https://stackoverflow.com/a/57994079/3776827 |
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
– The Git website
Choose one of the following options.
Pre-requisite: You should be able to do ssh without entering password. See this
Steps (Fig 1 and 2)
This started as an introspection of the open-source contribs that I did during my PhD.
Creating a list of PRs and contribs in nice projects:
Link: https://github.com/shubhamagarwal92/pecan
Medium: https://medium.com/@shubhamagarwal92/google-summer-of-code-2017-pecan-daa2fd11755a
| # https://cmdlinetips.com/2016/03/how-to-join-pdf-files-in-mac-on-terminal/ | |
| # On mac | |
| /System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py -o pages.pdf 1.pdf 2.pdf | |
| # Another command | |
| gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf | |
| # sed 's/>>> //g ' combinePDF.py >> combinePDF.py |
| # Following https://stackoverflow.com/questions/38080407/how-can-i-install-the-latest-anaconda-with-wget | |
| latest=$(wget -qO- https://repo.anaconda.com/archive/ | | |
| grep -Eo "(href=\")(Anaconda3-.*-Linux-x86_64.sh)*\"" | | |
| sed 's/href=//g' | sed 's/\"//g' | head -n 1); wget "https://repo.anaconda.com/archive/$latest" | |
| bash $latest -b | |
| rm $latest | |
| echo 'export PATH="~/anaconda3/bin:$PATH"' >> ~/.bashrc |