Skip to content

Instantly share code, notes, and snippets.

View claytantor's full-sized avatar
💭
Doing and Being

Clay Graham claytantor

💭
Doing and Being
View GitHub Profile
@claytantor
claytantor / UCISequenceClassificationExample.java
Created September 9, 2016 05:06
UCISequenceClassificationExample test throws no such element
public static void main(String[] args) throws Exception {
downloadUCIData();
// ----- Load the training data -----
//Note that we have 450 training files for features: train/features/0.csv through train/features/449.csv
SequenceRecordReader trainFeatures = new CSVSequenceRecordReader();
trainFeatures.initialize(new NumberedFileInputSplit(featuresDirTrain.getAbsolutePath() + "/%d.csv", 0, 449));
SequenceRecordReader trainLabels = new CSVSequenceRecordReader();
trainLabels.initialize(new NumberedFileInputSplit(labelsDirTrain.getAbsolutePath() + "/%d.csv", 0, 449));
@claytantor
claytantor / GsonFactory.java
Created September 7, 2016 21:21
simple factory pattern for Gson gives complete control over serialization
package com.dronze.json;
import com.dronze.json.deserialize.*;
import com.dronze.json.serialize.*;
import com.dronze.model.*;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.TreeBasedTable;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
// show me, show crossover for momentum with RSI
variables:
vMom( 0 ),
vRsi( 0 ),
vAccel( 0 );
vMom = Momentum( Close, 12 ) ;
vRsi = RSI(Close,14) ;
If (vMom crosses over 0 and vRsi > 30) then
// show me, show crossover for momentum
variables:
intrabarpersist InAChart( false ),
Mom( 0 ),
Accel( 0 ),
ColorLevel( 0 ) ;
Mom = Momentum( Close, 20 ) ;
If Mom crosses over 0
@claytantor
claytantor / dax_first_hour.txt
Created July 18, 2016 01:42
DAX first hour for TradeStation
// EasyLanguage (TradeStation) / PowerLanguage (MultiCharts) code
// basic code to play around with :-)
// DAX, 5min time frame, default settings, exchange time
input:
RangeMultiplier(0.95),
BegTime(0900),
EndTime(0955),
CloseTime(2155),
{
"repos": [{
"name": "dev-repo",
"types": [
"default"
]
}, {
"name": "brewmaster-jenkins",
"types": [
"jenkins"

TECHNOLOGY, DESIGN, DOING

Clay Graham

Clay Graham is a software architect who is self motivated, passionate and driven towards providing lasting business impact with technology. Doing is essential to Clay's ethos, ideas are important, but execution is crucial to success.

Nike 2015

Created Continuous Delivery Cloud Infrastructures Continuous delivery means that Dev-ops code to production time lines are shorter and customer experiences are better. At Nike I helped design micro-services automation and blueprints using the Netflix OSS Stack for Amazon Web Services.

Pandora 2012

Deployed Foundational Monetization Analytics

@claytantor
claytantor / example_rest.md
Created June 5, 2016 23:56
Evere need to document your rest API? Works great with MkDocs.

Tickers V1


Gives the user access to the available tickers.

Path: /rest/v1/tickers

GET /tickers/ticker/{ticker}

@PreAuthorize("hasAuthority('api')")
@claytantor
claytantor / cf_cname_subdomain.json
Last active April 21, 2020 12:05
create a subdomain using a CF template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Template Route53_CNAME. This uses the patameters to create a subdomain CNAME",
"Parameters" : {
"HostedZone" : {
"Type" : "String",
"Description" : "The DNS name of an existing Amazon Route 53 hosted zone",
"AllowedPattern" : "(?!-)[a-zA-Z0-9-.]{1,63}(?<!-)",
@claytantor
claytantor / bootRun.gradle
Created May 4, 2016 01:36
passing vars to the boot run in gradle
bootRun {
addResources = false
//pass command line args
if ( project.hasProperty('jvmArgs') ) {
jvmArgs project.jvmArgs.split('\\s+')
}
}