Skip to content

Instantly share code, notes, and snippets.

# -*- coding:utf-8 -*-
import urllib, http.cookiejar, requests
import threading
import os,re
def get_page(url,timeout=20):
# 仅返回网页,不做任何操作
try:
request = urllib.request.Request(url)
;-------导出---------;
F3::
{
Validate()
Sleep 50
ExportClick()
WinWait, Export to pdf
Sleep 50
Return
}
[Rainmeter]
Author=mindenhova+lzy3560
Update=1000
AppVersion=1001000
MiddleMouseDownAction=!RainmeterRefresh #CURRENTCONFIG#
;Metadata added by RainBrowser
;http://rainmeter.net/RainWiki/index.php?title=Rainmeter_101#.5BMetadata.5D
[Metadata]
function [a,yy] = SinCosFit(x,y,n,xx)
% SinCosFit : Trigonometric function fitting and interpolating
% [a,yy] = SinCosFit(x,y,n,xx)
% use least-squares method to calculate the A B and C
% A B should be vectors, and the formula is like this
% y = C + Σ[A(i)*sin(i*x) + B(i)*cos(i*x)],i = 1,2...n
% n is given by the user
% input:
% x = independent variable
% y = dependent variable