Credit for this goes to the Stack Overflow user Statistic Dean for his post on this question
(base)$ conda install -c conda-forge nb_conda_kernels
Credit for this goes to the Stack Overflow user Statistic Dean for his post on this question
(base)$ conda install -c conda-forge nb_conda_kernels
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<script type="text/javascript" src="http://mbostock.github.io/d3/talk/20111018/d3/d3.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.io/d3/talk/20111018/d3/d3.geom.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.io/d3/talk/20111018/d3/d3.layout.js"></script> | |
<style type="text/css"> | |
circle { |
-- In pg_stat_statements, there is a problem: sometimes (quite often), it registers the same query twice (or even more). | |
-- It's easy to check in your DB: | |
-- | |
-- with heh as ( | |
-- select userid, dbid, query, count(*), array_agg(queryid) queryids | |
-- from pg_stat_statements group by 1, 2, 3 having count(*) > 1 | |
-- ) select left(query, 85) || '...', userid, dbid, count, queryids from heh; | |
-- | |
-- This query gives you "full picture", aggregating stats for each query-database-username ternary |
HTTP request limiting =================================================================================================================== | |
frontend ft_web | |
# Use General Purpose Couter (gpc) 0 in SC1 as a global abuse counter | |
# Monitors the number of request sent by an IP over a period of 10 seconds | |
stick-table type ip size 1m expire 10s store gpc0,http_req_rate(10s) | |
tcp-request connection track-sc1 src | |
# refuses a new connection from an abuser | |
tcp-request content reject if { src_get_gpc0 gt 0 } |
Region Name Region Latency | |
EU (Frankfurt) eu-central-1 305ms | |
Asia Pacific (Tokyo) ap-northeast-1 716ms | |
EU (Ireland) eu-west-1 770ms | |
US West (N. California) us-west-1 927ms | |
US East (N. Virginia) us-east-1 1048ms | |
Asia Pacific (Seoul) ap-northeast-2 1066ms | |
US West (Oregon) us-west-2 1098ms | |
Asia Pacific (Singapore) ap-southeast-1 1242ms | |
South America (Sao Paulo) sa-east-1 1266ms |
"""Tool for profiling Cassandra query performance. | |
Tests are run by profile() multiple times and the 'Read Latency' is | |
extracted using node tool. | |
Usage: | |
#Create the schema using the cassandra-cli. | |
create keyspace query |
// Support routines for automatically reporting user timing for common analytics platforms | |
// Currently supports Google Analytics, Boomerang and SOASTA mPulse | |
// In the case of boomerang, you will need to map the event names you want reported | |
// to timer names (for mPulse these need to be custom0, custom1, etc) using a global variable: | |
// rumMapping = {'aft': 'custom0'}; | |
(function() { | |
var wtt = function(n, t, b) { | |
t = Math.round(t); | |
if (t >= 0 && t < 3600000) { | |
// Google Analytics |
"""" | |
The orignal author: Alexer / #python.fi | |
""" | |
import opcode | |
import dis | |
import sys | |
import multiprocessing |
A spanning tree of the canvas is generated using random traversal and then flooded with color. Hue encodes Manhattan distance from the root of the tree. (This is not an optimal visual encoding, but it suffices and is pretty.)
Spanning trees can also be used to generate mazes. See a maze generated with randomized depth-first traversal flooded with color, and compare color floods of spanning trees generated by random traversal, Prim’s algorithm, and Wilson’s algorithm.
A spanning tree of the canvas is generated using Prim’s algorithm and then flooded with color. Hue encodes Manhattan distance from the root of the tree. (This is not an optimal visual encoding, but it suffices and is pretty.)
Spanning trees can also be used to generate mazes. See a maze generated with Prim’s algorithm flooded with color, and compare color floods of spanning trees generated with Prim’s algorithm to random traversal, randomized depth-first traversal and Wilson’s algorithm.