Skip to content

Instantly share code, notes, and snippets.

@krmarien
krmarien / nv.d3.min.js
Last active January 5, 2017 19:15
NVD3 multiChart xScale fix
/* nvd3 version 1.8.5-dev (https://github.com/novus/nvd3) 2017-01-05 */
!function(){var a={};a.dev=!1,a.tooltip=a.tooltip||{},a.utils=a.utils||{},a.models=a.models||{},a.charts={},a.logs={},a.dom={},"undefined"!=typeof module&&"undefined"!=typeof exports&&"undefined"==typeof d3&&(d3=require("d3")),a.dispatch=d3.dispatch("render_start","render_end"),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),a.dev&&(a.dispatch.on("render_start",function(b){a.logs.startTime=+new Date}),a.dispatch.on("render_end",function(b){a.logs.endTime=+new Date,a.logs.totalTime=a.logs.endTime-a.logs.startTime,a.log("total",a.logs.totalTime)})),a.log=function(){if(a.dev&&window.c
@krmarien
krmarien / gist:eea144ec061b513dd6d0
Last active August 29, 2015 14:15
TV Show rename
#!/usr/bin/python
import argparse
import sys
import os
import re
from datetime import datetime
def log(text, format='normal'):