Tag:Brother Liang

  • Master bitcoin in 21 days

    Time:2021-5-6

    Recently, more and more people have come into contact with bitcoin. I have also added two groups. The group friends are standard K-line party and trend party. In short, many of them are chasing up and down. Find the time to enter from every mutation of the K line, and leave when it reaches the […]

  • Analysis of UNIX domain socket

    Time:2021-5-5

    unix domain socket UNIX domain socket is developed on the socket architecture, which is used for inter process communication (IPC) of the same host. It does not need to go through the network protocol stack, package and unpack, calculate the check sum, maintain the serial number and reply, and just copies the application layer data […]

  • Python automation operation and maintenance

    Time:2021-5-3

    Here are some common doubts about getting started with Python, which are listed below. 1. If you use Python 3.5.2, but the production environment of most companies is Linux, the default Python is 2.6.6, and you don’t have permission to change it. In this case, what’s a good way? Python2 generally has a third-party library, […]

  • Hold on, my colleagues who are still crawling in the code mountain

    Time:2021-4-29

    “There are only two hard things in Computer Science: cache invalidation and naming things.” — Phil Karlton In the computer world, there are only two difficult things: cache invalidation and object naming. It’s not a joke. It’s easy to write code, but reading other people’s code will vary from person to person. Good engineers write […]

  • Using ab and wrk to benchmark Tencent CLS

    Time:2021-4-12

    Use AB and wrk to stress test Tencent cloud log service CLS, and take AB and wrk as examples to illustrate ab AB, whose full name is Apache benchmark, is an official tool of Apache. This tool is used to test the performance of Apache server. Check the service capability of the server installed with […]

  • Python deconstruction and encapsulation

    Time:2021-3-25

    Asking questions Let’s look at the following code first x = 1 y = 2 tmp = x x = y y = tmp print(x, y) The output of the code is: 2 1 Look at the following code: x = 1 y = 2 x, y = y, x print(x, y) The output of […]

  • Python parsing

    Time:2021-3-21

    In Python, you can often see the form ofret = [x ** 2 for x in lst]This kind of assignment statement is not easy for people who transfer from C + + to Python to understand the use of this for loop. This is the new syntax invented by Python for simplicity. Python analytic expression […]

  • Python zipper method and open address method to achieve dictionary

    Time:2021-3-19

    Python dictionary is the most flexible built-in data structure type in Python besides list. Lists are ordered combinations of objects,A dictionary is an unordered collection of objects. The difference between the two is that the elements in the dictionary are accessed by keys, not by offsets. Using subscript index in the list can quickly get […]

  • Python decorator implements dynamic type checking of functions

    Time:2021-3-4

    Decorator code for function dynamic type checking import inspect import functools def typeHints(fn): @functools.wraps(fn) def wrap(*args, **kwargs): sig = inspect.signature(fn) params = sig.parameters #Processing kwargs: Dictionary for k, v in kwargs: param = params[k] if param.annotation != inspect._empty and not isinstance(v, param.annotation): raise TypeError(‘parameter {} requires {}, but got {}’.format(k, param.annotation, type(v))) #Processing args: tuple […]

  • Ubuntu 16.04 configures Samba to solve the problem of Linux SVN using comfort

    Time:2021-2-25

    Personally, the command line of SVN is not as comfortable as git, but the SVN GUI client tortoise SVN on windows is very convenient. Therefore, for the students who often do service program development in virtual machine but have to use SVN, it is particularly useful to combine Linux development environment and tortoise SVN to […]

  • Python WSGI interface

    Time:2021-2-15

    Python WSGI specifies the standard interface between web server and python web application or web framework, mainly to promote the portability of Web Application on various web servers. The above sentence is translated from Python’s official pep333 standardPEP 333 — Python Web Server Gateway Interface v1.0 Overview of WSGI interface The meaning of WSGI: Web […]

  • Linux configuration C + + 11 compiling environment

    Time:2021-2-6

    Configure Yum source Here we use the yum source of 163, and the configuration is as follows Back up / etc first/ yum.repos .d/CentOS- Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup Download the corresponding version of repo file and put it into / etc/ yum.repos . D / (please make corresponding backup before operation), the following is the […]