November 17, 2023
Configuration
#
Remote SSH
#
Host machine
Hostname machine.com
User user_name
IdentityFile path/to/ssh/key
Remote SSH - SSH Tunnel
#
Host tunnel_machine
Hostname machine.com
User user_name
IdentityFile path/to/ssh/key
Host machine_after_tunnel
Hostname machine_after_tunnel.com
User user_name
IdentityFile path/to/ssh/key
ForwardAgent yes
ProxyJump tunnel_machine
PC Configuration
#
Authorize your windows local machine to connect to remote machine.
$USER_AT_HOST="your-user-name-on-host@hostname"
$PUBKEYPATH="$HOME\.ssh\id_ed25519.pub"
$pubKey=(Get-Content "$PUBKEYPATH" | Out-String); ssh "$USER_AT_HOST" "mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo '${pubKey}' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
Verify that the authorized_keys file in the .ssh folder for your remote user on the SSH host is owned by you and no other user has permission to access it.
...October 26, 2023
Installations
#
Configuration
#
- To create a new Hugo website, run:
- Initialize the site as a git repository
- Choose the hugo theme that suits you.
Hugo offer a selection of themes developed by the community. This site for example was built using Hugo-Book.
- Add the theme as a submodule
# For example:
git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book
- Add the theme to your site configuration file
# Could be config.toml OR config.yaml OR hugo.toml OR hugo.yaml
echo "theme = 'hugo-book'" >> config.toml
- You will be able to see a first version of your website locally by running:
- Edit your configuration file
baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
Theme ConfigurationGuidelines
Themes’ publishers offer guidelines to configure your webiste in accordance to the theme. Check your theme publisher page on hugo themes or their theme github repo for guidance and help.
Hosting on Github Pages
#
- On your project settings, go to Pages. You’ll be able to see your site’s link.
- Choose a Build and deployment source (Github actions OR deploy from branch).
- You can also choose to publish it on a custom domain.
- Edit your configuration file
baseURL = 'https://username.github.io/repository'
languageCode = 'en-us'
title = 'My New Hugo Site'
theme = 'hugo-book'
October 24, 2023
1 pip uninstall plotly
2 jupyter labextension uninstall @jupyterlab/plotly-extension
3 jupyter labextension uninstall jupyterlab-plotly
4 jupyter labextension uninstall plotlywidget
5 jupyter labextension update --all
6 pip install plotly==5.17.0
7 pip install "jupyterlab>=3" "ipywidgets>=7.6"
8 pip install jupyter-dash
9 jupyter labextension list
Useful Links
#
June 20, 2023
1- Download packages locally using a requirements file or download a single package
pip download -r requirements.txt
## Example - single package
python -m pip download \
--only-binary=:all: \
--platform manylinux1_x86_64 --platform linux_x86_64 --platform any \
--python-version 39 \
--implementation cp \
--abi cp39m --abi cp39 --abi abi3 --abi none \
scipy
2- Copy them to the a temporary folder in your remote machine
3- On your machine, Activate conda and then install them using pip - specify installation options
...June 8, 2023
Thanks to the Jupyter community, it’s now much easier to run PySpark on Jupyter using Docker.
There are two ways you can do this : 1. the “direct” way and 2. the customized way.
The “direct” way
#
July 12, 2019
Les mêmes principes et critères d’un bon code devraient s’appliquer à la documentation:
- Conventionnelle
- Simple
- Facile à comprendre
En plus des critères d’un bon code, une bonne documentation devrait aussi être:
- Explicative (intention du code, règles métiers, clarification du code, mise en garde sur les conséquences d’une mauvaise
utilisation, indications pour le testing)
- Non-redondante
/**
* Returns the temperature.
*/
int get_temperature(void) {
return temperature;
}
/**
* Always returns true.
*/
public boolean isAvailable()
{ return false;}
Bonnes pratiques
#
Introduire son code.
#
Décrire le contexte ou le background du code est une bonne pratique qui permettra aux lecteurs de se positionner par
rapport aux conditions dans lesquelles le code a été généré et à ses objectifs.
...