I hereby claim:
- I am lbn on github.
- I am archeronl (https://keybase.io/archeronl) on keybase.
- I have a public key ASC5zu7Bd9vcEuNu_YUa2XSHSiqnOisIp75ivGRI0MsHTAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import socket | |
| import logging as log | |
| import threading | |
| from http.server import HTTPServer | |
| from flask import Flask | |
| from prometheus_client import Summary, MetricsHandler | |
| app = Flask("prom-gunicorn-ex") |
| "use strict" | |
| function matprint(mat) { | |
| let shape = [mat.length, mat[0].length]; | |
| function col(mat, i) { | |
| return mat.map(row => row[i]); | |
| } | |
| let colMaxes = []; | |
| for (let i = 0; i < shape[1]; i++) { | |
| colMaxes.push(Math.max.apply(null, col(mat, i).map(n => n.toString().length))); |
| def matprint(mat, fmt="g"): | |
| col_maxes = [max([len(("{:"+fmt+"}").format(x)) for x in col]) for col in mat.T] | |
| for x in mat: | |
| for i, y in enumerate(x): | |
| print(("{:"+str(col_maxes[i])+fmt+"}").format(y), end=" ") | |
| print("") | |
| # Try it! | |
| import numpy as np |
| set tabstop=2 | |
| set shiftwidth=2 | |
| set expandtab | |
| set t_Co=256 | |
| let g:solarized_termcolors=256 | |
| set background=dark | |
| set cursorline | |
| set cursorcolumn | |
| set colorcolumn=80 |