Skip to content

Instantly share code, notes, and snippets.

View zyr17's full-sized avatar

zyr17

  • Fudan University
View GitHub Profile
! Put user rules line by line in this file.
! See https://adblockplus.org/en/filter-cheatsheet
||github.com
||live.github.com
githubusercontent.com
api.github.com
githubapp.com
githubassets.com
@zyr17
zyr17 / checkmd5.py
Created June 17, 2020 13:53
split transfer big files (for some poor disks)
"""
check md5 of every part, and remove broken part
put in same foler with partitions, and mkdir part, with empty file md5ok.txt and hash file md5sum.txt
"""
import os
files = os.listdir()
files.sort()
files = files[:-4]
@zyr17
zyr17 / P3381.py
Created June 2, 2020 05:47
ZKW Min Cost Max Flow
import numpy as np
class ZKW:
def __init__(self, maxm, maxn, src, des, n):
self.maxm = maxm
self.maxn = maxn
self.e_cost = np.zeros(maxm, dtype=float)
self.e_cap = np.zeros(maxm, dtype=int)
self.e_v = np.zeros(maxm, dtype=int)
self.e_n = np.zeros(maxm, dtype=int)