PrimerPy
Python | Algorithms | Data Science
Java Learning Path Java Learning Path
Learning JavaI’ve been thinking about learning Java and Spring Boot Framework as an alternative to Django/Flask. Ho
2020-05-08
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 the
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
Python Class Variables and Instance Variables Python Class Variables and Instance Variables
Understanding the difference between Class Var and Instance Var is fundamental to OOP. Class VarGiven a class Lang, as b
2020-04-05
Flask: avoid circular import Flask: avoid circular import
One of the common mistakes using Flask is circular import.To avoid it, we can split one application file into three file
2020-04-01
3 / 4