Skip to content

Instantly share code, notes, and snippets.

@ialarmedalien
ialarmedalien / business_numbers.py
Created January 21, 2025 14:07
Business Numbers
class BusinessNumbers(object):
def __init__ (self, dbwrapper):
"""
Initialize the business logic.
dbwrapper - the database wrapper for storing user information.
"""
self.dbwrapper = dbwrapper
self.log = logging.getLogger(__Name__)
@ialarmedalien
ialarmedalien / basin3d.json
Created December 4, 2024 18:00
basin 3D JSONschema
{
"$defs": {
"AbsoluteCoordinate": {
"additionalProperties": false,
"description": "Absolute coordinate describes the geo-referenced location of a feature.\nCoordinates match the feature's shape. For example, a curve is a list of points.\nCurrently collections of discrete points describing a feature are supported.",
"properties": {
"datasource": {
"type": [
"string",
"null"
@ialarmedalien
ialarmedalien / .block
Last active October 18, 2018 19:58
Nested pie chart
license: mit
border: yes
scrolling: yes
height: 600
@ialarmedalien
ialarmedalien / .block
Last active October 13, 2018 14:12
Pan and Zoom Controls
license: mit
border: yes
scrolling: no
height: 600
@ialarmedalien
ialarmedalien / octocat.svg
Created October 12, 2018 08:02 — forked from johan/octocat.svg
Github octocat avatar, SVG format
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ialarmedalien
ialarmedalien / dc.axis.js
Last active October 11, 2018 15:31
dc bottom axis component; easy to make more abstract for top/side axes.
/**
* Separate axis implementation.
*
* Examples:
* - {@link https://bl.ocks.org/ialarmedalien/0a4bf25ffc0fb96ae569a20f91957bc1 eslint on dc.js source}
* @class axisChart
* @memberof dc
* @mixes dc.capMixin
* @mixes dc.marginMixin
* @mixes dc.baseMixin
@ialarmedalien
ialarmedalien / tsv-formatter.js
Created October 4, 2018 11:19
TSV formatter for eslint
// output eslint results in TSV format
module.exports = function ( results = [] ) {
const sep = "\t"
, severity = [ '', 'warning', 'error' ]
, path = require( 'path' )
, eslint = require( 'eslint' )
, cwd = process.cwd()
, header = function () {
console.log( [ 'file', 'line', 'column', 'severity', 'fixable', 'code', 'description' ].join( sep ) );
@ialarmedalien
ialarmedalien / .block
Last active September 25, 2018 08:11
StackOverflow: d3.js migration map fix
license: mit
@ialarmedalien
ialarmedalien / .block
Last active September 18, 2018 21:10
dc.js Partition Cluster chart
license: mit
border: yes
scrolling: yes
height: 600
@ialarmedalien
ialarmedalien / .block
Last active September 17, 2018 11:14
dc.js pack layout demonstration
license: mit
border: yes
scrolling: yes
height: 600