Skip to content

Instantly share code, notes, and snippets.

View dreamerns's full-sized avatar

Nikola Novakovic dreamerns

View GitHub Profile
@dreamerns
dreamerns / api-server-log.txt
Created September 26, 2024 13:57
api-server log
go mod download
go build -v
./api-server
INFO [15:31:50] Developer portal integration enabled: true env=local
INFO [15:31:50] Starting with Nomad integration: darwin env=local
INFO [15:31:50] creating the tables (if not created) env=local
INFO [15:31:50] NomadActionLoopInterface listening for standard events... env=local
INFO [15:31:50] NomadActionLoopInterface listening for serialized events... env=local
INFO [15:31:50] creating the tables (if not created) env=local
INFO [15:31:50] creating the tables (if not created) env=local
@dreamerns
dreamerns / TFIDF.java
Last active July 7, 2020 22:27
TF-IDF in Java
// search returns array of matching docs ranked by tf-idf score
// aka term frequency * inverse document frequency
//
// tf = # of occurences of term in document / # of words in document
// idf = log ( # of documents / # of documents with term )
// tf-idf = tf * idf
// multi-term tf-idf = sum of tf-idf scores (per document)
import java.util.Arrays;