Skip to content

Instantly share code, notes, and snippets.

View johnfkraus's full-sized avatar

John Kraus johnfkraus

View GitHub Profile
@johnfkraus
johnfkraus / Are LLMs Good At Statistics.md
Last active May 5, 2025 14:12
Are LLMs Good at Making Judgements Under Uncertainty?

Are LLMs Good at Making Judgements Under Uncertainty)?

(Work in process by John Kraus, 4/25/25)

Here are some snippets of evidence regarding how well LLMs perform in making judgements under uncertainty.

Prompt:

The mean IQ of the population of eighth graders in a city is known to be 100. You have selected a random sample of 50 children for a study of educational achievements. The first child tested has an IQ of 150. What do you expect the mean IQ to be for the whole sample? [^1]

@johnfkraus
johnfkraus / .block
Last active December 27, 2020 15:00
Zoomable Sunburst
license: mit
@johnfkraus
johnfkraus / README.md
Created March 24, 2020 02:13 — forked from jexp/README.md
Python script to parse a git commit log into Cypher create statements for Neo4j database

What is this about?

This script parses the git log and outputs Cypher statements to create a Neo4j database of your git history.

BEGIN
create constraint on (c:Commit) assert c.sha1 is unique;
COMMIT
BEGIN
CREATE (:Commit {author_email:'[email protected]',date_iso_8601:'2014-05-22 20:53:05 +0200',parents:['b6393fc9d5c065fd42644caad600a9b7ac911ae2'],refs:['HEAD', 'origin/master', 'master', 'in-index'],sha1:'934cacf9fe6cd0188be642b3e609b529edaad527',subject:'Some commit message',timestamp:'1400784785'});
@johnfkraus
johnfkraus / git-branches-by-commit-date.sh
Created March 21, 2020 16:22 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@johnfkraus
johnfkraus / postgres-cheatsheet.md
Created January 5, 2018 17:19 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@johnfkraus
johnfkraus / postgres-brew.md
Created November 1, 2017 00:13 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@johnfkraus
johnfkraus / panama_papers_azerbaijan.adoc
Created November 20, 2016 18:20 — forked from jexp/panama_papers_azerbaijan.adoc
ICIJ Panama Papers Graph Model Exploration

The #PanamaPapers - Example Dataset President of Azerbaijan

Let’s look at the family of the Azerbaijan’s President Ilham Aliyev who was already the topic of a GraphGist by Linkurious in the past. We see his wife, two daughters and son depicted.

Source

@johnfkraus
johnfkraus / sublime_text_2_useful_shortcuts.md
Created October 14, 2015 18:41 — forked from nuxlli/sublime_text_2_useful_shortcuts.md
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods