Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

All Questions

Filter by
Sorted by
Tagged with
4 votes
1 answer
163 views

Functools extension library

I wrote a utility library inspired by functools that adds some common operations on functions I frequently use in my projects. As usual I'd appreciate any feed back....
Richard Neumann's user avatar
2 votes
1 answer
344 views

Garden simulator [closed]

I tried to write the program so that it runs without error but I want to improve the program so that it follows the Single Responsibility Principle. What changes can I make to improve this program? I ...
bambam's user avatar
  • 21
2 votes
1 answer
105 views

Dose tracker with daily and weekly totals

This is an old script I made a while ago. What it does It tracks your dose of whatever you want tracked (cigarettes, salt, etc), outputs the total for each day, and the full week. What I’m looking for ...
Nickotine's user avatar
  • 378
1 vote
1 answer
2k views

Processing CSV files with filtering

I have 4 CSV files that i need to process (filter out Part segment and then merge them) but the problem is that they do not fit in my memory. So I decided to: [open - filter - write out] each one of ...
amous's user avatar
  • 13
3 votes
2 answers
640 views

Python word guessing game

...
Rabeea Rehman's user avatar
2 votes
1 answer
1k views

Alternatives for checking if something is not None in Python [closed]

I recently bumped into dry-python/returns, which seems like a very useful project. In the project description, the authors describe a snippet which can be written with their ...
oz123's user avatar
  • 497
1 vote
1 answer
65 views

Operations on nested data

Problem description. I have JSON which comes in bad shape: ...
kluvin's user avatar
  • 385
1 vote
1 answer
66 views

Functional Python Script to write a large amount of CSVs to database

I just finished up this script that crawls hundreds of local git repos for csv files and then stores them into a database. I've tried to follow a "functional" paradigm for this script but am kind of ...
dylanjm's user avatar
  • 225
7 votes
1 answer
1k views

Decorator to cache a function result for some time

I recently played around with a script that got some data from the Google API. As I didn't want to spam requests at the service (and potentially get blocked), I made this decorator, which caches the ...
Graipher's user avatar
  • 41k
-2 votes
1 answer
71 views

Printing the steps of a function composition

I have this code: ...
Dheraj Dhruv's user avatar
3 votes
1 answer
911 views

Maximum distance between space stations HackerRank

I am just working on Flatland Space Stations problem, and it is not seeming to be a tough question, but my algorithm lags in some aspects, since it solves majority of the test cases but fails for some....
Alok's user avatar
  • 201
2 votes
1 answer
49 views

Re-write custom feature encoding function python

I have a question regarding code quality and best practices. My task - to write a feature encoding function that will encode categorical labels, boolean labels as one-hot encoding, timestamps for ...
PasDeSence's user avatar
6 votes
1 answer
751 views

Timeout Error in Fraudulent Activity Notification HackerRank

I am solving this problem: Fraudulent Activity Notifications on HackerRank. I am done with my code and is working, but it is inefficient as well for very large inputs. I don't know but after all ...
Alok's user avatar
  • 201
2 votes
1 answer
93 views

Functional n-queens

Following the book "Structure and interpretation of computer programs" I have tried to implement a functional solution to the problem of N-queens (implemented by the function ...
Zanzag's user avatar
  • 392
-2 votes
1 answer
65 views

A game that deals a high card to one of two players [closed]

So for my class, I have to design a game that will deal out one card to for each player. I also need to use functions to accomplish this one for the high card game, and another for the face value of ...
SIth_Lord_85's user avatar

15 30 50 per page