Python learning notes: basic data types! (tuple, list, dictionary)

Tuple tupe Tuples are called read-only lists, that is, data can be queried but cannot be modified. Therefore, the slicing operation of strings is also applicable to tuples. Example: (1, 2, 3) ("a", "b", "c") List list List is one of the basic data types in python. Other languages also have data types similar to ...

Posted by calande on Sat, 18 Sep 2021 02:29:18 -0700

Chapter 7 function decorators and closures

  function decorators are used to "mark" functions in the source code to enhance the behavior of functions in some way. This is a powerful feature, but to master it, you must understand closures.   the ultimate goal of this chapter is to explain the working principle of function decorators, including the simplest registratio ...

Posted by Cerberus_26 on Sat, 18 Sep 2021 01:34:57 -0700

Data visualization of python for beginners (word cloud diagram)

1. The generation of word cloud needs to confirm that wordcloud and matplotlib have been installed. The download library can be downloaded through cmd or by directly entering instructions on the Jupiter notebook, or from the website https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud Download the installation package manually on the, place th ...

Posted by s2day on Sat, 18 Sep 2021 01:17:15 -0700

Python learning 3 strings and related common functions

String declaration Double quotation marks, single quotation marks, three single quotation marks, three double quotation marks There are double quotation marks inside and single quotation marks outside There are single quotation marks inside and double quotation marks outside Or use escape characters #character string m='hello' n="hello" #Ther ...

Posted by sasquatch69 on Fri, 17 Sep 2021 21:37:18 -0700

Installation of Anaconda(3-2021.05)+Tensorflow(2.6) in Win10 environment

Installation of Anaconda(3-2021.05)+Tensorflow(2.6) in Win10 environment In the process of learning machine learning, many Python libraries will be used, such as tensorflow and pandas. It is very inconvenient to install them alone. Therefore, in most cases, people will install Anaconda first. 1. Install Anaconda3 version You can find the lat ...

Posted by leegreaves on Fri, 17 Sep 2021 17:14:15 -0700

Lesson 1: cloud picture of words

1. Download jieba participle and wordcloud Pip3 install jieba (3 may need to be removed) 2. Open + name the text to generate word cloud Use with open as 3. Participle Import custom dictionary (load_userdict; sep_list) 4. Statistics of word frequency Define an empty dictionary; Use cycle         &nb ...

Posted by TutorMe on Fri, 17 Sep 2021 16:10:35 -0700

The first Python primer for programming beginners. Learning notes Charper7: Class

class In the United States, everyone drinks the same Coca Cola, whether it's the president or a tramp. Andy Warhol Define a class Definition: a class is the sum of abstract concepts of a series of behavioral transactions with common characteristics # Small example: define a Coca Cola class and assign a formula variable class CocaCola: ...

Posted by LikPan on Fri, 17 Sep 2021 14:48:16 -0700

Reproduction of Research Report: backtrader implements the improved golden fork strategy (with code)

Just learning soon, I hope to point out some problems. They are not authoritative and not necessarily correct. Thank you! 1. Data acquisition Recommended here tushare To obtain transaction data, college students can try for free after registration and approval. Remember to complete the task. import tushare as ts import pandas as pd ts.set_to ...

Posted by m4x3vo on Fri, 17 Sep 2021 13:43:46 -0700

Python built-in functions

Serial numberfunctionexplain1abs()Returns the absolute value of a number2divmod()Returns a tuple containing quotient and remainder, (quotient, remainder)3max()Returns the maximum value of the given parameter4min()Returns the minimum value of the given parameter5pow(x,y)Returns the value of x to the power of y6reduce()Accumulate the elements in ...

Posted by rayk on Fri, 17 Sep 2021 09:33:20 -0700

[EMG signal] Based on GUI MUAP waveform [Matlab 736]

1, Introduction EMG signal is easy to collect, but it is very difficult to understand and interpret the collected EMG signal. The analysis of EMG signals can enable us to understand the mechanism of force generation in muscles and how muscles produce movement. However, how to extract this information depends on the appropriate signal acquisiti ...

Posted by alanho on Fri, 17 Sep 2021 04:53:07 -0700