Skip to main content

All Questions

Tagged with
-3 votes
1 answer
74 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. ...
alvas's user avatar
  • 699
4 votes
2 answers
678 views

What is the best way to set a class value to a variable in Python if it exists in a dictionary?

I have this code which sets values in a location class from values from JSON data. ...
Asher Ross's user avatar
1 vote
1 answer
269 views

Rules-engine to be improved/simplified for Efficiency (performance), Extensibility and Maintenance?

This is a simple implementation of a rules engine. I am really hating the very long MATCH/CASE function. I am wondering what kind of Design Patterns could be used there to make this code more ...
user avatar
4 votes
3 answers
308 views

Calculation of centrifugal liquid propellant injectors

There is this code in which the calculation of the centrifugal nozzle of a liquid rocket engine is performed. All basic calculations take place in the Injector ...
DYNAMIC AEROSPACE's user avatar
2 votes
1 answer
88 views

Semi-generic data loading utility class

The following implements a relatively generic and modular data loading utility. It loads images from a local storage given a lookup table. The data loader is parametrized via dependency injection to ...
lo tolmencre's user avatar
1 vote
1 answer
92 views

Blackjack optimization in python (Update)

A little while back, I made a post on blackjack using object oriented programming. I've begun running simulations under it, it runs fairly quickly but I know there is always improvements to be made. I ...
Joseph Beegle's user avatar
6 votes
2 answers
607 views

Advanced Python Grade Calculator

In this project, I've developed an Advanced Grade Calculator that not only calculates the average grade but also accounts for credit hours and predicts future performance based on historical grade ...
Shamp Phili's user avatar
4 votes
2 answers
398 views

Poker bets on Python

I'm writing poker for my bot in discord. So far I'm presenting an incomplete version of the project, which is only a betting system. The development took a lot of time, so I decided to ask for help. ...
Cat met's user avatar
  • 43
2 votes
2 answers
142 views

BlackJack in python

I began creating blackjack in python; however, I'm looking to simulate it, so I'm thinking I'm going to need to optimize it so that I don't just leave my computer running for three hours waiting for ...
Joseph Beegle's user avatar
3 votes
2 answers
233 views

Tic-tac-toe OOP Minimax Algorithm

I wrote a module that I intend to use in my next tic-tac-toe project. All it is is a class that stores the boardstate along with some methods/properties. The biggest thing is the minimax alg. As shown ...
flakpm's user avatar
  • 97
7 votes
3 answers
1k views

Is this Python/Pygame that draws a maze well structured?

I'm not very confident about this piece of code I created, it basically takes a file like this: ## # ## ## # #B # # # ## ## ## A###### Then proceeds to ...
José Gomes's user avatar
4 votes
2 answers
328 views

Optimizing Multiple Subplot Visualization and Navigation in Matplotlib

I have implemented a class in Python using Matplotlib for visualizing multiple subplots along with navigation buttons to move between different subsets of data. Each subplot displays a contour plot ...
Cold Fire's user avatar
3 votes
0 answers
81 views

Text-Based Multiplayer RPG Engine using Flask & React

As a final project for a software engineering bootcamp, I decided to make a text-based multiplayer RPG game engine. Using Python, Flask, & Flask-SocketIO for the backend and React & TypeScript ...
Thomas Makurat's user avatar
2 votes
1 answer
56 views

A selenium web scraper to package NBA data

I'm building a selenium web scraper for basketball-reference.com that takes a player name and returns data in either a JSON format or Pandas DataFrame object. The class in question is one of many that ...
BluffShove's user avatar
2 votes
1 answer
59 views

Return a set of geodetic coordinates for a particular moment in time

Use case The user is interested in supplying a timestamp of a particular moment in time. This python application will perform two astronomy calculations for a set list of planetary bodies: Calculate ...
Hunter's user avatar
  • 259

15 30 50 per page
1
2 3 4 5
49