severo HF staff commited on
Commit
3653ee1
1 Parent(s): 3d2bfe6

Upload folder using huggingface_hub

Browse files
assets/{index-D9TlA0kP.js → index-DjleYvwe.js} RENAMED
@@ -1013,4 +1013,4 @@ YEruPHv9jvnYZxalzUMH9iWulTvIaLTXEa5ZX8xVa61fFraX9QCIAKg5bh8rVRiy7m8o4pJl5O0ogZ8d
1013
  vmbCnCfH5TJKTBFva0O4Wl+l/Ix13xO6KCJPD5H51fete+aO/R8EyzZRoN8BAA==`;let pi;function Jh(){if(!pi){pi=new Uint8Array(122784);const e=atob(Xh),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);us(t,pi)}return pi}const Q=0,za=1,_h=2,bh=3,$h=4,eg=5,tg=6,ng=7,rg=8,Nd=9,ie=10,se=11,au=12,ig=13,og=14,lg=15,ug=16,sg=17,ag=18,fg=20;function S(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(let r=0;r<e.length;r++)this.prefix[r]=e.charCodeAt(r);for(let r=0;r<n.length;r++)this.suffix[r]=n.charCodeAt(r)}const Ni=[new S("",Q,""),new S("",Q," "),new S(" ",Q," "),new S("",au,""),new S("",ie," "),new S("",Q," the "),new S(" ",Q,""),new S("s ",Q," "),new S("",Q," of "),new S("",ie,""),new S("",Q," and "),new S("",ig,""),new S("",za,""),new S(", ",Q," "),new S("",Q,", "),new S(" ",ie," "),new S("",Q," in "),new S("",Q," to "),new S("e ",Q," "),new S("",Q,'"'),new S("",Q,"."),new S("",Q,'">'),new S("",Q,`
1014
  `),new S("",bh,""),new S("",Q,"]"),new S("",Q," for "),new S("",og,""),new S("",_h,""),new S("",Q," a "),new S("",Q," that "),new S(" ",ie,""),new S("",Q,". "),new S(".",Q,""),new S(" ",Q,", "),new S("",lg,""),new S("",Q," with "),new S("",Q,"'"),new S("",Q," from "),new S("",Q," by "),new S("",ug,""),new S("",sg,""),new S(" the ",Q,""),new S("",$h,""),new S("",Q,". The "),new S("",se,""),new S("",Q," on "),new S("",Q," as "),new S("",Q," is "),new S("",ng,""),new S("",za,"ing "),new S("",Q,`
1015
  `),new S("",Q,":"),new S(" ",Q,". "),new S("",Q,"ed "),new S("",fg,""),new S("",ag,""),new S("",tg,""),new S("",Q,"("),new S("",ie,", "),new S("",rg,""),new S("",Q," at "),new S("",Q,"ly "),new S(" the ",Q," of "),new S("",eg,""),new S("",Nd,""),new S(" ",ie,", "),new S("",ie,'"'),new S(".",Q,"("),new S("",se," "),new S("",ie,'">'),new S("",Q,'="'),new S(" ",Q,"."),new S(".com/",Q,""),new S(" the ",Q," of the "),new S("",ie,"'"),new S("",Q,". This "),new S("",Q,","),new S(".",Q," "),new S("",ie,"("),new S("",ie,"."),new S("",Q," not "),new S(" ",Q,'="'),new S("",Q,"er "),new S(" ",se," "),new S("",Q,"al "),new S(" ",se,""),new S("",Q,"='"),new S("",se,'"'),new S("",ie,". "),new S(" ",Q,"("),new S("",Q,"ful "),new S(" ",ie,". "),new S("",Q,"ive "),new S("",Q,"less "),new S("",se,"'"),new S("",Q,"est "),new S(" ",ie,"."),new S("",se,'">'),new S(" ",Q,"='"),new S("",ie,","),new S("",Q,"ize "),new S("",se,"."),new S(" ",Q,""),new S(" ",Q,","),new S("",ie,'="'),new S("",se,'="'),new S("",Q,"ous "),new S("",se,", "),new S("",ie,"='"),new S(" ",ie,","),new S(" ",se,'="'),new S(" ",se,", "),new S("",se,","),new S("",se,"("),new S("",se,". "),new S(" ",se,"."),new S("",se,"='"),new S(" ",se,". "),new S(" ",ie,'="'),new S(" ",se,"='"),new S(" ",ie,"='")],cg=Ni.length;function Oa(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}function dg(e,t,n,r,i){const o=Jh(),{prefix:l}=Ni[i],{suffix:u}=Ni[i],s=Ni[i].transform;let a=s<au?0:s-(au-1);const f=t;a>r&&(a=r);let d=0;for(;d<l.length;)e[t++]=l[d++];n+=a,r-=a,s<=Nd&&(r-=s);for(let A=0;A<r;A++)e[t++]=o[n+A];let c=t-r;if(s===ie)Oa(e,c);else if(s===se)for(;r>0;){const A=Oa(e,c);c+=A,r-=A}let m=0;for(;m<u.length;)e[t++]=u[m++];return t-f}const pg=256,hg=704,gg=26,Ma=6,Wa=2,Nt=1080,fu=16,mg=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),vg=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),Ag=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]),wg=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),yg=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),Eg=4,ja=24;function Sg(e,t){const n=new Uint8Array(t),r=new Ed(e),i=new Sd(n);return Ig(r,i),n}function Ig(e,t){let n=0,r=0,i=0,o=0;const l=[16,15,11,4];let u=0,s=0,a=0;const f=[new Xt(0,0),new Xt(0,0),new Xt(0,0)],d=128+rt.READ_SIZE,c=new rt(e);i=Cg(c);const m=(1<<i)-16,A=1<<i,v=A-1,w=new Uint8Array(A+d+ja),h=A,p=[],g=[];for(let y=0;y<3*Nt;y++)p[y]=new _(0,0),g[y]=new _(0,0);for(;!r;){let y=0;const I=[1<<28,1<<28,1<<28],E=[0],C=[1,1,1],B=[0,1,0,1,0,1],L=[0];let x=0;for(let O=0;O<3;O++)f[O].codes=[],f[O].htrees=new Uint32Array;c.readMoreInput();const M=Lg(c);if(y=M.meta_block_length,n+y>t.buffer.length){const O=new Uint8Array(n+y);O.set(t.buffer),t.buffer=O}if(r=M.input_end,M.is_metadata){for(Pg(c);y>0;--y)c.readMoreInput(),c.readBits(8);continue}if(y===0)continue;if(M.is_uncompressed){c.bit_pos_=c.bit_pos_+7&-8,xg(t,y,n,w,v,c),n+=y;continue}for(let O=0;O<3;O++)C[O]=Rd(c)+1,C[O]>=2&&(ro(C[O]+2,p,O*Nt,c),ro(gg,g,O*Nt,c),I[O]=hi(g,O*Nt,c),L[O]=1);c.readMoreInput();const W=c.readBits(2),H=fu+(c.readBits(4)<<W),D=(1<<W)-1,U=H+(48<<W),G=new Uint8Array(C[0]);for(let O=0;O<C[0];O++)c.readMoreInput(),G[O]=c.readBits(2)<<1;const Qe=Ya(C[0]<<Ma,c),N=Qe.num_htrees,{context_map:T}=Qe,z=Ya(C[2]<<Wa,c),q=z.num_htrees,K=z.context_map;f[0]=new Xt(pg,N),f[1]=new Xt(hg,C[1]),f[2]=new Xt(U,q);for(let O=0;O<3;++O)f[O].decode(c);let ve=0,ce=0,Se=G[E[0]],Ie=di[Se],he=di[Se+1],ot=f[1].htrees[0];for(;y>0;){let O;c.readMoreInput(),I[1]===0&&(rl(C[1],p,1,E,B,L,c),I[1]=hi(g,Nt,c),ot=f[1].htrees[E[1]]),I[1]--;const Ct=Dn(f[1].codes,ot,c);let lt=Ct>>6;lt>=2?(lt-=2,O=-1):O=0;const kt=Wh[lt]+(Ct>>3&7),Vr=jh[lt]+(Ct&7),ss=Ua[kt].offset+c.readBits(Ua[kt].nbits),ut=Da[Vr].offset+c.readBits(Da[Vr].nbits);s=w[n-1&v],a=w[n-2&v];for(let st=0;st<ss;st++){c.readMoreInput(),I[0]===0&&(rl(C[0],p,0,E,B,L,c),I[0]=hi(g,0,c),x=E[0]<<Ma,ve=x,Se=G[E[0]],Ie=di[Se],he=di[Se+1]);const hn=Ra[Ie+s]|Ra[he+a],gn=T[ve+hn];I[0]--,a=s,s=Dn(f[0].codes,f[0].htrees[gn],c),w[n&v]=s,(n&v)===v&&t.write(w,A),n++}if(y-=ss,y<=0)break;if(O<0){c.readMoreInput(),I[2]===0&&(rl(C[2],p,2,E,B,L,c),I[2]=hi(g,2*Nt,c),ce=E[2]<<Wa),I[2]--;const st=(ut>4?3:ut-2)&255,hn=K[ce+st];if(O=Dn(f[2].codes,f[2].htrees[hn],c),O>=H){O-=H;const gn=O&D;O>>=W;const Gr=(O>>1)+1,xo=(2+(O&1)<<Gr)-4;O=H+(xo+c.readBits(Gr)<<W)+gn}}const Zn=kg(O,l,u);if(Zn<0)throw new Error("[BrotliDecompress] invalid distance");n<m&&o!==m?o=n:o=m;let qr=n&v;if(Zn>o)if(ut>=Eg&&ut<=ja){let st=wg[ut];const hn=Zn-o-1,gn=yg[ut],Gr=(1<<gn)-1,xo=hn&Gr,as=hn>>gn;if(st+=xo*ut,as<cg){const Bo=dg(w,qr,st,ut,as);if(qr+=Bo,n+=Bo,y-=Bo,qr>=h){t.write(w,A);for(let Zr=0;Zr<qr-h;Zr++)w[Zr]=w[h+Zr]}}else throw new Error("Invalid backward reference")}else throw new Error("Invalid backward reference");else{if(O>0&&(l[u&3]=Zn,u++),ut>y)throw new Error("Invalid backward reference");for(let st=0;st<ut;st++)w[n&v]=w[n-Zn&v],(n&v)===v&&t.write(w,A),n++,y--}s=w[n-1&v],a=w[n-2&v]}n&=1073741823}t.write(w,n&v)}function Cg(e){if(e.readBits(1)===0)return 16;let t=e.readBits(3);return t>0?17+t:(t=e.readBits(3),t>0?8+t:17)}function rl(e,t,n,r,i,o,l){const u=n*2,s=n,a=Dn(t,n*Nt,l);let f;a===0?f=i[u+(o[s]&1)]:a===1?f=i[u+(o[s]-1&1)]+1:f=a-2,f>=e&&(f-=e),r[n]=f,i[u+(o[s]&1)]=f,++o[s]}function Xt(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*Ag[e+31>>>5]),this.htrees=new Uint32Array(t)}Xt.prototype.decode=function(e){let t=0;for(let n=0;n<this.num_htrees;n++)this.htrees[n]=t,t+=ro(this.alphabet_size,this.codes,t,e)};function hi(e,t,n){const r=Dn(e,t,n),{nbits:i}=Fa[r];return Fa[r].offset+n.readBits(i)}function kg(e,t,n){return e<fu?(n+=mg[e],n&=3,t[n]+vg[e]):e-fu+1}function xg(e,t,n,r,i,o){const l=i+1;let u=n&i,s=o.pos_&rt.IBUF_MASK;if(t<8||o.bit_pos_+(t<<3)<o.bit_end_pos_){for(;t-- >0;)o.readMoreInput(),r[u++]=o.readBits(8),u===l&&(e.write(r,l),u=0);return}if(o.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;o.bit_pos_<32;)r[u]=o.val_>>>o.bit_pos_,o.bit_pos_+=8,u++,t--;let a=o.bit_end_pos_-o.bit_pos_>>3;if(s+a>rt.IBUF_MASK){const f=rt.IBUF_MASK+1-s;for(let d=0;d<f;d++)r[u+d]=o.buf_[s+d];a-=f,u+=f,t-=f,s=0}for(let f=0;f<a;f++)r[u+f]=o.buf_[s+f];if(u+=a,t-=a,u>=l){e.write(r,l),u-=l;for(let f=0;f<u;f++)r[f]=r[l+f]}for(;u+t>=l;){if(a=l-u,o.input_.read(r,u,a)<a)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(r,l),t-=a,u=0}if(o.input_.read(r,u,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");o.reset()}function Rd(e){if(e.readBits(1)){const t=e.readBits(3);return t===0?1:e.readBits(t)+(1<<t)}return 0}function Bg(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function Lg(e){const t=new Bg;if(t.input_end=e.readBits(1),t.input_end&&e.readBits(1))return t;const n=e.readBits(2)+4;if(n===7){if(t.is_metadata=!0,e.readBits(1)!==0)throw new Error("Invalid reserved bit");const r=e.readBits(2);if(r===0)return t;for(let i=0;i<r;i++){const o=e.readBits(8);if(i+1===r&&r>1&&o===0)throw new Error("Invalid size byte");t.meta_block_length|=o<<i*8}}else for(let r=0;r<n;r++){const i=e.readBits(4);if(r+1===n&&n>4&&i===0)throw new Error("Invalid size nibble");t.meta_block_length|=i<<r*4}return t.meta_block_length++,!t.input_end&&!t.is_metadata&&(t.is_uncompressed=e.readBits(1)),t}function Ya(e,t){let n=0;t.readMoreInput();const r=Rd(t)+1,i=new Uint8Array(e);if(r<=1)return{num_htrees:r,context_map:i};t.readBits(1)&&(n=t.readBits(4)+1);const l=[];for(let u=0;u<Nt;u++)l[u]=new _(0,0);ro(r+n,l,0,t);for(let u=0;u<e;){t.readMoreInput();const s=Dn(l,0,t);if(s===0)i[u]=0,u++;else if(s<=n){let a=1+(1<<s)+t.readBits(s);for(;--a;){if(u>=e)throw new Error("[DecodeContextMap] i >= context_map_size");i[u]=0,u++}}else i[u]=s-n,u++}return t.readBits(1)&&Rg(i,e),{num_htrees:r,context_map:i}}function Ng(e,t){const n=e[t];for(let r=t;r;r--)e[r]=e[r-1];e[0]=n}function Rg(e,t){const n=new Uint8Array(256);for(let r=0;r<256;r++)n[r]=r;for(let r=0;r<t;r++){const i=e[r];e[r]=n[i],i&&Ng(n,i)}}function Pg(e){const t=e.bit_pos_+7&-8;return!e.readBits(t-e.bit_pos_)}function Qg(e,t){const n=new Uint8Array(t);try{let r=0,i=0;for(;r<e.length-8;){const o=e[r++]<<24|e[r++]<<16|e[r++]<<8|e[r++],l=e[r++]<<24|e[r++]<<16|e[r++]<<8|e[r++];if(e.length-r<l)throw new Error("lz4 not hadoop");if(n.length<o)throw new Error("lz4 not hadoop");if(cu(e.subarray(r,r+l),n,i)!==o)throw new Error("lz4 not hadoop");if(r+=l,i+=o,r===e.length)return n}if(r<e.length)throw new Error("lz4 not hadoop")}catch(r){if(r instanceof Error&&r.message!=="lz4 not hadoop")throw r;cu(e,n,0)}return n}function Tg(e,t){const n=new Uint8Array(t);return cu(e,n,0),n}function cu(e,t,n){let r=n;for(let i=0;i<e.length;){const o=e[i++];let l=o>>4;if(l){let c=l+240;for(;c===255;)l+=c=e[i++];if(t.set(e.subarray(i,i+l),r),r+=l,i+=l,i>=e.length)return r-n}const u=e[i++]|e[i++]<<8;if(!u||u>r)throw new Error(`lz4 offset out of range ${u}`);let s=(o&15)+4,a=s+240;for(;a===255;)s+=a=e[i++];let f=r-u;const d=r+s;for(;r<d;)t[r++]=t[f++]}return r-n}const Fg={SNAPPY:Rh(),GZIP:(e,t)=>{const n=new Uint8Array(t);return us(e,n),n},BROTLI:Sg,ZSTD:e=>Nh(e),LZ4:Qg,LZ4_RAW:Tg};async function Ug(e){const t=e.getReader(),n=[];for(;;){const{done:r,value:i}=await t.read();if(r)break;n.push(i)}return new Blob(n).arrayBuffer()}async function Dg(e){const t=await So(e),{children:n}=F1(t),r=n.map(o=>o.element.name),i=Number(t.num_rows);return{header:r,numRows:i,rows(o,l,u){return ch({metadata:t,compressors:Fg,file:e,rowStart:o,rowEnd:l,orderBy:u})},sortable:!0}}async function zg(e){const t=await fetch(e,{method:"HEAD"});if(!t.ok)throw new Error(`Failed to fetch parquet file: ${t.statusText}`);const n=t.headers.get("Content-Length");if(!n)throw new Error("Content-Length header missing");return{byteLength:Number(n),slice:async(i,o)=>{const l=new Headers({Range:Og(i,o)}),u=await fetch(e,{headers:l});if(!u.ok||!u.body)throw new Error(`Failed to fetch parquet file: ${u.statusText}`);return Ug(u.body)}}}function Og(e,t){if(e<0){if(t!==void 0)throw new Error(`invalid suffix range [${e.toString()}, ${t.toString()}]`);return`bytes=${e.toString()}`}else if(t!==void 0){if(e>=t)throw new Error(`invalid empty range [${e.toString()}, ${t.toString()}]`);return`bytes=${e.toString()}-${(t-1).toString()}`}else return`bytes=${e.toString()}-`}function Mg({file:e,setProgress:t,setError:n}){const[r,i]=j.useState(0),[o,l]=j.useState();j.useEffect(()=>{const a=e.startsWith("http://")||e.startsWith("https://")?e:"/api/store/get?key="+e;async function f(){try{t(.33);const d=await zg(a);t(.66);let c=await Dg(d);c=E1(c);const m=d.byteLength;l({dataframe:c,fileSize:m})}catch(d){n(d)}finally{i(2),t(1)}}r===0&&(i(1),f().catch(()=>{}))},[r,e,n,t]);const u=F.jsx(F.Fragment,{children:(o==null?void 0:o.dataframe)&&F.jsxs("span",{children:[o.dataframe.numRows.toLocaleString("en-US")," rows"]})});return F.jsxs(Eo,{content:o,headers:u,children:[(o==null?void 0:o.dataframe)&&F.jsx(C1,{data:o.dataframe,onError:n}),r&&F.jsx(id,{className:"center"})]})}function Wg({file:e,setError:t}){const[n,r]=j.useState(0),[i,o]=j.useState(),l=j.useRef(null);j.useEffect(()=>{const a=e.startsWith("http://")||e.startsWith("https://")?e:"/api/store/get?key="+e;async function f(){try{const c=await(await fetch(a)).text();o(c)}catch(d){t(d)}finally{r(2)}}r(d=>d!==0?d:(f().catch(()=>{}),1))},[e,n,t]);const u=F.jsx(F.Fragment,{children:F.jsxs("span",{children:[i?jg(i):0," lines"]})});return F.jsxs(Eo,{content:{fileSize:i==null?void 0:i.length},headers:u,children:[F.jsx("code",{className:"text",ref:l,children:i}),n&&F.jsx(id,{className:"center"})]})}function jg(e){let t=0;for(const n of e)n===`
1016
- `&&t++;return t.toLocaleString("en-US")}function Yg({file:e,setError:t,setProgress:n}){const r=e.replace(/\?.*$/,"");return r.endsWith(".md")?F.jsx(m1,{file:e,setError:t}):r.endsWith(".parquet")?F.jsx(Mg,{file:e,setError:t,setProgress:n}):c1.some(i=>r.endsWith(i))?F.jsx(d1,{file:e,setError:t}):F.jsx(Wg,{file:e,setError:t,setProgress:n})}function Hg({file:e}){const[t,n]=j.useState(),[r,i]=j.useState(),o=e.split("/");if(o.length<1)throw new Error("Invalid file path");const l=o.at(-1),u=e.startsWith("http://")||e.startsWith("https://");return F.jsxs(o1,{progress:t,error:r,title:l,children:[F.jsx("nav",{className:"top-header",children:F.jsx("div",{className:"path",children:u&&F.jsx("a",{href:`/files?key=${e}`,children:e})})}),F.jsx(Yg,{file:e,setProgress:n,setError:i})]})}function Vg(){return F.jsx(Hg,{file:"https://huggingface.co/datasets/codeparrot/github-code/resolve/main/data/train-00000-of-01126.parquet"})}const Pd=document.getElementById("root");if(!Pd)throw new Error("No root element");rd(Pd).render(F.jsx(j.StrictMode,{children:F.jsx(Vg,{})}));
 
1013
  vmbCnCfH5TJKTBFva0O4Wl+l/Ix13xO6KCJPD5H51fete+aO/R8EyzZRoN8BAA==`;let pi;function Jh(){if(!pi){pi=new Uint8Array(122784);const e=atob(Xh),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);us(t,pi)}return pi}const Q=0,za=1,_h=2,bh=3,$h=4,eg=5,tg=6,ng=7,rg=8,Nd=9,ie=10,se=11,au=12,ig=13,og=14,lg=15,ug=16,sg=17,ag=18,fg=20;function S(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(let r=0;r<e.length;r++)this.prefix[r]=e.charCodeAt(r);for(let r=0;r<n.length;r++)this.suffix[r]=n.charCodeAt(r)}const Ni=[new S("",Q,""),new S("",Q," "),new S(" ",Q," "),new S("",au,""),new S("",ie," "),new S("",Q," the "),new S(" ",Q,""),new S("s ",Q," "),new S("",Q," of "),new S("",ie,""),new S("",Q," and "),new S("",ig,""),new S("",za,""),new S(", ",Q," "),new S("",Q,", "),new S(" ",ie," "),new S("",Q," in "),new S("",Q," to "),new S("e ",Q," "),new S("",Q,'"'),new S("",Q,"."),new S("",Q,'">'),new S("",Q,`
1014
  `),new S("",bh,""),new S("",Q,"]"),new S("",Q," for "),new S("",og,""),new S("",_h,""),new S("",Q," a "),new S("",Q," that "),new S(" ",ie,""),new S("",Q,". "),new S(".",Q,""),new S(" ",Q,", "),new S("",lg,""),new S("",Q," with "),new S("",Q,"'"),new S("",Q," from "),new S("",Q," by "),new S("",ug,""),new S("",sg,""),new S(" the ",Q,""),new S("",$h,""),new S("",Q,". The "),new S("",se,""),new S("",Q," on "),new S("",Q," as "),new S("",Q," is "),new S("",ng,""),new S("",za,"ing "),new S("",Q,`
1015
  `),new S("",Q,":"),new S(" ",Q,". "),new S("",Q,"ed "),new S("",fg,""),new S("",ag,""),new S("",tg,""),new S("",Q,"("),new S("",ie,", "),new S("",rg,""),new S("",Q," at "),new S("",Q,"ly "),new S(" the ",Q," of "),new S("",eg,""),new S("",Nd,""),new S(" ",ie,", "),new S("",ie,'"'),new S(".",Q,"("),new S("",se," "),new S("",ie,'">'),new S("",Q,'="'),new S(" ",Q,"."),new S(".com/",Q,""),new S(" the ",Q," of the "),new S("",ie,"'"),new S("",Q,". This "),new S("",Q,","),new S(".",Q," "),new S("",ie,"("),new S("",ie,"."),new S("",Q," not "),new S(" ",Q,'="'),new S("",Q,"er "),new S(" ",se," "),new S("",Q,"al "),new S(" ",se,""),new S("",Q,"='"),new S("",se,'"'),new S("",ie,". "),new S(" ",Q,"("),new S("",Q,"ful "),new S(" ",ie,". "),new S("",Q,"ive "),new S("",Q,"less "),new S("",se,"'"),new S("",Q,"est "),new S(" ",ie,"."),new S("",se,'">'),new S(" ",Q,"='"),new S("",ie,","),new S("",Q,"ize "),new S("",se,"."),new S(" ",Q,""),new S(" ",Q,","),new S("",ie,'="'),new S("",se,'="'),new S("",Q,"ous "),new S("",se,", "),new S("",ie,"='"),new S(" ",ie,","),new S(" ",se,'="'),new S(" ",se,", "),new S("",se,","),new S("",se,"("),new S("",se,". "),new S(" ",se,"."),new S("",se,"='"),new S(" ",se,". "),new S(" ",ie,'="'),new S(" ",se,"='"),new S(" ",ie,"='")],cg=Ni.length;function Oa(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}function dg(e,t,n,r,i){const o=Jh(),{prefix:l}=Ni[i],{suffix:u}=Ni[i],s=Ni[i].transform;let a=s<au?0:s-(au-1);const f=t;a>r&&(a=r);let d=0;for(;d<l.length;)e[t++]=l[d++];n+=a,r-=a,s<=Nd&&(r-=s);for(let A=0;A<r;A++)e[t++]=o[n+A];let c=t-r;if(s===ie)Oa(e,c);else if(s===se)for(;r>0;){const A=Oa(e,c);c+=A,r-=A}let m=0;for(;m<u.length;)e[t++]=u[m++];return t-f}const pg=256,hg=704,gg=26,Ma=6,Wa=2,Nt=1080,fu=16,mg=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),vg=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),Ag=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]),wg=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),yg=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),Eg=4,ja=24;function Sg(e,t){const n=new Uint8Array(t),r=new Ed(e),i=new Sd(n);return Ig(r,i),n}function Ig(e,t){let n=0,r=0,i=0,o=0;const l=[16,15,11,4];let u=0,s=0,a=0;const f=[new Xt(0,0),new Xt(0,0),new Xt(0,0)],d=128+rt.READ_SIZE,c=new rt(e);i=Cg(c);const m=(1<<i)-16,A=1<<i,v=A-1,w=new Uint8Array(A+d+ja),h=A,p=[],g=[];for(let y=0;y<3*Nt;y++)p[y]=new _(0,0),g[y]=new _(0,0);for(;!r;){let y=0;const I=[1<<28,1<<28,1<<28],E=[0],C=[1,1,1],B=[0,1,0,1,0,1],L=[0];let x=0;for(let O=0;O<3;O++)f[O].codes=[],f[O].htrees=new Uint32Array;c.readMoreInput();const M=Lg(c);if(y=M.meta_block_length,n+y>t.buffer.length){const O=new Uint8Array(n+y);O.set(t.buffer),t.buffer=O}if(r=M.input_end,M.is_metadata){for(Pg(c);y>0;--y)c.readMoreInput(),c.readBits(8);continue}if(y===0)continue;if(M.is_uncompressed){c.bit_pos_=c.bit_pos_+7&-8,xg(t,y,n,w,v,c),n+=y;continue}for(let O=0;O<3;O++)C[O]=Rd(c)+1,C[O]>=2&&(ro(C[O]+2,p,O*Nt,c),ro(gg,g,O*Nt,c),I[O]=hi(g,O*Nt,c),L[O]=1);c.readMoreInput();const W=c.readBits(2),H=fu+(c.readBits(4)<<W),D=(1<<W)-1,U=H+(48<<W),G=new Uint8Array(C[0]);for(let O=0;O<C[0];O++)c.readMoreInput(),G[O]=c.readBits(2)<<1;const Qe=Ya(C[0]<<Ma,c),N=Qe.num_htrees,{context_map:T}=Qe,z=Ya(C[2]<<Wa,c),q=z.num_htrees,K=z.context_map;f[0]=new Xt(pg,N),f[1]=new Xt(hg,C[1]),f[2]=new Xt(U,q);for(let O=0;O<3;++O)f[O].decode(c);let ve=0,ce=0,Se=G[E[0]],Ie=di[Se],he=di[Se+1],ot=f[1].htrees[0];for(;y>0;){let O;c.readMoreInput(),I[1]===0&&(rl(C[1],p,1,E,B,L,c),I[1]=hi(g,Nt,c),ot=f[1].htrees[E[1]]),I[1]--;const Ct=Dn(f[1].codes,ot,c);let lt=Ct>>6;lt>=2?(lt-=2,O=-1):O=0;const kt=Wh[lt]+(Ct>>3&7),Vr=jh[lt]+(Ct&7),ss=Ua[kt].offset+c.readBits(Ua[kt].nbits),ut=Da[Vr].offset+c.readBits(Da[Vr].nbits);s=w[n-1&v],a=w[n-2&v];for(let st=0;st<ss;st++){c.readMoreInput(),I[0]===0&&(rl(C[0],p,0,E,B,L,c),I[0]=hi(g,0,c),x=E[0]<<Ma,ve=x,Se=G[E[0]],Ie=di[Se],he=di[Se+1]);const hn=Ra[Ie+s]|Ra[he+a],gn=T[ve+hn];I[0]--,a=s,s=Dn(f[0].codes,f[0].htrees[gn],c),w[n&v]=s,(n&v)===v&&t.write(w,A),n++}if(y-=ss,y<=0)break;if(O<0){c.readMoreInput(),I[2]===0&&(rl(C[2],p,2,E,B,L,c),I[2]=hi(g,2*Nt,c),ce=E[2]<<Wa),I[2]--;const st=(ut>4?3:ut-2)&255,hn=K[ce+st];if(O=Dn(f[2].codes,f[2].htrees[hn],c),O>=H){O-=H;const gn=O&D;O>>=W;const Gr=(O>>1)+1,xo=(2+(O&1)<<Gr)-4;O=H+(xo+c.readBits(Gr)<<W)+gn}}const Zn=kg(O,l,u);if(Zn<0)throw new Error("[BrotliDecompress] invalid distance");n<m&&o!==m?o=n:o=m;let qr=n&v;if(Zn>o)if(ut>=Eg&&ut<=ja){let st=wg[ut];const hn=Zn-o-1,gn=yg[ut],Gr=(1<<gn)-1,xo=hn&Gr,as=hn>>gn;if(st+=xo*ut,as<cg){const Bo=dg(w,qr,st,ut,as);if(qr+=Bo,n+=Bo,y-=Bo,qr>=h){t.write(w,A);for(let Zr=0;Zr<qr-h;Zr++)w[Zr]=w[h+Zr]}}else throw new Error("Invalid backward reference")}else throw new Error("Invalid backward reference");else{if(O>0&&(l[u&3]=Zn,u++),ut>y)throw new Error("Invalid backward reference");for(let st=0;st<ut;st++)w[n&v]=w[n-Zn&v],(n&v)===v&&t.write(w,A),n++,y--}s=w[n-1&v],a=w[n-2&v]}n&=1073741823}t.write(w,n&v)}function Cg(e){if(e.readBits(1)===0)return 16;let t=e.readBits(3);return t>0?17+t:(t=e.readBits(3),t>0?8+t:17)}function rl(e,t,n,r,i,o,l){const u=n*2,s=n,a=Dn(t,n*Nt,l);let f;a===0?f=i[u+(o[s]&1)]:a===1?f=i[u+(o[s]-1&1)]+1:f=a-2,f>=e&&(f-=e),r[n]=f,i[u+(o[s]&1)]=f,++o[s]}function Xt(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*Ag[e+31>>>5]),this.htrees=new Uint32Array(t)}Xt.prototype.decode=function(e){let t=0;for(let n=0;n<this.num_htrees;n++)this.htrees[n]=t,t+=ro(this.alphabet_size,this.codes,t,e)};function hi(e,t,n){const r=Dn(e,t,n),{nbits:i}=Fa[r];return Fa[r].offset+n.readBits(i)}function kg(e,t,n){return e<fu?(n+=mg[e],n&=3,t[n]+vg[e]):e-fu+1}function xg(e,t,n,r,i,o){const l=i+1;let u=n&i,s=o.pos_&rt.IBUF_MASK;if(t<8||o.bit_pos_+(t<<3)<o.bit_end_pos_){for(;t-- >0;)o.readMoreInput(),r[u++]=o.readBits(8),u===l&&(e.write(r,l),u=0);return}if(o.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;o.bit_pos_<32;)r[u]=o.val_>>>o.bit_pos_,o.bit_pos_+=8,u++,t--;let a=o.bit_end_pos_-o.bit_pos_>>3;if(s+a>rt.IBUF_MASK){const f=rt.IBUF_MASK+1-s;for(let d=0;d<f;d++)r[u+d]=o.buf_[s+d];a-=f,u+=f,t-=f,s=0}for(let f=0;f<a;f++)r[u+f]=o.buf_[s+f];if(u+=a,t-=a,u>=l){e.write(r,l),u-=l;for(let f=0;f<u;f++)r[f]=r[l+f]}for(;u+t>=l;){if(a=l-u,o.input_.read(r,u,a)<a)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(r,l),t-=a,u=0}if(o.input_.read(r,u,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");o.reset()}function Rd(e){if(e.readBits(1)){const t=e.readBits(3);return t===0?1:e.readBits(t)+(1<<t)}return 0}function Bg(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function Lg(e){const t=new Bg;if(t.input_end=e.readBits(1),t.input_end&&e.readBits(1))return t;const n=e.readBits(2)+4;if(n===7){if(t.is_metadata=!0,e.readBits(1)!==0)throw new Error("Invalid reserved bit");const r=e.readBits(2);if(r===0)return t;for(let i=0;i<r;i++){const o=e.readBits(8);if(i+1===r&&r>1&&o===0)throw new Error("Invalid size byte");t.meta_block_length|=o<<i*8}}else for(let r=0;r<n;r++){const i=e.readBits(4);if(r+1===n&&n>4&&i===0)throw new Error("Invalid size nibble");t.meta_block_length|=i<<r*4}return t.meta_block_length++,!t.input_end&&!t.is_metadata&&(t.is_uncompressed=e.readBits(1)),t}function Ya(e,t){let n=0;t.readMoreInput();const r=Rd(t)+1,i=new Uint8Array(e);if(r<=1)return{num_htrees:r,context_map:i};t.readBits(1)&&(n=t.readBits(4)+1);const l=[];for(let u=0;u<Nt;u++)l[u]=new _(0,0);ro(r+n,l,0,t);for(let u=0;u<e;){t.readMoreInput();const s=Dn(l,0,t);if(s===0)i[u]=0,u++;else if(s<=n){let a=1+(1<<s)+t.readBits(s);for(;--a;){if(u>=e)throw new Error("[DecodeContextMap] i >= context_map_size");i[u]=0,u++}}else i[u]=s-n,u++}return t.readBits(1)&&Rg(i,e),{num_htrees:r,context_map:i}}function Ng(e,t){const n=e[t];for(let r=t;r;r--)e[r]=e[r-1];e[0]=n}function Rg(e,t){const n=new Uint8Array(256);for(let r=0;r<256;r++)n[r]=r;for(let r=0;r<t;r++){const i=e[r];e[r]=n[i],i&&Ng(n,i)}}function Pg(e){const t=e.bit_pos_+7&-8;return!e.readBits(t-e.bit_pos_)}function Qg(e,t){const n=new Uint8Array(t);try{let r=0,i=0;for(;r<e.length-8;){const o=e[r++]<<24|e[r++]<<16|e[r++]<<8|e[r++],l=e[r++]<<24|e[r++]<<16|e[r++]<<8|e[r++];if(e.length-r<l)throw new Error("lz4 not hadoop");if(n.length<o)throw new Error("lz4 not hadoop");if(cu(e.subarray(r,r+l),n,i)!==o)throw new Error("lz4 not hadoop");if(r+=l,i+=o,r===e.length)return n}if(r<e.length)throw new Error("lz4 not hadoop")}catch(r){if(r instanceof Error&&r.message!=="lz4 not hadoop")throw r;cu(e,n,0)}return n}function Tg(e,t){const n=new Uint8Array(t);return cu(e,n,0),n}function cu(e,t,n){let r=n;for(let i=0;i<e.length;){const o=e[i++];let l=o>>4;if(l){let c=l+240;for(;c===255;)l+=c=e[i++];if(t.set(e.subarray(i,i+l),r),r+=l,i+=l,i>=e.length)return r-n}const u=e[i++]|e[i++]<<8;if(!u||u>r)throw new Error(`lz4 offset out of range ${u}`);let s=(o&15)+4,a=s+240;for(;a===255;)s+=a=e[i++];let f=r-u;const d=r+s;for(;r<d;)t[r++]=t[f++]}return r-n}const Fg={SNAPPY:Rh(),GZIP:(e,t)=>{const n=new Uint8Array(t);return us(e,n),n},BROTLI:Sg,ZSTD:e=>Nh(e),LZ4:Qg,LZ4_RAW:Tg};async function Ug(e){const t=e.getReader(),n=[];for(;;){const{done:r,value:i}=await t.read();if(r)break;n.push(i)}return new Blob(n).arrayBuffer()}async function Dg(e){const t=await So(e),{children:n}=F1(t),r=n.map(o=>o.element.name),i=Number(t.num_rows);return{header:r,numRows:i,rows(o,l,u){return ch({metadata:t,compressors:Fg,file:e,rowStart:o,rowEnd:l,orderBy:u})},sortable:!0}}async function zg(e){const t=await fetch(e,{method:"HEAD"});if(!t.ok)throw new Error(`Failed to fetch parquet file: ${t.statusText}`);const n=t.headers.get("Content-Length");if(!n)throw new Error("Content-Length header missing");return{byteLength:Number(n),slice:async(i,o)=>{const l=new Headers({Range:Og(i,o)}),u=await fetch(e,{headers:l});if(!u.ok||!u.body)throw new Error(`Failed to fetch parquet file: ${u.statusText}`);return Ug(u.body)}}}function Og(e,t){if(e<0){if(t!==void 0)throw new Error(`invalid suffix range [${e.toString()}, ${t.toString()}]`);return`bytes=${e.toString()}`}else if(t!==void 0){if(e>=t)throw new Error(`invalid empty range [${e.toString()}, ${t.toString()}]`);return`bytes=${e.toString()}-${(t-1).toString()}`}else return`bytes=${e.toString()}-`}function Mg({file:e,setProgress:t,setError:n}){const[r,i]=j.useState(0),[o,l]=j.useState();j.useEffect(()=>{const a=e.startsWith("http://")||e.startsWith("https://")?e:"/api/store/get?key="+e;async function f(){try{t(.33);const d=await zg(a);t(.66);let c=await Dg(d);c=E1(c);const m=d.byteLength;l({dataframe:c,fileSize:m})}catch(d){n(d)}finally{i(2),t(1)}}r===0&&(i(1),f().catch(()=>{}))},[r,e,n,t]);const u=F.jsx(F.Fragment,{children:(o==null?void 0:o.dataframe)&&F.jsxs("span",{children:[o.dataframe.numRows.toLocaleString("en-US")," rows"]})});return F.jsxs(Eo,{content:o,headers:u,children:[(o==null?void 0:o.dataframe)&&F.jsx(C1,{data:o.dataframe,onError:n}),r&&F.jsx(id,{className:"center"})]})}function Wg({file:e,setError:t}){const[n,r]=j.useState(0),[i,o]=j.useState(),l=j.useRef(null);j.useEffect(()=>{const a=e.startsWith("http://")||e.startsWith("https://")?e:"/api/store/get?key="+e;async function f(){try{const c=await(await fetch(a)).text();o(c)}catch(d){t(d)}finally{r(2)}}r(d=>d!==0?d:(f().catch(()=>{}),1))},[e,n,t]);const u=F.jsx(F.Fragment,{children:F.jsxs("span",{children:[i?jg(i):0," lines"]})});return F.jsxs(Eo,{content:{fileSize:i==null?void 0:i.length},headers:u,children:[F.jsx("code",{className:"text",ref:l,children:i}),n&&F.jsx(id,{className:"center"})]})}function jg(e){let t=0;for(const n of e)n===`
1016
+ `&&t++;return t.toLocaleString("en-US")}function Yg({file:e,setError:t,setProgress:n}){const r=e.replace(/\?.*$/,"");return r.endsWith(".md")?F.jsx(m1,{file:e,setError:t}):r.endsWith(".parquet")?F.jsx(Mg,{file:e,setError:t,setProgress:n}):c1.some(i=>r.endsWith(i))?F.jsx(d1,{file:e,setError:t}):F.jsx(Wg,{file:e,setError:t,setProgress:n})}function Hg({file:e}){const[t,n]=j.useState(),[r,i]=j.useState(),o=e.split("/");if(o.length<1)throw new Error("Invalid file path");const l=o.at(-1),u=e.startsWith("http://")||e.startsWith("https://");return F.jsxs(o1,{progress:t,error:r,title:l,children:[F.jsx("nav",{className:"top-header",children:F.jsx("div",{className:"path",children:u&&F.jsx("a",{href:`/files?key=${e}`,children:e})})}),F.jsx(Yg,{file:e,setProgress:n,setError:i})]})}function Vg(){return F.jsx(Hg,{file:"https://huggingface.co/datasets/codeparrot/github-code/resolve/main/data/train-00000-of-01126.parquet"})}const Pd=document.getElementById("app");if(!Pd)throw new Error("No root element");rd(Pd).render(F.jsx(j.StrictMode,{children:F.jsx(Vg,{})}));
index.html CHANGED
@@ -9,10 +9,10 @@
9
  <link rel="icon" type="image/svg+xml" href="/assets/logo.svg" />
10
  <meta name="theme-color" content="#6b00ff">
11
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
12
- <script type="module" crossorigin src="/assets/index-D9TlA0kP.js"></script>
13
  <link rel="stylesheet" crossorigin href="/assets/index-CGnH7AMj.css">
14
  </head>
15
  <body>
16
- <div id="root"></div>
17
  </body>
18
  </html>
 
9
  <link rel="icon" type="image/svg+xml" href="/assets/logo.svg" />
10
  <meta name="theme-color" content="#6b00ff">
11
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
12
+ <script type="module" crossorigin src="/assets/index-DjleYvwe.js"></script>
13
  <link rel="stylesheet" crossorigin href="/assets/index-CGnH7AMj.css">
14
  </head>
15
  <body>
16
+ <div id="app"></div>
17
  </body>
18
  </html>