Instruction manual for secondary development of openGauss open source database

This section mainly introduces compiling and verifying secondary development results. compile Compilation environment requirements Operating environment requirements The operating system environment requirements are shown in the table below. CPU Operating system requirements X86 architecture Cent ...

Posted by yacaph on Mon, 07 Mar 2022 06:15:23 +0100

Concurrent programming -- collaborative process, Greenlet module, Gevent module, synchronous and asynchronous of Gevent, Gevent application

An introduction The topic of this section is to realize concurrency based on single thread, that is, to realize concurrency with only one main thread (obviously, there is only one available cpu). Therefore, we need to review the essence of concurrency first: switching + saving state. The cpu is running a task and will switch to execute oth ...

Posted by Ben5on on Mon, 07 Mar 2022 05:38:51 +0100

"Python" 8 tips to improve the quality of Python code

enumerate() instead of range(len()) Problem: traverse a list and set the value less than 0 to 0. Traversing the list is an operation often involved in the development process. Most Python developers are used to using range(len()) syntax, which is introduced in many tutorials and books. Therefore, many students choose to use this method to tr ...

Posted by dennyx on Mon, 07 Mar 2022 03:11:35 +0100

String correlation function

String correlation functions and methods Correlation functions: len, str, eval 1. Str (data) - convert the specified data into a string (when converting, put quotation marks directly outside the printed value of the data) str(100) #'100' str(True) #'True' list1 = [10,20,30] str(list1) #'[10, 20, 30]' 2. Eval (string) - evaluates th ...

Posted by richza on Mon, 07 Mar 2022 02:40:24 +0100

Mobile phone number validation latest regular expression

Generally, the form page needs to fill in the mobile phone number. To verify whether the mobile phone number entered by the user is correct, we need to use the regular expression to match the mobile phone number segment. If it is in the operator number segment, the number is correct. Therefore, it is necessary to know the latest segment number ...

Posted by dila125 on Mon, 07 Mar 2022 02:04:50 +0100

[Scala] functional programming

Function definition and use The most common way to define a function is as a member of a class or object. This function is called a method, and its basic syntax is def Method name(parameter list):Result type={Method body} Literal quantity includes integer literal quantity, floating-point literal quantity, Boolean literal quantity, c ...

Posted by blawson7 on Mon, 07 Mar 2022 00:33:51 +0100

Web chat room realized by flash socket IO

preface As a Xiaobai, it's really difficult to read documents, and there is little knowledge about flash socketio on the Internet, so I wrote this blog for some brothers who can't do anything like me to understand the basic use of flash socketio, which can also be regarded as recording the production process of my chat room, even my small ...

Posted by damic on Sun, 06 Mar 2022 21:00:24 +0100

Make a desktop binary conversion (CONS) gadget python learning diary 2.28~3.6

2022 3.6 0 Beginning Trash Finally, the vegetable chicken's diary has been updated. This time it is a bit long. Teachers who want to see something useful can skip the catalog directly. I haven't written a diary for a long time. Did the chicken give up? Not really. Only chicken and vegetable have a new understanding of their dishes. jpg, d ...

Posted by bapi on Sun, 06 Mar 2022 18:51:17 +0100

Python 3 regular expression

re module 1,re.match function re.match attempts to match from the starting position of a string. If it cannot match from the starting position, it returns None. Syntax: re match(pattern, string, flags=0) Parameters: pattern -- regular expression String -- matching string flags -- flag bit, which is used to control the matching method of ...

Posted by ravnen on Sun, 06 Mar 2022 14:28:40 +0100

TVM User Tutorial -- Quick Start Tutorial for Compiling Deep Learning Models

Author: Yao Wang, Truman Tian This example shows how to use the Relay python front end to build a neural network and generate a runtime library for Nvidia GPU with TVM. Note that you need to build TVM with cuda and llvm enabled. Overview of hardware backend supported by TVM The following figure shows the hardware backend currently supported ...

Posted by dolcezza on Sun, 06 Mar 2022 13:26:32 +0100