Skip to content

Instantly share code, notes, and snippets.

View ThomasAlexandre's full-sized avatar

Thomas Alexandre ThomasAlexandre

  • Stockholm, Sweden
View GitHub Profile
@ThomasAlexandre
ThomasAlexandre / gist:8463db11f6763638e1687182122acf40
Created January 16, 2026 09:07
Distributed wordcount in unison - similar to scio workshop example
-- Distributed Word Count Example
-- Original distributed wordcount from Scala Scio lib, see Beam Summit Workshop at https://www.youtube.com/watch?v=cGvaQp_h5ek&t=2s
-- Reads ./data/muestra.txt, counts words, outputs top 10 to ./data/wordcount-results.txt
wordcount.run : '{IO, Exception} ()
wordcount.run = do
use Text ++
inputPath = FilePath "./data/muestra.txt"
outputPath = FilePath "./data/wordcount-results.txt"