Skip to content

Instantly share code, notes, and snippets.

Плевнелиев: Скъпи сънародници,
LSI : Скъпи сънародници,
Rank : 1.0
LDA : Скъпи сънародници,
Rank : 1.0
Tfidf LSI: Скъпи сънародници,
Rank : 1.0
LogEnt LSI: Скъпи сънародници,
Rank : 1.0
@peio
peio / Top 100 elections Names
Created May 12, 2013 10:35
Най-споменавани имена в публикациите относно изборите
Най-споменавани имена в публикациите относно изборите:
Цветан Цветанов 7103
Бойко Борисов 6275
Мирослав Найденов 3154
Сергей Станишев 1398
Росен Плевнелиев 1353
Яне Янев 948
Николай Кокинов 863
Сотир Цацаров 856
@peio
peio / sexyvibes.py
Last active January 19, 2021 09:44
# Sexy Vibe viz from: http://ohyespodcast.com/2021/01/partner-multifun-3/
# Run in Notebook
import matplotlib.pyplot as plt
%matplotlib inline
sequences = [
'11111122222333200011112222233332000',
'33332211110111112223333',
#!/usr/bin/env python
"""Solve wordle with primes: https://converged.yt/primel/ """
import random
def five_digit_primes():
"Return all five digit primes"
'Source: https://www.quora.com/What-is-5-digit-maximum-prime-number-And-how-did-you-find-it'
p = [True]*1000005
for x in range(2,1001):
@peio
peio / cik2gsheets
Created October 30, 2023 07:30
Google Sheets import and cleaning of results of the 2023 Municipal election from the webiste of CIK.bg
=QUERY({
INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 1),
INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 2),
ARRAYFORMULA(IFERROR(VALUE(SUBSTITUTE(SUBSTITUTE(TRIM(INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 3)), "*", ""), " ", "")), INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 3))),
ARRAYFORMULA(IFERROR(VALUE(SUBSTITUTE(SUBSTITUTE(TRIM(INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 4)), "*", ""), " ", "")), INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 4)))
}, "SELECT * WHERE Col1 IS NOT NULL", 1)