Skip to content

Instantly share code, notes, and snippets.

View informz's full-sized avatar

Stephen Ball informz

View GitHub Profile
sequenceDiagram
participant uws
participant portfolioingest
participant planingest
participant waverunner
uws->>portfolioingest: request creation of an UP plan
portfolioingest->>planingest: request n plans be created
service:
s3:
bucket:
tags:
foo : bar
baz : bang
ec2:
----
service:
import org.scalatest.Matchers._
import org.scalatest.FlatSpec
/*
Implement the mean, median, mode and range methods in Java 8 Functional style with the minimum code necessary to pass the tests.
*/
class FunctionalTestSpec extends FlatSpec {
"A Range " should "have a value of 14" in {
assert(14 === range(3, 17, 15, 11, 9))
}
// range: the difference between min and max values
@informz
informz / get_job_status.sh
Created April 19, 2018 12:32 — forked from arturmkrtchyan/get_job_status.sh
Apache Spark Hidden REST API
curl http://spark-cluster-ip:6066/v1/submissions/status/driver-20151008145126-0000
@informz
informz / rest_on_oracle.sql
Last active October 4, 2017 17:10
rest_on_oracle
declare
l_url varchar2(100) := 'http://datamaker-stage.aoa.inbcu.com/data-maker/health';
l_req utl_http.req;
l_result utl_http.resp;
l_data varchar2(4000);
l_clob clob;
begin
dbms_lob.createtemporary(l_clob,true);
l_req := utl_http.begin_request(l_url);
l_result := utl_http.get_response(l_req);
@informz
informz / client_module_insert.json
Last active October 2, 2017 16:42
Data Lake Config Proposal using EAV pattern
insert API request:
[
{
"entity" : "ssp_ratecard",
"attribute" : "calendar_period_id",
"bigint_value" : 34567,
"text_value" : null,
"double_value" : null,
"boolean_value" : null
### Keybase proof
I hereby claim:
* I am informz on github.
* I am s_ball (https://keybase.io/s_ball) on keybase.
* I have a public key ASB9Bxh_zrIvBszbDzDob4OBelPsL-ukJv9vgdugYnWq_go
To claim this, I am signing this object:
@informz
informz / InventoryFetcher.scala
Created September 16, 2016 15:00
Fetches Inventory
import play.api.libs.json.Json
import play.api.libs.ws.ning.NingWSClient
import scala.concurrent.ExecutionContext.Implicits.global
/**
* Created by ball on 9/16/16.
*/
object InventoryFetcher {
(defproject lein1 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[compojure "1.5.0"]
[ring "1.4.0"]
[com.h2database/h2 "1.4.187"]
[org.clojure/java.jdbc "0.6.1"]
@informz
informz / GRANTS_SYNONYMS
Last active August 29, 2015 14:23
GRANTS AND SYNONYMS
SELECT 'REVOKE '
|| privilege
|| ' ON "'
|| table_name
|| '" TO '
|| grantee
|| CASE
WHEN grantable = 'YES'
THEN ' WITH GRANT OPTION;'
ELSE ';'