This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Linux Commands : | |
top: This is an interactive, real-time process viewer. When you run top, it displays a list of running processes that automatically updates, with the most CPU-intensive processes at the top. It's a great tool for monitoring a server's performance and identifying resource-hungry processes. | |
htop: An enhanced, user-friendly version of top. htop offers a more colorful and intuitive interface, and you can use a mouse to interact with it, making it easier to sort processes, search, or kill a specific process. | |
ps: The ps (process status) command provides a snapshot of the processes currently running on the system. It's not interactive like top, but it's very useful for scripting and filtering. | |
ps aux: This is a very common variation. a shows processes for all users, u provides a user-oriented format with details like CPU and memory usage, and x includes processes not attached to a terminal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
from sklearn.metrics import confusion_matrix, roc_curve, roc_auc_score | |
def find_optimal_threshold(y_true, y_scores): | |
""" | |
Find the optimal threshold that minimizes the difference between | |
sensitivity and specificity. | |
Parameters: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step-by-step: Register a Conda environment with Jupyter | |
Let’s say your environment is called name_env: | |
1. Activate the environment: | |
conda activate name_env | |
2. Install ipykernel inside that env: | |
$pip install ipykernel | |
(or conda install ipykernel if you prefer) | |
3. Add the environment to Jupyter as a kernel: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
***to see all the tmux sessions : $ tmux ls | |
***to open the session created before : $ tmux attach -t 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use a Personal Access Token (PAT) | |
Instead of your GitHub password, you generate a special token and use that when Git prompts you for a password. | |
🔧 Step-by-step: | |
Go to: https://github.com/settings/tokens | |
Click "Generate new token" (classic) | |
Give it a name (e.g., "Git access from laptop") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🔍 Qu’est-ce qu’un git submodule ? | |
Un submodule Git est comme un lien vers un autre dépôt. Il te permet d'intégrer un projet externe (ou un autre repo) tout en gardant sa gestion séparée. | |
***list the branch : $git branch --list | |
### Rename master to main : $git branch -m master main | |
*** Slelect a specific branch : git branch -M main | |
***Pour voir l’URL du remote origin (pour vérifier l’URL du repo : nom d’utilisateur dans l’URL) : | |
git remote -v |