Instantly share code, notes, and snippets.

View abalone_data.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 8 columns, instead of 9.
Sex, Length, Diameter, Height, Whole weight, Viscera weight, Shell weight, Rings
M,0.455,0.365,0.095,0.514,0.2245,0.101,0.15,15
M,0.35,0.265,0.09,0.2255,0.0995,0.0485,0.07,7
F,0.53,0.42,0.135,0.677,0.2565,0.1415,0.21,9
M,0.44,0.365,0.125,0.516,0.2155,0.114,0.155,10
I,0.33,0.255,0.08,0.205,0.0895,0.0395,0.055,7
I,0.425,0.3,0.095,0.3515,0.141,0.0775,0.12,8
F,0.53,0.415,0.15,0.7775,0.237,0.1415,0.33,20
F,0.545,0.425,0.125,0.768,0.294,0.1495,0.26,16
M,0.475,0.37,0.125,0.5095,0.2165,0.1125,0.165,9
View data.json
{
"@context": "https://project-open-data.cio.gov/v1.1/schema/catalog.jsonld",
"@type": "dcat:Catalog",
"conformsTo": "https://project-open-data.cio.gov/v1.1/schema",
"dataset": [
{
"@type": "dcat:Dataset",
"accessLevel": "public",
"contactPoint": {
"@type": "vcard:Contact",
View data.json
{
"@context": "https://www.data.govt.nz/catalog.jsonld",
"@id": "https://www.ministry-of-silly-walks.govt.nz/data.json",
"@type": "dcat:Catalog",
"conformsTo": "https://www.data.govt.nz/toolkit/schema",
"dataset":
[
{
"title": "Convention Activity Survey",
"description": "The Convention Activity Survey (CAS) monitors and benchmarks the performance of more than 300 professional conferencing and meeting venues in New Zealand. The CAS is the 'supply-side' component of the Convention Research Programme.",
View stewards.py
stewards = [
("Steve", "Alice"),
("Alice", "Boris"),
("Boris", "Einstein"),
("Einstein", "Linus"),
("Linus", "Steve")
]
from graphviz import *
g = Digraph(name='stewards', engine='neato')
View gist:5c7399ba9f36ca0bc954731304419216
{
"@context": "https://www.data.govt.nz/catalog.jsonld",
"@id": "ersin.nz/data.json",
"@type": "dcat:Catalog",
"conformsTo": "https://www.data.govt.nz/toolkit/schema",
"dataset":[
{
"title": "Rivers and streams: monitoring and reporting",
"description": "Waikato Regional Council regularly monitors and reports on the quality of our region's river and stream resources, and the pressures that face these waterbodies and the plants and animals that rely on them for habitat.",
"identifier": "https://www.waikatoregion.govt.nz/Environment/Environmental-information/Environmental-indicators/River-and-streams/",
View goodtest.component.spec.ts
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
import { By } from '@angular/platform-browser';
import { NO_ERRORS_SCHEMA } from '@angular/core';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
View gist:ed9321e9e1c796eae9bc6134e364b1c2
Code Review Checklist
Understand the change
Read Pull Request description and Ticket
Functional Test
Does it work from a clean install?
Does it solve the problem and satisfy the AC?
(Green Path) Does everything work if you go through the intended steps?
(Red Path) Does the application help you and make sense when things go wrong?
View gist:fe86d02552fd487c0829
/**
* Daily programmer weekly challenge http://www.reddit.com/r/dailyprogrammer/comments/2a3pzl/weekly_1_handling_console_input/
*/
package main
import (
"bufio"
"log"
"os"
"strconv"
View property_scrape.rb
require 'net/http'
require 'json'
#hamilton RegionId
hamilton = 16
waikato = 14
# make a query to the Residential endpoiint of the trademe search api
#
# @param argument_hash Hash
View gist:6254978
set nocompatible
set list nolist
inoremap jj <esc>
runtime bundle/pathogen.vim
silent! call pathogen#helptags()
silent! call pathogen#runtime_append_all_bundles()
filetype plugin indent on
syntax on