91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 6.06MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2024-01-19
  • 語言: 其他
  • 標簽: MIT??P2P??CHORD??

資源簡介

麻省理工開發實現的chord算法源代碼 P2P四大經典算法之一

資源截圖

代碼片段和文件信息

def?str2bigint(s):
????a?=?map(ord?s)
????v?=?0L
????for?d?in?a:
v?=?v?< v?=?v?|?d
????return?v

class?bigint(long):
????def?__new__(cls?val?=?None):
if?isinstance(val?str):
????return?long.__new__(cls?str2bigint(val))
else:
????return?long.__new__(cls?val)

????def?__hex__(self):
return?long.__hex__(self).lower()[2:-1]
????def?__str__(self):
return?hex(self)

def?pack_bigint(p?v):
????a?=?[]
????while?v?>?0:
a.append(chr(v?&?0xFF))
v?=?v?>>?8
????#?Ensure?that?remote?end?will?decode?as?posititive
????if?len(a)?and?ord(a[-1])?&?0x80:
a.append(chr(0))
????#?Pad?out?to?multiple?of?4?bytes.
????while?len(a)?%?4?!=?0:
a.append(chr(0))
????a.reverse()
????p.pack_opaque(‘‘.join(a))

def?unpack_bigint(u):
????s?=?u.unpack_opaque()
????return?bigint(s)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-09-16?09:36??chord-0.1\
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\branches\
?????文件?????????249??2013-09-16?09:32??chord-0.1\.git\config
?????文件??????????73??2013-09-16?09:32??chord-0.1\.git\description
?????文件??????????23??2013-09-16?09:32??chord-0.1\.git\HEAD
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\hooks\
?????文件?????????452??2013-09-16?09:32??chord-0.1\.git\hooks\applypatch-msg.sample
?????文件?????????896??2013-09-16?09:32??chord-0.1\.git\hooks\commit-msg.sample
?????文件?????????189??2013-09-16?09:32??chord-0.1\.git\hooks\post-update.sample
?????文件?????????398??2013-09-16?09:32??chord-0.1\.git\hooks\pre-applypatch.sample
?????文件????????1704??2013-09-16?09:32??chord-0.1\.git\hooks\pre-commit.sample
?????文件????????4898??2013-09-16?09:32??chord-0.1\.git\hooks\pre-rebase.sample
?????文件????????1239??2013-09-16?09:32??chord-0.1\.git\hooks\prepare-commit-msg.sample
?????文件????????3611??2013-09-16?09:32??chord-0.1\.git\hooks\update.sample
?????文件???????17976??2013-09-16?09:32??chord-0.1\.git\index
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\info\
?????文件?????????240??2013-09-16?09:32??chord-0.1\.git\info\exclude
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\logs\
?????文件?????????162??2013-09-16?09:32??chord-0.1\.git\logs\HEAD
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\logs\refs\
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\logs\refs\heads\
?????文件?????????162??2013-09-16?09:32??chord-0.1\.git\logs\refs\heads\master
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\objects\
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\objects\info\
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\objects\pack\
?????文件??????606880??2013-09-16?09:32??chord-0.1\.git\objects\pack\pack-8d14df6db8cc9e038100c292b0366267519e8313.idx
?????文件?????5337433??2013-09-16?09:32??chord-0.1\.git\objects\pack\pack-8d14df6db8cc9e038100c292b0366267519e8313.pack
?????文件??????????94??2013-09-16?09:32??chord-0.1\.git\packed-refs
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\refs\
?????目錄???????????0??2013-09-16?09:36??chord-0.1\.git\refs\heads\
............此處省略229個文件信息

評論

共有 條評論