Skip to content

Instantly share code, notes, and snippets.

View digi0ps's full-sized avatar
🐈
dfadfadfadsf

Sriram digi0ps

🐈
dfadfadfadsf
View GitHub Profile
@digi0ps
digi0ps / .block
Last active February 25, 2018 11:36
Bar chart with Negative Values
license: bsd-3-clause
@digi0ps
digi0ps / .block
Created February 25, 2018 11:36
Bar chart with Negative Values
license: bsd-3-clause
data = [
{
"input": [
0.2823529411764706,
0.396078431372549,
0.4745098039215686,
0.12549019607843137,
0.4666666666666667,
0.40784313725490196,
0.3803921568627451,
{
"sizes": [
22,
11,
2
],
"layers": [
{
"0": {},
"1": {},
Date Delay
25Feb18 2
26Feb18 0
27Feb18 3
28Feb18 5
1Mar18 2
2Mar18 -2
3Mar18 0
4Mar18 7
5Mar18 -1
@digi0ps
digi0ps / vega.json
Created March 30, 2018 05:42
Interactive graph
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"url": "https://gist.githubusercontent.com/digi0ps/eacf81d38aafb1a387da605319c50042/raw/47c9fe4100dc2d71ac16b2202754693791bd0036/blah.csv",
"format": {
"type": "csv",
"parse": {
"date": "date"
}
}
Station Delay Train
MS 5 16127
TBM 19 16127
CGL 29 16127
MLMR 29 16127
TMV 26 16127
VM 10 16127
VRI 27 16127
PNDM 27 16127
ALU 31 16127
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"url": "https://gist.githubusercontent.com/digi0ps/d53b23e2bf308e229da838827b5717c2/raw/320a194204649b1a05eac1e08ec990384f5dd19c/dupbup.csv",
"format": {
"type": "csv"
}
},
"width": 800,
"height": 400,
@digi0ps
digi0ps / ns2.tcl
Last active March 31, 2018 17:03
A TCL tutorial
# variable and printing
set x 10
set y 25
set z [expr $x*$y]
puts $x
puts "x + y = [expr $x+$y]"
# conditional
if { $x > 9 } {
@digi0ps
digi0ps / garden.ino
Created April 1, 2018 15:51
Code for our garden automation project
#include <dht.h>
// For DHT11 sensor
dht DHT;
// PINS
#define DHT11_PIN A7
#define SMOISTURE_PIN A0
#define PDIODE_PIN A1
#define LED_PIN D5
#define MOTOR_PIN