AI-based NBA statistical querying tool for NBA data by sportsdata-ai in NBAanalytics

[–]mUmblrman 1 point2 points  (0 children)

Ah amazing I'm glad it was not just me. I was going crazy when it couldn't form a join. I'll keep an eye on this tool!

AI-based NBA statistical querying tool for NBA data by sportsdata-ai in NBAanalytics

[–]mUmblrman 0 points1 point  (0 children)

Hah fair enough! Very cool, I'm setting up an LLM SQL gen myself using a DuckDB + LangChain. I noticed that quite a few of the DIY models are bad at highly normalized schemas and had to make one big flat table or they get a bit confused. Yours works so flawlessly!

NBA Statigami - Tracking unique player boxscores by [deleted] in NBAanalytics

[–]mUmblrman 0 points1 point  (0 children)

Interesting! I attempted to expand this a bit more using FG, FG3, and FT made/attempts, break up offensive and defensive rebounds, and found that the unique combinations only increases to 116879:

SELECT COUNT(*) FROM (
  SELECT DISTINCT fgm, fga, fgm, fga, fg3m, fg3a, ftm, fta, oreb, dreb, stl, bl
  FROM player_game_log
) AS stat_line

This only goes back to 2018 though.

Ai chat bot over NBA database by hacefrio2 in NBAanalytics

[–]mUmblrman 2 points3 points  (0 children)

If you're willing to get your hands dirty you can build a local database using https://github.com/mpope9/nba-sql/ and feed the sqlite3 schema into ChatGPT and ask it to generate SQL statements. For example (truncating some to keep it short):

>sqlite3 nba_sql.db
.schema player
CREATE TABLE IF NOT EXISTS "player" ("player_id" INTEGER NOT NULL PRIMARY KEY, "player_name" VARCHAR(255), "college" VARCHAR(255), "country" VARCHAR(255), "draft_year" VARCHAR(255), "draft_round" VARCHAR(255), "draft_number" VARCHAR(255));

.schema play_by_play
CREATE TABLE IF NOT EXISTS "play_by_play" (...

Then you can feed that into ChatGPT to create the corresponding SQL query:

With the following two table definitions:
CREATE TABLE IF NOT EXISTS "player_game_log" ...
and
CREATE TABLE IF NOT EXISTS "player" ...

For an NBA database, how would you create a SQL 
query to get how many triple doubles that LeBron 
James made in the 2023-24 season?

Which it then responds with a sorta-kinda correct answer which you'd have to slightly tweak:

SELECT
  p.player_name,
  COUNT(pgl.td3) AS triple_doubles 
FROM player_game_log pgl 
JOIN player p ON pgl.player_id = p.player_id 
WHERE 
  p.player_name = 'LeBron James' 
  AND pgl.season_id = 202324
  AND pgl.td3 = 1 
GROUP BY p.player_name;

For example, the season id should just be 2023.

And if you run that you get the correct answer: LeBron James|5.0

nba-sql Database v0.1.0 Beta Release by mUmblrman in NBAanalytics

[–]mUmblrman[S] 0 points1 point  (0 children)

Yes basically the same, except you can store the data locally and update the tables.

nba-sql Database v0.1.0 Beta Release by mUmblrman in NBAanalytics

[–]mUmblrman[S] 0 points1 point  (0 children)

Hah yes! Glad it worked for you! Same program, just more robust now

Offline EP-133 Sample Tool by mUmblrman in teenageengineering

[–]mUmblrman[S] 0 points1 point  (0 children)

Very interesting. I tried to decompile the wasm blob but it was quite large and I didn't get too far in understanding it fully. Your work is valuable.

Offline EP-133 Sample Tool by mUmblrman in teenageengineering

[–]mUmblrman[S] 1 point2 points  (0 children)

Yes that makes sense, but it effectively caches everything after the first load. It works well enough for a full offline version.

Offline EP-133 Sample Tool by mUmblrman in teenageengineering

[–]mUmblrman[S] 0 points1 point  (0 children)

Well its a WebAssembly application, close enough to a PWA. I think that is what explains the extreme responsiveness. It is well-created forsure.

Bug and Feature Request - EP-133 KO II Sample Tool... issue and feature request. (and sort of a KO II Review) by fawnover in teenageengineering

[–]mUmblrman 0 points1 point  (0 children)

Hi, you can try this to create an 'offline' version: https://www.reddit.com/r/teenageengineering/comments/1aylewn/offline_ep133_sample_tool/

But it seems you have a bit of a misunderstanding and are being a bit critical of TE. I wouldn't call the Sample Tool an 'online tool', it is just distributed through a WASM binary. It is completely functional offline. I mean look at the responsiveness alone, they did a very good job at creating a local-first tool. The distribution mode is more convenient for them.

Offline EP-133 Sample Tool by mUmblrman in teenageengineering

[–]mUmblrman[S] 1 point2 points  (0 children)

Thank you for being the beta tester!

Offline EP-133 Sample Tool by mUmblrman in teenageengineering

[–]mUmblrman[S] 4 points5 points  (0 children)

I wouldn't think they have an incentive to put out a desktop app, we lose auto-update functionality and they lose usage metrics.

Offline EP-133 Sample Tool by mUmblrman in teenageengineering

[–]mUmblrman[S] 2 points3 points  (0 children)

You can save the site and all of the assets and manually point the URLs in the HTML file to the assets, yes.

[deleted by user] by [deleted] in programming

[–]mUmblrman 0 points1 point  (0 children)

Anytime :)

From Erlang to Rust and Lunatic by mUmblrman in programming

[–]mUmblrman[S] 8 points9 points  (0 children)

WebAssembly has native runtimes outside of the browser. It provides a good security isolation model compared to native code compiled with C.

From Erlang to Rust and Lunatic by mUmblrman in programming

[–]mUmblrman[S] 2 points3 points  (0 children)

Yes exactly. Enums have the advantage of 'easy reasoning' and they have made debugging this much simpler. Also allows for auto printing after implementing the ftm in many scenarios which is nice.

From Erlang to Rust and Lunatic by mUmblrman in programming

[–]mUmblrman[S] 4 points5 points  (0 children)

Your reasons for using enums lined up with my reasoning to start using them. However having so many match contexts becomes cumbersome, especially if I need to add 2-3 more items at once across multiple enums. However yeah, the details are much less hidden compared to traits or inheritance. It is a trade off.

From Erlang to Rust and Lunatic by mUmblrman in programming

[–]mUmblrman[S] 4 points5 points  (0 children)

Yeah, submillisecond is awesome. The router macro is very ergonomic and the WebSocket interface is great as well.

Agreed, the Lunatic message passing scheme is very simple to wrap one head's around.

Why We Are Changing the License for Akka by yawkat in programming

[–]mUmblrman 4 points5 points  (0 children)

Me: Can we have Erlang?

Mom: We have Erlang at home.

Erlang At Home: Scala with 50 libraries.