python regular expression re module

'''regular expression regular expressionRegular expression is a special character sequence, which can be understood as a stringBut this string is stronger than the original stringRegular expression usage scenario:Special characters are not allowed when registering and setting passwords. What are the number of passwordsWhen crawling, use regular ...

Posted by nomad9 on Sun, 22 May 2022 11:47:14 +0300

socketserver and hashlib verification in Python

One, socketserver The bottom layer of the network protocol is the socket, which is based on the socket module and encapsulated with another layer, which is the socketserver. The socketserver is to realize the concurrency of the tcp protocol on the server side. 1. Basic writing server side writing: # Server #import socket module import sockets ...

Posted by rick007 on Sun, 22 May 2022 08:34:13 +0300

The use of pytest_addoption in pytest

illustrate         In daily UI automation testing, multiple scenarios may be used, such as testing, pre-release, and production environments, which requires us to switch environments. If we need to specify different system configurations in different environments, each modification The framework code configuration is very unautomated and cause ...

Posted by mj99 on Sun, 22 May 2022 07:47:33 +0300

Python Github automatic login, Github open source project analysis

I. Introduction Github source link: https://github.com/Python3WebSpider/GithubLogin Cui Qingcai: https://cuiqingcai.com/8229.html When it comes to automatic login, using selenium is the most suitable, and I have actually fought several times before. Let's try to construct a post form and log in with a post request. 2. Analysis ) login process B ...

Posted by computerzworld on Sat, 21 May 2022 20:30:28 +0300

Django e-commerce function

Django e-commerce function 1, Order Order logic Login users can browse products The product details page purchases immediately and generates an order. The order status is unpaid Add goods to the shopping cart, view the shopping cart, select the specified goods, purchase immediately and generate an order. The order status is unpaid Settle the ...

Posted by akkad on Sat, 21 May 2022 18:27:21 +0300

Sword finger offer special exercise

Continuously updating 1. Search in two-dimensional array Problem: in a two-dimensional array (each one-dimensional array has the same length), each row is sorted in ascending order from left to right, and each column is sorted in ascending order from top to bottom. Please complete a function, input such a two-dimensional array and an integer, ...

Posted by doreg28 on Sat, 21 May 2022 13:16:46 +0300

Some personal understanding of Python decorator

Decorator It is essentially a function that accepts parameters as functions. Function: add additional general functions to an implemented method, such as logging, running timing, etc. give an example Decorator without parameters, No@ # Decorator without parameters def deco_test(func): def wrapper(*args, **kwargs): print("before fu ...

Posted by computerbum on Sat, 21 May 2022 11:19:33 +0300

Three characteristics of object-oriented language: encapsulation, inheritance, polymorphism -- encapsulation

1. What is encapsulation? In a program, encapsulation is an abstraction of a concrete object To put it simply: hide some parts (privatize), and you can't see other parts of the program (there's no way to call them directly) Privatization: privatize the features or some methods in the class so that they cannot be used directly by the outside 2 ...

Posted by stry_cat on Sat, 21 May 2022 09:49:33 +0300

SVD and CUR self summary

SVD and CUR self summary reference resources: https://www.cnblogs.com/endlesscoding/p/10033527.html https://blog.csdn.net/WangWeb1998/article/details/114376298 1. SVD (singular value decomposition) definition: There is one m × n ...

Posted by shruti on Sat, 21 May 2022 02:38:13 +0300

Using Docker to run HuggingFace massive model

This article will share how to quickly run the interesting model on Hugging Face locally through Docker. Run the model with less code and less time cost than the original project. If you are familiar with Python, most model projects can be deployed and run locally in about 10 minutes. Write in front In order to facilitate the display, I chos ...

Posted by besa on Sat, 21 May 2022 01:07:42 +0300