r/PythonProjects2 • u/Emergency-Tutor-7 • 56m ago
r/PythonProjects2 • u/Wonderful_Bee_3281 • 7h ago
My first Github Project
i have created my first github project for my college mini project.
your review will help us a lot.
Apex Driver Lab
Qubit-007/Apex-Driver-Lab
A procedural driving simulator and reinforcement-learning sandbox built with Python and PyTorch. Train a policy against generated roads and traffic, inspect its behavior in a live GUI, and resume from versioned local checkpoints.
This project is an educational simulation. It is not designed, validated, or safe for controlling real vehicles.
Capabilities
r/PythonProjects2 • u/Rayterex • 4h ago
Polishing the New Version of the Halftoning Tool
Enable HLS to view with audio, or disable this notification
r/PythonProjects2 • u/Cuatuza • 5h ago
Resource I built a free catalog of Python tutoring prompts across 28 learning blocks. Looking for testers and feedback
Hey everyone! I’ve been working on a project that organizes AI tutoring prompts into a structured learning path. I think AI has a lot of potential for education, and I wanted to explore how much more useful it could be with a clear curriculum and specific teaching instructions.
The current catalog covers Python in 28 learning blocks, from installing Python and writing your first program to testing, databases, APIs, and deployment. Each block has learning objectives and a prompt you can use with an AI assistant.
The prompts ask the AI to explain concepts, check your understanding through open-ended questions, give you practical exercises, and review your work. Based on your answers, it should revisit anything you’re struggling with and adapt to your pace. For more complex exercises, the AI guides you through the problem without solving it for you.
My goal is to make a thorough Python learning path available for free. I believe AI tutoring could offer learning experiences comparable to paid courses, and I’d like to test how well this approach works in practice.
If you’re learning Python, whether you’re starting from scratch or filling gaps in your knowledge, I’d love for you to give it a try. I’m looking for people to use it and help me find out how well it works in practice.
If you try it, I’d appreciate hearing how it goes: what helped, what was confusing, or what could be better. But you don’t have to give feedback if you don’t want to; you’re welcome to just use it to learn.
Web: Click here and start learning Python with your AI tutor
r/PythonProjects2 • u/WritHerAI • 5h ago
Un piccolo widget sempre in primo piano che mi avvisa quando Claude Code ha bisogno di me (Windows, open source).
r/PythonProjects2 • u/dfbaggins • 7h ago
First Steps into Frames in Python
tech.daniellbastos.com.brr/PythonProjects2 • u/EvgenyKolyakov • 10h ago
GAGP - Transform your GitHub activity graph into a work of art.
r/PythonProjects2 • u/Lance_2564_ • 18h ago
QN [easy-moderate] Random thing I made
I made a Ratio class in Python. It wasn't too hard, in fact this is very easy and can be done by anyone with a basic understanding of OOP.
import math
class Ratio:
def __init__(self, numerator: float, denominator: float):
self.numerator: float = numerator
self.denominator: float = denominator
def __str__(self) -> str:
return f"The numerator is {self.numerator}, the denominator is {self.denominator}\nIts result is {self.calculate} \nThe lowest form is {self.lowest_form}"
def __repr__(self) -> str:
return f"Ratio(numerator = {self.numerator}, denominator = {self.denominator})"
def __add__(self, ratio2: Ratio) -> Ratio:
"""Adds two ratios together, handles both same
denominator and different denominators"""
if self.denominator == ratio2.denominator:
sum_numerator = self.numerator + ratio2.numerator
return Ratio(sum_numerator, self.denominator)
else:
# Gets LCM of numerator and denominator
main_lcm = self.lcm(self.denominator, ratio2.denominator)
new_ratio1_numerator = self.numerator * (
main_lcm / self.denominator
) # Gets the new numerator, e.g 1:2 + 1:3 now u get 3:6
new_ratio2_numerator = (
ratio2.numerator * (main_lcm / ratio2.denominator)
) # Gets the new numerator of thee second ratio, e.g(Following the above example) 2:6
# Sums the two numerators
sum_numerator = new_ratio1_numerator + new_ratio2_numerator
return Ratio(sum_numerator, main_lcm)
def __sub__(self, ratio2) -> Ratio:
"""Subtracts two ratios, handles both same
denominator and different denominators"""
if self.denominator == ratio2.denominator:
diff_numerator = self.numerator - ratio2.numerator
return Ratio(diff_numerator, self.denominator)
else:
# Gets the denominator LCM of both fractions
main_lcm = self.lcm(self.denominator, ratio2.denominator)
# New numerator, same logic here
new_ratio1_numerator = self.numerator * (
main_lcm / self.denominator
)
new_ratio2_numerator = ratio2.numerator * (
main_lcm / ratio2.denominator
)
diff_numerator = new_ratio1_numerator - new_ratio2_numerator
return Ratio(diff_numerator, main_lcm)
def __mul__(self, ratio2) -> Ratio:
"""Very self explanatory"""
prod_numerator = self.numerator * ratio2.numerator
prod_denominator = self.denominator * ratio2.denominator
return Ratio(prod_numerator, prod_denominator)
def __truediv__(self, ratio2) -> Ratio:
"""For the division of two ratios, e.g 3:4/5:6"""
# Fractional divison is very simple, (x / y) / (z / a) = xa / yz
# The same principle has been applied here
quo_numerator = self.numerator * ratio2.denominator
quo_denominator = self.denominator * ratio2.numerator
return Ratio(quo_numerator, quo_denominator)
def __eq__(self, ratio2) -> bool:
"""Checks if two ratios are equal(in proportion)"""
if not isinstance(ratio2, Ratio):
return False
return (
self.numerator * ratio2.denominator
== self.numerator * ratio2.numerator
)
def calculate(self) -> float:
# Just returns the value of the ratio e.g 3:5 = 0.6
return round(self.numerator / self.denominator, 12)
def lowest_form(self) -> str:
# Returns the lowest form, e.g 10:15 = 2.0, doesn't return Ratio to avoid recursion
hcf = self.hcf(self.numerator, self.denominator)
lowest_numerator = self.numerator / hcf
lowest_denominator = self.denominator / hcf
# If-else block so that 10:15 doesn't output 2.0:3.0
if lowest_numerator.is_integer() and lowest_denominator.is_integer():
return f"{int(lowest_numerator)} : {int(lowest_denominator)}"
else:
return f"{lowest_numerator} : {lowest_denominator}"
def get_multiplier(self, a: str, b: str) -> tuple[int, int]:
from_index_a = (
a.index(".") + 1
) # Finds out how much you need to 10 ** to make a an int
mul1 = 10 ** len(
a[from_index_a:]
) # Figures out the 10 **, e.g for 0.05 this equals 10 ** 2 or 100
from_index_b = b.index(".") + 1 # Same as "a"
mul2 = 10 ** len(b[from_index_b:])
mul_tuple = (mul1, mul2) # Returns a tuple for easier unpacking
return mul_tuple
def lcm(self, a: float, b: float):
# If two numbers are co-prime, i.e HCF(a, b) = 1, then their lcm is a * b
if self.hcf(a, b) == 1:
return a * b
# Fun fact: a * b = hcf(a, b) * lcm(a, b) so lcm(a, b) = ab/hcf(a, b)
else:
return a * b / self.hcf(a, b)
def hcf(self, a: float, b: float):
# If both are ints, why go through the trouble?
if isinstance(a, int) and isinstance(b, int):
return math.gcd(a, b)
elif a.is_integer() and b.is_integer():
return math.gcd(int(a), int(b))
# A bit tricky but easy enough
else:
# What to multiply with to make both floats ints
greatest_mul = max(self.get_multiplier(str(a), str(b)))
# Making the floats into ints
big_a = int(a * greatest_mul)
big_b = int(b * greatest_mul)
# Dividing to return it back as a float and give an accurate hcf
return math.gcd(big_a, big_b) / greatest_mul
Thoughts? Anyways no AI was used. You are free to use this code however you want.
Thanks!
Edit: Yes I do know that the Fraction class exists, this is just a project I made for fun.
r/PythonProjects2 • u/EducationalBrush7282 • 19h ago
I built an open-source process anomaly detection engine using deterministic CUSUM & process-tree graphs (Zero-eBPF required for local testing)
Hey everyone,
Most process anomaly detection systems either trigger overwhelming alert fatigue or rely on black-box AI models that don't explain why an alert fired.
To study process-behavior detection from first principles, I built KERNEL SENTINEL — a Python-first research and detection platform.
Core Architecture & Engineering Highlights:
Since native eBPF requires a Linux kernel, I designed this environment-agnostic Python MVP to validate detection mathematics, streaming telemetry, and process correlation cleanly on Windows/Cross-platform first, while maintaining a strict interface for future native Linux sensor integration.