Skip to content

Instantly share code, notes, and snippets.

@vvagias
vvagias / iot_streaming_example.scala
Created January 17, 2020 15:34
example flink app for edge2ai workshop iot data.
package vv
import java.util.{Properties, StringTokenizer}
import org.apache.flink.api.common.functions.{FlatMapFunction, MapFunction}
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParseException
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode
import org.apache.flink.streaming.api.scala.{StreamExecutionEnvironment, _}
import org.apache.flink.streaming.connectors.kafka.{FlinkKafkaConsumer, FlinkKafkaProducer, FlinkKafkaProducer011}
import org.apache.flink.streaming.util.serialization.JSONKeyValueDeserializationSchema
@vvagias
vvagias / Load-IoT-to-Kafka.xml
Created January 17, 2020 15:25
NiFi load IoT data into Kafka for Flink lab
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description>push IoT Data into Kafka highTemp Topic.
</description>
<groupId>3790f4bc-b7c1-3c67-b301-dbe48fc844a3</groupId>
<name>IoT Data To Kafka</name>
<snippet>
<controllerServices>
<id>88022ac5-b2a7-33c8-0000-000000000000</id>
<parentGroupId>a488add2-cd6f-3753-0000-000000000000</parentGroupId>
@vvagias
vvagias / classify.json
Created December 18, 2019 11:20
model score
[
{
"label": "bee",
"probability": 0.44016194343566895
},
{
"label": "vase",
"probability": 0.13220570981502533
},
{
@vvagias
vvagias / graph.json
Last active December 14, 2019 16:12
sample json for force graph
{
"name": "v2",
"children": [
{
"name": "social",
"children": [
{
"name": "political",
"children": [
{
@vvagias
vvagias / d3_test.csv
Last active December 14, 2019 14:41
data for testing d3
name value
a 1
b 2
c 3
d 4
e 5
f 6
g 7
h 8
i 7
@vvagias
vvagias / hive_table_atlas_entity.json
Created September 30, 2016 17:01
Sample response from Apache Atlas REST entity request
{
"requestId": "qtp940790097-33208 - f99ee279-719a-4657-a868-5a58a5b64d52",
"definition": {
"jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
"id": {
"jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
"id": "55517c07-1313-4a0a-befe-71f2eea82e85",
"version": 0,
"typeName": "hive_table",
"state": "ACTIVE"