python basic skills comprehensive training question 2

1. To judge whether each letter in a string is in another string, we can use the characteristics of the set to solve the problem. If the elements of the set exist, it is impossible to add the update to the set again. Then the length of the set is the same as before. If you add it, the length of the set will increase >>> a = 'ghost' ...

Posted by rd321 on Sun, 05 Apr 2020 19:27:47 -0700

A collection of code examples of API calls for travel services: long distance bus query, train ticket query, etc

The following example code applies to www.apishop.net For the API under the website, you need to apply for the corresponding API service before using the interface call code examples mentioned in this article. Coach query Long distance bus time query and bus station query in major cities in China Vehicle Daquan : in ...

Posted by nogeekyet on Sun, 05 Apr 2020 14:57:20 -0700

Build Flask web app with Translate ToolKit 2.5.0 API

The Translate ToolKit 2.5.0 API is a document conversion tool for the translation industry. For example, convert json or html to PO file for translation. Here, we use the Flask web framework to implement the basic functions of the Translate ToolKit api. This is a written test of the previous few days. It requires three days to implement a webAp ...

Posted by phpyoungdeveloper on Sun, 05 Apr 2020 14:43:37 -0700

A detailed explanation of common modules in python

1.time module import time s = time.localtime() # Convert the time into the formatted time, and obtain the struct time format such as mm / DD / yyyy through time.struct_time(tm_year=2018, tm_mon=3, tm_mday=11, tm_hour=19, tm_min=53, tm_sec=31, tm_wday=6, tm_yday=70, tm_isdst=0) s=time.gmtime() #UTC time zone s=time.time() # Returns the cur ...

Posted by pattyb on Sun, 05 Apr 2020 10:08:38 -0700

"python data analysis (2nd Edition) - Amando van Dango" reading notes Chapter 4 - statistics and linear algebra

python data analysis personal study reading notes - Catalog Index Chapter 4 statistics and linear algebra Statistics and linear algebra lay the foundation for exploratory data analysis. Both descriptive and inferential statistical methods are helpful to obtain insights and inferences from the original data. For example, after calculating the ...

Posted by consultant1027 on Sun, 05 Apr 2020 09:29:07 -0700

Concept of decorator & actual use of dry goods

Definition: Function in essence (decorate other functions), is to add additional functions for other functions Principle: The source code of the decorated function cannot be modified Cannot modify the call mode of decorated function   Realize knowledge reserve of decorators: Functions and "variables" Higher order function Pas ...

Posted by silvermice on Sun, 05 Apr 2020 07:18:31 -0700

Python actual battle: virus trapped me in the fighting room, desktop took me to travel

Article directory 1. Set up Windows Wallpaper with Python 2. Randomly switch Windows Wallpaper 3. Switch Windows wallpaper regularly In modern history, every year of gengzi was unusual: the Opium War in 1840, the invasion of China by the Allied forces of eight countries in 1900, and the famine in 1960. A novel coronavirus e ...

Posted by RogerInHawaii on Sun, 05 Apr 2020 06:57:27 -0700

sklearn datasets module learning

sklearn.datasets module mainly provides some methods of importing, downloading online and generating datasets locally. You can view them through dir or help command. We will find that there are three main forms: load < dataset  name >, fetch < dataset  name > and make < dataset  ① Datasets. Load < datasets ﹤ name >: small datas ...

Posted by purplehaze on Sun, 05 Apr 2020 05:52:12 -0700

Automating SQL with Python

I often use SQL in my work, which has annoying subtle differences and limitations, but after all, it is the cornerstone of the data industry.Therefore, SQL is indispensable to every data worker.Being proficient in SQL means a lot. SQL is good, but how can you just be satisfied with "good"?Why not proceed further with SQL? Statements c ...

Posted by barnbuster on Sun, 05 Apr 2020 03:05:57 -0700

Preliminary knowledge of artificial intelligence: data analysis: numpy foundation of scientific computing

1. numpy scientific computing base 1.1 what is numpy NumPy(Numerical Python) is an extension library of Python language, which supports a large number of dimension arrays and matrix operations. In addition, it also provides a large number of mathematical function libraries for array operations. NumPy's predecessor, Numeric, was first developed ...

Posted by FrozNic on Sun, 05 Apr 2020 02:08:36 -0700