python

Python: How To Add Elements In Two Lists In One-To-One Correspondence

There are two lists with the same length. Now if you need to add the values in the lists one by one…

robot18 created at July 26, 2021, 6 p.m.

Python: How To Make One-To-One Correspondence Of Two Lists

## Demand There are two lists: A and B. The date is stored in A, and the output under that date …

robot18 created at July 26, 2021, 5:55 p.m.

How To Generate Permutations And Combinations Of All Elements Of A Python List

## Permutation  generation You can use `itertools.product` to generate the permutation: ```pl…

robot18 created at July 26, 2021, 8:50 a.m.

3 Ways To Efficiently Kill All Python Processes Under Linux (Including Scripts.Sh)

3 ways to kill all python processes under linux This article mainly introduces 3 ways to kill al…

robot18 created at July 24, 2021, 11:22 p.m.

Error Operation Not Permitted Solution When Install Playwright In Mac Uses Python

When using mac to install playwright, it prompts an error: ```plaintext PermissionError: [Errno…

robot18 created at July 24, 2021, 2:55 p.m.

Python Redis Ordered Set Sorted Set Checks Whether A Key Exists

Redis ordered set (Sorted Set) command ```plaintext ZADD ZREM ZCARD ZCOUNT ZSCORE ZINCRBY …

robot18 created at July 24, 2021, 10:27 a.m.

Python Variable Length Parameter Detailed Explanation

If you want a function to receive arbitrarily multiple parameters, you can use variable-length para…

robot18 created at July 23, 2021, 11:52 a.m.

How To Pair Elements In Two Lists One By One, Python

## Requirement realize the pairing of the elements from two lists one by one. ## Ordinary met…

robot18 created at July 23, 2021, 11:14 a.m.

Processing Any Two Elements Of A Python List

1. Python `enumerate()` function 2. `Itertools` module combination method ```plaintext impor…

robot18 created at July 23, 2021, 11:07 a.m.

Selenium.Common.Exceptions.Webdriverexception: Message: Invalid Argument: Missing 'Name'

Use selenium to add a cookie prompt error: ```plaintext Traceback (most recent call last): F…

robot18 created at July 17, 2021, 11:03 a.m.

Python3 Redis Returns Bytes (Bytes) Instead Of Strings (String)

## description Recently, my project was updated to python3, and the redis version was also updat…

robot18 created at July 15, 2021, 12:48 p.m.

Python3 Redis Subscription And Publishing Demo Example

python3 redis subscription and publishing  ## demo example ```plaintext import redis clas…

robot18 created at July 15, 2021, 12:46 p.m.

Crawler Error: Unicodedecodeerror:'Utf-8' Codec Can't Decode Byte 0x8b In Position 1: Invalid Start Byte

## description After crawling `http://www.example.com/ajax-poets/`, convert the returned html in…

robot18 created at July 15, 2021, 6:46 a.m.

Np.Ascontiguousarray() Function In Numpy

Instructions in the Numpy documentation: > "Return a contiguous array (ndim >= 1) in memory (C o…

robot18 created at July 15, 2021, 6:15 a.m.

Typeerror: Int() Argument Must Be A String, A Bytes-Like Object Or A Number, Not 'Image'

## description In process of PIL.Image convert to numpy array When using `PIL.Image` to read …

robot18 created at July 15, 2021, 6 a.m.

4 Cool Python Libraries For Command Line Visualization

## Introduction Usually everyone runs the program on their own computer and can directly visuali…

robot18 created at July 14, 2021, 1:28 p.m.

How To Send Smtp Mail With Python

## SMTP **SMTP** (Simple Mail Transfer Protocol) is the Simple Mail Transfer Protocol. It is a s…

robot18 created at July 14, 2021, 11:39 a.m.

Several Ways To Execute Python Scripts Using Shell Scripts

## scenarios we use shell language The shell language is a packaging script for a wide range of …

robot18 created at July 14, 2021, 11:10 a.m.

Pandas Data Loading And Exploratory Data Analysis

## Read data ### Read in a small amount of data View or modify the working directory ```pl…

robot18 created at July 13, 2021, 5:43 p.m.

5 Pandas Chart Beautification Styles

## Introduction Pandas is an efficient data processing library. It uses dataframe and series as …

robot18 created at July 13, 2021, 5:11 p.m.

Say Goodbye To Copy+Paste, Python Implements Pdf To Text

## Introduction For many people, converting PDF to editable text is just a need, but there is no…

robot18 created at July 13, 2021, 4:12 p.m.

Scientific Computing: Python Analyzes Data To Find Problems And Visualize Them

For the recorded data, how to use Python to analyze or graph it? This article will introduce sev…

robot18 created at July 13, 2021, 3:43 p.m.

How Does Matplotlib Draw In Spyder To Display Pictures In Pop-Up Windows

## description ![image](/media/image_JT5J5q5.png) The advantage of `spyder` is that the pictu…

robot18 created at July 13, 2021, 3:23 p.m.

Typeerror: 'Module' Object Is Not Callable

This error means that **the module is called as a function**, but it cannot be called by itself. …

robot18 created at July 11, 2021, 4:02 p.m.

Python: Introduction To Rna Rate And Installation Of Scvelo

## 1 Introduction Measuring gene activity in individual cells requires destroying these cells in…

robot18 created at July 9, 2021, 5:05 p.m.

Micropython: Environment Configuration, Firmware Burning

Statement: As a beginner, I record the learning content in the form of notes. If there is a mistake…

robot18 created at July 9, 2021, 3:20 p.m.

How To Package Paddleocr Program With Pyinstaller

Due to the needs of the project, the py file recognized by the picture needs to be packaged into an…

robot18 created at July 9, 2021, 2:48 p.m.

Several Interesting Python Command Line Tools

## 1\. http service Start an http static file service with http module ```plaintext # python…

robot18 created at July 8, 2021, 6:07 p.m.

Pytorch Runtime Error:Cuda Run Out Of Memory

I believe that most of the friends who use pytorch to run programs have encountered this problem on…

robot18 created at July 7, 2021, 6:26 a.m.

Fatal Error: 'Libxml/Xpath.H' File Not Found

## description I encountered a problem when installing `readability-lxml` on MacOS ```plainte…

robot18 created at July 7, 2021, 6:06 a.m.

[No.008]Pyhton Import Error Bz2

When installing NodeJS, I got the import bz2 Error: ```plaintext ImportError: No module named b…

robot18 created at July 7, 2021, 5:47 a.m.

Solution For Problem After Updating Pip: No Module Named Pip

## problem after updating pip environment: Win10 since the system keeps reminding me to updat…

robot18 created at July 6, 2021, 11:23 a.m.

Cv2.Error: Opencv(3.4.3) C:Projectsopencv-Python Opencv Modules High Guisrc Window.Cpp:356...

## description ### error message: ```plaintext cv2.error: OpenCV(3.4.3) C:projectsopencv-pyt…

robot18 created at July 6, 2021, 6:21 a.m.

Error 1045 (28000): Access Denied For User 'Root'@'Localhost'

## Connect Mysql with Python ```plaintext import mysql.connector conn = mysql.connector.connec…

robot18 created at July 6, 2021, 6:01 a.m.

Python Requests“Max Retries Exceeded With Url” Error

## error1 > NewConnectionError('\<urllib3.connection.VerifiedHTTPSConnection object at 0x0000000…

robot18 created at July 5, 2021, 3:30 p.m.

Error: Package 'Imageio' Requires A Different Python: 2.7.17 Not

## description I encountered the following error when installing imgaug using Python2.7:  ```…

robot18 created at July 4, 2021, 1:45 p.m.

Overflowerror: String Longer Than 2147483647 Bytes Problem

## description requests 2.21.0 requests-toolbelt 0.9.1 When uploading files using python r…

robot18 created at July 4, 2021, 9:51 a.m.

Pip Install Twisted Error: Limits.H: No Such File Or Directory

## Environment * macOS mojave - 10.14.1;  * python 2.7.15/python 3.7.1. ## error message…

robot18 created at July 4, 2021, 9:05 a.m.

Socket Error 104 Bug

## bug overview ### Technology stack * nginx * uwsgi * bottle ### Error details …

robot18 created at July 4, 2021, 8:59 a.m.

Scrapy Unhandled Error In Deferred

## error message ```plaintext builtins.TypeError: 'NoneType' object is not iterable start_requ…

robot18 created at July 4, 2021, 8:48 a.m.

What Is The Advantage Of The Map() Function In Python

## introduction to python map function There are some built-in higher-order functions in python,…

robot18 created at July 3, 2021, 5:03 p.m.

Pipenv-Super Helpful Python Package Management Tool

## What is pipenv **pipenv** is a package management tool officially recommended by python, whic…

robot18 created at July 3, 2021, 1:58 p.m.

How To Convert Coordinate System With Python-Opencv

The example below uses OpenCV to convert  coordinate system in Python. ## Cartesian to polar coo…

robot18 created at July 2, 2021, 10:44 a.m.

Python Converts A 10*2 Randomly Generated Cartesian Coordinates (Rectangular Coordinates) Into Polar Coordinates

here is an example code block to converts a 10\*2 randomly generated Cartesian coordinates (rectang…

robot18 created at July 2, 2021, 10:35 a.m.

Pyecharts: How To Plot Scatter Plots/Heat Maps On The Map Based On Latitude, Longitude And Magnitude

**Function**: Map the latitude and longitude to the map to view the distribution of the number of b…

robot18 created at July 2, 2021, 9:33 a.m.

Arcgis: Calculate The Number Of Points In A Polygon Unit With Python Geopandas Batch Processing

In ArcMap, the operation is very simple. Use the Spatial Join tool directly. Pay attention to two p…

robot18 created at July 1, 2021, 2:42 p.m.

Three Ways To Find The Absolute Value Of Python

## Three ways to find the absolute value of python 1.  Conditional judgment 2.  Built-in func…

robot18 created at July 1, 2021, 1:04 p.m.

How To Input A List Into The Python Input Function

## description After Python3.0, keyboard input uses the input function: ```plaintext >>> x=i…

robot18 created at July 1, 2021, 12:52 p.m.

Python Command Line Clearing Method

## Linux ```plaintext >>> import os >>> os.system("clear") ``` ## Windows ```plaintext…

robot18 created at July 1, 2021, 12:43 p.m.

How To Plot Box Plot In Python

## Introduction to box plots: Because the box chart is a graphical summary based on the five-num…

robot18 created at July 1, 2021, 11:08 a.m.

How To Plot Heat Map With Python Seaborn Package

## data A common application scenario of the heat map is to draw the correlation coefficient hea…

robot18 created at July 1, 2021, 5:50 a.m.

How To Plot Scatter Plot With Python Seaborn Package

**seaborn** is a package specially used for statistical data visualization, comparable to the ggplo…

robot18 created at July 1, 2021, 5:35 a.m.

How To Use Python To Manipulate Git Code? Introduction To Gitpython

Sometimes, you need to do complex Git operations, and there is a lot of intermediate logic. Using S…

robot18 created at June 30, 2021, 3:50 p.m.

How To Use Python In Rstudio

Pycharm has always been mentioned when we learn and test python, which is not only easy to use, but…

robot18 created at June 30, 2021, 2:56 p.m.

How To Determining Whether A Number Is A Perfect Square Number In Python

## question The original question is this: > An integer, it is a perfect square number after …

robot18 created at June 30, 2021, 2:30 p.m.

Typeerror: Tuple Object Does Not Support Item Assignment

The code below prompt error ```plaintext def change(tupleTest): tupleTest[0] = 2 tupleTes…

robot18 created at June 30, 2021, 2:23 p.m.

Python Typeerror: Str Object Does Not Support Item Assignment

## description When doing an exercise question, the topic is:  > Use the `map()` function to …

robot18 created at June 30, 2021, 11:16 a.m.

Python Plot Confusion Matrix Diagram

## 1\. Calculate the confusion matrix ```plaintext # Import the package that calculates the con…

robot18 created at June 29, 2021, 6:24 p.m.

Python+Opencv+Hog+Svm+Pedestrian Detection

This article summarizes the HOG+SVM related to pedestrian detection. Of course, there are also vehi…

robot18 created at June 29, 2021, 5:36 p.m.

Scrapy:Valueerror: Invalid Literal For Int() With Base 10: ''

## description wrong code: ```python Item['job_minpayment']=str(round(int(re.split('\-', Ite…

robot18 created at June 28, 2021, 4:53 p.m.

Python Replace All Blanks In Text With Commas

In scientific computing, the conversion of input data file format is a frequently encountered probl…

robot18 created at June 28, 2021, 11:06 a.m.

Jupyter Notebook Change The Document Path And Browser Settings

Jupyter Notebook modify the document path and browser settings I thought there was a lot of such…

robot18 created at June 27, 2021, 1:39 p.m.

Use Try...Except Block To Return The Error Message Accurately

try...except... monitor a piece of code, want to accurately locate the error type and error details…

robot18 created at June 27, 2021, 1:31 p.m.

Python Ignores Warning Errors

## description Errors are often encountered in python development, but warning usually does not …

robot18 created at June 27, 2021, 10:56 a.m.

Run Python Script Got Error: Error: Unrecognized Arguments

## description Run the Python program with a script and pass parameters, and an error is reporte…

robot18 created at June 27, 2021, 10:48 a.m.

Python Ioerror: [Errno 0] Error

Under Windows, this exception occurs during the process of opening a file in `a+` mode, reading the…

robot18 created at June 27, 2021, 9:05 a.m.

Python Windowserror: [Error 32]

## description code: ```python import os file_open = open('F:/input1.txt') os.remove("F:/i…

robot18 created at June 27, 2021, 8:59 a.m.

Python Get Second-Level Timestamp And Millisecond-Level Timestamp

## 1\. Get second-level timestamp, millisecond-level timestamp, and microsecond-level timestamp …

robot18 created at June 27, 2021, 7:30 a.m.

Solution For Image Distortion From Python's Matplotlib To Pdf

## Problem Description: After Python runs the simulation image, it is usually copied directly in…

robot18 created at June 27, 2021, 7:20 a.m.

Python: How To Compare Strings/Files/Contents

## 1 File content difference comparison method The file content difference comparison is realize…

robot18 created at June 27, 2021, 6:58 a.m.

An Article Teaches You Use Python To Draw Android Cpu And Memory Growth Curves

Let's talk! ! ! ! When doing performance monitoring, it will be more intuitive if you can displa…

geoer created at June 26, 2021, 4:31 p.m.

Attributeerror: 'Rectangle' Object Has No Property 'Normed' Solution

## description If you run your code and get the error message like bellow: ```plaintext Attr…

robot18 created at June 26, 2021, 8:31 a.m.

Packstack Installation Error: Error: Systemd Start For Openstack-Nova-Scheduler Failed!

According to the error, you know that the Scheduler startup under the Nova service failed, the corr…

robot18 created at June 26, 2021, 8:24 a.m.

Python Appears Runtimeerror Error

```plaintext RuntimeError: An attempt has been made to start a new process before the …

robot18 created at June 26, 2021, 8:17 a.m.

Python Syntaxerror: (Unicode Error) 'Unicodeescape' Codec Can't Decode Bytes In Position 2-3: Tr

Hello ~ Happy New Year, I haven't updated for a long time, I just got the error `SyntaxError: (Unic…

robot18 created at June 26, 2021, 7:30 a.m.

Typeerror: Input ‘Value’ Of ‘Assign’ Op Has Type Float64 That Does Not Match Type Float32 Of Argument ‘Ref’.*

## error prompt ![](/media/image_gcT2N5L.png) ## solution This is the pop-up problem inter…

robot18 created at June 25, 2021, 6:51 a.m.

Indentationerror: Expected An Indented Block

## Solution: Python is a language that is very sensitive to indentation, which brings confusion …

robot18 created at June 25, 2021, 6:45 a.m.

Python: Error Syntaxerror: Invalid Syntax's Summary Summary

I learned Python today, but I just started a problem, I didn't have a problem, but I will display "…

robot18 created at June 24, 2021, 4:46 p.m.

Python Install Third Party Library Error: Command Erropred Out With Exit Status 1:

## Let's take a look at the prompt of mistake:  I originally wanted to get a word cloud with Pyt…

robot18 created at June 24, 2021, 4:37 p.m.

Solution: Django-Error: That Port Is Already In Use

For Django newbies, there will be many problems during the learning process, which often encounters…

robot18 created at June 24, 2021, 4:14 p.m.

Solve Modulenotfounderror: No Module Named 'Pip' Problem

Today I want to install the WXPython Third Directory to write Python's GUI, I found that the PIP co…

geoer created at June 24, 2021, 10:38 a.m.

Modulenotfounderror: No Module Named 'Sklearn.Cross_Validation'

Error call method:  ![](/media/image_Kw5nOXf.png) Correct call: ```python from sklearn.mo…

robot18 created at June 24, 2021, 10:28 a.m.

Python: How To Continue Tasks After Capturing Exceptions

Recently written scraping scripts, some bad data will always occur in the acquired URL link, that i…

robot18 created at June 24, 2021, 6:14 a.m.

Modulenotfounderror: No Module Named 'Requests'

Solution for Python error: ImportRequestsError: No module named 'requests' ## **Case 1 "requests…

lyp created at May 29, 2021, 10:11 a.m.

Syntaxerror: (Unicode Error) 'Unicodeescape' Codec Can't Decode Bytes In Position 16-17: Truncated \Uxxxxxxxx Escape

## **Description** When you meet this error, it means there are some problem with your Unicode e…

lyp created at May 24, 2021, 3:12 p.m.

Syntaxerror: Unexpected Character After Line Continuation Character When Reading Py File From Terminal

## Description If you meet this problem when reading a python script from you Terminal (like CMD…

lyp created at May 21, 2021, 9:13 a.m.

Tensorflow:Syntaxerror: Unexpected Character After Line Continuation Character

## Problem description For example, editing two lines of code: ```python tf.keras.layers.Max…

lyp created at May 21, 2021, 8:36 a.m.

Typeerror: Cannot Perform Reduce With Flexible Type

### Description In python, if you meet this error, it means: > You wrote **numbers** in the f…

lyp created at May 9, 2021, 11:01 a.m.

Redundant Character Escape '\/' In Regexp

### **Reason** if you got this warning, it means you used too many `\` symbols, the  `/` charact…

lyp created at March 20, 2021, 10 a.m.

Urllib.Error.Httperror: Http Error 403: Forbidden

## **Error message** ```plaintext urllib.error.HTTPError: HTTP Error 403: Forbidden ``` ## …

lyp created at March 17, 2021, 7:16 p.m.