Skip to content

Instantly share code, notes, and snippets.

std::string blobText = ...;
if( blobText[0] != '{' ) return createParseForBadEffect( input_params );
if( (blobText[1] != (char)BLOB_VERSION_CHAR) && (blobText[1] != (char)GZIPTEXT_VERSION_CHAR) ) return createParseForBadEffect( input_params );
if( blobText[blobText.length()-1] != '}' ) return createParseForBadEffect( input_params );
int binary_len = 0;
unsigned char* binary_raw = unbase64( blobText.c_str()+2, blobText.length()-3, &binary_len );
U_VERIFY( binary_raw );
@dustyleary
dustyleary / vector_kuhn.py
Created February 17, 2020 02:18 — forked from kastnerkyle/vector_kuhn.py
Vectorized, alternating update versions of various algorithms for Kuhn poker
# Author: Kyle Kastner
# License: BSD 3-Clause
# Vectorized, alternating update CFR+ for Kuhn poker
# For specific algorithmic details see
# http://jeskola.net/cfrp_mt.pdf
# https://pdfs.semanticscholar.org/ed52/8594465e96f51fd9a3cf00401bfba20597fa.pdf
# An alternate overview using scalar, simultaneous updates
# https://justinsermeno.com/posts/cfr/

Keybase proof

I hereby claim:

  • I am dustyleary on github.
  • I am dleary (https://keybase.io/dleary) on keybase.
  • I have a public key ASAe5qpHEiD7_P5HEQ2Lw9DDpP7GOMogmOqfg2SweyhMGQo

To claim this, I am signing this object: