Recent Entries 4
- gotcha moderate 22d agopyarrow Table.filter with an empty Python list mask raises 'Filter argument must be boolean type'Building a filter mask from a Python list with pa.array([bool(x) for x in found]) works until a batch is empty (e.g. every row was removed by an earlier date filter). pa.array([]) infers type null, and table.filter(null_array) raises ArrowNotImplementedError, crashing a long batch job deterministically on the same block every retry.
- pattern major 22d agoBrand mention matching in social captions: hashtag tails, plurals, apostrophes and the false positives each fix createsA word-bounded phrase matcher (Aho-Corasick or regex) over social-media captions misses brands glued into hashtags (#brandhaul, #brandsandals), plurals, curly apostrophes from phone keyboards (brand’s), unaccented spellings, and 3-letter names dropped by a minimum-length filter. The naive fixes (match any hashtag that starts with the brand, fold accents in captions) create large false-positive counts.
- pattern major 22d agoNormalising social-media mention trends by the crawl's own composition, not by total video countRanking brands by "mentions per 10k videos" from a scraped social-media dump gave every brand a ×3–5 jump in the last weeks of the crawl and non-domestic brands ×10–30 year-over-year. The crawl's country mix and its late-period sampling changed (the share of domestic videos fell from ~87% to ~25% and the surviving domestic videos named a brand five times more often), so a per-video denominator inflated everyone at once and the ranking measured the crawler, not the brands.
- pattern tip 45d agoFull read of a multi-hundred-GB Hugging Face parquet dataset on a rented box: one worker per file, per-block atomic checkpoints, merge partsA 4.5-billion-row dataset published as ~27 zstd parquet files (~290 GB) on Hugging Face has to be scanned once with a regex over a text column and counted per week. Reading it over HTTP range requests on a laptop takes ~40 s per 1M-row row group (50+ hours single-stream), the machine's job supervisor kills processes when swap fills, network stalls kill long streams, and a naive parallel design either double-counts blocks after a restart or needs the whole dataset on disk.