Skip to content

Instantly share code, notes, and snippets.

View alecrajeev's full-sized avatar

Alec Rajeev alecrajeev

View GitHub Profile
@alecrajeev
alecrajeev / outpute-windows.yaml
Created March 12, 2021 18:44
Output windows helm template
---
# Source: fluent-bit/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: RELEASE-NAME-fluent-bit
labels:
helm.sh/chart: fluent-bit-0.12.4
app.kubernetes.io/name: fluent-bit
app.kubernetes.io/instance: RELEASE-NAME
@alecrajeev
alecrajeev / output.yaml
Created March 12, 2021 18:42
Output helm template
---
# Source: fluent-bit/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: RELEASE-NAME-fluent-bit
labels:
helm.sh/chart: fluent-bit-0.12.4
app.kubernetes.io/name: fluent-bit
app.kubernetes.io/instance: RELEASE-NAME
@alecrajeev
alecrajeev / add_account_v3.py
Last active January 23, 2018 03:29 — forked from dancaps/add_account_v3.py
Why is this not working?
import requests
import json
# add the Admin API access key where it says access key in the headers value
cc_api_url = 'https://api.cloudcheckr.com/api/account.json/add_account_v3'
headers = {'Content-Type': 'application/json', 'access_key': ''}
params = {'account_name': 'test_account'}
@alecrajeev
alecrajeev / colorBuilder.js
Last active April 27, 2017 17:54
House 2018 Election
// this is the javascript file that has all the functions that regarding color
var color = d3.scale.linear() // initial color scale for the demographic data
.range(['rgb(247,252,245)','rgb(229,245,224)','rgb(199,233,192)','rgb(161,217,155)','rgb(116,196,118)','rgb(65,171,93)','rgb(35,139,69)','rgb(0,109,44)','rgb(0,68,27)']);
var eleven_domain = [-1.0,-0.3,-0.2,-0.1,-0.05,0.0,0.05,0.1,0.2,0.3,1.0];
var color1;
var stateColor = ["#A94588","#D76940","#D13F46","#23A5C5", "#F0A851", "#F0A851", "#726198", "#23A5C5", "#228947", "#2B6AA1", "#D13F46", "#A94588", "#A94588",
"#2B6AA1", "#F0A851", "#D76940", "#D13F46", "#D13F46", "#6EAE51", "#A94588", "#A94588", "#D76940", "#D13F46", "#F0A851", "#228947", "#D76940", "#23A5C5",
"#23A5C5", "#D13F46", "#6EAE51", "#A94588", "#2B6AA1", "#23A5C5", "#2B6AA1", "#6EAE51", "#2B6AA1", "#2B6AA1", "#D13F46", "#23A5C5", "#6EAE51", "#6EAE51",
@alecrajeev
alecrajeev / colorBuilder.js
Last active April 27, 2017 19:00
2016 Presidential Election
// this is the javascript file that has all the functions that regarding color
var color = d3.scale.linear() // initial color scale for the demographic data
.range(['rgb(247,252,245)','rgb(229,245,224)','rgb(199,233,192)','rgb(161,217,155)','rgb(116,196,118)','rgb(65,171,93)','rgb(35,139,69)','rgb(0,109,44)','rgb(0,68,27)']);
var eleven_domain = [-1.0,-0.3,-0.2,-0.1,-0.05,0.0,0.05,0.1,0.2,0.3,1.0];
var color1;
var stateColor = ["#A94588","#D76940","#D13F46","#23A5C5", "#F0A851", "#F0A851", "#726198", "#23A5C5", "#228947", "#2B6AA1", "#D13F46", "#A94588", "#A94588",
"#2B6AA1", "#F0A851", "#D76940", "#D13F46", "#D13F46", "#6EAE51", "#A94588", "#A94588", "#D76940", "#D13F46", "#F0A851", "#228947", "#D76940", "#23A5C5",
"#23A5C5", "#D13F46", "#6EAE51", "#A94588", "#2B6AA1", "#23A5C5", "#2B6AA1", "#6EAE51", "#2B6AA1", "#2B6AA1", "#D13F46", "#23A5C5", "#6EAE51", "#6EAE51",
@alecrajeev
alecrajeev / colorBuilder.js
Last active April 11, 2016 01:03
Republican Primary
// this is the javascript file that has all the functions that regarding color
var color = d3.scale.linear() // initial color scale for the demographic data
.range(['rgb(247,252,245)','rgb(229,245,224)','rgb(199,233,192)','rgb(161,217,155)','rgb(116,196,118)','rgb(65,171,93)','rgb(35,139,69)','rgb(0,109,44)','rgb(0,68,27)']);
var candidateMargin = [0.0, 0.05, 0.1, 0.25, 1.0];
var republicanStateColors = ["#e41a1c", "#984ea3", "#4daf4a", "#377eb8", "#D3D3D3"];
var marginColors = ['#fee5d9','#fcae91','#fb6a4a','#de2d26','#a50f15', '#f2f0f7','#cbc9e2','#9e9ac8','#756bb1','#54278f', '#bae4b3', '#bdd7e7', "#D3D3D3"];
@alecrajeev
alecrajeev / README.md
Last active June 8, 2016 19:52
Democratic Primary 2016

Democratic Primary 2016 by CD

Background

The purpose of this map as detailed on Daily Kos is to represent the congressional districts in the United States accurately. Currently it is difficult to show the districts because some such as those in New York City are very small, while others like Montana are the size of an entire state. Previosly the maps needed to be zoomable to see the districts containing cities. Other represntations such as cartograms warped the country's shape. This map attempts to fix that by giving each congressional district equal area i.e. five regular hexagons.

The map was built by Daniel Donner.

I ported the map using d3 to make it easier to use.

The raw data on the race comes from The Green Papers, but I adapted it slightly to my use in [google s

@alecrajeev
alecrajeev / colorBuilder.js
Last active September 25, 2015 00:00
Who Drew the Lines?
// this is the javascript file that has all the functions that regarding color
var color = d3.scale.linear() // initial color scale for the demographic data
.range(['rgb(247,252,245)','rgb(229,245,224)','rgb(199,233,192)','rgb(161,217,155)','rgb(116,196,118)','rgb(65,171,93)','rgb(35,139,69)','rgb(0,109,44)','rgb(0,68,27)']);
var voteColor = d3.scale.ordinal() // color scale for a specifc vote
.range(["#7A9CC7","#DA9285","#a9a9a9","#405695","#B43030"])
.domain([0, 1, 2, 3, 4]);
var bernieColor = d3.scale.ordinal() // color scale for bernie event data
@alecrajeev
alecrajeev / index.html
Last active January 30, 2016 06:26
Iris Data
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Iris Data </title>
<link rel="stylesheet", type="text/css", href="style.css">
</head>
<body>
@alecrajeev
alecrajeev / index.html
Last active October 14, 2015 01:56
Bifurcation Plot
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Bifurcation Plot </title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/queue-async/1.0.7/queue.min.js"></script>
<style>
svg {
border: 1px solid #f0f;
}