Skip to content

Instantly share code, notes, and snippets.

View NPashaP's full-sized avatar

Pasha NPashaP

  • Available for consulting
  • Columbus, Ohio
View GitHub Profile
@NPashaP
NPashaP / .block
Last active November 6, 2020 19:57
Graceful Tree Conjecture
license: gpl-3.0
@NPashaP
NPashaP / .block
Last active May 13, 2023 06:25
3D Donut
license: gpl-3.0
@NPashaP
NPashaP / gradientPie.js
Last active August 29, 2015 13:58
Gradient Pie
!function(){
var gradPie={};
var pie = d3.layout.pie().sort(null).value(function(d) {return d.value;});
createGradients = function(defs, colors, r){
var gradient = defs.selectAll('.gradient')
.data(colors).enter().append("radialGradient")
.attr("id", function(d,i){return "gradient" + i;})
.attr("gradientUnits", "userSpaceOnUse")
@NPashaP
NPashaP / .block
Last active October 29, 2022 19:22
US State Map
license: gpl-3.0
@NPashaP
NPashaP / .block
Last active December 27, 2019 04:55
DashBoard
license: gpl-3.0
@NPashaP
NPashaP / data.js
Last active December 27, 2019 07:14
Stacked Density and Quantile Graphs
var dqData=[];
dqData.push({title:'Product Groups',
mean:0.0393,
dP:[
['GROUP01',-0.0435,32937],
['GROUP10',-0.2651,132],
['GROUP11',-0.0694,1164],
['GROUP12',0.0345,17127],
['GROUP13',-0.0288,8858],
['GROUP18',-0.3741,46],
@NPashaP
NPashaP / index.html
Last active November 11, 2016 10:23
Convex Hull
<html>
<head>
<title>Page Title</title>
<style>
.points{
fill:steelblue;
}
polyline, .ray{
fill:none;
stroke-width:3;
@NPashaP
NPashaP / index.html
Last active December 27, 2019 07:13
Sum of First n Numbers
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body{
width:900px;
}
svg text{
font-size:30px;
}
line{
@NPashaP
NPashaP / index.html
Last active August 29, 2015 14:08
Nails And Strings
<!DOCTYPE html>
<meta charset="utf-8">
<style>
circle{
fill:#e0e0e0;
}
</style>
<body>
<section style="display:block;">
Design: <select onchange="changeArt(this)"></select>
@NPashaP
NPashaP / goL games.js
Last active August 29, 2015 14:13
Conway's Game of Life
var games ={// list of sample games.
Planes:(function(){
var r = [
[ , , , , , , , , ,1, , , , , , , , , , , , , , , , , , , , , , , , , , ,0],
[ , , , , , , ,1, ,1, , , , , , , , , , , , , , , , , , , , , , , , , , ,0],
[ , , , , , ,1, ,1, , , , , , , , , , , , , , , , , ,1, , , , , , , , , ,0],
[1,1, , , , 1, , ,1, , , , , , , , , , , , , , , , , 1,1, , , , , , , , , ,0],
[1,1, , , , ,1, ,1, , , , , , , , , , , , , , , ,1, 1, , , , , 1,1, , , , ,0],
[ , , , , , , ,1, ,1, , , , , , , , , , , , , ,1,1, 1, , , , , 1,1, , ,1, 1,0],
[ , , , , , , , , ,1, , , , , , , , , , , , , , ,1, 1, , , , , 1,1, , ,1, 1,0],