All Questions
17 questions
3
votes
1
answer
66
views
Interactive, real-time bikeshare web application with Bokeh
As a side project, I'm working on a Bokeh web application to display public bikeshare data on a map. The data is updated every 2 minutes using a periodic callback. Below is the full implementation.
I'...
6
votes
1
answer
3k
views
Multiplayer card game "Hearts" with OOP in Python
To practice Object-Oriented Python and learning how to write tests, I found an exercise and solved it as below(all classes are put in one block of code to make the question a little bit more readable):...
5
votes
1
answer
3k
views
PyTorch Unit-testing in Python
I'm new to PyTorch and I'm writing a unit test for an activation function I'm making.
I plan to test against a reference implementation for this function. I want to approach this in a test-driven way,...
5
votes
1
answer
1k
views
Implementing d-ary heap
I'm trying to Implement a d-ary heap.
A d-ary heap is just like a regular heap but instead of two childrens to each element, there are d childrens!
d is given when building a heap, either by giving an ...
6
votes
2
answers
400
views
Sorting algorithms with Python project
I wrote my first project in Python and I would like to know if this is correct. I prepared some guidelines I want to ask. (I know that I don't have any documentation yet). In the future I want to ...
7
votes
1
answer
2k
views
Bubble sort algorithms and unittest in Python
I am quite new in Python and I am starting my journey with sorting algorithms, PEP8 and the Zen of Python. So far i wrote a post BubbleSort and I drew conclusions and followed the advices. I ...
-2
votes
1
answer
528
views
My third post about Python 3 palindromes
I'm new to python3, and I tried to test if my palindrome codes work and pass most of the edge cases. so I created the following 2 python files below. When I ran the ...
1
vote
1
answer
4k
views
Unit test cases for Python palindrome
I'm new to Python 3, and I tried to test if my palindrome code works and passes most of the edge cases, so I created the following 2 Python files. When I ran the ...
5
votes
2
answers
182
views
Solution to basic unit tests
I'm working my way through an intermediate Python course on Pluralsight that focuses on unit testing and just finished my first assignment.
Basically the course itself focuses on teaching you how to ...
5
votes
1
answer
739
views
Python beginner's tree with unit tests
I have implemented a tree in Python. However, due to my lack of experience with Python, I am not able to judge the overall quality of my code.
...
2
votes
1
answer
83
views
Unit testing for a blog post model on Google App Engine
It is my second day into software testing and I am currently testing my database, handlers, and functions. I am wondering if I am taking the right approach as this is the first time testing my web app....
4
votes
1
answer
1k
views
WAKE UP! CodingBat alarm clock
I'm brand new at Python, but I've been working in general at granulating my functions and being as self-readable as possible without suffering readability. This CodingBat question is a little ...
6
votes
1
answer
3k
views
Testing file IO errors in python
Below is a simple class with two methods: the first calls open() to read in a file. The second calls the first method and does error handling.
There is also a ...
3
votes
3
answers
5k
views
Bowling scoring kata
I've been writing basic Python scripts for a while now to help process data or automate some task but I've decided I should start picking up unit testing and objective orientated programming (the vast ...
6
votes
2
answers
2k
views
Renaming PDF files based on given rules in a text file
I'm learing Python by writing a program to solve some housekeeping I do weekly, namely renaming PDF files according to rules given in a text file.
My end goal is to have idiomatic Python, with full ...