RuntimeError: thread.__init__() not called (Python)
Today I got a really dumb error from Python.
RuntimeError: thread.init() not called
But luckily it’s really easy to fix!
Below is the code …
Read Article →320 articles about python development, tools, and best practices
Today I got a really dumb error from Python.
RuntimeError: thread.init() not called
But luckily it’s really easy to fix!
Below is the code …
Read Article →All dates in your server applications should be stored in the UTC timezone.
This is because you always want to store time without the offset of the …
Read Article →The requests module for Python is very useful in helping simplify HTTP/s requests from Python, but how would you use it in an AWS Lambda script? …
Given an array of strings arr. String s is a concatenation of a sub-sequence of arr which have unique characters.
Return the maximum …
Read Article →Let’s say that you have a Python list with the following 5 foods:
foods = ["pizza", "pasta", "steak", "chicken", …
Read Article →
This is not the first time that I created a Python3 application that spat out some output and required access to it via an HTTP server.
While there …
Read Article →Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remaining elements to the right.
Note that elements beyond …
Read Article →Python has never been the best at doing multiple things at the same time.
While there are ways to mostly resolve this, such as using the …
Read Article →Let’s say that you have an array or a list, or logs.
Each of these logs is a space-delimited string of words.
For example:
logs = ["dig1 8 …
A common programming interview question, and for a change, one that you will actually be able to use in the job, is that of implementing a Queue by …
Read Article →Take a string S of lowercase letters.
These letters form consecutive groupings of like characters.
Find groups with 3 or more like …
Read Article →Google Colab is a fantastic environment to write Python code using Jupyter Notebooks, hosted for free by Google.
If you’ve ever used Jupyter …
Read Article →