Tools for checking vulnerabilities in Python code. Safety - Dependency Scanner 1# Install 2pip install safety 3 4# Check dependencies 5safety check 6 7# Check requirements file 8safety check -r requirements.txt 9 10# JSON output 11safety check --json Bandit - Static Security Analysis 1# Install 2pip install bandit 3 4# …
Read MoreEssential PyTorch operations and patterns for deep learning. Installation 1# CPU version 2pip install torch torchvision torchaudio 3 4# GPU version (CUDA 11.8) 5pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 6 7# Check installation 8python -c "import torch; …
Read MorePython examples for accessing Raspberry Pi GPIO, I2C, SPI, I2S, and PWM. GPIO (Digital I/O) Installation 1# Install RPi.GPIO 2sudo apt install python3-rpi.gpio 3 4# Or use pip 5pip3 install RPi.GPIO 6 7# Alternative: gpiozero (higher-level) 8pip3 install gpiozero Basic GPIO (RPi.GPIO) 1import RPi.GPIO as GPIO 2import …
Read MoreEssential TensorFlow operations and patterns for deep learning. Installation 1# CPU version 2pip install tensorflow 3 4# GPU version 5pip install tensorflow[and-cuda] 6 7# Check installation 8python -c "import tensorflow as tf; print(tf.version)" Basic Tensor Operations 1import tensorflow as tf 2 3# Create …
Read MoreWeb Scraping with Python
Web scraping tools and techniques with Python. Includes BeautifulSoup, Scrapy, Selenium, and crawl4ai patterns. BeautifulSoup - HTML Parsing Installation 1pip install beautifulsoup4 requests lxml Basic Usage 1import requests 2from bs4 import BeautifulSoup 3 4# Fetch page 5url = "https://example.com" 6response = …
Read MoreVS Code is an light but powerful editor developed by Microsoft. I have been using this editor for Python and embedded development(using PlatformIO) for a few months now. Using PlatformIO with VSCode is rather simple - just install it through built in package manager and you're good to go. However python development …
Read More