Questions tagged [python-3.x]

Python 3 is the latest version of the Python programming language and was formally released on December 3rd, 2008. Use this tag along with the main python tag to denote programs that are meant to be run on a Python 3 interpreter only. Do not mix this tag with the python-2.x tag.

569 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
14 votes
0 answers
826 views

Let's register that Django user

Short intro So, I've been using Django for a while now and thought it would be nice to start a simple application. In an ideal World, each app must have a way of letting its users register and that's ...
Grajdeanu Alex's user avatar
10 votes
0 answers
1k views

Cyther: The Cross Platform Cython/Python Compiler (Take 2)

I recently posted an earlier version of this code on Code Review, and now with the given suggestions and many other improvements, I am back. I included the description of exactly what Cyther is ...
Nick Pandolfi's user avatar
7 votes
1 answer
189 views

Structuring of my tkinter music player program

This music player app hasn't really completed yet but it runs the basic functions of a music player, which include play/pause, volume adjustment, next/prev, shuffle and repeat functionalities. However,...
CoreVisional's user avatar
6 votes
0 answers
259 views

Thread Art Generation that Creates Embroidery Files

I have made a thread art generator that creates thread patterns from images. Mine is a bit different as it outputs an embroidery file (It embroiders quite nicely, though the settings need a lot of ...
GameDungeon's user avatar
6 votes
0 answers
5k views

Cubic spline interpolation in Python from scratch

I implemented the cubic spline interpolation explained in https://en.wikipedia.org/wiki/Spline_interpolation as a Python class. Of course, such an interpolation should exist already in some Python ...
Ivan ZAR's user avatar
6 votes
0 answers
998 views

2048 AI in Python 3

I am working on an 2048 AI and this is my code so far. In the game 2048 you have a 4x4 grid in that some random so named tiles spawn. Each tile has a number. The lowest number is 2. By using the left,...
codeglow's user avatar
6 votes
0 answers
2k views

Fibonacci heap in Python

I have this implementation of the Fibonacci heap in Python: ...
coderodde's user avatar
  • 27k
6 votes
0 answers
254 views

Selection sort with reduced comparison count: Python iteration 2

Follow up to Selection sort with reduced comparison count - semi-final Iteration? My goal (and excuse not to tag reinventing…) is to have presentable code to argue the viability of reducing the number ...
greybeard's user avatar
  • 6,104
6 votes
0 answers
9k views

Example of multithreading in Python3 / PyQt5 using QThread

I wanted to make a simple example of multithreading with QThread in PyQt5 / Python3. The script generates a set of QLineEdits and buttons to start and stop a set of ...
SDiv's user avatar
  • 161
6 votes
0 answers
3k views

Real-time bitcoin data feed and storage using websocket framework

I'm trying to create data feed script for real time bitcoin data for OkCoin exchange using their websocket API (documentation) and a database manager for storing. There are two channels I am ...
user56951's user avatar
5 votes
0 answers
50 views

Message-free flow-oriented logger

Today, I've got a small FlowLogger for you to review. The idea is not to log pure messages, but focus on the flow of the app that might contain such items as: <...
t3chb0t's user avatar
  • 44.2k
5 votes
0 answers
109 views

A Python script that creates n-flakes

I have written a simple Python script that generates n-flakes using matplotlib. Wikipedia article on N-flake. I wrote two functions, one function generates pentaflake, the other generates hexaflake, I ...
Ξένη Γήινος's user avatar
5 votes
0 answers
184 views

@lazylist - Converts a Python Generator to a List without evaluating every element

Inspired by a blog I read, I made a LazyList class that can wrap an iterable (list, generator etc.) and turn it into a ...
Greedo's user avatar
  • 2,345
5 votes
0 answers
406 views

Process Injector using ctypes and the Windows API

To get some practice with the Windows API and ctypes, I decided to write a program capable of injecting and running shellcode inside of another specified process. ...
Carcigenicate's user avatar
5 votes
1 answer
119 views

Approximation search source reconstruction localization algorithm

Goal To determine the coordinates of some signal source in a 3D space, given the coordinates of four observers and the time at which each saw the signal, as well as the velocity of the signal. ...
10GeV's user avatar
  • 285
5 votes
0 answers
399 views

Sequence and Series Calculator

The Sequences & Series involved are Arithmetic and Geometric. stores and allows you to calculate using these given formulas and import fractions into micropython Support for micropython! ...
Eren Yaegar's user avatar
5 votes
0 answers
728 views

Selecting child contours in OpenCV

I'm really new to OpenCV. :) I have been working on this for almost an entire day. After hours of sleepless work I would like to know if I can further improve my code. I have written some code to ...
Avishka Dambawinna's user avatar
5 votes
0 answers
99 views

Dealing Synchronous Request in Asynchronous Code

Problem I am trying to convert my synchronous code to an asynchronous implementation. Using aiohttp I was able to almost get where I want. My problem is how to ...
user101's user avatar
  • 151
5 votes
0 answers
353 views

what is the correct way to write an endpoint?

Here is a rather large endpoint that I have written in Python using Flask and SQLAlchemy, I was wondering if there are any tips I could get. The endpoint takes a post request which contains specific ...
dmc94's user avatar
  • 173
5 votes
0 answers
654 views

Liveness monitor : python and RabbitMQ together through Pika

I'm a beginner using Python, and I'm trying to implement a functionality of a monitor program already developed by an other programmer. This program is working on a Windows machine (made by Inno ...
Hooli's user avatar
  • 181
5 votes
0 answers
57 views

Form deserializer for Python Flask

I've started working on a small Flask project for no real reason other than fun, and pulled myself back on form validation. I realize that there are existing libraries like WTForms, but wanted to try ...
user avatar
5 votes
0 answers
174 views

Linny: Continued Language Development

A previous question regarding Linny exists here. After a wonderful response on my previous question regarding my developing programming language, I worked on it for a couple days, and am returning ...
Linny's user avatar
  • 9,989
5 votes
0 answers
89 views

Scraping a hiring website using python's requests and BeautifulSoup

I'm designing a scraping application using python, requests and BeautifulSoup4. I decided to divide the logic into two classes: Spider : gets the base url ...
Iduoad's user avatar
  • 151
5 votes
0 answers
92 views

Parsing Long Excel Report Files for Predefined Results

I work as an IT intern in a multinational and I was given a tedious task of combing through a 2500+ long multi-column excel report file in search of inactive servers. Here's a sample row from that ...
baduker's user avatar
  • 1,348
5 votes
0 answers
124 views

graphtimer v2 - Utility to plot timings

GitHub repo (MIT) Clone the repo and replace the contents of example.py with the one at the bottom and you'll have everything setup. Explanation of the code A ...
Peilonrayz's user avatar
  • 42.8k
5 votes
0 answers
2k views

Secure Password and Passphrase Generator in Python 3

I'm aware that people have implemented password/passphrase generators before, but I still went ahead and wrote my own, which I actually use for my own passwords and/or phrases. By "secure", I mean ...
code_dredd's user avatar
5 votes
0 answers
142 views

Comparing same-size files and reporting on the differences byte-by-byte

I created a small Python utility to analyze multiple same-size files and report on the difference byte-by-byte (i.e. Hamming distance, not Levenshtein distance.) I am planning to extend the ...
Graham's user avatar
  • 1,369
5 votes
0 answers
85 views

"Backend" of custom app made for editing Google Spreadsheet file

I've been learning some basics of python for few moths now. My friend, who works as salesman at company which sells hookahs, asked me if a could write a simple app which would help him maintain a ...
Michal Vöröš's user avatar
5 votes
0 answers
13k views

(Python) Use IMAP lib to download attachments and email details

This is my first approach to programming in Python, so I hope you will "destroy" my coding! Idea is to use SSL connection to my mailbox and use IMAP to download attachments from emails with ...
Tomek's user avatar
  • 203
5 votes
0 answers
5k views

Minimal SQLite table view in PyQt5

I have just started digging into PyQt5 in order to write a small GUI for editing a lexical database. Before I dig deeper into this, I would like to have feedback on the progress so far. Some ...
Anaphory's user avatar
  • 201
5 votes
0 answers
4k views

Auto clicker with a simple GUI

What do you think of my auto clicker script? Even though it's just for my own personal use, I'm thinking of using PyInstaller to turn it into an exe, so I know how to do that in the future. ...
ant9985's user avatar
  • 51
5 votes
0 answers
2k views

Python script to generate a playlist with the Spotify API

The result is just a list of youtube links. I'm requesting an access token every time and throwing it away, so I'm thinking of a way to save it for future use. Maybe I'll use a tempfile, but even ...
diwakar_wagle's user avatar
5 votes
0 answers
1k views

Downloading images from Reddit using Python 3

I have been working on this small project in order to fetch top-notch images from Reddit. Overall I am pretty confident about the code below but I am not entirely sure about whether my error handling ...
間澤東雲's user avatar
5 votes
0 answers
1k views

Start a sub-process (with sudo) as head of new process group, kill it after timeout, get the output

This is a bit of a tricky one ... I am writing a test suite for a Python project - running on Linux. As part of the tests, I have to fire up various commands (shell commands, small CLI tools, Perl ...
s-m-e's user avatar
  • 273
5 votes
0 answers
1k views

Django Project for creating events

Before I continue developing this project, I just wanted to make sure I'm going about creating the views and tests in a "proper manner" or if I am completely fudging this up. Also, is it better to use ...
doughboy's user avatar
5 votes
0 answers
870 views

Writing a metaclass to ensure a class is thread-safe

Python allows the creation of classes to be modified via metaclasses. They can perform all sorts of operations that might appear to be magical to languages that do not have the capability. The goal of ...
Noctis Skytower's user avatar
5 votes
0 answers
2k views

Implementing an enum field for peewee.Model

I implemented an enum field class EnumField inheriting from peewee.CharField. The reason that I use a character-based field is ...
Richard Neumann's user avatar
5 votes
0 answers
1k views

Python code to calculate STM CRC32

I have code to calculate STM CRC32 in python. It works well but I'm shocked from time when I see how much it takes. Namely calculating for 5120 bytes takes about 20ms (or even more)! Now I'm thinking ...
KyluAce's user avatar
  • 151
5 votes
0 answers
127 views

Tokenizing and sorting the strings of a text file with the results of a public competition

I made this script to carry out a specific real-life task, which was to sort a list of candidates in a public competition by grade. The file with the informations consists of a text file copied from ...
frix's user avatar
  • 357
5 votes
0 answers
711 views

Implement OO interfaces in Python

Edit: Whoops! I just remembered there's already an long-lived package for this, zope.interface. I'd like a review all the same. This is a proof-of-concept ...
shadowtalker's user avatar
5 votes
0 answers
794 views

Customizable Multi-Agent Predator/Prey Simulation

I am trying to create a highly customizable "battle simulator". The default setup is a predator/prey relationship (no births); however, I am trying to create code such that it's easy to add and ...
Swerve's user avatar
  • 51
5 votes
0 answers
572 views

Django blog application - views, urls, models, forms

I want to learn how to create websites and I have started learning Django web framework. I think Django is very good alternative for PHP and it isn't too complex as JEE. I'm very satisfied learning ...
user avatar
4 votes
0 answers
168 views

constraint solving graduation using HTML Parsing, pandas, and z3

not sure if this project fits on code review, but my code is getting extremely messy, and would love some tips to clean it up! Overview The project is designed to take in an HTML file (a degree audit),...
retep's user avatar
  • 169
4 votes
0 answers
96 views

Determine when a file is no longer being changed by hashing

I have a requirement to essentially scan a filesystem on any kind of filesystem and move a resource whenever it is ready. To do this I have the following code ...
Patrick Christie's user avatar
4 votes
0 answers
105 views

Injectable EventLogger for custom application events that are handled differently from normal logs

I am trying to become better at designing classes for dependency injection and IOC in general. It is often not an intuitive concept. I have the following python interface and implementation for a ...
Patrick Christie's user avatar
4 votes
0 answers
150 views

An abstract ORM model for PostgreSQL databases

Over the last year, I have been slowly building an abstract class for deserialisation, and it has sort of morphed into a lightweight JSON-SQL modeler targeting PostgreSQL with ...
Bob's user avatar
  • 139
4 votes
0 answers
3k views

Student report card management Python program

The program is designed to take data from a MySQL database, using mysql-connector-python, and print it as a table in Python using the texttable module. The program also plots charts based on the data ...
Random Person's user avatar
4 votes
0 answers
115 views

Sudoku sequence solver for non-standard constraints

This script is designed to help solve sequences in Sudoku puzzles with variant constraints (ex: Thermometer, Renban, etc.). Summary The user specifies the constraints they want applied as well as the ...
JS Lavertu's user avatar
4 votes
0 answers
411 views

Subclass of Python's multiprocessing.Pool which allows progress reporting

For context, the whole of the project code can be found here. This question was created specifically for the progress.py file. The goal behind it is to allow ...
gabe appleton's user avatar
4 votes
0 answers
120 views

Sending simultaneous requests using threading

I have been trying to improve my Discord sending webhooks functions where I have multiple dictionaries, as you will see in the code below: ...
PythonNewbie's user avatar

1
2 3 4 5
12