Skip to content

Instantly share code, notes, and snippets.

@edsu edsu/drinks.csv
Last active May 14, 2019

Embed
What would you like to do?
% cat ~/irclogs/freenode/#code4lib.log | ./stats.py
drink count
Wild Snow Sprout Tea 180
Golden Orchid 173
Honey Black Tea 162
Keemun Full Leaf Tea 134
Bio Pao Chung Pouchong 121
Masala Chai 110
Bi Luo Chun Green Tea (Pi Lo Chun) 104
BH02: Holy Basil Purple Leaf 87
Bao Zhong Oolong Tea 78
Hu-Kwa Tea 72
Huang Shan Mao Feng Green Tea 64
Holy Basil Purple Leaf 56
Sumatra Lake Tawar 52
Top Leaf™ Green Tea 51
Home 42
Dragon Pearl Jasmine 41
English Breakfast 40
Sumatra Danau Toba 35
Wuyi Mountain Big Red Robe 35
Panama Esmeralda Especial 34
San Mateo Air Dried Loose Yerba Mate 30
Assam TGFOP Black Tea 30
Greenfield Estate Ceylon Black Tea 28
Dong Ding Oolong 27
Jasmine Petal 25
Panama Elida Estate 24
Ethiopia Yirgacheffe 24
2006 Fengqing Raw Pu-erh Tea Tuocha 24
Masala Chai 19
Sumatra Golden Mandheling 19
Hacienda La Esmeralda Special Mario Carnaval 18
Panama El Burro Estate 18
Kenya Mamuto 18
Kenya Peaberry Kirinyaga Kii 17
Finca La Tacita 17
Magic Summer Organic Tea 17
Ethiopian Sidamo Fair Trade/Organic 17
Hamma Cooperative Yirgacheffe, Fair-Trade Organic 17
Romance by Paradise 17
Starlight Blend 17
Panama Gesha 2011 17
Panama Elida Estate Natural Process 16
Sumatra Aceh Pondok 16
Colombia Tolima Jairo Guiterrez Micro-Lot 07 16
Kenya AA Wagamuga Auction Lot 16
India AA Elkhill Estate 16
Kenya Kirinyaga Kii Peaberry Espresso 16
Kenya AA Mathareini 16
Panama Esmeralda Lot 9 16
Kenya Karatu AA 16
Colombia La Escuelita 16
Huila El Palacio Colombia 15
Kenya Karogoto 15
Kenya 15
Kenyan AA 15
Colombia Tolimas 15
Ethiopia Yirgacheffe Aricha Selection #7 15
Kenya Kagongo Peaberry 15
Honey Pot Espresso 15
Ethiopia Sidamo Natural Korate 15
Ethiopia Yirgacheffe Koke 14
Colombia Hato Viejo Cup of Excellence 14
Kenya Thiriku Top Auction Lot 14
Burundi Kinyovu 14
Esmeralda Especial Best of Panama 14
Cardamon Tea (Cardamom Tea, Loose) 14
Espresso Nuevo 14
Ethiopia Awassa Special 14
Kenya Peaberry Nyeri-Tatu 14
Panama Hacienda La Esmeralda Gesha 14
Resiprocate Verita Espresso 14
Kenya Nyeri AB Gichatha-ini Signature Series 13
Tres Santos Micro-Lot La Dorada Cauca 13
Ethiopia Sidama ARDI 13
Kenya AA 13
Colombia Pitalito Estate 13
Colombia Cauca, Special Micro-Lot Selection Juvenal Penna 13
S.O. India Sitara 13
El Salvador Finca Kilimanjaro 13
Mocha Java Espresso 13
Guatemala La Conception 13
Kenya Peaberry Ruera Estate 13
El Salvador Pacamara Tierra Fertil Los Alpes Reserva 13
Fair Trade Organic Ethiopia Yirgacheffe 13
Belle Espresso 13
Ethiopia Natural Yirgacheffe Aricha Special Microlot 13
Decaf Organic Caffe Volcan 13
Ethiopia Yirga Cheffe Koke Espresso 13
"Kona Sweet" 100% Kona 13
Ethiopia Yirgacheffe Addis Ketema North Italian Espresso Roast 13
Costa Rica Micro Lot "Pepe" Honey Processed 12
Panama Elida Estate Natural 12
Ruvuma Tanzanian Peaberry 12
El Salvador La Montana Pacamara 12
Panama Esmeralda Mario Carnival 12
Kenya Giakanja 12
Tanzanian Songea Peaberry 12
El Salvador Pacamara Finca Los Alpes The Bank 12
Guatemala El Injerto 12
Hawaii Isla Kona Mauka 12
El Salvador Montecarlos Peaberry 12
Kenya AA, 2003 Crop 12
Green Tea with Peach 12
El Salvador Nombre de Dios 12
El Patron Nicaragua Espresso 12
Colombia Tolima Reynel Perez Micro-Lot 12
El Salvador Montecarlos Tablon Crater 12
Nicaragua SHG 12
Guang Dong Phoenix Dan Cong Oolong Tea 12
Ethiopia Nekisse 12
Organic Colombia 11
Sumatra Lintong 11
El Salvador Pacamara Finca Los Alpes Tierra Fertil 11
Panama Mama Cata Geisha 11
Ethiopia Nekisse Espresso 11
Kenya Peaberry Thika Gethumbwini 11
Kenya Ndiara 11
Rusty's Hawaiian Red Caturra Natural 11
Panama Elida Natural 11
Extra Fancy Kona Coffee Medium Roast 11
Aricha Selection Seven Ethiopia Yirgacheffe 11
Kenya AA Nyeri Fine Cup 11
Panama Geisha Aroma Roast 11
Hacienda La Esmeralda 11
Kenya Ndiara Full Flavor Roast 11
Kenya Ndaroini Microlot 11
Kenya Bourbon French Mission 11
Guatemala El Injerto Pacamara 11
Ka'u Bourbon 11
Nicaragua Maragogipe Organic 11
Natural Decaf Espresso 10
La Minita Costa Rica 10
Kenya AA Kiaora Estate Full City Roast 10
Kenya Karinga 10
Kenya Kigutha 10
Guatemala Antigua - Finca La Tacita 10
Laoshan Black 10
Kenya Peaberry Muthunzunni Estate 10
Kenya Mamuto Kirinyaga 10
Kenya Gichathaini 10
Indonesia Blue Batak Peaberry 10
Colombia El Castillo Micro-Lot Nelson Melo 10
Ethiopia Konga Co-op Yirgacheffe 10
El Salvador Finca Siberia Pacamara 10
Colombia Huila Supremo 10
Stars of Italy Espresso 10
El Salvador Los Planes Cup of Excellence 2006 10
Ethiopia Harrar 10
La Esmeralda Panama 10
Tsui Yu Jade Oolong Tea 10
Nicaraguan Maragogipe Light Roast 9
Guatemala El Diamante 9
La Esmeralda 9
Kenyan Highland Cooperatives 9
Bolivia Caranavi Cenaproc Co-op 9
People's Daily Espresso 9
Bonsai Blend Espresso 9
Gyokuro Imperial Green Tea 9
Ethiopia Yirgacheffe Beloya Selection 8 9
Nectar 9
Kenya Kangunu 9
Ibonia Kenya Peaberry 9
Kenya Githiru 9
Scottish Breakfast 9
Costa Rica Finca Cerro Palado 9
Colombia Granja La Esperanza Geisha 9
Esmeralda Especial Panama 9
Kenya AA Gachatha 9
Kenya AA Nyeri Tatu 9
Colombia Finca Cerro Azul 9
Rwanda Karaba Fair Trade 8
Kenya AA Top 8
Vanilla Almond 8
Honduras David Mancia 8
Kenya Peaberry Deep River Estate 8
Kenya Gethembwini 8
Fair Trade Organic Guatemala 8
Guatemala Hunapu Antigua Bourbon 8
Kalami Assam Indian Tea 8
Ethiopia Washed Yirgacheffe, Koke Grade 1 8
La Esperanza Colombia Huila 8
Brazil Fazenda Boa Vista 8
Kenya Kiandu 7
Stars of Formosa Blend 7
Ethiopia Biloya Special 7
Guatemala Pandora Pacamara Medium-Light Roast 7
El Salvador Los Planes Pacamara 7
Ka'u Coffee Natural Dried 7
Mocha Java 7
Prince of Wales (Loose) 7
Pomegranate Pizzazz® Herbal Tea 6
Honduras Fernandez Farm 6
Panama La Esmeralda Especial Mario San Jose 6
Ethiopia Sidamo Special Prep 6
Nicaragua El Progresso COE Lot #1 6
El Salvador Pacamara Los Planes 5
Ethiopia Sidamo Guji 5
Guatemala Xeucalvitz 5
Tung Ting Oolong Tea 5
Sulawesi Toraja 5
Ginger Peach 5
Holy Basil, Rama (Tulsi) 4
Liu An Gua Pian Green Tea 4
Singbulli, Darjeeling Black Tea, First Flush 2014 4
Holiday Tea - Nutcracker Sweet® 4
TT57: Formosa Amber Oolong Select 4
Ceylon Tea OPA 4
Premium Tai Ping Hou Kui Green Tea 4
Russian Country 3
Chamomile Lemon (Sweet Meadows) 3
White Peony (Pai Mu Tan) 3
Lapsang Souchong Organic Tea 3
Bangkok 2
Nonpareil Taiwan Li Shan Oolong Tea 1
Kava Stress Relief® 1
El Salvador Montecarlos Tablon Crater, and sends it sliding down the bar to brews and pours a cup of Ethiopia Sidamo Guji, and sends it sliding down the bar to brews and pours a cup of Guatemala El Injerto 1
Ancient Baked Heart Tea 1
Chocolate Peppermint 1
Maharaja Chai Oolong Tea 1
Keemun Full Leaf Tea, and sends it sliding down the bar to dbs along with a shot of brews and pours a cup of Guatemala El Diamante 1
Darjeeling de Triomphe Black Tea 1
Kenya Gichathaini, and sends it sliding down the bar to or brews and pours a pot of Bao Zhong Oolong Tea 1
Earl Grey Creme Black Tea 1
Darjeeling (Sachets) 1
Lemon and Ginger 1
Taiwan Monkey Picked (Ma Liu Mie) Tie Guan Yin Oolong Tea 1
Monkey-Picked Ti Kuan Yin 1
nick drinks
yo_bj 199
mberkowski 159
petrichor 123
zoia 77
archivist 74
Wooble 74
everyone 71
mistym 69
dojobo 67
csharp 62
edsu 60
anarchivist 60
dbs 57
jeff 56
rsinger 51
bshum 48
phasefx 48
_mst 47
lbjay 46
FrozenSolid 45
gmcharlt 45
berick 45
jblyberg 44
vmbrasseur 44
Laevos 43
stryx 43
ksclarke 43
HackmasterA 42
rodgort 42
ejk 41
magnuse 41
code4lib 40
cherveny 38
sivoais 37
geheimnis 37
miker 35
bricas 34
jackhill 33
pencha 33
ThatAndromeda 30
cbeer 29
nrogers_art 29
jaqque 29
kmlussier 28
eby 28
JBoyer 25
Bmagic 25
rhamby 24
pmurray 24
jeffnm 23
bibliotechy 23
ejlynema 23
BHSPiMonkey 23
crhalpin 22
phasefx_ 22
Morbus 21
jeff_ 20
ieure 19
MrDys 19
jtgorman 19
egh 18
Enthralled 18
alanharnum 17
niko 17
mjgiarlo 17
maryj 17
prskavec 16
ruebot 16
k0avg 16
collum 15
atomotic 15
medo 15
terrellt 15
sesuncedu 15
_ja 14
jeffdavis 14
christoph531 14
wickr 14
cesardv 13
hcayless 13
kat3_drx 13
awead 12
eeevil 12
asl2 12
sarabee 11
mceraso 11
BillDueber 11
hopkinsju 11
Stompro 11
truk77 11
someone 10
sysanthrope 10
jcoyne 10
jrochkind 10
bencomp 10
dluch 10
maryj_ 9
markeaton 9
atz 9
StomproJ 9
artunit 9
mbklein 9
davemenninger 9
ndushay 8
nomadicoder 8
the 8
robcaSSon 7
jeff__ 7
craisins 7
anyone 7
flyingzumwalt 7
kitteh_ 7
zemkat 7
williw 7
bricas_ 7
zemkat_ 6
shambrarian 6
me 6
sbrylander 6
jcamins 6
jamesrf 5
everybody 5
mtj_ 5
earlgrey 5
jtgorman_ 5
djevans 5
Satyricon 5
iaglium 5
Mitar 5
jmignault 5
th3n0rd 5
emerac 5
AFrozenPeach 5
padraic 5
duckydan 4
sesuncedu1 4
ablemann 4
awead_coffee 4
cipherrot 4
sandbergja 4
mberkows1i 4
kshepherd 4
Nemo_bis 4
nowviskie 4
gsf 4
yo_bj1 4
tpendragon 4
rangi 4
egspoony 4
RowdyChildren 4
k0avg_ 4
all 3
eiro 3
nmz787 3
pmurray_away 3
seabre 3
dwilcox 3
b_bonner 3
egh_ 3
Guest13406 3
collum_ 3
alanharn_ 3
acdha 3
nakatomi 3
cm_harlow 3
Frozen 3
davemenninger1 3
erikhatcher 3
dyelar 3
jandresen 3
punkrocker 3
Guest16495 3
StomproJosh 3
sysanthrope_ 3
jblyberg_ 3
rogersna 3
gsf_ 3
shauna 3
ejlynema1 3
ndushay1 3
jeff___ 3
rsinger_ 3
anna3lc_ 2
edward 2
tolloid 2
Hz0 2
mcooper 2
royt 2
mrbond 2
kaarefc 2
c4l19 2
MrDys_home 2
HackMasterA 2
escowles 2
cherveny2 2
mistym_lunch 2
artunit_ 2
Everyone 2
bradl 2
ajconsta 2
ewlarson 2
ruthbrarian 2
jgpawletko 2
afred 2
d_prskavec 2
ptone 2
bjonnh 2
ruebot_away 2
cesardv_ 2
rordway 2
hpottinger 2
jobyh 2
robcaSSon1 2
wickr_ 2
moodaepo 2
2019 2
anna3lc 2
Petrichor 2
wooble 2
mnsri 2
dluch_ 2
dwgreen 2
y 2
ca71__ 2
magnuse_ 2
jbaiter 2
jcamins1 2
kanzure 2
people 2
onder 2
alxp 2
DeadTOm 2
pencha_ 2
tjohnson 2
eddies 2
whoever 1
medo1 1
Guest14619 1
clib21 1
jrochkindold 1
JacobSanford 1
gnutls 1
mistym_ 1
dericed 1
try 1
matts_away 1
leofseige 1
bacli1 1
mbklein_ 1
mdm_ 1
meowrobot 1
search 1
Anytone 1
conferencegoers 1
jeff____ 1
digibrarian1 1
helrond 1
pfeeley 1
alxp_ 1
this 1
rhamby_ 1
ronallo 1
GerardM 1
my 1
Guest52365 1
goood 1
gglitch 1
jpstroop 1
btingle 1
ssimpkin 1
corals 1
kuthurium 1
VooDooNOFX 1
What 1
cenovis 1
hnomad 1
ruebot_afk 1
half 1
slmcdanold 1
galuszkak 1
Arty 1
BigD1 1
lo5an 1
mmitchel_ 1
This 1
ajamielittle 1
Laevos_ 1
jkeck 1
rordway_ 1
RAPSCA77ION 1
shauna_ 1
Please 1
thomas_uc 1
timothy 1
Guest10480 1
jstirnaman1 1
a 1
petrichor_ 1
zemkat__ 1
stairs 1
JBoyer_alt 1
mcfly 1
benwbrum 1
Guest19547 1
jboyer 1
jkoivist 1
Guest16602 1
anj 1
panzana 1
sandbergja2 1
have 1
tjvc 1
realz 1
markb_dpla 1
why 1
chrpr 1
jrochkind1 1
with 1
jas 1
Guest85053 1
do 1
sivoais_ 1
knickum 1
btoms20 1
morning 1
dpk 1
Xaila 1
nnschiller1 1
corrupt 1
Code4Lib 1
That 1
mdellabitta 1
please 1
bryjbrown 1
petr 1
missing 1
goood_ 1
LDCX 1
librarywebchic 1
matts 1
sulky 1
ruebot_iceland 1
nattyrice 1
bradl_ 1
Guest10075 1
anarchivist_ 1
rsinger__ 1
jeff_______ 1
those 1
runway 1
kbeswick 1
th5 1
Librariman 1
fmtv 1
gugek 1
gmcharlt_ 1
i 1
anybody 1
emerac1 1
jonphipps 1
tha 1
HackMaster 1
mistym_coffee 1
omegadoom 1
rowdychildren 1
fkayiwa1 1
Smirk 1
hopkinsju_ 1
for 1
ddg 1
coral 1
fkayiwa 1
afternoon 1
Ocaasi 1
yo_bj_burrito 1
_jamie 1
Guest52694 1
mcritchlow 1
lbjay_ 1
rob_away 1
mjgiarlo1 1
rosy1280 1
BenO 1
West 1
RDF 1
mcmillwh4 1
rordway___ 1
mhbussey 1
no 1
kat3_drx1 1
Guest39906 1
#!/usr/bin/env python
# cat ~/irclogs/freenode/#code4lib.log | ./stats.py
import re
import csv
import sys
from collections import Counter
nicks = Counter()
drinks = Counter()
for line in sys.stdin:
m = re.search(r'zoia brews and pours a (pot|cup) of (.+), and sends it sliding down the bar to (\w+)( \()?', line)
if m:
nicks[m.group(3)] += 1
drinks[m.group(2)] += 1
def write_csv(filename, counter, headings):
with open(filename, 'w') as fh:
out = csv.writer(fh)
out.writerow(headings)
for label, count in counter.most_common():
out.writerow([label, count])
write_csv("nicks.csv", nicks, ['nick', 'drinks'])
write_csv("drinks.csv", drinks, ['drink', 'count'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.