Learning
Django Signals
· ☕ 3 min read
1. Basic Concepts Django ships with a signal dispatcher built in. Signals help decouple program modules. When an event occurs elsewhere in the application, a designated function is notified. Signals let certain senders notify a group of receivers that some action has taken place. 2. Using Signals 2.1 Declaring a

ECMAScript 6 Primer
· ☕ 1 min read
Author: Ruan Yifeng Publisher: Publishing House of Electronics Industry Publication year: 2014-8-1 ISBN: 9787121238369 E-book

Django Snippets
· ☕ 3 min read
1. Auto-Register All Models in Admin admin.py 1 2 3 4 5 6 7 8 9 10 # -*- coding: utf-8 -*- import inspect from django.contrib import admin from . import models for name, obj in inspect.getmembers(models): try: if inspect.isclass(obj): admin.site.register(getattr(models, name)) except Exception as e: pass 2. Get All View Names Get all view names of the project

Dive Into Python
· ☕ 1 min read
Author: Mark Pilgrim Publisher: Apress Published: 2004-07-19 ISBN: 9781590593561

Drawing Fractals with Python: Koch Curves, Julia Sets, and Mandelbrot Sets
· ☕ 2 min read
1. Koch Curve The Swedish mathematician Helge von Koch proposed the Koch curve in his 1904 paper “On a continuous curve without tangents, constructible from elementary geometry.” It is described as follows: Specify the length of a line segment \(l\) (this can be thought of as iteration 0) Divide this