Skip to content

Instantly share code, notes, and snippets.

View lx-88's full-sized avatar

Michael Ewald lx-88

  • Northwest USA
View GitHub Profile
@lloydmeta
lloydmeta / AkkaStreamSparkIntegration.scala
Last active January 28, 2021 17:11
Example for how to connect Akka Stream and Spark Streaming by turning creating a Flow element that feeds into an InputDstream
import akka.actor._
import akka.stream.scaladsl.Flow
import org.apache.spark.streaming.dstream.ReceiverInputDStream
import org.apache.spark.streaming.receiver.ActorHelper
import akka.actor.{ ExtensionKey, Extension, ExtendedActorSystem }
import scala.reflect.ClassTag
object AkkaStreamSparkIntegration {
@jkleint
jkleint / timeseries_cnn.py
Created July 29, 2016 04:05
Example of using Keras to implement a 1D convolutional neural network (CNN) for timeseries prediction.
#!/usr/bin/env python
"""
Example of using Keras to implement a 1D convolutional neural network (CNN) for timeseries prediction.
"""
from __future__ import print_function, division
import numpy as np
from keras.layers import Convolution1D, Dense, MaxPooling1D, Flatten
from keras.models import Sequential
@jonmaim
jonmaim / oauth_node_example.js
Created March 21, 2017 10:53
OAuth 1.0 3-legged server side flow (motorsportreg example)
'use strict';
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
var localtunnel = require('localtunnel');
var request = require('request');
var qs = require('querystring');
var url = require('url');
var http = require('http');