Categories
Python | Algorithms | Data Science
Use Customized User Profile to Replace Django Default User Tables Use Customized User Profile to Replace Django Default User Tables
In Django, the default user profile table is created as auth_user. Alternatively, we can create our own customized UserP
2021-04-20
Configure Django ORM with MySQL Configure Django ORM with MySQL
Django uses sqlite as the default database. In this post, I’ll explain how to configure Django settings to connect with
2021-04-20
How to mannually start chromedriver How to mannually start chromedriver
For some websites, using default chromedriver will be detected and blocked.To avoid this, we need to start chrome and ch
2020-05-09
Count element frequencies Count element frequencies
How to count the frequencies of elements in a list? Convert to a dictionary with key is the element, value is the frequ
2020-04-19
Sort Dictionary based on its values Sort Dictionary based on its values
How to sort a dictionary? It’s obvious to use the built-in sorted function, as it’s written in C and optimized already.
2020-04-19
Named Tuple Named Tuple
For data with fixed format, they can be stored as tuples. Compared to dictionary, tuples save more space. However if we
2020-04-19
Filter Data in List, Dictionary and Set Filter Data in List, Dictionary and Set
It’s a common operation to filter elements in list, dictionary and set. For loopdata = [-1, 2, 3, -4, 5] # filter out th
2020-04-19
MRO: Understanding Multiple Inheritance in Python MRO: Understanding Multiple Inheritance in Python
While building a project in Django, it’s common to encounter multiple inheritance. For example, Django’s own ListView cl
2020-04-15
Django Cookiecutter to create a project Django Cookiecutter to create a project
Cookiecutter is a cli tool creating projects from templates.Cookiecutter Django is a good starting point to structure an
2020-04-15
Inheritance, yield, contextmanager and rollback Inheritance, yield, contextmanager and rollback
Building a webapp with flask could involve a couple of more advanced topics in Python, Flask and SQLAlchemy Event and Ro
2020-04-11
Flask Multi-threading Flask Multi-threading
Processes and threads are used to allocate computer resources in an optimal manner. Process A process is a unit for OS t
2020-04-06
AppContext vs. RequestContext and Flask vs. Request AppContext vs. RequestContext and Flask vs. Request
In Flask, there are two types of context: AppContext, it’s a Flask object app = Flask(__name__) RequestContext, it’s
2020-04-06
1 / 2