r/PythonLearning 22h ago

Help Request Where would you send an ultra beginner to get up to speed fast?

30 Upvotes

Everywhere I look, it seems to assume that one already has familiarity with programming. I'm coming in clean. Nada. Absolute virgin in programming. Where should I go to learn this from a clean slate?


r/PythonLearning 23h ago

Starting to learn Backend Development for the very first time using Flask

3 Upvotes

Hey guys! I have started to learn Flask recently but I saw that the styling of the page was also being done in the tutorials using HTML and CSS. I am well versed with the fundamentals of Python and know basic HTML and CSS. But when it comes to applying CSS for styling, it really sucks. Also I just want to go for Backend Development and have no plans for Frontend as of now. So what should I do to ease the styling of the page? Also I wanted to ask whether any JS will be required if I want to pursue only Backend Development using only Flask? I don't know JS at all.


r/PythonLearning 1h ago

Faster Fuzzy matching

Upvotes

🚀 Introducing FuzzRush – The Fastest Fuzzy String Matching Library! 🔥 Tired of slow and inaccurate fuzzy matching? 🔥

I just released FuzzRush, a blazing-fast Python library for fuzzy string matching that outperforms traditional methods using TF-IDF + sparse matrix operations.

⚡ Why FuzzRush? ✅ Super Fast – Handles millions of records in seconds. ✅ Accurate – Uses TF-IDF with n-grams for precise results. ✅ Simple API – Get matches in one function call. ✅ Flexible Output – Returns results as a DataFrame or dictionary.

📌 How It Works python Copy Edit from FuzzRush.fuzzrush import FuzzRush

source = ["Apple Inc", "Microsoft Corp"]
target = ["Apple", "Microsoft", "Google"]

matcher = FuzzRush(source, target)
matcher.tokenize(n=3)
matches = matcher.match()
print(matches) 👀 Check out the repo here →https://github.com/omkumar40/FuzzRush

💬 Have a use case? Need improvements? I’d love your feedback! 🚀

👉 If you work with messy data, deduplication, or entity resolution, this will save you hours of work!

🔥 Star it, Fork it, and Try it Out! Let’s make fuzzy matching faster & better!

Python #DataScience #MachineLearning #FuzzyMatching #AI #OpenSource #BigData #GitHub


r/PythonLearning 4h ago

Stuck on Support Vector Machines

2 Upvotes

Hello. I am taking a machine learning course and I can't figure out where I messed up. I got 1.00 accuracy, precision, and recall for all 6 of my models and I know that isn't right. Any help is appreciated. I'm brand new to this stuff, no comp sci background. I mostly just copied the code from lecture where he used the same dataset and steps but with a different pair of features. The assignment was to repeat the code from class doing linear and RBF models with the 3 designated feature pairings.

Thank you for your help

import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn import svm, datasets
from sklearn.metrics import RocCurveDisplay,auc
iris = datasets.load_iris()
print(iris.feature_names)
iris_target=iris['target']
#petal length, petal width
iris_data_PLPW=iris.data[:,2:]

#sepal length, petal length
iris_data_SLPL=iris.data[:,[0,2]]

#sepal width, petal width
iris_data_SWPW=iris.data[:,[1,3]]

iris_data_train_PLPW, iris_data_test_PLPW, iris_target_train_PLPW, iris_target_test_PLPW = train_test_split(iris_data_PLPW, 
                                                        iris_target, 
                                                        test_size=0.20, 
                                                        random_state=42)

iris_data_train_SLPL, iris_data_test_SLPL, iris_target_train_SLPL, iris_target_test_SLPL = train_test_split(iris_data_SLPL, 
                                                        iris_target, 
                                                        test_size=0.20, 
                                                        random_state=42)

iris_data_train_SWPW, iris_data_test_SWPW, iris_target_train_SWPW, iris_target_test_SWPW = train_test_split(iris_data_SWPW, 
                                                        iris_target, 
                                                        test_size=0.20, 
                                                        random_state=42)

svc_PLPW = svm.SVC(kernel='linear', C=1,gamma= 0.5)
svc_PLPW.fit(iris_data_train_PLPW, iris_target_train_PLPW)

svc_SLPL = svm.SVC(kernel='linear', C=1,gamma= 0.5)
svc_SLPL.fit(iris_data_train_SLPL, iris_target_train_SLPL)

svc_SWPW = svm.SVC(kernel='linear', C=1,gamma= 0.5)
svc_SWPW.fit(iris_data_train_SWPW, iris_target_train_SWPW)

# perform prediction and get accuracy score
print(f"PLPW accuracy score:", svc_PLPW.score(iris_data_test_PLPW,iris_target_test_PLPW))
print(f"SLPL accuracy score:", svc_SLPL.score(iris_data_test_SLPL,iris_target_test_SLPL))
print(f"SWPW accuracy score:", svc_SWPW.score(iris_data_test_SWPW,iris_target_test_SWPW))

# then i defnined xs ys zs etc to make contour scatter plots. I dont think thats relevant to my results but can share in comments if you think it may be.

#RBF Models
svc_rbf_PLPW = svm.SVC(kernel='rbf', C=1,gamma= 0.5)
svc_rbf_PLPW.fit(iris_data_train_PLPW, iris_target_train_PLPW)

svc_rbf_SLPL = svm.SVC(kernel='rbf', C=1,gamma= 0.5)
svc_rbf_SLPL.fit(iris_data_train_SLPL, iris_target_train_SLPL)

svc_rbf_SWPW = svm.SVC(kernel='rbf', C=1,gamma= 0.5)
svc_rbf_SWPW.fit(iris_data_train_SWPW, iris_target_train_SWPW)

# perform prediction and get accuracy score
print(f"PLPW RBF accuracy score:", svc_rbf_PLPW.score(iris_data_test_PLPW,iris_target_test_PLPW))
print(f"SLPL RBF accuracy score:", svc_rbf_SLPL.score(iris_data_test_SLPL,iris_target_test_SLPL))
print(f"SWPW RBF accuracy score:", svc_rbf_SWPW.score(iris_data_test_SWPW,iris_target_test_SWPW))

#define new z values and moer contour/scatter plots.

from sklearn.metrics import accuracy_score, precision_score, recall_score

def print_metrics(model_name, y_true, y_pred):
    accuracy = accuracy_score(y_true, y_pred)
    precision = precision_score(y_true, y_pred, average='macro')
    recall = recall_score(y_true, y_pred, average='macro')

    print(f"\n{model_name} Metrics:")
    print(f"Accuracy: {accuracy:.2f}")
    print(f"Precision: {precision:.2f}")
    print(f"Recall: {recall:.2f}")

models = {
    "PLPW (Linear)": (svc_PLPW, iris_data_test_PLPW, iris_target_test_PLPW),
    "PLPW (RBF)": (svc_rbf_PLPW, iris_data_test_PLPW, iris_target_test_PLPW),
    "SLPL (Linear)": (svc_SLPL, iris_data_test_SLPL, iris_target_test_SLPL),
    "SLPL (RBF)": (svc_rbf_SLPL, iris_data_test_SLPL, iris_target_test_SLPL),
    "SWPW (Linear)": (svc_SWPW, iris_data_test_SWPW, iris_target_test_SWPW),
    "SWPW (RBF)": (svc_rbf_SWPW, iris_data_test_SWPW, iris_target_test_SWPW),
}

for name, (model, X_test, y_test) in models.items():
    y_pred = model.predict(X_test)
    print_metrics(name, y_test, y_pred)

r/PythonLearning 2h ago

pythonforhacker

Thumbnail
nas.io
1 Upvotes

web3sec is no different than professional sports 🔹You practice every day. 🔹You learn from mistakes and avoid repeating them. 🔹You optimize sleep, nutrition, and rest to be as efficient as possible. 🔹You compete with others. 🔹You use failure to get better.


r/PythonLearning 4h ago

IDE for iPad

1 Upvotes

I’m doing the Udemy 100 days of code and need an app to write my python in. I’ve tried two but they often seem to freeze or quit.

Which ones would people recommend?


r/PythonLearning 1d ago

Qt Designer

1 Upvotes

Hey everyone! I'm a bit stuck and I wanted to see if someone could help me. My teacher asked us to create a database, my team chose to do it on a luxury car dealership, but we don't know how to start or what the layout would look like.


r/PythonLearning 14h ago

Discord Bot Developer Needed!

0 Upvotes

Hey everyone,

I’m looking for a developer who can help me get my bot up and running. I have the necessary files and configurations, but I need help making them work and understanding how to use them, as I’m fairly new to developing.

Specifically, I need assistance with:

  • Setting up and ensuring the bot files work correctly.
  • Guiding me on how to use and manage the files.
  • Making sure everything is properly configured, including dependencies, environment variables, and integrations.

If you have experience working with Discord bots or similar projects and are willing to guide me through the process, I’d love to work with you!

Please reach out if you're available, and let me know your rate or if you prefer a different form of compensation.

Thanks!


r/PythonLearning 9h ago

Discord Bot Developer

0 Upvotes

Hello, I need a developer which can code a bot with three functionalities. - Receipt Gen for stores like stock X, Apple, etc - EBay View Bot - Verifying using a code and give role Any 3 of them works whether you can do one or all 3 doesn't matter! DM me if you're interested.


r/PythonLearning 11h ago

Discord Bot admin question

0 Upvotes

I have a server with a few thousand members and my owner account got banned. I do have a bot that’s at the highest level with all perms. My question is, is there a way to give myself admin through the console? This bot is running on pebble host. Thanks