Skip to content

Instantly share code, notes, and snippets.

@granturing
granturing / reactive_map.js
Last active November 14, 2022 04:28
Sample reactive Leaflet code for Zeppelin
<!-- place this in an %angular paragraph -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.css" />
<div id="map" style="height: 800px; width: 100%"></div>
<script type="text/javascript">
function initMap() {
var map = L.map('map').setView([30.00, -30.00], 3);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
@granturing
granturing / note.json
Last active September 26, 2016 14:33
DC Apache Spark MeetUp - Zeppelin & Spark SQL
{
"paragraphs": [
{
"text": "%md\n## Agenda\n\n1. Loading data, initial discovery\n2. Joining with browsers lookup\n3. Custom UDF for ip-geo\n4. Page dwell time, sessionize visits\n6. Revenue metrics\n7. Funnel analysis",
"dateUpdated": "Oct 6, 2015 2:38:20 AM",
"config": {
"colWidth": 8.0,
"editorMode": "ace/mode/markdown",
"editorHide": true,
"tableHide": false,
@granturing
granturing / HCatInputFormat.java
Last active September 28, 2016 14:24
HCatalog InputFormat wrapper to use with Spark (FYI for those finding this now, this was originally written pre-SparkSQL)
public class HCatInputFormat extends InputFormat<SerializableWritable<Writable>, HCatRecord> {
private final org.apache.hcatalog.mapreduce.HCatInputFormat input;
public HCatInputFormat() {
input = new org.apache.hcatalog.mapreduce.HCatInputFormat();
}
@Override
public RecordReader<SerializableWritable<Writable>, HCatRecord> createRecordReader(