View pg-pong.py
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
View cloud_four.csv
timestamp open high low close volume symbol
2017-04-05 66.3 66.35 65.44 65.56 21448594 MSFT
2017-04-05 854.71 860.59 847.52 848.91 1855153 GOOGL
2017-04-05 910.82 923.72 905.62 909.28 7508370 AMZN
2017-04-05 174.7 176.33 172.81 172.88 6238894 IBM
2017-04-06 913.8 917.19 894.49 898.28 6344065 AMZN
2017-04-06 849.5 853.59 844.0 845.1 1533564 GOOGL
2017-04-06 65.6 66.06 65.48 65.73 18103453 MSFT
2017-04-06 173.47 173.47 172.25 172.45 3435403 IBM
2017-04-07 65.85 65.96 65.44 65.68 14089274 MSFT
View kafka-spark-streaming.py
"""
Count client/server response code per time interval.
"""
import argparse
from operator import add
from pyspark import SparkContext
from pyspark.streaming import StreamingContext
from pyspark.streaming.kafka import KafkaUtils
View analyze-face-in-video.py
import argparse
from scipy.misc import imsave
import cognitive_face as CF
import cv2
from sys import platform
def recognize(key):
CF.Key.set(key) # set API key
View CameraImage.cpp
#include "ofMain.h"
#include "ofxTiming.h"
class ofApp : public ofBaseApp {
public:
ofVideoGrabber grabber;
DelayTimer delay;
ofTrueTypeFont font;
string description;