The way of python with millions of annual salary -- day11 -- f-strings format

f-strings is a new writing method of formatted output that Python 3.6 started to add to the standard library. This formatted output is more efficient and simpler than the previous% s or format, which is very easy to use. 2.1 simple examples His structure is in the form of F(f)+ str. the position to be replaced in the string is occupied by {}, s ...

Posted on Sat, 19 Oct 2019 12:02:38 -0400 by lady1dc

Python - polymorphism, check type

1. Polymorphism Python variables do not need to declare types. The same variable can refer to different objects at different times. When a variable calls the same method, it can present a variety of behaviors. Which behaviors are displayed depends on the object referenced by the variable, which is called multimodality. Let's take a look at th ...

Posted on Sat, 19 Oct 2019 12:01:48 -0400 by kane007

pytest custom dynamic add description information

First on the renderings:   Modify the pytest HTML report, which is divided into three parts. pytest execution directory create a new conftest.py file import pytest from py._xmlgen import html from datetime import datetime """ Summary Part set here """ @pytest.mark.optionalhook def pytest_html_results_summary(prefix, summary, post ...

Posted on Sat, 19 Oct 2019 10:45:20 -0400 by unplugme71

Development of "GIS DICTIONARY A-Z" query page -- bs4 and dictionary data processing

The first day's work: find data source, data download, data processing. Data source:“ http://webhelp.esri.com/arcgisserver/9.3/java/geodatabases/definition_frame.htm". Data download: right click the page to save as. Data processing: bs4 + comparative observation + chrome check element + write function I. bs4 from bs4 import Beauti ...

Posted on Sat, 19 Oct 2019 10:12:13 -0400 by KirstyScott

One to one, one to many, many to many relationships between database tables and tables

Table 1 foreign key table 2 Many to one: multiple records in Table 1 correspond to one record in Table 2 Using the principle of foreign key, we can make many to many, one to one relationship between two tables Many to many: Multiple records in Table 1 can correspond to one record in Table 2 Multiple records in Table 2 can also correspond to ...

Posted on Sat, 19 Oct 2019 02:52:20 -0400 by aprieto

Classes and multithreading

Classes and multithreading In the project, a client is needed to communicate with lidar. The main function of the client is to receive the original byte stream sent by the radar and parse it into pcl::PointXYZ type three-dimensional coordinate points which can be directly processed by pcl. The specif ...

Posted on Fri, 18 Oct 2019 16:03:23 -0400 by Chrysanthus

Simulated landing on 12306 website

Catalog Simulated landing on 12306 website Get ready requirement analysis Implementation code Simulated landing on 12306 website Get ready Target website: https://kyfw.12306.cn/otn/login/init Install the PIL module: PIP3 install pilot or PIP3 -- default timeout = 100 install - U pilot th ...

Posted on Fri, 18 Oct 2019 15:58:22 -0400 by tphgangster

MongoDB database

2019.7.22:   motor is a tool for asynchronously implementing python to operate database. It can reduce the delay of back-end accessing database. Motor is a MongoDB repository implemented asynchronously. The configuration of motor is basically similar to Pymongo. The connection object changes from MongoClient to asynciomorclient.   I. conn ...

Posted on Fri, 18 Oct 2019 15:35:56 -0400 by gaugeboson

Book management system blueprint based on flash

Book management based on flash -- blueprint mode Renderings, only basic addition and deletion functions Catalog App app name Templates store templates, html and so on book is used to distinguish html files index.html home page display View store view __init initialization blueprint bookManage ...

Posted on Fri, 18 Oct 2019 14:11:28 -0400 by robin_percy

Python loop (notes)

Python loop 2018-04-25 for cycle: Iteration loop, when the sequence ends, the loop ends range function, traversal range(start,end,step) list1=[12,27,3,28,7,8,9] list2=[] list3=[] i=0 for i in range(len(list1)): if(list1[i]%2==0): list2.append(list1[i]) else: list3.append(lis ...

Posted on Fri, 18 Oct 2019 13:35:50 -0400 by bengaltgrs