This file contains hidden or 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
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
This file contains hidden or 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
| ** Find commmonly accessed tables and their use of indexes: | |
| SELECT relname,seq_tup_read,idx_tup_fetch,cast(idx_tup_fetch AS numeric) / (idx_tup_fetch + seq_tup_read) AS idx_tup_pct FROM pg_stat_user_tables WHERE (idx_tup_fetch + seq_tup_read)>0 ORDER BY idx_tup_pct; | |
| Returns output like: | |
| relname | seq_tup_read | idx_tup_fetch | idx_tup_pct | |
| ----------------------+--------------+---------------+------------------------ | |
| schema_migrations | 817 | 0 | 0.00000000000000000000 | |
| user_device_photos | 349 | 0 | 0.00000000000000000000 |
This file contains hidden or 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
| --- src/http/ngx_http_variables.c.orig 2010-01-11 03:21:46.000000000 -0800 | |
| +++ src/http/ngx_http_variables.c 2010-02-18 10:01:32.000000000 -0800 | |
| @@ -93,6 +93,9 @@ | |
| static ngx_int_t ngx_http_variable_pid(ngx_http_request_t *r, | |
| ngx_http_variable_value_t *v, uintptr_t data); | |
| +static ngx_int_t ngx_http_variable_start_time(ngx_http_request_t *r, | |
| + ngx_http_variable_value_t *v, uintptr_t data); | |
| + | |
| /* |