Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#NNNGM: On meillä uniseuranta, pöytätietokone, elokuvaääni ja mukanakulkeva #143

Open
hugovk opened this issue Nov 30, 2019 · 0 comments

Comments

@hugovk
Copy link
Member

hugovk commented Nov 30, 2019

An idea from 2016, done in under 256 chars as a Nano-NaNoGenMo or #NNNGM:

from random import choice as c

print(open("intro.txt").read())

s = open("stuff.txt").read().splitlines()

for _ in range(3843):
    print(f"\nOn meillä {c(s)}, {c(s)}, {c(s)} ja {c(s)}")
    print(f"On {c(s)}, {c(s)}, {c(s)} ja {c(s)}")

Perfect or Black Friday/Weekend/Week, Leevi and the Leavings' Finnish song Onnelliset comments on happiness and consumerism.

However, only eight home appliances are mentioned in the 1981 song.

On meillä stereot, televisio, mikroaaltouuni ja videonauhuri
On pakastin, kahvinkeitin, mikroprosessori ja pölynimuri

Translated:

We have a stereo, television, microwave oven and VCR
An oven, coffee machine, computer and vacuum cleaner

Nowadays, there's even more stuff we need to acquire! Let's extend it with an extra 23 058 things.

Preview:

On meillä uniseuranta, pöytätietokone, elokuvaääni ja mukanakulkeva
On paikannus, vastaanotin, älylukko ja joustokeula

On meillä aktiivisuusranneke, sähköhammasharja, videokamera ja pelikuulokemikrofoni
On leikkimökki, prosenttista, autoblaster ja valjas

On meillä tyttönukke, termosmuki, jalustakaiutinpari ja makuupussi
On tasoisella, kantojärjestelmä, rakenne ja kiinnitys

On meillä kattila, toimintapelin, järjestelmäkamera ja porttinen
On päätarjoukset, pöytälevy, savustusgrilli ja ohjelma

This involved some prep:

raw.txt has 33 pages of Black Friday tat from a webshop.

Then find the, for example, -älykello (smartwatch), -kaasugrilli (gas grill),
-televisio (television) and -minikopteri (minicopter) in:

  • Xiaomi Amazfit Stratos -älykello, musta
  • Weber Genesis II LX S-340 GBS -kaasugrilli, rosteri
  • ProCaster 43UNB820H 43" 4K Ultra HD Smart LED -televisio
  • Ryze Tello, powered by DJI -minikopteri, valkoinen

(There's some false positive products in there, but it'll do.)

And cut the initial dash, and sort and remove duplicates:

grep -o "\-[a-zäö]\+" raw.txt | cut -c 2- | sort | uniq > stuff.txt

Then the Python script prints intro.txt, and generates this pattern until 50k words:

On meillä A, B, C ja D
On E, F, G ja H
python on-meilla.py > on-meilla.txt
This was referenced Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant