[ Launch: test ] 5bb73faf58504c340fa4 by sampathweb[ Launch: test ] 4653053 by enjalot[ Launch: test ] 4652017 by enjalot[ Launch: test ] 4582399 by enjalot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def print_puzzle(puzzle): | |
print('---' * 18) | |
for row in range(9): | |
for col in range(9): | |
pos = row * 9 + col | |
print(' ', puzzle[pos]['val'], end=' |') | |
print(end='\n') | |
if (row + 1) % 3 == 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/env/python | |
from __future__ import print_function | |
import pandas as pd | |
# Read the csv | |
violations_df = pd.read_csv('violations-2012.csv') | |
# Covert Violations to datetime object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Basic Calendar</title> | |
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.0.2/fullcalendar.css' /> | |
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.0.2/fullcalendar.print.css' /> | |
</head> |
Built with blockbuilder.org
This simple bar chart is constructed from a TSV file storing the frequency of letters in the English language. The chart employs conventional margins and a number of D3 features:
- d3.tsv - load and parse data
- d3.format - format percentages
- d3.scale.ordinal - x-position encoding
- d3.scale.linear - y-position encoding
- d3.max - compute domains
- d3.svg.axis - display axes
OlderNewer