Open and Close Principle
The so-called open-close principle is that a software entity such as classes, modules, and functions should be open to extensions and closed to modifications.Emphasizes building a framework with abstraction to achieve expanded detail.
It has the advantage of improving the reusability and maintainability of th ...
Added by jonskinny12 on Sun, 19 May 2019 00:02:12 +0300
Written in the forefront
Developed before TI5 last year dotaonly.com Web sites need to use APIs of various live platforms. Unlike Twitch, which is not as open as foreign websites, there are ready-made APIs available. Domestic websites are closed and not very friendly to developers. The APIs mentioned in this paper are all crawled from the F ...
Added by KendersPlace on Sat, 18 May 2019 21:08:39 +0300
Sometimes, when we naively download HTML pages using urllib libraries or Scrapy, we find that the elements we want to extract are not in the HTML we download, although they seem to be readily available in browsers.
This shows that the elements we want are dynamically generated through js events under some of our operations. F ...
Added by phast1 on Sat, 18 May 2019 10:14:26 +0300
The whole crawler is based on selenium and Python, running the packages needed
Need to install selenium Firefox browser driver, Baidu search.
The whole crawler is modular. Functions and classes with different functions are placed in different files. Finally, constants that need to be configured are placed in consta ...
Added by ludwig on Sat, 18 May 2019 09:49:29 +0300
pymssql module usage guide
Using pymssql module
Basic usage process
User Authentication Logon
Windows Identity Authentication Logon
Several other common options
Submit sql commands
Calling stored procedures
Notes for Cursor Objects
Added by sandstorm140 on Sat, 18 May 2019 09:34:38 +0300
python file read and write
Reading and writing files is the most common IO operation. Python has built-in functions for reading and writing files, which are compatible with C.
Before we read and write files, we must understand that the function of reading and writing files on disk is provided by the operating system. Modern operating syste ...
I. Concepts of the protocol
Protocol, also known as micro-threading, fiber.The English name is Coroutine.
Collaboration is another way of multitasking in python, but takes up less execution units (understood as required resources) than threads.
The general understanding is that a function in a thread can store informatio ...
Added by Xanthis on Sat, 18 May 2019 04:28:50 +0300
Previously, I have talked about the path of python machine learning. This time, Luo Luopan takes you to complete a machine learning project of Chinese text sentiment analysis. Today's process is as follows:
Data Situation and Processing
The data here are for the comments of the public (provided ...
Added by patrickrock on Sat, 18 May 2019 01:57:03 +0300
Three Questions in Life
What is an object
The real thing with certain characteristics and behaviors is the object, everything is the object.
What is a class
A combination of a series of objects with the same characteristics and behavior is called a class.In programming, only classes can have objects.
1. What is Object OrientedObject- ...
Added by salasilm on Fri, 17 May 2019 23:59:20 +0300
Iterator refers to an object that can be called by the built-in function next and continuously returns the next value until the StopIteration error is finally thrown to indicate that it is impossible to continue returning the next value.
In fact, the above statement is just the definition of chivalrous iterator. In python, the iterator also n ...
Added by srividya on Fri, 17 May 2019 17:40:07 +0300