• Problems in splicing MySQL syntax in Python


    The value behind the in statement of MySQL is similar to the ancestor of Python. Under normal circumstances, it can be directly passed to the ancestor. For example, we have a ancestor: TMP_ tup = (“xiaoming”, “xiaohua”) The format string SQL = f “select * from TB where name in {tmp_tup}” is OK. However, if […]

  • Typescript basic learning (2): basic types


    Basic type of typescript Boolean type Number type (number) String type (string) Array type (array) Yuanzu type (tuple) Enum type (enum) Any type (any) Null and undefined Void type Never type Boolean type var flag:boolean = true flag = false Number type (number) Floating point numbers are also numeric types var a:number = 2365.36 a […]

  • 02select listening client


    #Coding: utf-8import socket # defines a message list. Messages = [‘this is the message’, ‘it will be sent’, ‘in parts’,]# defines a primitive to specify the server to be connected. server_ Address = (‘localhost ‘, 8090) # create atcp / IP socket # initialize two sockets # connect the socket to the port where the […]

  • 03python network programming multithreaded server.


    #Multithreading and single threading are actually similar. We have opened several more threads # to connect multiple clients, so that four clients can communicate with the server at the same time_ Utils # import thread module from threading import thread # defines the function and passes it into the socket. def start_ Threads (listener, workers […]

  • Python time collection


    Statement: the following contents are my personal understanding. If you find any errors or questions, you can contact me for discussion Representation of time in Python 3 Format time string Format time string (string)_ Time) meansFormat output specifies the format and relative position of the output parameters, similar to the format function in Python, common […]

  • What is pytorch’s tensor?


    This is a Python based scientific computing package for two groups of audiences: Want to replace numpy to use GPU computing power Deep learning research platform with maximum flexibility and speed Start walking Tensors Tensors is similar to numpy’s ndarrays, in addition, it can be used to accelerate computing on GPU. from future import print_functionimport […]