| tar -xvC mydirectory/ -f myarchive.tgz |
| ls *.gz |xargs -n1 tar -xvC /home/daporte/PycharmProjects/4d-graphs/models -f |
|
|
| untar mutliple files into separate dirs: |
| for file in *results.tar.gz; |
| do mkdir -p "/home/daporte/PycharmProjects/4d-graphs/results/trial_${file%.tar.gz*}"; |
| tar -xf $file -C "/home/daporte/PycharmProjects/4d-graphs/results/trial_${file%.tar.gz*}"; |
| done |
|
|
|
|
| unzip: |
| unzip '*.zip' |
| tar -xf archive.tar.bz2 |
|
|
|
|
| list ssh keys: |
| ls -al ~/.ssh |
|
|
|
|
|
|
|
|
| To quickly kill all the stopped jobs under the bash, enter: |
| kill -9 `jobs -ps` |
|
|
|
|
| ssh setup key: |
| ssh-keygen |
| ssh-add |
| eval `ssh-agent -s` / Could not open a connection to your authentication agent. |
|
|
|
|
|
|
| SSH jupyer notebooks: |
| Essentially you just run the notebook on the remote in no browser mode. |
| jupyter notebook --no-browser --port=8080 |
| Then setup up an ssh tunnel from the local machine: |
| ssh -L 8080:localhost:8080 <REMOTE_USER>@<REMOTE_HOST> |
|
|
|
|
| Sizes of files: |
| du -sh ./*| sort -h |
| du -ah .| sort -h |
|
|
|
|
| copy and rename multiple files: |
| pax -rw -pe -s/2015/2016/ source/ target/ |
|
|
| copy file to/from server: |
| scp /file/to/send username@remote:/where/to/put |
| scp username@remote:/file/to/send /where/to/put |
|
|
|
|
| find string in folders: |
| grep -r "register_long_arrays" * |
|
|
|
|
| find file in folder: |
| find /search/directory/ -name "matching file search criteria" |
|
|
| Linux version: |
| hostnamectl |
|
|
|
|
| Conda: |
|
|
| conda config --add channels conda-forge |
| conda config --set channel_priority strict |
|
|
| conda install --file requirements.txt |
|
|
| Install env in a specific dir: |
| conda create --prefix speech_gen --file ~/speech_generation/requirements.txt |
|
|
| install miniconda: |
|
|
| mkdir -p ~/miniconda3 |
| wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh |
| bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 |
| rm -rf ~/miniconda3/miniconda.sh |
| ~/miniconda3/bin/conda init bash |
| ~/miniconda3/bin/conda init zsh |
|
|
| install mamba: |
| conda install mamba -n base -c conda-forge |
|
|
|
|
| |
| name: test-env |
| dependencies: |
| - python>=3.5 |
| - anaconda |
| - pip |
| - pip: |
| - -r file:requirements.txt |
|
|
|
|
| mamba create -n speechbrain --file environment.yml |
|
|
|
|
|
|
| pip venv: |
|
|
| https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/ |
|
|
|
|
| python3 -m venv env |
| source env/bin/activate |
|
|
| jupyter: |
| nb_conda_kernels : conda kernels not showing up |
|
|
| speech_gen: |
|
|
| cachemanager error: upgrade librosa |
|
|
|
|
| CUDA: |
| export CUDA_VISIBLE_DEVICES=0,1 |