Skip to content

Instantly share code, notes, and snippets.

View alokreddy's full-sized avatar
🎯
Focusing

Alok Reddy K alokreddy

🎯
Focusing
View GitHub Profile
@alokreddy
alokreddy / index.html
Created February 5, 2019 10:31 — forked from gaearon/index.html
Add React in One Minute
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@alokreddy
alokreddy / .block
Created December 22, 2018 14:24 — forked from cmgiven/.block
Brushable Scatterplot/Choropleth
license: mit
height: 350
@alokreddy
alokreddy / .block
Created December 21, 2018 14:35 — forked from enjalot/.block
some colors
license: mit
@alokreddy
alokreddy / .block
Created December 21, 2018 14:34 — forked from enjalot/.block
HTML Color Names (Relative Lightness)
license: mit
@alokreddy
alokreddy / .block
Created December 19, 2018 15:51 — forked from Fil/.block
Weighted Centroid of the world largest cities
license: mit
@alokreddy
alokreddy / index.html
Created December 19, 2018 15:24 — forked from darrenjaworski/index.html
Budget III
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Oklahoma state budget 2013</title>
<style type="text/css">
path {
stroke: #fff;
fill-rule: evenodd;
}
@alokreddy
alokreddy / index.html
Last active December 19, 2018 11:13 — forked from caravinden/index.html
D3.v4 Sunburst chart with line focus on hover
<!DOCTYPE html>
<meta charset="utf-8">
<style>
path { stroke: #fff;}
</style>
<body>
<h2 style='margin-left: 20%'>D3.v4 Sunburst chart with line focus on over</h2>
<div id='sunburst-chart-div'></div>
</body>
<script src="//d3js.org/d3.v4.min.js"></script>
@alokreddy
alokreddy / index.html
Created December 19, 2018 11:07 — forked from caravinden/index.html
OOP approach in d3.v4
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.bar {
fill: #74BBFB;
}
</style>
<body>
<div id="barChart"></div>
</body>
@alokreddy
alokreddy / README.md
Created November 15, 2018 10:37 — forked from robert-moore/README.md
A New Pattern for Updatable D3.js Charts

Using a new updatable chart format. Update functions are made accessible to the caller, handing over chart controls with full functionality to the caller in a modular manner. Data binding is done with method chaining, like any other configuration variable, and can be changed after initialization. This allows for changes to be rendered in the context of chart history, leveraging D3's transitions and update logic.

@alokreddy
alokreddy / beautiful_idiomatic_python.md
Created March 12, 2016 06:53 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]: