Author Politics Filter Code
224 ( "author_is_elon", candidate => candidate .getOrElse(AuthorIdFeature, None).contains(candidate.getOrElse(DDGStatsElonFeature, 0L))), ( "author_is_power_user", candidate => candidate .getOrElse(AuthorIdFeature, None) .exists(candidate.getOrElse(DDGStatsVitsFeature, Set.empty[Long]).contains)), ( "author_is_democrat", candidate => candidate .getOrElse(AuthorIdFeature, None) .exists(candidate.getOrElse(DDGStatsDemocratsFeature, Set.empty[Long]).contains)), ( "author_is_republican", candidate => candidate .getOrElse(AuthorIdFeature, None) .exists(candidate.getOrElse(DDGStatsRepublicansFeature, Set.empty[Long]).contains)), )
A screenshot shows Scala-like source code defining filters for whether an author is Elon, a power user, a Democrat, or a Republican. The joke is that political identities and a celebrity identity are reduced to blunt boolean-style predicates, making this useful as a reaction to overcomplicated categorization or suspiciously specific code. EN: A screenshot shows Scala-like source code defining filters for whether an author is Elon, a power user, a Democrat, or a Republican. The joke is that political identities and a celebrity identity are reduced to blunt boolean-style predicates, making this useful as a reaction to overcomplicated categorization or suspiciously specific code.
code screenshot / скриншот кодаsource code / исходный кодtext editor / текстовый редакторline numbers / номера строкprogramming syntax / синтаксис программированияparentheses / круглые скобкиfunction predicates / предикаты функцийpurple syntax highlighting / фиолетовая подсветка синтаксисаwhite background / белый фонauthor filter / фильтр автораElon Musk reference / упоминание Илона МаскаDemocrat label / метка демократаRepublican label / метка республиканца
- @rzeczyzabawne / 7785 2023-04-01
- Type
- image
- Size
- 772×485 · 40.7 KiB
- Mood
- sarcastic
- Language
- en
- Added