Skip to content

Instantly share code, notes, and snippets.

View jeromediaz's full-sized avatar

Jérôme Diaz jeromediaz

View GitHub Profile
@jeromediaz
jeromediaz / CandidateSet.swift
Created October 21, 2024 03:37
Class to replace Set<Int> to store candidates for a sudoku grid cell
//
// CandidateSet.swift
// solvoku
//
// Created by DIAZ Jérôme Olivier on 06/01/2018.
// Copyright © 2024 DIAZ Jérôme Olivier. All rights reserved.
//
import Foundation
@jeromediaz
jeromediaz / arxiv_title_categories_evaluation_stats.json
Created September 11, 2024 17:15
json extract of classification evaluation data
{
"evaluated_classes": {
"astro-ph.CO": {
"accuracy": 0.9990346449184666,
"expected_count": 32249,
"f1": 0.953086955847459,
"false_negative_count": 1521,
"false_positive_count": 1504,
"label": "astro-ph.CO",
"precision": 0.9533382973442541,
@jeromediaz
jeromediaz / model_global_metrics.csv
Created September 9, 2024 22:59
Gist used as an illustration for a medium article
metric mean value weighted mean value
recall 0.891 0.925
precision 0.912 0.925
f1 0.9 0.924
accuracy 0.999 0.998
@jeromediaz
jeromediaz / pandas_dataframe_like_filtering.py
Last active June 16, 2024 20:39
Gist used as an illustration for a Medium Article
# values from https://en.wikipedia.org/wiki/List_of_largest_cities
country_data = [
{"name": "Tokyo", "population": 13515271, "density": 6169},
{"name": "Delhi", "population": 16753235, "density": 11289},
{"name": "Shanghai", "population": 24870895, "density": 3922},
{"name": "Sao Paulo", "population": 12252023, "density": 8055},
{"name": "Mexico City", "population": 9209944, "density": 6202}
]