Skip to content

Instantly share code, notes, and snippets.

View sampathweb's full-sized avatar

Ramesh Sampath sampathweb

  • San Francisco, CA
View GitHub Profile
@sampathweb
sampathweb / .block
Last active May 13, 2016 02:39
Barley Farmers Exploration
license: mit
@sampathweb
sampathweb / .block
Last active May 13, 2016 02:39
Barley Yields Simple Multiples
license: mit
@sampathweb
sampathweb / .block
Last active May 12, 2016 21:59
Basic Bar Chart
license: mit
@sampathweb
sampathweb / index.html
Created May 3, 2016 02:50
Anscombe's Quartert Scatterplot
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
/*css to go here*/
</style>
</head>
<body>
df = pd.DataFrame({
"col_1": ["Movie1", "Movie2", "Movie3"],
"films": ["film1, film1.1", "film2", "film3"],
"books": ["book1, book1.1", "book2", "book3, book3.1"]
})
def split_values(row, row_accumulator):
"""
Split the rows into multiple Rows based on Books array.
Extends Films by repeating the last value to the length of Books list.
@sampathweb
sampathweb / README.md
Created March 13, 2016 22:13
D3 meetup: Simple Scatter
@sampathweb
sampathweb / tic_tac_toe.py
Last active December 29, 2015 23:39
A Fun Game for HackerSchool Application. I had good fun with it and wrote a Javascript Version to have my son play daddy's game. The code is at: github.com/sampathweb/game_toe. The game can be played at http://sampathweb.com/game_toe (hosted via gh-pages)
#! /usr/bin/env python
from random import choice
from collections import defaultdict
def get_player_input(valid_selections):
'''Returns the selected row, col by the Player'''
selected_item = tuple()
while selected_item not in valid_selections:
if selected_item:
print('Your selection of (%s, %s) is not valid: ' % selected_item)
@sampathweb
sampathweb / README.md
Last active December 21, 2015 07:33
Bar Chart_beta
@sampathweb
sampathweb / README.md
Created December 21, 2015 07:16
Bar Chart_beta