Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add random helper code snippets #50

Closed
nmarchio opened this issue Jul 14, 2022 · 5 comments
Closed

Add random helper code snippets #50

nmarchio opened this issue Jul 14, 2022 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@nmarchio
Copy link
Member

nmarchio commented Jul 14, 2022

Environment

conda create --name geospatial python=3.9.7 --yes
source activate geospatial

conda install -c conda-forge pygeos=0.10.2 --yes
conda install -c conda-forge geopandas=0.10.2 --yes 
conda install -c conda-forge urlpath --yes
conda install -c conda-forge requests --yes

conda install -c conda-forge dask --yes
conda install -c conda-forge dask-geopandas --yes
conda install -c conda-forge pyarrow --yes

conda install -c conda-forge rasterio --yes
conda install -c conda-forge xarray --yes
conda install -c conda-forge rioxarray --yes
conda install -c conda-forge momepy --yes

Transfer files

scp nmarchio@midway.rcc.uchicago.edu:/project2/bettencourt/mnp/production/inputs/ghsl/buffered_ghsl.parquet /Users/nm/Desktop
rsync -avz nmarchio@midway.rcc.uchicago.edu:/project2/bettencourt/mnp/production/outputs/streets /Users/nm/Downloads/outputs
scp -r nmarchio@midway.rcc.uchicago.edu:/project2/bettencourt/mnp/production/outputs/complexity /Users/nm/Downloads/outputs
rsync -avz --exclude 'dask' nmarchio@midway.rcc.uchicago.edu:/project2/bettencourt/mnp/production/outputs/complexity /Users/nm/Downloads/outputs

File lists

du -a -h --max-depth=1 | sort -hr
tree -L 1

Midway

rcchelp balance
rcchelp usage --byjob
squeue --user=nmarchio

Push repo

cd /Users/nm/Desktop/repos/kblock
git status
git branch k-refactor
git checkout k-refactor
git add -A
git commit -m "k-refactor"
git push -u origin k-refactor
git stash
git pull origin main

git fetch --all 
git reset --hard origin/main
git pull 

Login to midway

ssh cnetid@midway2.rcc.uchicago.edu
module load python/anaconda-2021.05
source activate pygisparallel
cd /project2/bettencourt/mnp/production/repos/kblock/kblock
bash /project2/bettencourt/mnp/production/repos/kblock/deploy/4-compute-k/job_trigger.sh 
squeue --state=RUNNING --user=nmarchio
rcchelp balance
rcchelp usage --byjob --partition=bigmem2
rcchelp qos
scancel --user=nmarchio
@nmarchio nmarchio added the documentation Improvements or additions to documentation label Jul 14, 2022
@nmarchio nmarchio mentioned this issue Oct 29, 2022
@nmarchio
Copy link
Member Author

nmarchio commented Dec 7, 2022

mv -i /project2/bettencourt/mnp/production/inputs/ecopia/buildings/* /project2/bettencourt/mnp/update/inputs/ecopia/

@nmarchio nmarchio closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2022
@nmarchio
Copy link
Member Author

rm -rI checks2

@nmarchio
Copy link
Member Author



git branch overlay-fix
git checkout overlay-fix
git add kblock/batch_1b_generate_blocks.py
git commit -m "Fix overlay issue"
git push -u origin overlay-fix

module load python/anaconda-2021.05
source activate geospatial


cd /project2/bettencourt/mnp/update/repo/kblock

@nmarchio
Copy link
Member Author

rsync -avz nmarchio@midway.rcc.uchicago.edu:/project2/bettencourt/mnp/production/inputs/ecopia/roads /Users/nm/Downloads/roads

@nmarchio
Copy link
Member Author

nmarchio commented Dec 7, 2023

Check error logs: cd /project2/bettencourt/mnp/prclz/logs

Using a terminal pager to view logs:
less .err
q quit
Using VIM text editor to view logs:
vim .err
shift+g autoscroll to bottom
:q quit
:wq save and quit
:q! quit and don't save
i insert mode
esc leave inserty mode and leave command line mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant