Nymbo/self-hosted-python
1
1var Module=typeof globalThis.__pyodide_module!=="undefined"?globalThis.__pyodide_module:{};if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){var loadPackage=function(metadata){var PACKAGE_PATH="";if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof process==="undefined"&&typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var PACKAGE_NAME="numcodecs-tests.data";var REMOTE_PACKAGE_BASE="numcodecs-tests.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=Module["locateFile"]?Module["locateFile"](REMOTE_PACKAGE_BASE,""):REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=metadata["remote_package_size"];var PACKAGE_UUID=metadata["package_uuid"];function fetchRemotePackage(packageName,packageSize,callback,errback){if(typeof process==="object"){require("fs").readFile(packageName,(function(err,contents){if(err){errback(err)}else{callback(contents.buffer)}}));return}var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"]("Downloading data... ("+loaded+"/"+total+")")}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}};xhr.onerror=function(event){throw new Error("NetworkError for: "+packageName)};xhr.onload=function(event){if(xhr.status==200||xhr.status==304||xhr.status==206||xhr.status==0&&xhr.response){var packageData=xhr.response;callback(packageData)}else{throw new Error(xhr.statusText+" : "+xhr.responseURL)}};xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetchedCallback=null;var fetched=Module["getPreloadedPackage"]?Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE):null;if(!fetched)fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,(function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}}),handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","lib",true,true);Module["FS_createPath"]("/lib","python3.9",true,true);Module["FS_createPath"]("/lib/python3.9","site-packages",true,true);Module["FS_createPath"]("/lib/python3.9/site-packages","numcodecs",true,true);Module["FS_createPath"]("/lib/python3.9/site-packages/numcodecs","tests",true,true);function processPackageData(arrayBuffer){assert(arrayBuffer,"Loading data file failed.");assert(arrayBuffer instanceof ArrayBuffer,"bad input to processPackageData");var byteArray=new Uint8Array(arrayBuffer);var curr;var compressedData={data:null,cachedOffset:38141,cachedIndexes:[-1,-1],cachedChunks:[null,null],offsets:[0,1387,2392,3032,4282,5407,6379,7218,8110,9146,10006,10901,11936,13073,13916,14903,15992,16922,17979,18979,19992,20961,22204,23015,24046,25079,26154,27163,28298,29417,30213,31441,32270,33239,34204,35290,36356,37288],sizes:[1387,1005,640,1250,1125,972,839,892,1036,860,895,1035,1137,843,987,1089,930,1057,1e3,1013,969,1243,811,1031,1033,1075,1009,1135,1119,796,1228,829,969,965,1086,1066,932,853],successes:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]};compressedData["data"]=byteArray;assert(typeof Module.LZ4==="object","LZ4 not present - was your app build with -s LZ4=1 ?");Module.LZ4.loadPackage({metadata:metadata,compressedData:compressedData},true);Module["removeRunDependency"]("datafile_numcodecs-tests.data")}Module["addRunDependency"]("datafile_numcodecs-tests.data");if(!Module.preloadResults)Module.preloadResults={};Module.preloadResults[PACKAGE_NAME]={fromCache:false};if(fetched){processPackageData(fetched);fetched=null}else{fetchedCallback=processPackageData}}if(Module["calledRun"]){runWithFS()}else{if(!Module["preRun"])Module["preRun"]=[];Module["preRun"].push(runWithFS)}};loadPackage({files:[{filename:"/lib/python3.9/site-packages/numcodecs/tests/__init__.py",start:0,end:72,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/common.py",start:72,end:11955,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_astype.py",start:11955,end:14344,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_base64.py",start:14344,end:16686,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_blosc.py",start:16686,end:25803,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_bz2.py",start:25803,end:27760,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_categorize.py",start:27760,end:30664,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_checksum32.py",start:30664,end:32186,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_compat.py",start:32186,end:35820,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_delta.py",start:35820,end:37409,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_fixedscaleoffset.py",start:37409,end:39676,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_gzip.py",start:39676,end:42669,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_json.py",start:42669,end:44732,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_lz4.py",start:44732,end:47199,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_lzma.py",start:47199,end:49889,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_msgpacks.py",start:49889,end:53570,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_packbits.py",start:53570,end:54578,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_pickles.py",start:54578,end:56272,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_quantize.py",start:56272,end:58411,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_registry.py",start:58411,end:58749,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_shuffle.py",start:58749,end:63136,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_vlen_array.py",start:63136,end:65775,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_vlen_bytes.py",start:65775,end:68327,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_vlen_utf8.py",start:68327,end:70724,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_zfpy.py",start:70724,end:72972,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_zlib.py",start:72972,end:75579,audio:0},{filename:"/lib/python3.9/site-packages/numcodecs/tests/test_zstd.py",start:75579,end:77764,audio:0}],remote_package_size:42237,package_uuid:"6d328591-de10-4a6d-9330-80d0af0944e1"})})();