Category: Python
-
Updated
Setup Jupyter and other Machine Learning tools on macOS
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.
-
Updated
IPython: the Python REPL interpreter
Category: Python
IPython is a neat alternative of Python's builtin REPL (Read–Eval–Print Loop) interpreter, also a kernel of Jupyter.
-
Updated
Speed up Python and Node.js builds on Travis CI
Category: DevOps, JavaScript, Python
For Python and Node.js projects, you could totally cache both site-packages and node_modules directories in every Travis CI build.
-
Updated
Django's get_or_create() may raise IntegrityError but subsequent get() raises DoesNotExist
Category: Database, Python, Web Development
get_or_create() 拋出 IntegrityError 但是接著 get() 一次卻會是 DoesNotExist,以上的錯誤常常會發生在 MySQL 的 isolation level 是 REPEATABLE READ 的情況下。MySQL 默認採用 REPEATABLE READ(而 PostgreSQL 預設是 READ COMMITTED)。
-
Updated
Configure i18n Translations in Django
Category: Python, Web Development
Internationalization and localization for your Django project.
-
Updated
Python is call-by-assignment
Category: Python
If you pass a mutable object into a method, the method gets a reference to that same object and you can mutate it to your heart's delight, but if you rebind the reference in the method, the outer scope will know nothing about it, and after you're done, the outer reference will still point at the original object. If you pass an immutable object to a method, you still can't rebind the outer reference, and you can't even mutate the object.
-
Updated
Upload files to Amazon S3 when Travis CI builds pass
Category: DevOps, Python, Web Development
CAUTION! By default, only master branch's builds could trigger deployments in Travis CI.
-
Updated
argparse: Create a Command-line App with Python
Category: Python
argparse is a Python standard library makes it easy to write a CLI application. You should use this module instead of optparse.
-
Updated
Tools for Profiling your Python Projects
Category: Python, Web Development
Tools you could use to profile your Python, Django or Flask projects, including: timer, pycallgraph, cProfile, line-profiler, memory-profiler.
-
Updated
django-debug-toolbar: The Debugging Toolkit for Django
Category: Python, Web Development
django-debug-toolbar is a toolbox to display various debug information about the current request and response in Django.