with context management protocol

Recently, I want to simulate the implementation of a framework involving with. Let's study it! Here is a common way to write Automatically release file handle after running with open("./abc.txt","r") as f: data = f.read() #Automatically release resources after running with tf.Session() as sess: result = sess.run([product]) prin ...

Posted by talor123 on Fri, 05 Jun 2020 10:40:52 +0200

Collection artifact, Octopus Automatic Grab strategy and warehousing operation!

Collect a lot of anti - Crawler sites, there is a very good tool: Octopus... Directly through the browser access, a force to break ten thousand methods Preparatory work: money, spend money to buy members of Octopus website for a month or more, so that you can do Cloud Collection Next, grab the data by yourself. After the grab, set the timing ...

Posted by christillis on Tue, 02 Jun 2020 17:02:35 +0200

Post implementation of blog class in Flask

1. Definition of post class A blog post should contain the most basic fields: title, author, publication time, summary, content, reference (reference can be written into the content). From the simplest point of view, first write the fields as English title, author, timestamp, summary, content. Of course, a database table must have a primary key ...

Posted by Iceman18 on Wed, 27 May 2020 07:57:04 +0200

Web service deployment deep learning model - Zhihu

The purpose of this article is to introduce how to use Web services to deploy deep learning model quickly. Although TF has TFserving to deploy the model, it can't do anything for python (if you want to use it, you need to transform the torch model, which is a bit troublesome); therefore, this article introduces a method of using Web services ...

Posted by urb on Wed, 27 May 2020 07:12:58 +0200

Smart Serverless, Easy to set up WeChat Public Number intelligent background service

Generally speaking, to add more functions to the WeChat public number, you need a server to set up the public number background service.So is there a simpler way to implement such a public number background under the Serverless architecture?Let's try it? Preliminary Setup Serverless native development First of all, of course, we must have a WeC ...

Posted by uwannadonkey on Fri, 22 May 2020 05:11:37 +0200

An article about TiDB disaster recovery

1, Background High availability is another major feature of TiDB. All three components of TiDB/TiKV/PD can tolerate partial instance failure without affecting the availability of the whole cluster. The following describes the availability of these three components, the consequences of a single instance failure, and how to recover. TiDB T ...

Posted by billynastie on Thu, 21 May 2020 06:23:27 +0200

Modify Nginx configuration to implement https request (SSL certificate deployment)

When it comes to [Nginx] () servers, I think the biggest characteristics are lightweight and high performance. Through testing on several different servers, it is found that its concurrency is very strong, and it eats a lot less [memory] (). At present, it is the preferred HTTP and reverse proxy server for most webmasters. The webmaster's own ...

Posted by CrashRoX on Tue, 19 May 2020 11:52:26 +0200

Technology sharing | MySQL group replication data consistency management analysis

Author: Yang Taotao Senior database expert, specializing in MySQL for more than ten years. Good at mysql, PostgreSQL, MongoDB and other open-source database related backup and recovery, SQL tuning, monitoring operation and maintenance, high availability architecture design, etc. At present, he is working in aikesheng, providing MySQL related ...

Posted by trent2800 on Mon, 18 May 2020 11:20:05 +0200

PHP uses POP3 to read mailbox and receive mail

1 <?php 2 $array_values['host'] = "host"; 3 $array_values['port'] = 110; 4 $array_values['user'] = 'user name'; 5 $array_values['password'] = 'Password'; 6 $array_values['checkmail'] = 'xxx@xxx.xxx'; 7 8 ganji_get_test_mail($array_values); 9 10 function ganji_get_test_mail($array_values) 11 { 12 $host = $array_values['host' ...

Posted by mtimdog on Thu, 07 May 2020 16:01:23 +0200

koa2 implements jwt login

1.jwt Introduction Introduction is partly reproduced from Ruan Yifeng's Introduction to JSON Web Token Tutorial 0.session login 1. Users send user names and passwords to the server. 2. After the server is authenticated, save relevant data in the current session, such as user role, login time and so on. 3. The server returns a session_id to the ...

Posted by mattcooper on Tue, 05 May 2020 19:51:50 +0200