You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"changelogs","path":"changelogs","contentType":"directory"},{"name":"portable","path":"portable","contentType":"directory"},{"name":"scripts","path":"scripts","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":"winpython","path":"winpython","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"MANIFEST.in","path":"MANIFEST.in","contentType":"file"},{"name":"README.rst","path":"README.rst","contentType":"file"},{"name":"diff.py","path":"diff.py","contentType":"file"},{"name":"generate_a_winpython_distro.bat","path":"generate_a_winpython_distro.bat","contentType":"file"},{"name":"generate_winpython_distros35_qt5.bat","path":"generate_winpython_distros35_qt5.bat","contentType":"file"},{"name":"generate_winpython_distros36_qt5.bat","path":"generate_winpython_distros36_qt5.bat","contentType":"file"},{"name":"hash.py","path":"hash.py","contentType":"file"},{"name":"hash_launch.bat","path":"hash_launch.bat","contentType":"file"},{"name":"make.py","path":"make.py","contentType":"file"},{"name":"setup.cfg","path":"setup.cfg","contentType":"file"},{"name":"setup.py","path":"setup.py","contentType":"file"},{"name":"test.py","path":"test.py","contentType":"file"}],"totalCount":19}},"fileTreeProcessingTime":31.361280999999998,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":133962190,"defaultBranch":"master","name":"winpython","ownerLogin":"yaojinchang","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2018-05-18T14:04:27.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/10633093?v=4","public":true,"private":false,"isOrgOwned":false},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1618550495.941094","canEdit":false,"refType":"branch","currentOid":"32c7cf44adc8aed283dc9a0335d3996f6d6c6371"},"path":"hash.py","currentUser":null,"blob":{"rawLines":["# -*- coding: utf-8 -*-","\"\"\"","Created on Tue Jun 23 21:30:06 2015","","\"\"\"","","import io","import os","import sys","import hashlib","","","def give_hash(file_in, with_this):"," with io.open(file_in, 'rb') as f:"," return with_this(f.read()).hexdigest() ","","","if __name__ == '__main__':"," if (len(sys.argv) \u003c 2):"," print (\"Usage: \" + sys.argv[0] + \" filename_to_hash\")"," exit(1)"," file = sys.argv[1]"," "," header = (\" MD5\"+\" \"*(32-4)+\" | SHA-1\"+\" \"*(40-5)+\" | SHA-256\"+"," \" \"*(64-7)+\" | Binary\"+\" \"*(31-5)+\"| Size\"+\" \"*(20-6))"," line = \"|\".join([\"-\"*len(i) for i in header.split(\"|\")])",""," print(header)"," print(line)"," print (\"%s | %s | %s | %s | %s\" % (give_hash(file, hashlib.md5),"," give_hash(file, hashlib.sha1),"," give_hash(file, hashlib.sha256),"," '{0:31s}'.format(os.path.basename(file)),"," ('{0:12,}'.format(os.path.getsize(file)).replace(\",\",\" \")+ ' Bytes')"," ))"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/yaojinchang/winpython/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"hash.py","displayUrl":"https://github.com/yaojinchang/winpython/blob/master/hash.py?raw=true","headerInfo":{"blobSize":"894 Bytes","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"ee135a1","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fyaojinchang%2Fwinpython%2Fblob%2Fmaster%2Fhash.py","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"35","truncatedSloc":"27"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Python","languageID":303,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/yaojinchang/winpython/blob/master/hash.py","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/yaojinchang/winpython/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/yaojinchang/winpython/raw/refs/heads/master/hash.py","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"give_hash","kind":"function","ident_start":122,"ident_end":131,"extent_start":118,"extent_end":237,"fully_qualified_name":"give_hash","ident_utf16":{"start":{"line_number":12,"utf16_col":4},"end":{"line_number":12,"utf16_col":13}},"extent_utf16":{"start":{"line_number":12,"utf16_col":0},"end":{"line_number":14,"utf16_col":46}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/yaojinchang/winpython/branches":{"post":"NQyThbLconWOMhwJLSBK_21QAzw6dtg6E1C4CxEeJLWvgRJa9qTDRqq8qKsbo9UVGNyBXlQoP2iDO0MNLaSdqw"},"/repos/preferences":{"post":"SyeizDz9kigLpJLTgAAuI-ZbJOnBu0Q5QL7LdWZ0r6iUOR4eGQuTsDUuAiA3McH3QE9TmafiheMz20s_pgtqEA"}}},"title":"winpython/hash.py at master · yaojinchang/winpython","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1ae9fa256942.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}