Skip to content

Instantly share code, notes, and snippets.

View F-Fawzi's full-sized avatar

F.Fatima zahra F-Fawzi

View GitHub Profile
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.
@F-Fawzi
F-Fawzi / find_optimal_threshold.py
Created May 9, 2025 15:13
Function for the calculation of the optimal threshold that minimizes the difference between sensitivity and specificity.
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:
@F-Fawzi
F-Fawzi / Command_Adding_kernel.sh
Last active April 14, 2025 03:58
if you're using Jupyter Notebooks inside a Conda (or virtual) environment, and you want to launch that environment as a kernel inside Jupyter, then you do need to install the IPython kernel in that environment.
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:
@F-Fawzi
F-Fawzi / tmux_command.txt
Created April 13, 2025 05:36
Information and basic command about tmux
***to see all the tmux sessions : $ tmux ls
***to open the session created before : $ tmux attach -t 0
@F-Fawzi
F-Fawzi / Connect_Git_with_Token.txt
Created April 12, 2025 18:28
Note: when trying to push a folder and git ask for username & password, you should not enter password but a token.
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")
@F-Fawzi
F-Fawzi / git-commands-daily.txt
Last active September 24, 2025 15:50
Command git used commanly
🔍 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