This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hobo_escape($val){ | |
// because there is no good way to escape a dynamic table/field name | |
$ret = preg_replace('/[^a-zA-Z _]+/', '', $val); | |
$ret = preg_replace('/\s+/', '_', $ret); | |
return $ret; | |
} | |
// Credentialing for MySQL server if you want the code to create table and load data automatically |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
import sys | |
class count_dict(dict): | |
""" | |
stub object used to simplify tracking | |
the number of letters encountered. | |
this expects to be initialized with an uppercase letter yo. | |
""" |