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
| def SMQT(data, level): | |
| ret = [0] * len(data) | |
| def MQU(idx, depth): | |
| if depth == 0 or not idx: | |
| return | |
| mean = sum(data[i] for i in idx) / len(idx) | |
| D0, D1 = [], [] | |
| for i in idx: | |
| (D0 if data[i] <= mean else D1).append(i) |
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 | |
| from bs4 import BeautifulSoup as bs | |
| from itertools import chain, filterfalse | |
| langs = {'python': ['(py)', '(pypy)', '(py3)'], | |
| 'ruby': ['(rb)']} | |
| def get_pids(maxpage=17): |
NewerOlder