TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Two Bites of Data Science in K

72 pointsby crux4 months ago

3 comments

RodgerTheGreat4 months ago
I had a go at rewriting the latter half in Lil, flexing its K&#x2F;Q heritage:<p><pre><code> t:readcsv[read[&quot;ICC Test Bowl 3003.csv&quot;] &quot;ssiiiiisffiiis&quot;] sorted: select orderby Wkts desc orderby Ave asc where Wkts from t best: select where !gindex by Wkts from sorted bestInClass: select where each v i in Ave v~min (i+1) take Ave end from best allWkts: sorted.Wkts mostCompetitive: extract where (gindex=0)&amp;15&lt;count gindex by value from allWkts mostCompetitiveBowlers: select where Wkts in mostCompetitive from best gap: min allWkts drop 1+range max allWkts </code></pre> &quot;bestInClass&quot; is probably the most awkward adaptation; I didn&#x27;t see a tidy way to make a suffix list like &quot;,\&quot;.
评论 #42836402 未加载
gitonthescene4 months ago
I had a similar-ish project a while ago. I enjoy doing the &quot;Spelling Bee&quot; game in The NY Times Games section. In the comments someone worried that there weren&#x27;t enough arrangements to keep the game going very long. I used an open source dictionary to generate all possible puzzles restricted by some basic heuristics like never using the letter S, having the total number of possible words in some reasonable range, etc. I found about 23,000 possible puzzles. My next idea was to use google&#x27;s n-gram statistics to add some sort of &quot;commonly known&quot; heuristic, but my energy for the project petered out.<p>In any event these languages are great for exploring data in projects like these.
g9397634 months ago
op, which version of k are you using in the post? for those who&#x27;d like to follow along
评论 #42835254 未加载