python basics 1-5: collections.defaultdict build multidict&&OrderedDict module & & zip() function

python cookbook Chapter 1, sections 6-8 1.6 keys in the dictionary map multiple values Question: how to implement a dictionary (also called multidict) in which a key corresponds to multiple values? Solution: a dictionary is a mapping of a key to a single value. If you want a key to map multiple values, you need to put these values in ...

Posted by OM2 on Sat, 23 Oct 2021 18:33:04 -0700

[pytorch learning notes] Chapter 4 - neural network

Previous chapter We have learned about automatic gradient autograd. torch.nn can be used to build neural network in pytorch. NN depends on autograd to define the model and differentiate it. nn.Module contains the layer and the method forward(input) that returns output. Artificial Neural Networks (abbreviated as ANNs), also referred to as ne ...

Posted by tmyonline on Sat, 23 Oct 2021 18:31:19 -0700

Handle missing and abnormal values in the data

preface In order to cope with my homework, I wanted to find a code on the Internet and handed it in. I found that I didn't have what I wanted, so I wrote it in tears for two days. In order to study hard, I rolled it up with my classmates 🤣 If you need to hand in your homework, just look at the source code directly. In the CleaningData () ...

Posted by katlis on Sat, 23 Oct 2021 07:36:05 -0700

Python basics -- variables and data types

1, Data type All data in the computer can be regarded as objects, and variables play the role of pointing to data objects in the program. The data types commonly used in python are divided into basic data types (number, str) and composite data types (list, tuple, dict, set) Basic data type 1.number (numeric) int float (no double) complex ...

Posted by madhavr on Sat, 23 Oct 2021 05:12:09 -0700

Kaggle house price forecast project learning notes

House price forecast Original question: https://www.kaggle.com/c/house-prices-advanced-regression-techniques/data?select=train.csv reference resources: https://blog.csdn.net/qq_29153321/article/details/103967670 The house price prediction experiment analyzes 1460 house price data and the attributes of 80 houses, establishes a regression mode ...

Posted by Penelope on Sat, 23 Oct 2021 01:49:01 -0700

The white way of python -- Day4 (I can't learn it gradually)

  Here is only for personal notes. The content and code are mostly from the 100 day course of GitHub Luo Hao God. The link is attached below, which is infringed and deleted~ GitHub - jackfried / python-100-days: Python - 100 days from novice to master 1, Use of functions and modules (1) Define function: use the def keyword to define a f ...

Posted by rofl90 on Sat, 23 Oct 2021 00:30:10 -0700

Python Beginner Tips: String

C language and python are often confused, especially I can't help adding a semicolon after Python... Just make a note for myself to save forgetting... (from the little turtle) 9, String Strings are widely used and extremely convenient: '''Determine whether it is palindrome number''' >>> x = '123454321' >>> 'Is the palin ...

Posted by frabble on Sat, 23 Oct 2021 00:25:21 -0700

Python Beginner Tips: List

C language and python are often confused, especially I can't help adding a semicolon after Python... Just make a note for myself to save forgetting... (from the little turtle) 7, List list The list contains multiple data types at the same time. The subscript index starts from 0. The subscript index value of the last element is - 1, and so ...

Posted by IronicSoul on Sat, 23 Oct 2021 00:12:02 -0700

[Pygame practice] laughing at the trembling little game "don't stop, eight note sauce", tearing, roaring and running with tears!

Introduction 🎼 Hi, big babies, it's the weekend again. Did you have a holiday today? Weekends are always idle, idle. I've been thinking about playing some games to give you something new. Isn't that right? Play games, find games, find materials and write code. Have you heard of this game? Voice controlled 2D action game, its name is &quo ...

Posted by darkwolf on Fri, 22 Oct 2021 22:44:03 -0700

Learning summary on September 28

Learning summary on September 28 1, Function basis 1. Cognitive function a. Concept (machine): a function is the encapsulation of code that implements a specific function b. Classification of functions 1. System functions (machines built by the system) - functions created by Python, such as print,input,type,max,min,id, etc 2. User defined ...

Posted by kycan on Fri, 22 Oct 2021 22:22:46 -0700