Skip to main content

Questions tagged [python]

Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability. Use the python tag for all Python related questions. If you believe your question may be even more specific, you can include a version specific tag such as python-3.x.

Filter by
Sorted by
Tagged with
2 votes
1 answer
67 views

Time Series Forecasting

I'm currently working on a project involving time series analysis and have written the following code for the train-test split section. I'm particularly concerned about the correctness of the ...
5 votes
2 answers
346 views

Cost sharing application in Python

I am very new to Python (yes, I know it's been around a long time). This is my first working just-for-fun project to see if I could do something in Python. I know the UI layout is rather ugly and ...
8 votes
1 answer
812 views

Typical password generator in Python

Password generators are extremely popular on CodeReview with beginners to both coding in general and Python in particular, for a number of reasons: They're (seemingly) easy to implement They offer an ...
-1 votes
0 answers
60 views

Pythonic ways to break up long string (xpath) [closed]

Consider the following f-string which generates an xpath. ...
1 vote
1 answer
36 views

Send a QNetworkRequest with a parameter

I want to send multiple QNetworkRequests in Python 3.12 that each downloads one image from a server, using a single callback function. To be able to distinguish ...
3 votes
2 answers
86 views

SEO Page Analysis Tool built in Python and Django

Objective: Develop an SEO analysis tool, for a website built in Django, that allows users to input a URL and receive an SEO report containing information about the page's optimization strengths and ...
8 votes
2 answers
1k views

Beginner level password generator optimization

I've been learning python for a few days now, and I programmed this password generator after today's lesson (following the 100 days of code on udemy course). This code works like it should and gives ...
6 votes
3 answers
1k views

Implementation of Euler-Maruyama numerical solver

I am trying to write a python implementation of Euler-Maruyama and Milstein schemes for numerically solving stochastic differential equations. The pseudo-code for the algorithms is in the Wikipedia ...
6 votes
3 answers
944 views

Code review for python password generator

The following code is a simple random password generator that spits out a randomized password based on some input flags. ...
-6 votes
1 answer
68 views

I am new/weak in Python and am wanting to utilize the help of Chat GPT to do some of the initial heavy lifting. What are your thought/concerns? [closed]

I used to have a strong background in BASIC, Fortran, Visual Basic, and studied some C, C#, Visual C#, C++, Etc. But am weak in Java and Python. I would like to explore Python and other light ...
5 votes
2 answers
619 views

Alternatives to iterrow loops in python pandas dataframes

I have a piece of code to calculate price sensitivity based on the product and its rating. Below is the original data set with product type, reported year, customer’s rating, price per unit, and ...
0 votes
1 answer
59 views

Replace iterrow loops in pandas matrices with something else to shorten the running time

This post is modified from this one: https://codereview.stackexchange.com/posts/292885/edit (Alternatives to iterrow loops in python pandas dataframes). I have a piece of code to calculate price ...
-3 votes
1 answer
71 views

Initializing an object using a staticmethod

I've an object that looks like this, and users have been populating the attributes post-initialization, e.g. ...
4 votes
1 answer
750 views

Password generator in Python 3

I would like to see what you think of a password generator I coded in Python. ...
3 votes
3 answers
1k views

Simple Random Password Generator in Python

I've made a password generator that works fine. It takes alphabetic, numeric, and punctuation characters and randomly generates a 8-16 character password. ...
2 votes
1 answer
429 views

Password generator project in Python

A few days ago I posted my password generator project to help me learn and become more comfortable. I got a lot of great replies from that and I've sense updated and would love another look at the ...
-3 votes
1 answer
72 views

Extremely simple python password generator [closed]

I tried to make a password generator and at first it works as intended, generating a password with lowercase, uppercase and special characters but I can only generate passwords of up to 19 characters ...
7 votes
5 answers
2k views

First password generator in Python

This is my first project using Python. I made a simple password generator that checks user input. How can I improve it? ...
3 votes
1 answer
1k views

Password Generator with GUI

I just finished my first GUI app, a Password Generator that can take any characters you want(I've added some default characters to make your life easier), and a password length up to 999, and some ...
15 votes
4 answers
4k views

Password generator in python

Here's a password generator I created. ...
7 votes
2 answers
4k views

Python 3.4 password generator

I'm pretty new to Python and I made a password generator. I would like you to check it out and give me tips on how I could do it better. ...
4 votes
3 answers
145 views

Password Generator Python

I decided to make a password generator to get more familiar with Python. I had to break up the code into two boxes due to weird Stack Exchange highlighting with the triple quotes. How would you ...
6 votes
2 answers
3k views

Password generator in Django

I am a system admin, not a developer, so this might be pretty horrible code. This is a password generator. The point of the attempt was to become more familiar with Django at a lower level. I current ...
2 votes
2 answers
2k views

Python password generator

This is considered as my second python project, I made the password generator where user has to input length of password minimum 5. I made the code that it will guarantee at least one lowers case, ...
2 votes
3 answers
134 views

Python object-oriented password generator

I have made a random password generator using a class called password and a method called generate. My program works as it ...
9 votes
3 answers
2k views

A password generator

This a small project for a beginner, it basically generate symbols digits letters depending on the user input I want to make the code better and learn from my mistakes. ...
6 votes
2 answers
767 views

Password Generator with injected password model

I'm getting started with Python and one of the beginner projects to learn the language was a password generator (one of the dozens already in CodeReview). I have a C# and JS background so I want to ...
2 votes
1 answer
83 views

Password generator - different solutions

I made a simple password generator (once again). ...
5 votes
2 answers
432 views

Simple password generator with a GUI

I made a simple password-generating app with a GUI written in Python and the tkinter library. Here's how the GUI looks like: The passwords are strings composed of ...
9 votes
6 answers
3k views

Python password generator class

I am a self taught python developer and I trying to write clean code as mush as possible. Since I do not have any environment that can give me constructive criticism, I would like to hear your ...
1 vote
1 answer
164 views

Python password generator with Tkinter

I program in Python as a hobby and this week I decided to write a program that generates 16 character long passwords. I wrote this program as a class, which i rarely do. Because of this I think I ...
1 vote
1 answer
150 views

Password keeper / generator application in Python

I've written this password-keeper application to keep my passwords safe in one place. From something over few lines it grew to almost 200 lines of code. I would greatly appreciate it if someone could ...
4 votes
1 answer
124 views

Python Password Generator with custom parameters

I have the following code here It's a password generator that lets you choose a completely random password with a certain length of a custom password with different amounts of character types. I want ...
10 votes
3 answers
2k views

Python command-line program that generates passwords

I took my code from this answer by me, I found it useful, so I developed it further, and here is the result. This script generates cryptographically secure passwords. The characters used by the ...
2 votes
0 answers
141 views

Truly cryptographically secure password generator in Python, version 2

Following suggestions from answers from my previous question, I have completely rewrote my script, to make it more concise and Pythonic, truly cryptographically secure, and added more functionality. ...
3 votes
1 answer
150 views

Python command line password generator

After giving a couple of well-received answers to similar questions, I thought I'd try to come up with my own solution. I believe that a good password generator can and should be quite simple without ...
0 votes
2 answers
213 views

Generate random password from a list of allowed characters

The code itself is a random password generator which is encapsulated. The other question about this code is whether it should be encapsulated on its main function. Or is it enough to exist in its own ...
2 votes
3 answers
143 views

Python Program Automatically Changing Mac Wallpaper to Nasa's Astronomy Picture of the Day

...
0 votes
2 answers
51 views

Feature subset selection using neural network

This listing selects the best features from the 1011 available columns in a given dataset. The first three columns are dropped because they are useless data. The dataset is huge. So, they were read in ...
5 votes
3 answers
903 views

Optimizing Pi Estimation Code

I'm trying to write a program in Python that estimates pi, but to get a more accurate estimation in a feasible amount of time, I want to make it faster. I'm using a method that estimates the area of ...
4 votes
2 answers
140 views

Excel sheet manipulation program

I'm very new to programming, and I'm hoping I can get feedback on the code I wrote - anything is helpful - what to split into different files (right now 1 large file), perhaps a way to break up the <...
-4 votes
0 answers
45 views

Solving genetic algorithm [closed]

I am new to programming, and I am hoping that I can get feedback on the code I wrote. I am currently using the code below and I hope that the results can be improved. ...
6 votes
8 answers
1k views

Reversing vowels in a string

Given a string s, reverse only all the vowels in the string and return it. The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both lower and upper ...
2 votes
3 answers
685 views

Capture multiple errors before raising an exception

I have a scenario where I need to store values from some environment variables (names of which I cannot control). My first run at this was pretty basic, however this is not usable as an exception ...
2 votes
2 answers
129 views

"Element Fusion" game where 2048 meets Chemistry

I've developed "Element Fusion," a PyGame-based game inspired by 2048 but using chemical elements. I'm seeking feedback on: Gameplay mechanics Code structure and efficiency PyGame ...
3 votes
2 answers
130 views

Check for key in dictionary without magic value comparison

I'm using pydantic in a project to check file formatting for an object, as well as pylint for linting. Whenever I read a file with an invalid format, I want to raise an exception with a descriptive ...
5 votes
3 answers
7k views

Finding a common prefix/suffix in a list/tuple of strings

The question that sparked this question, was one on Stack Overflow in which the OP was looking for a way to find a common prefix among file names( a list of strings). While an answer was given that ...
5 votes
1 answer
79 views

Backend-snippet of a full-stack web application for creating, viewing, and registering for events

The backstory (you can skip this if you want to) This code stems from a project that I had to do for a presentation for a university class around November 2023. The task was the following: Create a ...
0 votes
0 answers
38 views

Scrapy Spider - Code Audit and Optimization Suggestions

I've written a Scrapy spider to scrape product details from a specific website. The spider is designed to navigate through various pages, locate specific products, and gather detailed information ...
2 votes
1 answer
57 views

Scrapy Spider for fetching product data from multiple pages of a website

I have written a Scrapy spider to scrape product data from a website. The spider navigates through multiple pages to reach a specific product and extracts details such as the product name, price, ...

1
2 3 4 5
311