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
0eNrt3VtvIzmaoOG/UvDlwh7w45mFmQHmZq4WuwPMYm4aCUPpjHQKJctuWaru6kb+99XJVtgOKki+PmWWrzJly19EkAwenmCQ/zz5PFt1N4vpfHny6z9PphfX89uTX//yz5Pb6eV8Mtv8bD656k5+Pbm9mVx0ZzezyfLr9eLq7HY5WSy7xdn6p7+dfD89mc6/dH8/+VW+n/b/dvnHzeFvZ9cXk+X0en5yehdz8tfVdHbd+3P98M/3X1tcX/zWLc+Wq8WiW/a+bQa/PV9dzLrJ4mzRTS6W14ve9+33T6cn3Xw5XU673VVuP/xxPl9dfe4W67O/P7Pb5fW8O/vbZDZbn+3N9e10e+Lrg6zDnJl/cacnf2z+4//Ffd+cxKM4uiyOHotjyuLIWBxbFkeNxXFFcUbD+KIwo1cVisKMJnIsCjOa56ksje19HDccR1RZIHcfyGYCSW2g3Bnp2tsiF8jU3he5QIcC/Xk1++1sOr/tNrXR0VibZDo9+TJddBe7L2yu6+t0tv67XWVwV4Xdx/66/u5kXdddTS4n/5jOu3X4v64ms/WZbKqZdS042Zz9xfXVzWQx2VQ1v57828mmjlndduf3kZeLVTd0DYeb6XI1v6vcBm7uu6T43j/6ar4+7NW2Ll1X3teL9U/PZtPb5fCF3K7PdHZ21S3X/0wvzia36zO7nn452ZzWXc17/+Wr7st0dXX82+ZR6IvJ4vP1PPNl+zj00W+7R6Gv/z790g1+0z+O+/ir65xYNw7Xi+5sNd+n0vS2+5LPEl+UJR858no5UlvH5yqM2ko+FyeVVjxH6h37ltWOLmteRpspXda6jDYuWlfGybR2urSvdOid6Eykwt5SGg3kagOZTKDDfXV3K51dXM9m3bZ/+zRgeBBwU1Tmy8X17Pxz923y+3RTYP55cjFdXKymy/Pbbvm4zPRK22Ky2BS/RXe7mi3Xpf339ZldL9a/ma9ms6EzDWWNmr3LzI8q9KWrUB0b+krmffWV9KHanV3PL8++TdaH/1J2Kfp |
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 jqdata import * | |
import numpy as np | |
import pandas as pd | |
from sqlalchemy import func | |
def initialize(context): | |
# 设置基准 | |
set_benchmark("000300.XSHG") | |
# 设置滑点 |
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 codecs | |
import csv | |
from urllib.parse import urljoin | |
import requests | |
from bs4 import BeautifulSoup | |
ROOT_URL = 'http://www.nm.zsks.cn/zy_61_71_2017/A_11.html' | |
HEADER = ['批次', '院校代号', '院校名称', '计划数', '最低分', '应投档人数', '已报人数', '缺档人数'] | |
SUB_HEADER = ['专业代号', '专业名称', '专业计划数', '专业最低分', '专业已报人数', '学费', '办学地点', '专业备注'] |
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 re | |
import requests | |
USER_PAGE_URL = '/?author={}' | |
TITLE_REGEX = re.compile('<title>*** » (\w+)</title>') | |
def get_username(uid): | |
response = requests.get(USER_PAGE_URL.format(uid)) | |
result = TITLE_REGEX.match(response.text) |
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 multiprocessing.pool import Pool | |
import openpyxl | |
import requests | |
from bs4 import BeautifulSoup | |
def fetch_space_group(item): | |
response = requests.get('https://materialsproject.org/materials/{0}/'.format(item)) | |
if response.status_code != 200: |
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
#include <stdio.h> | |
#include <math.h> | |
#define PI 3.1415926 | |
int main() | |
{ | |
double r, g, b; | |
for (double alpha = 0.0; alpha < 5 * PI; alpha += 1e-1) | |
{ | |
r = 3 * PI / 2 < fmod(alpha, 2 * PI) || fmod(alpha, 2 * PI) < PI / 2 ? sin(alpha + PI / 2) : 0; |