Skip to content

Instantly share code, notes, and snippets.

@gparuthi
gparuthi / cute names dogs
Created September 16, 2014 20:42
source yahoo answers
ABBY
AFFINITY
AKIRA
ALCHEMY
AMBER
AMBROSIA
AMETHYST
AMORE
ANAIS
ANASTASIA
@gparuthi
gparuthi / autossh.md
Last active August 29, 2015 14:06
AutoSSH

Userful while using local ipython notebooks or local code while accessing secure remote servers like redis, mongodb, etc.

autossh -M0 -fN -l -i ~/.ssh/id_rsa -L :localhost:

import requests
import datetime
from dateutil import parser
import pandas as pd
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
# plt.style.use('ggplot')
from bs4 import BeautifulSoup
import StringIO
@gparuthi
gparuthi / misfit_ios_url_schema
Created October 13, 2015 03:13
Misfit app URL Schema
shine:// URL
@gparuthi
gparuthi / BLE_Potentiometer_Chat.ino
Created December 13, 2016 01:07
BLE_SimpleChat example for Readbear BLE NANO adapted to send potentiometer.
#include <BLE_API.h>
#define DEVICE_NAME "PotentiometerToChat"
#define TXRX_BUF_LEN 20
#define DEVICE_ID 0xFF
BLE ble;
@gparuthi
gparuthi / BLE_Potentiometer_Chat.ino
Last active December 13, 2016 01:15
BLE_SimpleChat example for Readbear BLE NANO adapted to send potentiometer.
#include <BLE_API.h>
#define DEVICE_NAME "PotentiometerToChat"
#define TXRX_BUF_LEN 20
#define DEVICE_ID 0xFF
BLE ble;
@gparuthi
gparuthi / Air Pressure Variance In Cities
Last active June 23, 2017 22:43
Air pressure analysis in python
# Introduction
This analysis helps in comparing cities on air pressure variations.
I calculate the mean variation in air-pressure for a given city using the wunderground data.
# Overall yearly variance output:
- BOS 0.08
- JFK 0.24
- SFO 0.13
@gparuthi
gparuthi / Air pollution | PM2.5
Created November 11, 2017 11:27
Quick InfoVis. When is the best time to visit delhi. According to Air Pollution.
Incomplete analysis of the pollution. Source: http://www.cpcb.gov.in/CAAQM/frmReportdisplay.aspx
https://docs.google.com/spreadsheets/d/1Deabs41hrbRsGL3qiE-evNWr4LFlDwl04nhk5S485T8/edit?usp=sharing
@gparuthi
gparuthi / example.ts
Created May 31, 2020 23:08
Extend lit-element to support state
import { customElement, property, LitElement, html, css } from 'lit-element';
import { Machine, interpret, assign, createMachine, Interpreter, StateMachine } from 'xstate';
import { XstateLitElement } from './xstate-lit-element';
interface CounterContext {
count: number;
}
type CounterEvent =
| {type: "INC"}