发布时间:2021-08-17 17:28:09
import socketimport structimport jsonimport ossc= socket.socket()sc.connect(('127.0.0.1',9997))''' 验证用户名密码的函数,验证区 '''def send_user(user,pwd):#发送用户的账户和密码 user_len = len(user.encode('utf-8')) le.........【阅读全文】
发布时间:2021-08-16 17:23:05
import torchimport torch.nn as nnimport torch.optim as optimfrom torchvision import datasets, transformsfrom torch.utils.data import DataLoader# 下载训练集train_dataset = datasets.MNIST(root='./', &n.........【阅读全文】
发布时间:2021-08-13 17:15:26
import requests,json,time,jsonpath,csv#from urllib.parse import urlencodebase_url = 'https://map.baidu.com/'headers = {#自己加咯}Name = [] #搜索结果中地市名Result = [] #包含搜索结果的数量FileName=[] #文件名(搜索时).........【阅读全文】
发布时间:2021-08-12 17:24:13
# your code goes herefrom matplotlib import pyplot as pltimport pandas as pddef linearCongruentialMethod(Xo, m, a, c, randomNums, U): randomNums[0] = Xo U[0] = randomNums[0] / m for i in range(1, 10000):.........【阅读全文】
发布时间:2021-08-11 17:19:23
import numpy as npimport matplotlib.pyplot as plt# import math as mtimport seaborn as snssns.set_style('darkgrid')x=np.arange(0,10,0.02)y=x+10*np.sin(5*x)+7*np.cos(4*x)plt.plot(x,y) #画原函数plt.title('Primitive function').........【阅读全文】