This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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) | |
| }); | |
| } | |
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 hidden or 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) |
This file contains hidden or 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 hidden or 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 hidden or 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
| """ | |
| Qxf2: Example script to run one test against the Chess Free app using Appium | |
| The test will: | |
| - launch the app | |
| - click the 'PLAY!' button | |
| """ | |
| import os | |
| import unittest | |
| from appium import webdriver |
This file contains hidden or 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 pickle | |
| import argparse | |
| from os import listdir | |
| from os.path import isfile, join | |
| import sys | |
| def convert(input_file_with_path, output_file_with_path): | |
| with open(input_file_with_path, 'rb') as f_in: | |
| data = pickle.load(f_in) | |
| with open(output_file_with_path, 'wb') as f_out: | |
| pickle.dump(data, f_out, protocol=2) |