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
#pragma once | |
#include <cassert> | |
#include <ctime> | |
#define ISLEAP(x) (((x) % 4 == 0 && (x) % 100 != 0) || ((x) % 400 == 0)) | |
#define LEAPDELTA(x, y) ((ISLEAP(x) && (y) >= 2) ? 86400 : 0) | |
time_t mktime_quick(struct tm const &p) | |
{ |
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
from copy import deepcopy | |
from fractions import Fraction | |
def find(eqns): | |
x = -1 | |
a = 0 | |
en = len(eqns) | |
vn = len(eqns[0]) | |
for i in range(0, vn - 1): | |
if eqns[0][i] > a: |
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
#!/bin/fish | |
phantomjs --ssl-protocol=any survey.js 100 | |
for i in (seq 0 99) | |
diff correct.png cap$i.png | |
end | |
rm *.png |
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/python | |
# required libraries: requests beautifulsoup4 | |
# please fill in target_class, user, pwd | |
import requests | |
import random | |
import multiprocessing | |
from bs4 import BeautifulSoup | |
from time import sleep, ctime |
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
#version 130 | |
/* This comes interpolated from the vertex shader */ | |
in vec2 texcoord; | |
/* The texture we are going to sample */ | |
uniform sampler2D tex; | |
out vec4 color; |

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 os | |
import re | |
from bs4 import BeautifulSoup | |
from mutagen.easymp4 import EasyMP4 | |
from mutagen.flac import FLAC | |
from mutagen.apev2 import APEv2 | |
from mutagen.easyid3 import EasyID3 | |
Path = "" | |
AllowFallbackToRawFileName = True |
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 re | |
import math | |
import traceback | |
from bs4 import BeautifulSoup | |
UID = '' # Put your UID here | |
member_auth = '' # Put your "member_auth" cookie here | |
ItemsPerPage = 25 |
NewerOlder