Configuring Django on Ubuntu

At the time of the 2018 Spring Festival, heaven knows what I went through, posting a blog article on the fourth day of the new year. Django was actually configured before the New Year; I had just learned some knowledge about developing web applications with python at that time, so I configured it along the way. Environment used for the configuration System: Ubuntu16.04 (LTS) python version: python3.6 (using Anaconda to create a virtual environment) Preparation Uninstalling an old version of Django If you are upgrading from an older version of Django, you need to deal with the old version a little. ...

February 19, 2018 · 2 min · Simplestory

Configuring Tensorflow on Linux

Borrowing a line from the TensorFlow Chinese community: TensorFlow, an open-source magic tool for artificial intelligence. Environment used for the configuration System: Ubuntu16.04 (LTS) python version: python3.6 (using Anaconda to create a virtual environment) Nvidia card: Geforce 920M (if there is no Nvidia card, only the CPU version can be installed) Installing Tensorflow tensorflow has two versions, CPU and GPU; I created two python virtual environments and installed these two versions separately. Below I record this painful installation process ...

February 4, 2018 · 6 min · Simplestory

Detecting Traffic Violations with Opencv

Opencv contains more than 2500 functions, and almost any mature algorithm you can think of can be implemented by calling Opencv’s functions, which is super convenient. This post combines Python and Opencv to detect cars in surveillance video and check whether they commit a violation (crossing the double yellow line). System environment: Ubuntu16.04LTS+OpenCV3.3.0+Python2.7.12 Background extraction For surveillance the position is relatively fixed, so the background will not change considerably over a long period of time. We can therefore consider using background subtraction to roughly extract the background. ...

November 5, 2017 · 6 min · Simplestory

Python Classes

“Class” is a template, and the template packages many “functions” for use. This post introduces the members of Python classes, member modifiers, and the special members of classes. Class members The members of a class can roughly be divided into three categories: fields, methods and properties Note: among all members, only the content of ordinary fields is stored in objects, that is, however many objects are created from this class, there will be that many ordinary fields in memory. The other members are all stored in the class, that is, no matter how many objects there are, only one copy is created in memory. ...

August 20, 2017 · 9 min · Simplestory