I sold and bought a house. No coding fun for me :(
The
pg_trgm
extension provides functions and index operators that allow for fast text searches.
The example I created is a Materialized View definition that includes the necessary components to achieve a full-text search.
Check it out here: full text search
sleep()
allows you to pause a program's execution. This is pretty cool, and I'm curious to learn about real use cases.
strftime()
provides an easy-to-control way of formatting time strings. Pass in formatting specifications as first argument, and thestruct_time
tuple generated through methods likelocaltime()
as second.
Check it out here: sleep() & strftime() in Python Time module
Magic methods are special methods (identified by a double underscore prefix and suffix, e.g.
__add__
) whose default behavior can be overridden in order to define special behavior when used with an object on whose Class they are defined.
The example I coded in order to learn about and practice this concept is not the most authentic, but I did have some fun with it.
Check it out here: Adding a Little on Top for the Favorite Kid's Weekly Allowance
I'm enrolled in Udacity's AI Programming with Python Nanodegree, and as part of the OOP module, we were asked to create a class Gaussian that calculates and plots normal distribution. While a solution was provided for reference, my solution differed in that instead of "manually" performing calculations, I installed the
statistics
module and used itsmean()
andstdev()
methods. Work smarter - not harder!Check it out here: Gaussian Distribution with Python