Website 12306 of python crawler -- station information query

python crawler query station information Catalog: 1. Find the url to query 2. Analysis of information 3. Processing of information python crawler queries the same station Catalog: 1. Find the url to query 2. Analysis of information 3. Processing of information 1. Find the url of station information 2. Analyze station information and find that ...

Posted by jefkin on Sun, 01 Dec 2019 21:26:40 -0800

python implementation of knapsack problem

Now I'm learning the algorithm course of Mr. Wang Xiaohua. I won't write C + + for the time being, so let's implement it in Python first. The knapsack problem is a variety of items, each of which has only one item. Here we use an extremely simple greedy method to achieve: It can be based on weight, value or value density, just c ...

Posted by wobbit on Sun, 01 Dec 2019 13:59:38 -0800

Basic knowledge of ES6

demo on github let&const let does not support variable promotion console.log(a); // Report here let a = "a"; let cannot repeat declaration let a = "a"; let a = "abc"; // Report errors let supports block level scope if (true) { let a = "a"; } console.log(a) // Report errors for (let i = 0; i < 5; i++) { setTimeout(( ...

Posted by robertf on Sat, 30 Nov 2019 16:24:38 -0800

Validation palindrome string of LeetCode

Given a string, verify whether it is a palindrome string, only consider alphabetic and numeric characters, and ignore the case of letters. In this paper, we define the empty string as a valid palindrome string. Example 1: Input: "A man, a plan, a canal: Panama" Output: true Example 2: Type: "race a car" O ...

Posted by mistercash60000 on Sat, 30 Nov 2019 01:19:08 -0800

I'm going blind. I use Python to protect my eyes

background Recently, it's more and more hard to watch the computer at work, and my eyes are more and more uncomfortable. Occasionally, a few tears will come out. At this time, I finally realized that it must be excessive use of eyes. On average, I stare at the screen for no less than eight hours every day, and my eyes don't get pro ...

Posted by mckinney3 on Fri, 29 Nov 2019 23:01:47 -0800

Using Express to develop novel API service 1.0

Using Express to develop novel API service 1.0 (2) Online access address https://api.langpz.com/ Before the completion of the home page and search interface, now start to write the rest of the interface. Access to novel sources Because the original source of Book Chasing artifact is charged and encrypted, it can only use pirated source, so it i ...

Posted by jaronblake on Fri, 29 Nov 2019 23:01:18 -0800

Visualize and modify json data on the front end

In general, front-end and back-end interaction is all we need to extract and use the data we need from json, but if rewriting a very long JSON presentation is undoubtedly painful, two more concise frameworks are recommended for JSON visualization: jquery.json-viewer (Official website) This framework import needs to depend on jQ ...

Posted by DirtySnipe on Fri, 29 Nov 2019 20:14:13 -0800

python parsing implementation of PIBOT communication protocol

Preceding text ROS robot chassis (3) - Communication Protocol Defined PIBOT This protocol is simple and not related to ROS, and can be extended at the same time. In this paper, we use python to realize a transceiver, which can be used in windows or linux at the same time 1. dataHolder python struct package It can be used to pac ...

Posted by TheUkSniper on Fri, 29 Nov 2019 07:58:53 -0800

No.50 --- opencv calls camera for face detection

Dlib technology comes from the paper of some college Daniel. It uses 68 feature points such as eyes, facial contour, bridge of nose, eyebrows and mouth to represent facial features. import cv2 import face_recognition as fr from PIL import Image, ImageDraw import numpy as np facial_features = ['chin', 'left_eyebrow', 'right_ey ...

Posted by klance on Thu, 28 Nov 2019 13:25:18 -0800

How to play Dubbo Filter

Under resources, create a new META-INF/dubbo/com.alibaba.dubbo.rpc.Filter file (which can be a txt suffix file) Learn about @ Activate annotation in dubbo before rolling code @Activate(group = {Constants.PROVIDER}, value = {"token"},order = -998) group refers to the common parameters of filter users: Constants.PROVIDER, Constants ...

Posted by coalgames on Tue, 26 Nov 2019 14:16:53 -0800