Articles tagged with Python

How to create many-to-many relationships with associated properties in SQLAlchemy

I once had a scenario where one business could be managed by multiple users, and each user could manage multiple businesses. To further complicate matters, only one user could be the Administrator of a business, which should ideally also be represented by the relationship.

Finding out how to represent that relationship was tricky as I couldn't find it in the SQLAlchemy docs, and StackOverflow was a mixed bag. This is what I pieced together:

from datetime import datetime as dt ☞

Calling the Top

Some time mid-2013 I was reading through rpietila's posts on the forums and came across the theory that you could "call the top" of a bubble simply by selling if the price doubles in 7 days.

Unfortunately, he's got 4.7k-odd posts now, so the exact post has eluded me so far.

While the old trope "past performance doesn't indicate future results" always applies, there's no harm in being prepared to take advantage of an identified pattern should ☞