https://augustpinch.com/qnd7d2fhd?key=ed5dbed8ecdd9af92e2b54e652945382
8
Wednesday, May 28, 2025
Tuesday, May 27, 2025
Monday, May 26, 2025
Sunday, May 25, 2025
Monday, May 19, 2025
SYSTEM INFORMATION CHECKER TOOL
import platform
import psutil
import socket
import shutil
def get_system_info():
print("=== System Information Checker ===\n")
# OS details
print(f"Operating System: {platform.system()} {platform.release()} ({platform.version()})")
print(f"Machine: {platform.machine()}")
print(f"Processor: {platform.processor()}")
print(f"Architecture: {' '.join(platform.architecture())}")
# CPU info
print(f"CPU Cores (Logical): {psutil.cpu_count(logical=True)}")
print(f"CPU Cores (Physical): {psutil.cpu_count(logical=False)}")
# Memory info
virtual_mem = psutil.virtual_memory()
print(f"Total RAM: {virtual_mem.total / (1024 ** 3):.2f} GB")
print(f"Available RAM: {virtual_mem.available / (1024 ** 3):.2f} GB")
# Disk info
total, used, free = shutil.disk_usage("/")
print(f"Disk Total: {total / (1024 ** 3):.2f} GB")
print(f"Disk Used: {used / (1024 ** 3):.2f} GB")
print(f"Disk Free: {free / (1024 ** 3):.2f} GB")
# Network info
hostname = socket.gethostname()
ip_address = socket.gethostbyname(hostname)
print(f"Hostname: {hostname}")
print(f"IP Address: {ip_address}")
print("\n=== End of Report ===")
if __name__ == "__main__":
get_system_info()
Friday, May 16, 2025
TEXT AND HTML FILE GENERATOR TOOL
Here's a simple implementation of a Txt & Html File Generator tool using Python:
import tkinter as tk
from tkinter import filedialog, messagebox
class FileGenerator:
def __init__(self, root):
self.root = root
self.root.title("Txt & Html File Generator")
# Filename
tk.Label(self.root, text="Filename:").grid(row=0, column=0, padx=5, pady=5)
self.entry_filename = tk.Entry(self.root, width=50)
self.entry_filename.grid(row=0, column=1, padx=5, pady=5)
# Title
tk.Label(self.root, text="Title (for HTML file):").grid(row=1, column=0, padx=5, pady=5)
self.entry_title = tk.Entry(self.root, width=50)
self.entry_title.grid(row=1, column=1, padx=5, pady=5)
# Content
tk.Label(self.root, text="Content:").grid(row=2, column=0, padx=5, pady=5)
self.text_content = tk.Text(self.root, width=50, height=10)
self.text_content.grid(row=2, column=1, padx=5, pady=5)
# Directory
tk.Label(self.root, text="Directory:").grid(row=3, column=0, padx=5, pady=5)
self.entry_directory = tk.Entry(self.root, width=50)
self.entry_directory.grid(row=3, column=1, padx=5, pady=5)
tk.Button(self.root, text="Browse", command=self.browse_directory).grid(row=3, column=2, padx=5, pady=5)
# Generate Files
tk.Button(self.root, text="Generate Files", command=self.generate_files).grid(row=4, column=1, padx=5, pady=5)
def browse_directory(self):
directory = filedialog.askdirectory()
if directory:
self.entry_directory.delete(0, tk.END)
self.entry_directory.insert(0, directory)
def generate_files(self):
filename = self.entry_filename.get()
title = self.entry_title.get()
content = self.text_content.get("1.0", tk.END)
directory = self.entry_directory.get()
if not filename or not title or not content or not directory:
messagebox.showerror("Error", "Please fill in all fields.")
return
try:
with open(f"{directory}/{filename}.txt", "w") as file:
file.write(content)
with open(f"{directory}/{filename}.html", "w") as file:
file.write(f"""
{title}
{title}
{content}
""") messagebox.showinfo("Success", "Files generated successfully.") except Exception as e: messagebox.showerror("Error", str(e)) if __name__ == "__main__": root = tk.Tk() file_generator = FileGenerator(root) root.mainloop() This tool allows you to: 1. Enter a filename 2. Enter a title for the HTML file 3. Enter content for both files 4. Choose a directory to save the files 5. Generate both a text file and an HTML file with the given filename, title, and content. To run this tool, save the code to a file (e.g., `file_generator.py`) and run it using Python: python file_generator.pyWednesday, May 14, 2025
SYSTEM INFORMATION CHECKER TOOL
Here's a basic example of a system information checker tool written in Python:
```
import platform
import psutil
def get_system_info():
print("System Information:")
print(f"System: {platform.system()}")
print(f"Release: {platform.release()}")
print(f"Version: {platform.version()}")
print(f"Machine: {platform.machine()}")
print(f"Processor: {platform.processor()}")
def get_cpu_info():
print("\nCPU Information:")
print(f"Physical cores: {psutil.cpu_count(logical=False)}")
print(f"Total cores: {psutil.cpu_count(logical=True)}")
print(f"Current frequency: {psutil.cpu_freq().current} Mhz")
print(f"Max frequency: {psutil.cpu_freq().max} Mhz")
print(f"Min frequency: {psutil.cpu_freq().min} Mhz")
print(f"CPU usage: {psutil.cpu_percent()}%")
def get_memory_info():
print("\nMemory Information:")
svmem = psutil.virtual_memory()
print(f"Total memory: {get_size(svmem.total)}")
print(f"Available memory: {get_size(svmem.available)}")
print(f"Used memory: {get_size(svmem.used)}")
print(f"Percentage: {svmem.percent}%")
def get_size(bytes):
for unit in ['', 'K', 'M', 'G', 'T', 'P']:
if bytes < 1024:
return f"{bytes:.2f}{unit}B"
bytes /= 1024
def main():
get_system_info()
get_cpu_info()
get_memory_info()
if __name__ == "__main__":
main()
```
This script uses the `platform` and `psutil` libraries to gather system, CPU, and memory information.
To run this script, you'll need to install the `psutil` library if you haven't already:
```
bash
pip install psutil
```
This tool provides basic system information, including:
- System type, release, version, machine, and processor
- CPU information, including physical and total cores, current frequency, and usage
- Memory information, including total, available, and used memory
You can modify and expand this script to suit your needs.
Subscribe to:
Posts (Atom)
HEALTHY INDIAN BREAKFAST RECIPE
Healthy Indian Breakfast Recipe: Vegetable Upma Ingredients: 1 cup semolina (rava/sooji) 2 tablespoons ghee or oil 1 teaspoon mustard...
-
*Online Stock Photography: Sell Your Snaps* Are you a budding photographer with a penchant for snapping stunning images? Look no further! O...
-
Smart Affiliate Link Generator 💰 Smart Affiliate Link Generator Enter your blog/content: Enter keywords and affili...
-
QR Code Generator QR Code Generator Text WhatsApp Email Phone ...