Skip to content

Instantly share code, notes, and snippets.

@gnthibault
gnthibault / README.md
Created March 16, 2020 23:04 — forked from Sklavit/README.md
Tornado HTTP web page with embedded Bokeh widget which communicates with other page of the same application

Tornado HTTP web page with embedded Bokeh widget which communicates with other page of the same application

Tornado HTTP web page with embedded Bokeh widget which communicates with other page of the same application.

Features

  • Full Tornado server
  • Bokeh server is started from Tornado server and is executed in the same ioloop
  • Embedded Bohek widget by autoload_server
  • 2 web page communication:
@gnthibault
gnthibault / README.md
Created March 16, 2020 23:04 — forked from Sklavit/README.md
Tornado HTTP web page with embedded Bokeh widget which communicates with other page of the same application

Tornado HTTP web page with embedded Bokeh widget which communicates with other page of the same application

Tornado HTTP web page with embedded Bokeh widget which communicates with other page of the same application.

Features

  • Full Tornado server
  • Bokeh server is started from Tornado server and is executed in the same ioloop
  • Embedded Bohek widget by autoload_server
  • 2 web page communication:
@gnthibault
gnthibault / tmux.sh
Created April 29, 2019 06:09
Tmux cheatsheet
# create sessionL
tmux new -s thibault1
# list session
tmux ls
#Attach to session
tmux attach -t thibault1
# Quit session
@gnthibault
gnthibault / copy.txt
Created August 24, 2018 15:26
Rename a whole bunch of files
find ./dirA -name "*c" -print0 | xargs -0 -I {} mv {} {}_appended
@gnthibault
gnthibault / deletedocker.sh
Created May 31, 2018 07:30
delete docker images
#In order to delete all containers, use the given command
docker rm $(docker ps -a -q)
# In order to delete all images, use the given command
docker rmi $(docker images -q)
@gnthibault
gnthibault / CondaPipTips.txt
Last active August 28, 2018 14:15
Run pip install inside anaconda environments
conda create --name my_name pip
source activate my_name
pip install -r ./requirements.txt
source deactivate my_name
conda env remove --name dash-app
@gnthibault
gnthibault / dockerize_gui.sh
Created May 22, 2018 13:06
How to dockerize a gui application through ssh
python3 python3-pip python3-pyqt5 libgl1-mesa-glx libegl1-mesa libxcomposite1 libxcursor1 libxi6 libxtst6 libfontconfig1 libxrandr2 libasound2 python-tk
SOCK=/tmp/.X11-unix; XAUTH=/tmp/.docker.xauth; xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
docker run -it -e DISPLAY -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH --net host ubuntu spyder3
@gnthibault
gnthibault / copywithstatusbar.sh
Created April 24, 2018 13:20
Copy with a status bar on linux with rsync
rsync --info=progress2 source dest
@gnthibault
gnthibault / get_ubuntu_window_back.txt
Created April 11, 2018 06:23
When ubuntu window is outside of the screen
Be sure to have the off-screen window selected (use Alt-Tab or Super-W for example). Then hold Alt+F7 and move the window with the cursor keys until it appears in the viewport.
@gnthibault
gnthibault / installGDAL.sh
Created March 27, 2018 11:52
Installing GDAL (c++ anf python) on ubuntu 16.04
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt upgrade
sudo apt-get install libgdal-dev libgdal1i
pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL