Youssef Ibrahim
@youssef_net
About
Network engineer and security specialist
Q&A Statistics
Recent Questions
How to use Python multiprocessing for parallel tasks
How to check if file exists in Python
How to find and kill a process using a specific port
SSH connection refused - how to troubleshoot
Recent Answers
Re: How to send emails in Python
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart # Email configuration smtp_server = "smtp.gmail.com" port = 587 sender …
Re: How to create Django model relationships
from django.db import models class Author(models.Model): name = models.CharField(max_length=100) class Book(models.Model): title = models.CharField(max_length=200) # ForeignKey (many-to-one) author = models.ForeignKey(Author, …
Re: How to read CSV files in Python
import csv # Using csv module with open('data.csv', 'r') as f: reader = csv.DictReader(f) for row in reader: print(row['column_name']) # …
Re: How to view and manage running processes
# List all processes ps aux # Filter by name ps aux | grep nginx # Interactive process viewer htop …
Re: How to use regular expressions in Python
Basic regex operations import re text = "Email: user@example.com, Phone: 123-456-7890" # Find all matches emails = re.findall(r'[\w.-]+@[\w.-]+', text) # …
Recent Articles
Open Source Projects
No projects yet.