100 Numpy practical chestnuts

51. Create a structured array (★★☆) representing position (x, y) and color (r, g, b, a)(prompt: dtype)Z = np.zeros(10, [('position', [('x', float, 1),                                  ('y', float, 1)]),                   ('color',    [('r', float, 1),                                  ('g', float, 1),                                  ('b', float ...

Added by bsamson on Tue, 18 Jan 2022 21:41:50 +0200

python -- Serial Communication

Serial communication of Python Serial communication is a necessary skill for embedded engineers. If you can write a simple host computer, you will get a lot of points. This series is a record of relevant work. After all, Python is not often used and always forgets a lot of things. It's too much trouble to learn it again when you use it. After ...

Added by bobvaz on Tue, 18 Jan 2022 21:22:37 +0200

Building wheels from scratch: gather of Python 3 asyncio

preface The book continues from the above: This paper builds the third wheel, which is also a very common function gather in the asyncio package 1, Knowledge preparation ● compared with the first two functions, gather is used more frequently because it supports the "simultaneous" execution of multiple collaborative tasks ● understa ...

Added by fotakis on Tue, 18 Jan 2022 20:29:15 +0200

Solution to the 11th provincial competition of Blue Bridge Cup (Python)

First question   unexpected check-in questions, traversal. #FA Yi ans = 0 for i in range(1,2021): for j in str(i): if j == "2": ans += 1 print(ans) #Method II s=0 for i in range(1, 2021): s+=str(i).count('2') #The count function can only be used with strings, so you need to convert numbers to strings print ...

Added by magie on Tue, 18 Jan 2022 18:08:49 +0200

Order of Mido Mall (submit order 2)

2.4 use optimistic lock to place orders concurrently Important: When multiple users initiate an order request for the same commodity at the same time, first query the commodity inventory and then modify the commodity inventory, there will be resource competition, resulting in abnormal final results of inventory. 2.4.1. Concurrent order probl ...

Added by uwannadonkey on Tue, 18 Jan 2022 17:27:29 +0200

[Python detection Script] do you know that your friends block you? Do you know the end of shielding others? (Lahai, all Lahai)

preface 🚀 Author: "programmer pear" 🚀 ** Article introduction * *: This article mainly explains how to use Python to find out those people who block me in QQ space, and put them in The whole process of pulling black. 🚀 ** Article source code acquisition * *: in order to thank everyone for paying attention to my little cu ...

Added by yong on Tue, 18 Jan 2022 17:12:46 +0200

Written a class roll call system in python

Introduction: Hello, iron juice ~ I brushed such a short video on the subway today. I wonder if I can write a similar class roll call program. The idea can't stand waiting. Just write it~ 1, Preparatory work 1.Tkinter Tkinter is Python's built-in TK GUI tool set. TK is the native GUI Library of Tcl language. As a graphic design tool of ...

Added by nicolam1 on Tue, 18 Jan 2022 16:42:22 +0200

Big data project 1 (data preprocessing)

1, Understand what preprocessing is Data preprocessing is a data mining technology. Its essence is to convert the original data into an understandable format or in line with our mining format. 2, Why preprocessing In the real world, data is usually incomplete (lack of some interesting attribute values), inconsistent (including difference ...

Added by mjlogan on Tue, 18 Jan 2022 15:18:21 +0200

[Python] upload the python package to the pypi official website

  I summary In the last [crawler] article on deploying Scrapy to k8s, it was mentioned that errors were reported in the custom , spiderkeeper , image, so I submitted a , python , package called , spiderkeeper new , based on its source code to the , pypi , official website. This article will record the whole construction process and ...

Added by konqest on Tue, 18 Jan 2022 13:22:59 +0200

Python learning notes: 05 application of branch and loop structure

05 application of branch and loop structure Classic case Example 1: Fibonacci sequence Note: the characteristic of Fibonacci sequence is that the first two numbers of the sequence are 1. Starting from the third number, each number is the sum of the first two numbers. Then the first ten numbers of Fibonacci sequence are: 1 1 2 3 5 8 13 21 ...

Added by Chesso on Tue, 18 Jan 2022 11:35:41 +0200