Weekend homework - circular exercises

Judge how many primes there are between 101-200, and output all primes. count = 0 for x in range(100, 200): for y in range(2, int(x ** 0.5)+1): if x % y == 0: break else: print(x) count += 1 print('have', count, 'Prime number', sep='') Find the cumulative value of integers 1 ~ 100, but it is requir ...

Posted by surfsup on Fri, 22 Oct 2021 21:25:39 -0700

python test development django-159.Celery asynchronous and RabbitMQ environment construction

preface Celery is a Python task queue system used to handle work task assignments across threads or network nodes. It makes asynchronous task management easy. Your application only needs to push messages to agents like RabbitMQ, and the Celery worker will pop them up and schedule tasks to execute. Celery Five roles of celery Task s are task ...

Posted by sargus on Fri, 22 Oct 2021 21:04:00 -0700

Python data structure 02 - sequential list, linked list

Sequence table Storage method of elements in the sequence table: The complete information of the sequence table consists of two parts: 1. Set of elements in the table 2. Information on the overall situation of the table There are two ways to implement the sequence table: Figure a shows an integrated structure: table information and el ...

Posted by ignorant on Fri, 22 Oct 2021 08:00:19 -0700

Double eleven welfare! Climb to the e-commerce platform for product details! We only buy high-quality products!

Hey, guys, good evening! After climbing Jingdong in the afternoon, we'll try Taobao in the evening. The road of chopping hands will never stop! In fact, I don't want to climb. I can't be known by my daughter-in-law. She said she wanted to buy things on Taobao. She didn't bother to see it. Let me analyze it with code. No, he doesn't smell good ...

Posted by laduch on Fri, 22 Oct 2021 07:21:12 -0700

Python data structure and algorithm -- search and sort

search 1. Sequential search Through subscripts, we can access and search data items in order. This technology is called "sequential search" def sequentialSearch(alist,item): pos = 0 found = False while pos<len(alist) and not found: if alist[pos] == item: found = True else: ...

Posted by renzaho on Fri, 22 Oct 2021 02:47:21 -0700

Huawei cloud experiment sandbox experience -- basic knowledge of Python code

This is because our cv teacher asked us to experience Huawei's AI Gallery. We have experienced a similar course before - the "basic operation" of paper clip (jibencaozuo.com). I personally feel it's good. Today, let's try Huawei's learning course. 1, Fundamentals of Python Programming 1.Print syntax print("XDU-ldx") #Print the words ...

Posted by oaskedal on Fri, 22 Oct 2021 01:04:19 -0700

Introduction to [Python Foundation Series] List

#Introduction to [Python Foundation Series] List List is one of the most commonly used data structures in Python. Its features include: Ordered, can be traversed by index Store multiple data structures Some characteristics Create array To create an array, you can use [], such as: test_list = ["Jon Snow", "Winterfell", 30] print(jon_sn ...

Posted by proctk on Thu, 21 Oct 2021 22:04:44 -0700

Learning summary on September 23

Learning summary on September 23 1, Tuple 1. Definition of tuple 1. Tuple is container type data (sequence). Take () as the flag of the container, and multiple elements in it are separated by commas: (element 1, element 2,...) 2. Tuples are immutable (addition, deletion and modification are not supported); Tuples are ordered (subscript oper ...

Posted by Thundarfoot on Thu, 21 Oct 2021 17:41:40 -0700

Python+opencv module to achieve emoticon package into mosaic pictures, image processing road

Preface Today, using the expression packs that you downloaded yesterday, you can use them to put together a wave of mosaic pictures. That's good. Don't talk too much. Let's start happily! development tool Python version: 3.6.4 Related modules: opencv-python module; numpy module; tqdm module; argparse module; And some of the modules tha ...

Posted by sogno on Thu, 21 Oct 2021 11:26:10 -0700

SYN Flood Attacks Implemented by Python Socket Programming and TCP Protocol

Preface Over the years, I have been crawling in the it industry. Along the way, I have summarized a number of high-frequency interviews in python industry. I have seen most of the new blood, and I still have a variety of difficult questions or answers for a variety of interview questions. So I've developed a treasure book of interviews myself ...

Posted by tmyonline on Thu, 21 Oct 2021 10:46:27 -0700