This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding:utf-8 | |
''' | |
1) 只看北京地区(包括各行政区)的货运司机的招聘分布情况 | |
python3 to_redis.py --city_name 北京 --position 货运司机 --include_district | |
2) 只看北京的货运司机的招聘分布情况 | |
python3 to_redis.py --city_name 北京 --position 货运司机 | |
''' | |
import redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from selenium import webdriver | |
def get_pdf(): | |
url = "http://www.baidu.com/ | |
chrome_options = webdriver.ChromeOptions() | |
settings = { | |
"recentDestinations": [{ | |
"id": "Save as PDF", | |
"origin": "local", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.feature_extraction.text import TfidfVectorizer | |
documents = [ | |
"The quick brown fox jumped over the lazy dog's back", | |
"Now is the time for all good men to come to the aid of their party" | |
] | |
vectorizer = TfidfVectorizer(stop_words=["for","is","of","the","to"]) | |
X = vectorizer.fit_transform(documents) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
function delay(time) { | |
return new Promise(function(resolve) { | |
setTimeout(resolve, time) | |
}); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import urllib | |
import json | |
import uuid | |
import os | |
image_folder = "images" | |
def save_image(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[net] | |
# Testing | |
# batch=1 | |
# subdivisions=1 | |
# Training | |
batch=64 | |
subdivisions=32 | |
width=416 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require("puppeteer"); | |
const crypto = require('crypto'); | |
// 代理服务器 | |
const proxyHost = "http-dyn.abuyun.com"; | |
const proxyPort = 9020; | |
const proxyServer = "http://" + proxyHost + ":" + proxyPort; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification. | |
const puppeteer = require("puppeteer"); | |
const crypto = require('crypto'); | |
const { proxyRequest } = require('puppeteer-proxy'); | |
// xun proxy | |
let orderno = 'ZF2020121058569meja6'; | |
let secret = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"center": { | |
"x": 333.5164489746094, | |
"y": 104.28516387939453 | |
}, | |
"has_center": true, | |
"result": [ | |
[ | |
"box", | |
0.798782229423523, |