Tag:Yuanzu

  • Problems in splicing MySQL syntax in Python

    Time:2022-4-27

    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

    Time:2022-2-12

    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

    Time:2021-10-21

    #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.

    Time:2021-9-25

    #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

    Time:2021-7-28

    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?

    Time:2020-7-26

    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 […]