Nginx method for configuring multiple HTTPS domain names

I've been playing wechat applet recently. I have: One ECS: CentOS 7 Multiple primary domain names During the development and testing process, for some reasons, you want to make the domain names A and B point to port 443 of the ECS at the same time and support HTTPS. Nginx supports SNI extension of TLS protocol (multiple domain names with diff ...

Posted by the-botman on Tue, 24 May 2022 00:03:36 +0300

Follow Up: Try Trading Strategies

According to the statistical rules written above, I designed a particularly simple and rude trading strategy, which is essentially chasing the price: Near the close, randomly select some stocks to buy from the stocks that rose by more than 5% that day, and sell them as long as they make x% profit the next day. Sell ​​at the close if it doesn't ...

Posted by Syrehn on Mon, 23 May 2022 22:21:34 +0300

Differences between functions and methods in Python

Brief summary: Functions that have no binding relationship with classes and instances belong to function s; Functions bound to classes and instances belong to method s.   First of all, abandon the false cognition: not all calls in a class are called methods Function type Functions encapsulate some independent functions and can be called direc ...

Posted by PHPeter on Mon, 23 May 2022 22:12:54 +0300

Arrays and strings

target 1. Understand the difference between array and dynamic array. 2. Be familiar with the basic operations in array and dynamic array. 3. Be able to understand and use multidimensional arrays. 4. Understand the concept of string and the different characteristics of string. 5. Be able to use double pointer skills to solve practical probl ...

Posted by bigwatercar on Mon, 23 May 2022 21:35:07 +0300

numpy common summary

A chestnut >>> import numpy as np >>> a = np.arange(15).reshape(3, 5) >>> a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) >>> a.shape (3, 5) >>> a.ndim # The number of axes of an array. In the python world, the number of axes is called rank 2 >>> a ...

Posted by evilmonkey on Mon, 23 May 2022 17:11:31 +0300

Big data acquisition case: Python web crawler instance

Web crawler: Web crawler (also known as web page) spider , network robot, in FOAF In the middle of the community, more often referred to as web page chaser), it is a kind of automatic crawling according to certain rules web A program or script that contains information. Other names that are not often used are Ants , automatic indexing, emulator ...

Posted by lobobr on Mon, 23 May 2022 13:35:16 +0300

pytorch on GPU - training neural network with CUDA (pytorch series-30)

Running PyTorch code on GPU - neural network programming guide In this episode, we will learn how to use GPU and PyTorch. We will see how to use the general methods of GPU, and we will see how to apply these general techniques to train our neural networks. Deep learning using GPU If you haven't seen the episode about why deep learning and neur ...

Posted by bmbc on Mon, 23 May 2022 12:42:05 +0300

Use of urllib Library of reptiles

urllib Library preface In the actual operation of the crawler, we only need two lines of code to get the web content. This function is the implementation of the third-party library In Python 2, our library has urllib 2 and urllib, but in Python 3, we directly merged this library into urllib, which is why we can't afford to install it when we in ...

Posted by ReDucTor on Mon, 23 May 2022 11:16:21 +0300

Detailed explanation of design pattern and Python implementation

Design pattern and Python implementation What is the design pattern? Christopher Alexander: "each pattern describes a recurring problem around us and the core of the solution to the problem * so that you can use the solution again and again without having to do repetitive work." Design patterns are summarized and optimized to provide ...

Posted by axo on Mon, 23 May 2022 10:49:13 +0300

Python draws snowflakes all over the sky and walks around the world

  the snowflakes all over the sky and walking on the horizon have always been what I think is a very romantic picture. After research, it is finally implemented in Python! In this article, let's take a look at the snow map with background pictures and music.             1, Effect drawing of snowflakes all over the sky    The snowflakes a ...

Posted by shameermp on Mon, 23 May 2022 10:27:19 +0300