this season top-100 stats

General PokerTH Issues
buratino
Posts: 10
Joined: Sun Feb 20, 2022 2:39 am

legenda: UTG, preflop, voluntary, call, raise, allin %%
Attachments
march_03.png
march_03.png (5.05 KiB) Viewed 2793 times
march_02.png
march_02.png (17.25 KiB) Viewed 2793 times
march_01.png
march_01.png (18.46 KiB) Viewed 2793 times
User avatar
sp0ck
Posts: 238
Joined: Mon Mar 15, 2021 12:54 pm
Location: Flensburg
Been thanked: 14 times

I really do insist in a more eye-candy xterm color-layout (I mean: black & white?) if there really is an extraordinary need of expressing a super smart nerd tendency. 😅

EDIT: I do like the simplicity of the font though ...
buratino
Posts: 10
Joined: Sun Feb 20, 2022 2:39 am

sorry Mr. sp0ck

but i tried to make my attachments as small as possible (i am perfectionist - yes) and used:

$> import -screen top.png && convert -monochrome top.png top.png

the font is great, yes - DejaVuSansMono

brgds
boehmi
Posts: 806
Joined: Wed Mar 17, 2021 12:24 pm
Been thanked: 33 times

Do people not know how to copy and paste plain text these days anymore? What has the Internet come to...

What's next, pasting all these pictures into a Word document? :lol:
buratino
Posts: 10
Joined: Sun Feb 20, 2022 2:39 am

ur so smart boehmi, so smart. but ... did u try to post table formatted utf-8 PLAIN TEXT (with special characters) into local forum by Ctrl-C Ctrl-V? no? just do it now

and this forum doesnt permit to attach palin text files. can u explain to me (noobie) why so?

brgds
boehmi
Posts: 806
Joined: Wed Mar 17, 2021 12:24 pm
Been thanked: 33 times

Code: Select all

test123     |mnhkjh  |lkhjkhjg
test1234    |vfggtdr |vdfgdfhgfh
:D

Works with tabs and spaces.

https://www.bbcode.org/showing-code-with-bbcode.php
buratino
Posts: 10
Joined: Sun Feb 20, 2022 2:39 am

Code: Select all

007                  |  0.31 |  0.00 |  0.00
AAV                  |  0.05 |  0.09 |  0.00
Adis_Abeba           |  0.37 |  0.00 |  0.00
Asado                |  0.26 |  0.00 |  0.00
Axtei                |  0.07 |  0.00 |  0.00
BadPhilIvey          |  0.23 |  0.00 |  0.00
Bauer Otte           |  0.30 |  0.00 |  0.00
Beop Jeong           |  0.35 |  0.04 |  0.00
Bookertheroo         |  0.36 |  0.05 |  0.00
Borussen-Ass         |  0.21 |  0.00 |  0.00
Botzeleigesetz       |  0.53 |  0.00 |  0.00
Catanese             |  0.28 |  0.08 |  0.03
Danek                |  0.08 |  0.04 |  0.00
Drondo               |  0.09 |  0.04 |  0.00
Edik1985             |  0.36 |  0.04 |  0.01
Event Horizon        |  0.23 |  0.01 |  0.00
FP Cormick           |  0.08 |  0.00 |  0.00
Fastserv             |  0.30 |  0.00 |  0.00
Feelgood76           |  0.50 |  0.00 |  0.00
Fetzenschedl         |  0.08 |  0.01 |  0.00
Floh2011             |  0.18 |  0.00 |  0.00
Florence             |  0.53 |  0.00 |  0.00
Follak               |  0.27 |  0.00 |  0.00
FreetzTheCat         |  0.54 |  0.02 |  0.00
Fussel               |  0.16 |  0.04 |  0.02
G_Gip                |  0.40 |  0.00 |  0.00
HIGHLANDER           |  0.20 |  0.00 |  0.00
Hermes               |  0.08 |  0.00 |  0.00
Ingolf17             |  0.13 |  0.00 |  0.00
JACKtheRIVER         |  0.12 |  0.02 |  0.00
JC Denton            |  0.56 |  0.04 |  0.00
Jazzy                |  0.41 |  0.00 |  0.00
JerryKhan            |  0.55 |  0.00 |  0.00
JumlyGurm            |  0.43 |  0.00 |  0.02
Just2Play            |  0.33 |  0.00 |  0.00
KEM                  |  0.12 |  0.00 |  0.00
Lacrimosa            |  0.25 |  0.04 |  0.00
Lazy_Bird            |  0.43 |  0.02 |  0.00
Maxmans              |  0.38 |  0.00 |  0.00
Maxwell              |  0.39 |  0.00 |  0.00
Nikolai              |  0.22 |  0.00 |  0.00
Noisette             |  0.16 |  0.05 |  0.00
Norb                 |  0.33 |  0.15 |  0.00
OkGo                 |  0.15 |  0.00 |  0.00
Permaplay            |  0.00 |  0.31 |  0.00
Picus                |  0.38 |  0.00 |  0.00
RTH-Baenni           |  0.50 |  0.00 |  0.00
Ricobilbao           |  0.44 |  0.00 |  0.00
SlippingJimmy        |  0.00 |  0.06 |  0.00
T-bot                |  0.04 |  0.00 |  0.00
THCpositive+         |  0.10 |  0.01 |  0.01
Tatau                |  0.13 |  0.02 |  0.00
Tecumseh             |  0.10 |  0.00 |  0.00
Tiziana              |  0.41 |  0.00 |  0.00
Wastl                |  0.52 |  0.00 |  0.05
WhiskyFaceJon        |  0.15 |  0.15 |  0.00
Worek                |  0.20 |  0.06 |  0.00
aDgoanz2             |  0.30 |  0.00 |  0.00
acecracker           |  0.22 |  0.06 |  0.00
adeadwombat          |  0.24 |  0.00 |  0.00
afu1                 |  0.61 |  0.00 |  0.00
anteante             |  0.17 |  0.17 |  0.00
areyousure           |  0.51 |  0.00 |  0.00
babelkot             |  0.32 |  0.00 |  0.00
bavaria              |  0.63 |  0.00 |  0.00
bertolin             |  0.15 |  0.00 |  0.00
boehmi               |  0.17 |  0.12 |  0.00
bofl78               |  0.23 |  0.13 |  0.00
cabestan17           |  0.09 |  0.00 |  0.00
calm                 |  0.25 |  0.00 |  0.00
compositor           |  0.47 |  0.00 |  0.00
coruja               |  0.13 |  0.00 |  0.00
danielv              |  0.35 |  0.00 |  0.01
darmax99             |  0.36 |  0.03 |  0.00
dmi3ij               |  0.21 |  0.17 |  0.00
eduardokn            |  0.39 |  0.03 |  0.00
empty brain          |  0.56 |  0.00 |  0.00
format C             |  0.42 |  0.00 |  0.00
frank                |  0.37 |  0.00 |  0.00
gianpirry            |  0.28 |  0.00 |  0.00
grumpf               |  0.33 |  0.00 |  0.00
guapodeturno         |  0.17 |  0.00 |  0.00
hippocampus4         |  0.29 |  0.00 |  0.00
jericho              |  0.29 |  0.00 |  0.00
jericho              |  0.29 |  0.00 |  0.00
johnbaisebis         |  0.48 |  0.00 |  0.00
jonth73              |  0.00 |  0.23 |  0.00
juancar              |  0.33 |  0.00 |  0.00
jumpingjack          |  0.19 |  0.24 |  0.00
justpoker            |  0.14 |  0.14 |  0.05
linuxman96           |  0.09 |  0.00 |  0.00
malayerba            |  0.38 |  0.00 |  0.00
neuling              |  0.12 |  0.04 |  0.00
novihok_1            |  0.29 |  0.08 |  0.01
o0O0o                |  0.33 |  0.04 |  0.00
offcorse             |  0.30 |  0.00 |  0.00
ollika               |  0.00 |  0.21 |  0.00
pado                 |  0.35 |  0.00 |  0.00
parkralle            |  0.28 |  0.03 |  0.00
rabbit               |  0.23 |  0.05 |  0.05
rapido               |  0.59 |  0.00 |  0.00
rob20pv              |  0.27 |  0.02 |  0.00
serge91360           |  0.22 |  0.00 |  0.00
shull1960            |  0.33 |  0.00 |  0.00
taciturn             |  0.39 |  0.06 |  0.00
thorald              |  0.00 |  0.00 |  0.00
turmik               |  0.50 |  0.00 |  0.00
velt                 |  0.53 |  0.05 |  0.00
viko                 |  0.25 |  0.04 |  0.00
walstet              |  0.26 |  0.00 |  0.00
walter57             |  0.15 |  0.00 |  0.00
win me??             |  0.32 |  0.07 |  0.00
wolfw                |  0.38 |  0.04 |  0.00
yes , it works. thx. i didnt recognize ...code... option. sry boehmi
buratino
Posts: 10
Joined: Sun Feb 20, 2022 2:39 am

in the case someone wants to get it himself/herself:

u need sqlite3 and tokyocabinet be installed on your system

bash script:

Code: Select all

#!/run/current-system/sw/bin/bash

# this script get data from dbs 
# input script parameters: 
#           $1 - path to logfiles
#           $2 - file with sql-request

if [[ $# -eq 2 ]] ; then   # test num of params in command line input

  echo "start collecting ... "
  for db in $1/*.pdb  ; do ./a.out $db $2 >> $$ ; done ;
  #  temporay output $$ data file has been created with fields 'nick' 'move' separated by |
  echo "ok"

  echo "start treatment ... "
  rm -f res.dat  # to remove old output data file, if it exists 
  ./z.out $$ res.dat 
  #  output res.dat plain text file has the format:  
  #    nick | fold | check | call | bet | allin
  echo "ok"

  rm -f $$                         # to remove temporary input raw data file
  
 else 

  echo "usage : ./get_stats.sh path_to_db_files sql_file" ; exit ; 

fi
sql request:

Code: Select all

select Player.Player, Action.Action 
from Player join Action join Game 
using (UniqueGameID) 
where Game.Startmoney = 10000 
and Player.UniqueGameID = Game.UniqueGameID 
and Player.UniqueGameID = Action.UniqueGameID 
and Player.Seat = Action.Player 
and Action.HandID < 22 
and Action.BeRo = 0 
and Action.Action in ('is all in with', 'folds', 'calls', 'bets') 
group by Action.UniqueGameID, Action.HandID 
having min (Action.ActionID) ;
src for a.out

Code: Select all

/*   to compile this file:         gcc -o a.out -lsqlite3 agregate.c    */

/* this utilite agregates data from SQLite pokerTH database     
 * according to external SQL request which must return 'nick | move'  
 * the first param   : path to db file 
 * the second param  : file with sql-request                            */

#include <sqlite3.h>      /*          sqlite library          */
#include <stdio.h>
#include <stdlib.h>


/* this function receives array of fields and output these fields in readable format */
static int 
PlayersMovesFunc (void *notUsed, int argc, char **argv, char **colName)
{
  printf ("%s|%s\n", argv[0], argv[1]) ;  /*     nick | move    */
  
  return 0 ;
}

/* the first param : path to db file 
 * the second param: sql-request file  */
int 
main (int argc, char **argv)
{
  sqlite3   *db ;
  FILE      *fd ;


  /* to test user input in command line */
  if ( argc!=3 ) { puts ("usage: db_path sql_file")                 ; return 1 ;  }
  if ( sqlite3_open (argv[1], &db) ) { puts ("cant open db") ; return 2 ; }


  /* to create request */
  fd = fopen (argv[2], "r") ; 
  char *req = malloc (8096) ;   /* max size of SQL-request file : 8kB */
  fgets (req, 8096, fd) ; 
  fclose (fd) ;


  /* to execute request and treat its results one-by-one with callback function */
  sqlite3_exec (db, req, PlayersMovesFunc, 0, 0) ;

  /* to clear */
  sqlite3_close (db) ;

  return 0 ;
}
src for z.out

Code: Select all

/*        gcc -ltokyocabinet treatment.c -o z.out            */

#include "tchdb.h"        /*     tokyocabinet library          */
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>


/*  global variables to calc statistic   */
int fold   = 0 ;
int check  = 0 ;
int call   = 0 ;
int bet    = 0 ;
int allin  = 0 ;


typedef struct {
  char *nick ;
  char *move ;
} keyValue ;

typedef keyValue* Step ;


/*  this function changes global variables according to input string  */
void 
calcMoves (char* oneMove) 
{
  if      ( 0 == strcmp ("folds",          oneMove) ) { fold++  ; } 
  else if ( 0 == strcmp ("checks",         oneMove) ) { check++ ; } 
  else if ( 0 == strcmp ("calls",          oneMove) ) { call++  ; } 
  else if ( 0 == strcmp ("bets",           oneMove) ) { bet++   ; } 
  else if ( 0 == strcmp ("is all in with", oneMove) ) { allin++ ; } 
  else                                                {           } ;
}

/* this function creates nick-move pair as structure 'KeyValue' */
Step 
split (char* arr) 
{
  Step x = malloc (sizeof (keyValue)) ; 

  x->nick = strtok (arr,  "|") ;
  x->move = strtok (NULL, "|") ;
  /* strtok remembers current pos and cont with it if called with NULL first arg */

  return x ;
} ;

/*  the first  arg - name of plain 'nick|fold|call|raise|allin' file  
 *  the second arg - name of plain output file       */
int 
main (int argc, char **argv)
{
  TCMDB *hdb ;
  FILE  *fd1, *fd2 ;

  hdb = tcmdbnew () ;              /*  to create in-memory-hash-table        */
  fd1 = fopen (argv[1], "r") ;     /*  to open input file with raw-data      */

  char *buffer = malloc (1024) ;

  /* read datafile line-by-line, tokinize line and put it into memory-hash-table */
  while ( fgets (buffer, 1024, fd1) ) 
  { 
    Step player = split (buffer) ;
    /* append new data to hash-table */
    tcmdbputcat2 (hdb, player->nick, player->move) ; 
  } ;

  /*  to clear   */
  free (buffer) ;
  fclose (fd1) ;                 /*   to close input file with raw-data         */ 

  fd2 = fopen (argv[2], "w") ;   /*   to open output file                       */
  tcmdbiterinit (hdb) ;          /*   to initiate iteration through hash-table  */

  /* iterativly get nick and treat all moves for this nick */
  char *currNick = malloc (1024) ;
  while ( currNick = tcmdbiternext2 (hdb) ) 
  {
    char *currMoves = tcmdbget2 (hdb, currNick) ;
    char *oneMove  = malloc (1024) ; 

    oneMove = strtok (currMoves, "\n") ; 
    calcMoves (oneMove) ;

    /* strtok remembers current pos and cont with it if called with NULL first arg */
    while ( oneMove = strtok (NULL, "\n") ) { calcMoves (oneMove) ; } ;
    
    float sum = fold + check + call + bet + allin ;

    if ( sum > 12 )  /*   to make statistic data meaningfull   */
    {
      fprintf (fd2, "%-20s | %5.2f | %5.2f | %5.2f | %5.2f | %5.2f\n", currNick, \
           (float) (fold / sum), (float) (check / sum), (float) (call / sum),   \
           (float) (bet / sum),  (float) (allin / sum) ) ;
    } ;

    /* to clear global variables for next iteration */
    fold = check = call = bet = allin = 0 ;

    free (currMoves) ;
    free (oneMove) ;
  } ;

  /* to clear all sutff */
  free     (currNick) ;
  fclose   (fd2) ;        /* to close output file            */
  tcmdbdel (hdb) ;        /* to delete in-memory-hash-table  */

  return   0 ;
}  
thats all
User avatar
sp0ck
Posts: 238
Joined: Mon Mar 15, 2021 12:54 pm
Location: Flensburg
Been thanked: 14 times

untoppable! can we give a perma shiny, blinking star for burjat? It really feels like we all needed that data/logs somehow.
buratino
Posts: 10
Joined: Sun Feb 20, 2022 2:39 am

:-))

"Buy it or leave it" (c)

brgds
Post Reply