Lazy evaluation in Django middlewares
Attach a lazy evaluated function as a property of request in a middleware.
Attach a lazy evaluated function as a property of request in a middleware.
Jupyter Notebook is an interactive environment for running code in the browser. It allows you to create interactive documents that contain live code, rich text elements and visualizations. It's also a widely used tool for Data Scientists to make prototypes or demonstrations.
IPython is a neat alternative of Python's builtin REPL (Read–Eval–Print Loop) interpreter, also a kernel of Jupyter.
For Python and Node.js projects, you could totally cache both site-packages and node_modules directories in every Travis CI build.
get_or_create() 拋出 IntegrityError 但是接著 get() 一次卻會是 DoesNotExist,以上的錯誤常常會發生在 MySQL 的 isolation level 是 REPEATABLE READ 的情況下。MySQL 默認採用 REPEATABLE READ(而 PostgreSQL 預設是 READ COMMITTED)。