ajdajzler
g/MuzykaMetalowa

eh do teamu dołączyła nowa osoba, z którą mam nagle 6 wspólnych znajomych na facebooku ;s zawsze mnie stresują takie obroty spraw

Deykun

@Ferun17: nie wiedziałem, że jesteśmy rówieśnikami Ferun30.

Deykun
g/programowanie

Leniwy tutaj. Jak chcę mierzyć średnią w czasie to wystarczy mi dwie liczby, suma wszystkich ocen i liczba ocen. Jak pojawia się nowa ocena to dodaje jej wartość do sumy i 1 do liczby i mam nową średnią.

Medianę da się w ogóle mierzyć w taki uproszczony sposób (albo w przybliżeniu jakimś), że mam tylko 3-6 liczb do niej?

Deykun

If you can't hold all the items in memory at once, this problem becomes much harder. The heap solution requires you to hold all the elements in memory at once. This is not possible in most real world applications of this problem.

Instead, as you see numbers, keep track of the count of the number of times you see each integer. Assuming 4 byte integers, that's 2^32 buckets, or at most 2^33 integers (key and count for each int), which is 2^35 bytes or 32GB. It will likely be much less than this because you don't need to store the key or count for those entries that are 0 (ie. like a defaultdict in python). This takes constant time to insert each new integer.

Then at any point, to find the median, just use the counts to determine which integer is the middle element. This takes constant time (albeit a large constant, but constant nonetheless).
https://stackoverflow.com/a/10692777/6743808

To w sumie jest manageable jak są trzymane w ryzach inty tylko.

W diffle do zwracania mediany długości słowa zamiast średniej która może być zjebana fest jak ktoś dwa razy odgadnie w 35 słowie to jest ok, bo tych intów dla diffle by było z dla przeciętnego gracza 10 żeby obsługiwać wszystkie inputy.

ajdajzler
g/MuzykaMetalowa

eh do teamu dołączyła nowa osoba, z którą mam nagle 6 wspólnych znajomych na facebooku ;s zawsze mnie stresują takie obroty spraw

Deykun

@ajdajzler:
Ja ten problem rozwiązałem już w 2015 roku, po prostu nie mam znajomych. dx

Deykun
g/programowanie

Leniwy tutaj. Jak chcę mierzyć średnią w czasie to wystarczy mi dwie liczby, suma wszystkich ocen i liczba ocen. Jak pojawia się nowa ocena to dodaje jej wartość do sumy i 1 do liczby i mam nową średnią.

Medianę da się w ogóle mierzyć w taki uproszczony sposób (albo w przybliżeniu jakimś), że mam tylko 3-6 liczb do niej?

Deykun

What you are looking for is an "online" algorithm to compute the median in constant space, and I don't think an exact one exists. There are approximate algorithms, and if you know the kind of values you are expecting (for instance if the inputs are a finite set of integers) you could get a good answer by counting occurrences. As for your histogram idea, you could always use a cheap solution (like keeping a short list of values, and using an O(n) median-finding algorithm when required) and then switch to a histogram once there is enough data.
https://math.stackexchange.com/questions/3837060/how-to-compute-median-without-storing-all-the-values#comment7914107_3837060

kakabix
g/TanieLatanie

📷 #WhereTaken🌎 #281 1/6
🟦🟦🟦🟦🟦🎉
⭐⭐

wheretaken.teuteuf.fr

Deykun

📷 #WhereTaken🌎 #281 2/6
🟦🟦🟦🟦🟨↙️
🟦🟦🟦🟦🟦🎉

wheretaken.teuteuf.fr

kakabix
g/Prywatnosc

📷 #WhereTaken🌎 #280 X/6
🟨⬜⬜⬜⬜⬅️
🟦🟦🟨⬜⬜↙️
🟦🟦🟦🟦⬜➡️
🟦🟦🟨⬜⬜⬅️
🟦🟦🟦🟦🟨➡️
🟦🟦🟦🟦⬜↘️
⭐⭐

wheretaken.teuteuf.fr

Deykun

📷 #WhereTaken🌎 #280 X/6
🟨⬜⬜⬜⬜➡️
🟦🟦🟨⬜⬜↙️
🟦🟦🟨⬜⬜⬅️
🟦🟦🟦⬜⬜➡️
🟦🟦🟦🟦⬜↗️
🟦🟦⬜⬜⬜↙️

wheretaken.teuteuf.fr

Deykun
g/memy

Kupiłem 4

Na tiktoku to widziałem i śmieszne:
https://www.instagram.com/p/C0R_ac2oJ84/

Deykun

@Aleks: tak to jest jak ktoś ma rzecz tylko dla siebie

Deykun
g/memy

Kupiłem 4

Na tiktoku to widziałem i śmieszne:
https://www.instagram.com/p/C0R_ac2oJ84/

Deykun

Tak wyliczone żeby tylko @Aleks nie dostał.

Deykun
g/powiadomienia

LinkedIn to poważny portal, ten portal jest poważny dx

Deykun

@spam_only:
Musisz chyba szukać pracy żeby spamowało tym powiadomieniem, a nie innymi.

Deykun
g/samorozwój

listopad najaktywniejszy w notowanej historii

Deykun

@kakabix:
Tuptanie

Deykun
g/diffle

Nowy ficzer w diffle

Na komputerach na klawiaturze działają strzałki i delete.
Na telefonach można kliknąć na literkę by ustawić |.

Przy długich słowach usuwanie i wpisywanie robi się upierdliwe, teraz można zmienić fragment gdzie się chce.
W sumie to nie tylko przy długich tylko można wpisać znane litery potem sobie dodać to co się myśli wygodnie.

Deykun

@sens:
Nie rozumiem i nie wiem czy to śmieszki czy jakiś serio pomysł.

Deykun
g/samorozwój

listopad najaktywniejszy w notowanej historii

Deykun

@ajdajzler:
When you reach max level. You stop levelling.

kakabix
g/Drzewa

📷 #WhereTaken🌎 #1 1/6
🟦🟦🟦🟦🟦🎉
⭐⭐

wheretaken.teuteuf.fr

Deykun

📷 #WhereTaken🌎 #1 X/6
🟦🟦🟦🟦⬜➡️
🟦🟦🟦🟦⬜↘️
🟦🟦🟦🟦🟨↗️
🟦🟦🟦🟦🟨⬇️
🟦🟦🟦🟦🟨↙️
🟦🟦🟦🟦🟨⬇️

wheretaken.teuteuf.fr

Deykun
g/rozkminy

Tak w sumie jak zmieniali nazwę branczy z master na main, bo master i slave to beka, ale teraz po latach to w sumie mnie to myrda i w sumie jak tak myślę, to imho nie jest i nigdy nie była relacja master-slave, a mamy takie w IT i w sumie main ma więcej sensu dla branczy.

Deykun

@spam_only:
No tak, ale moje rozumowanie wynika głównie z tego, że branch który nie jest masterem/mainem nie jest slavem zależnym od mastera imho zupełnie odwrotnie rolą branczów jest zmienianie głównego więc to nie jest master-slave jak to ma miejsce w sieciach komputerowych czy czymś.

Logika
g/Wykop

ej co jest kurwa
próbuję się na wykop zalogować a oni mi że weryfikacja sms i nawet nie ma gdzie podać numeru telefonu więc jak się tu kurwa zweryfikować?

Deykun

@Logika:
🌻