python3-cookbook notes: Chapter IX Metaprogramming

Each section in the python3-cookbook explores the best solution of Python 3 to a given problem in three parts: problem, solution, and discussion, or how Python 3's own data structure, functions, classes, and so on, can be better used in a given problem.This book is very helpful for understanding Python 3 and improving Python programming capabil ...

Posted on Wed, 26 Feb 2020 08:28:24 -0800 by maxpup979

Analysis of Python module

1. What is a module 2. Module classification 3. How to import or customize modules 4. Analysis of common system modules: random, math, OS, os.path     What is Python module The python program we wrote on the Python interpreter has built so many functions, but as long as we exit the interpreter ...

Posted on Wed, 26 Feb 2020 02:31:04 -0800 by Digital Wallfare

Translation Toolkit: txt file session

Baidu interface details I use: Standard Version You need to use the delay function to control the upload rate, because the Standard Version QPS=1, but there is no limit to characters You can change it to a more advanced version. It's also free, but there's a character limit every month, but it's ...

Posted on Tue, 25 Feb 2020 22:01:42 -0800 by xeidor

New compatibilizer of C++11

This section includes STD:: array (array) STD:: forward? List STD:: unordered? Set STD:: unordered? Multiset (unordered container) STD:: unordered? Map STD:: unordered? Mutlimap (unordered container) STD:: tuple (tuple) std::array When you see this container, there must be such a problem: Why introdu ...

Posted on Tue, 25 Feb 2020 19:34:40 -0800 by superkingkong

flask foundation for python learning

What is Flask?Flask is a Web framework that provides tools, libraries, and technologies that allow you to build a Web application. This Web applicationThese can be Web pages, blogs, wiki, Web-based calendar applications, or business websites.Flask dependent modules:web Services Gateway Interface (Python Web Server Gateway Interface, abbreviate ...

Posted on Tue, 25 Feb 2020 17:13:01 -0800 by briguy9872

Python 3 Standard Library: pprint Beautiful Printing Data Structure

1. pprint beautiful print data structure The pprint module contains a "beautiful printer" that generates a beautiful view of the data structure.Formatting tools generate some representations of the data structure, which can be interpreted correctly by the interpreter and read easily.The output is placed on one line whenever possible a ...

Posted on Tue, 25 Feb 2020 16:43:10 -0800 by jfeather

python note 23 (object-oriented course five)

Today's Content Last Section Job Singleton mode class Foo: pass obj1 = Foo() # Instance, Object obj2 = Foo() # Instance, Object logging module Directory structure of programs Content Review Job 1. String Formatting msg = "I am%s,Age%s" %('alex',19,) print(msg) msg = "I am%(n1)s,Age%(n2)s" % {'n1': 'alex', 'n2': 123, } print(msg) # v1 ...

Posted on Tue, 25 Feb 2020 08:17:51 -0800 by plinares

[log service] [data processing] summary of the use of e'anchor function and e'regex function

E ﹣ anchor extraction method is based on string subscript, which has the advantages of convenience, rapidity and high efficiency. However, the disadvantages are also obvious, such as the lack of flexibility, poor universality, which is suitable for string extraction with obvious pre suffix identification and strong regularity. Regular extracti ...

Posted on Tue, 25 Feb 2020 01:53:33 -0800 by jordy

Homework of python course selection system

#Course selection system#Role: school, student, course, lecturerRequest:#1. Establish two schools in Beijing and Shanghai#2. Create three courses: Linux, Python and go. linux\py opens in Beijing and go opens in Shanghai#3. Courses include, cycle, price, and create courses through schools#4. Create a class through the school, and the class is as ...

Posted on Mon, 24 Feb 2020 03:43:39 -0800 by xudzh

python notes for beginners (tuples, dictionaries)

We may know that string, number, list, tuple and dictionary are the five basic data types in python. The previous article has introduced numbers, strings, lists. This article is about tuples and dictionaries. (also mention tuple modification) Tuple (the biggest difference with list is whether it can b ...

Posted on Mon, 24 Feb 2020 03:32:29 -0800 by Pegasys