Skip to content

Instantly share code, notes, and snippets.

@bgbg
bgbg / asciihist.py
Last active August 17, 2023 09:34
ASCII histograms
from __future__ import print_function
import numpy as np
def asciihist(it, bins=10, minmax=None, str_tag='',
scale_output=30, generate_only=False, print_function=print):
"""Create an ASCII histogram from an interable of numbers.
Author: Boris Gorelik boris@gorelik.net. based on http://econpy.googlecode.com/svn/trunk/pytrix/pytrix.py
License: MIT
"""
ret = []
@shunirr
shunirr / criminal_jc.md
Last active February 26, 2024 05:51
女子中学生チケット詐欺事件

criminal_jc

@fatso83
fatso83 / collaborator.js
Last active January 26, 2023 10:54
Demonstrates how to stub and test for collaborators in a class constructor using sinon and proxyquire. See https://github.com/sinonjs/sinon/issues/831
module.exports = function(n){
// do something with n
}
@ethyde
ethyde / csscomb.json
Last active May 20, 2019 16:34
CSS Comb Config conforme idiomatic CSS
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
"leading-zero": false,
"quotes": "single",