for i in {1..59}; do sshpass -p THE_SECRET_PASSWORD ssh-copy-id myacount_$i@mymachine.mydomain.com ; done
for i in {1..59}; do ssh myacount_$i@mymachine.mydomain.com << 'EOF'
name: torchcomplex | |
channels: | |
- pytorch | |
- defaults | |
dependencies: | |
- _libgcc_mutex=0.1=main | |
- _openmp_mutex=5.1=1_gnu | |
- blas=1.0=mkl | |
- brotli=1.0.9=h5eee18b_7 | |
- brotli-bin=1.0.9=h5eee18b_7 |
import pathlib | |
import PIL.Image as Image | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import cm | |
import json | |
# Code taken from utils.py on https://github.com/alexsax/2D-3D-Semantics | |
def get_index(color): |
# coding: utf-8 | |
# External imports | |
import numpy as np | |
FIELD_WIDTHS = { | |
'int': 16 | |
} | |
ENDIAN = 'big' |
# The margins were on the right and bottom parts (hence the first rotation to ease margin removal) | |
convert -rotate 180 -crop +130+210 +repage -density 130 -rotate -90 -colorspace gray +repage source.pdf tmp.pdf && mutool poster -x 2 tmp.pdf target.pdf |
# Make the workspace | |
mkdir ~/catkin_ws | |
cd catkin_ws | |
mkdir -p src | |
catkin_make | |
cd src | |
# Clone the required repositories | |
git clone https://github.com/turtlebot/turtlebot.git |
To run a jupyter lab with a specific token, just : | |
jupyter lab --NotebookApp.token='toto' | |
This is handfull to use a custom token , for example when running a batch of jupyter lab for students working remotely to which you just want to provide a token and not the quite complicated instance specific URL. |
Given texts from wikisource, the raw one , with the markup, from here https://fr.wikisource.org/w/index.php?title=Fables_et_opuscules_p%C3%A9dagogiques&action=edit | |
and suppose the whole wiki text is copied in fenelon.txt , we can somehow get rid of the markup and so on with the following | |
cat fenelon.txt | sed '/^</d' | perl -pe 's|\[\[Auteur.*?\]\]||' | sed 's/\[\[//g' | sed 's/\]\]//g' | sed 's/==//g' | sed '/^$/d' | perl -pe 's|<ref>.*?</ref>||' | perl -pe 's|<ref>.*?</ref>||' | perl -pe 's|<sup>.*?</sup>||' | perl -pe 's|</.*?>||' | sed "s/\’/'/g" | sed 's/»/"/g' | sed 's/«/"/g' | perl -pe 's|\{\{.*?\}\}||' | sed 's/œ/oe/g' | sed 's/Œ/OE/g' > fenelon2.txt | |
there are still some markup though. |
# Description of the issue : | |
After pushing a text file, which was UTF-8 encoded (as indicated by the file command) on github and pulling it back on another computer on which I was connected through ssh , | |
I was unable to see the accents in the files (these appeared either as _ _ _ or <C5><A9>, etc..) | |
Then , I added to my bashrc | |
export LANG="en_US.UTF-8" | |
export LC_ALL="en_US.UTF-8" |
# Extract, e.g., the second page | |
pdftk input-file.pdf cat 2 output pageA3.pdf | |
# Scale it up | |
pdfjam --outfile pageA4.pdf --paper a3paper pageA3.pd | |
# Split it in mutiple A4 pages | |
pdfposter pageA3.pdf multipleA4.pdf -m a4 -p 2x1a4 |