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 | |
import time | |
from datetime import datetime | |
import feedparser | |
import pymongo | |
import qbittorrentapi | |
import requests | |
# 需求: |
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 io | |
import csv | |
import time | |
import requests | |
from urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) | |
with open('cf_ips.txt') as fo: | |
with open('speedtest_result.csv','w')as fc: |
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
#!/usr/bin/env python | |
import requests | |
import argparse | |
import sys | |
import hashlib | |
headers = { | |
'User-Agent': 'DrWhat Speedtest', | |
'Origin': 'https://c.speedtest.net', | |
'Referer': 'https://c.speedtest.net/flash/speedtest.swf' |
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 xml.dom.minidom import parse | |
import xml.dom.minidom | |
doc = xml.dom.minidom.parse("results-all.xml") | |
root = doc.documentElement | |
hosts = root.getElementsByTagName('host') | |
for host in hosts: | |
try: | |
ip = host.getElementsByTagName('address')[0].getAttribute('addr') | |
c = host.getElementsByTagName('ports')[0].getElementsByTagName('port')[0]. \ |
This file has been truncated, but you can view the full file.
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
173.245.49.0 | |
173.245.49.1 | |
173.245.49.2 | |
173.245.49.3 | |
173.245.49.4 | |
173.245.49.5 | |
173.245.49.6 | |
173.245.49.7 | |
173.245.49.8 | |
173.245.49.9 |
This file has been truncated, but you can view the full file.
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
173.245.49.0 | |
173.245.49.1 | |
173.245.49.2 | |
173.245.49.3 | |
173.245.49.4 | |
173.245.49.5 | |
173.245.49.6 | |
173.245.49.7 | |
173.245.49.8 | |
173.245.49.9 |
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 | |
import os | |
import requests | |
from progressbar import * | |
url = "https://zstueducn-my.sharepoint.com/:f:/g/personal/zywang_zstu_edu_cn/ElSrM9_2jD9IrsEwNoN0qyABAxhYvGgFCj0UpcjIf17W4g?e=S2XoVf" | |
tenant = url.split('/')[2] | |
mail = url.split('/')[6] |
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 numpy as np | |
def calc_mse(b, w, points): | |
totalError = 0 | |
for i in range(0, len(points)): | |
x = points[i, 0] | |
y = points[i, 1] | |
totalError += (y - (w * x + b)) ** 2 | |
return totalError / float(len(points)) |
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 | |
from contextlib import closing | |
def get_files(url,files): | |
with closing(requests.get(url, stream=True)) as response: | |
chunk_size = 1024 # 单次请求最大值 | |
content_size = int(response.headers['Content-Length']) # 内容体总大小 | |
data_count = 0 | |
with open(files, "wb") as file: | |
for data in response.iter_content(chunk_size=chunk_size): |
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 urllib | |
import requests | |
import re | |
for i in range(4300): | |
try: | |
r = requests.get('https://pt.msg.vg/download.php?id='+ str(i) +'&passkey=xxx') | |
d = r.headers['content-disposition'] | |
fname = re.findall("filename=(.+)", d)[0] | |
f = open('result.txt','a') |