PageSourceSearch

https://www.quant-soc.com/_next/static/chunks/1636.c4ecd81c4f088658.js

js quant-soc.com collected 2026-10-09 22:32:09 UTC 3,341 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="6aca5e53-e37c-4898-b055-a95b92a7429b",e._sentryDebugIdIdentifier="sentry-dbid-6aca5e53-e37c-4898-b055-a95b92a7429b")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1636],{1636:(e,s,r)=>{r.r(s),r.d(s,{CORRECT:()=>c,GroupTheRows:()=>x});var n=r(95155);r(12115);var t=r(92823);let l="#0ea5e9",o=[{sector:"Tech",pnl:3},{sector:"Energy",pnl:-1},{sector:"Tech",pnl:2},{sector:"Energy",pnl:4},{sector:"Tech",pnl:1}],a=new Set(o.map(e=>e.sector)).size,c="b",d=Array.from(new Set(o.map(e=>e.sector))).map(e=>({sector:e,pnl:o.filter(s=>s.sector===e).reduce((e,s)=>e+s.pnl,0)})),i=[{id:"a",label:"5 rows"},{id:"b",label:"2 rows"},{id:"c",label:"1 row"}],u={a:5,b:2,c:1};function x(e){let{pick:s,setPick:r,status:x,graded:m,canCheck:p,check:f,reset:b}=(0,t.Qc)(e,c);return(0,n.jsxs)(t.rl,{question:"How many rows does df.groupby('sector')['pnl'].sum() return?",status:x,onCheck:f,onReset:b,canCheck:p,feedback:"correct"===x?"one row per group → ".concat(a," sectors"):"groupby collapses to one row per distinct key",children:[(0,n.jsx)(t.Dn,{className:"p-2",children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("div",{className:"flex flex-1 flex-col gap-1 font-mono text-xs",children:o.map((e,s)=>(0,n.jsxs)("div",{className:"flex justify-between rounded bg-foreground
1/[0.05] px-2 py-1",style:m?{opacity:.5}:void 0,children:[(0,n.jsx)("span",{className:"text-foreground",children:e.sector}),(0,n.jsxs)("span",{className:"tabular-nums text-muted-foreground",children:[e.pnl>0?"+":"",e.pnl]})]},s))}),!m&&s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"shrink-0 text-[0.62rem] font-medium text-muted-foreground",children:"groupby\xa0→"}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-1 font-mono text-xs",children:[Array.from({length:u[s]},(e,s)=>(0,n.jsxs)("div",{className:"flex justify-between rounded px-2 py-1",style:{background:"rgba(148,163,184,0.16)"},children:[(0,n.jsx)("span",{className:"text-muted-foreground",children:"?"}),(0,n.jsx)("span",{className:"text-muted-foreground",children:"?"})]},s)),(0,n.jsxs)("div",{className:"text-center text-[0.58rem] text-muted-foreground",children:["your claim: ",u[s]," row",1===u[s]?"":"s"]})]})]}):null,m?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"shrink-0 text-[0.62rem] font-medium text-muted-foreground",children:"groupby\xa0→"}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-1 font-mono text-xs",children:[d.map(e=>(0,n.jsxs)("div",{className:"flex justify-between rounded px-2 py-1",style:{background:"".concat(l,"1f")},children:[(0,n.jsx)("span",{className:"text-foreground",children:e.sector}),(0,n.jsxs)("span",{className:"tabular-nums font-semibold",style:{color:l},children:[e.pnl>0?"+":"",e.pnl]})]},e.sector)),(0,n.jsxs)("div",{className:"text-center text-[0.58rem] text-muted-foreground",children:[d.length," rows, one per distinct sector"]})]})]}):null]})}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(t.yZ,{options:i,value:s,onSelect:r,columns:3,accent:l,revealed:m,correctId:c,disabled:m})})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.