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
| var _http_map = { | |
| 'white': { | |
| 'any': [], | |
| 'bangumi.bilibili.com': [ | |
| /^\/index\/ding\-count\.json$/i | |
| ] | |
| }, | |
| 'proxy': { | |
| 'any': [ | |
| /^[^/]*\.cupid\.iqiyi\.com\//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
| function string.fh(str) | |
| return (str:gsub('..', function (cc) | |
| return string.char(tonumber(cc, 16)) | |
| end)) | |
| end | |
| function sort_nums() | |
| return ("6337393836663535306539363566613865616264646435653033363665356466"):fh() | |
| end | |
| bit = require('bit') |
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
| #!/usr/bin/env python3 | |
| import requests | |
| import random | |
| import json | |
| import re | |
| def yy_m3u8(url): | |
| m3u8_file = None | |
| re_live = r'www\.yy\.com/(\d+)/(\d+)' |
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 | |
| import logging | |
| import time | |
| class RangeDownloadException(Exception): | |
| pass | |
| def range_download(url, start, length, fp): | |
| '''Low level routine. Caller should handle start and length with care''' | |
| headers = {} |
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
| #!/usr/bin/env python3 | |
| import sys | |
| import tempfile | |
| import logging | |
| import requests | |
| from Crypto.Cipher import AES | |
| from bs4 import BeautifulSoup | |
| BASE_URL = 'http://media.mtvnservices.com/player/html5/mediagen/?uri=' | |
| BASE_SUFFIX = '&device=iPad' |
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
| #include <stdio.h> | |
| int interval_sum(int a, int b) | |
| { | |
| int result = 0, offset = 0; | |
| start: | |
| result += (a+offset); | |
| if(a+offset < b){ | |
| offset += 1; | |
| goto start; |
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
| /* http://cs.clackamas.cc.or.us/molatore/cs260Spr03/combsort.htm */ | |
| #include <stdio.h> | |
| void combsort(int* ary, int size); | |
| void swap(int*, int*); | |
| int main() | |
| { | |
| int i = 0; | |
| int ary[] = {9, 6, 2, 7, 8, 4, 1, 5}; |
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
| #include <stdio.h> | |
| #define FALSE 0 | |
| #define TRUE 1 | |
| int next_permutation(int* ary, int length); | |
| void print_array(int* ary, int length); | |
| int main() | |
| { | |
| int test_data[] = {1, 2, 3, 4}; |
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
| #include <iostream> | |
| #include <vector> | |
| #include <bitset> | |
| #include <cmath> | |
| using std::vector; | |
| using std::bitset; | |
| bitset<1300000> buf; |
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
| #include <iostream> | |
| #include <algorithm> | |
| #include <vector> | |
| using std::vector; | |
| int main() | |
| { | |
| int len; | |
| while(std::cin >> len && len){ |
NewerOlder