When using fully declared table metadata,use the primary_key=True flag on those columns:
1 2 3 4 5 class Dummy(Base): __tablename__ = "dummy" pk1 = Column(Integer, primary_key=True) pk2 = Column(String, primary_key=True) This will create the following table (in postgres) :
testdb=> \d dummy; Table "public.dummy" Column | Type | Modifiers -------+-------------------+----------------------------------------------------- pk1 | integer | not null default nextval('dummy_pk1_seq'::regclass) pk2 | character varying | not null Indexes: "dummy_pkey" PRIMARY KEY, btree (pk1, pk2) See SQLAlchemy documentation
Be Unreasonable
I came across this video by Robin Sharma (The author of great books like “The Monk who sold his Ferrari” and “The leader without title”)
It starts with the following quote :
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.
George Bernard Shaw
Robin goes on to suggest that you install 3 habits during the next 90 days, that set the tone for the next 12 months, so that 2016 can be your greatest year (Rather than a repeat of the last year)
How did I "recover" from broken spacemacs ?
OK, it wasn't really that bad, I could have easily “lived” with it.
Background While thinking of creating API documentation for my project, I first considered Markdown syntax (Later I selected ReST, since sphinx supports it better.)
I also wanted to keep the documentation in .org files. I was planning to export these .org files to .md , which I can commit to git. .md other users can edit, .org is very emacs specific.
Maze Vs Labyrinth
I had always considered them to be same (like many people do) but realized that they are different in important ways.
In the Book “A Whole New Mind”, Daniel Pink explains the difference between the two.
Maze engage the left brain (Logical) as a puzzle to solve, while Labyrinth is a “moving Meditation” and thus “frees” the right brain. Objective of the maze is to escape, while Labyrinth are spiral walking course There are about 4000 public and private labyrinths in the United States labyrinths are showing up in hospitals and medical facilities If you are interested to know more, this page has quite detailed explanation of the differences.
Rust, Python Requests Library and Freakonomics
May 21, 2015 Rust Language (The changelog) safety without garbage collector single ownership model (so cleanup is easy) Transfer of ownership (permanent) or lending (temp) Owner is supposed to cleanup Better C++ C++ hackers can already do this stuff, but rust enables new/web programmers to systems programming cargo (package management) - all (ex) C++ programmers (who now use rust) now like this cargo - learn from other package managers like ruby, npm etc.
Freakonomics, Curl and Tim Ferris
May 14, 2015 James Altucher Show (Tim Ferriss experiment) When division is shutdown, new management/owner will not take any decisions. If the decision results into “loss”, new management will be blamed for shutting down the project/division. If the decision results into “profit”, old management gets the credit So leave it in a limbo :( May 15, 2015 How think like a Child (Freakonomics Radio)
Go on Mobile, Pencil Pushups and Flask Sentinel
April 22, 2015 The changelog podcast episode 148 : The state of Go in 2015 Go on Mobile - Seems like cool stuff Andrew talks about move from Google code to Github(He isn't too happy) Google code was going away (Internal projects had to move first) He explains why Gerrit is better than github “pull request” workflow Github doesn't support CLA When I worked on OpenStack for a short amount of time, I had signed CLA and used Gerrit.