Skip to content

Instantly share code, notes, and snippets.

View jbfbell's full-sized avatar

Joe Bell jbfbell

View GitHub Profile
@jbfbell
jbfbell / alphaVantage.swift
Created July 22, 2018 14:44
Alpha Vantage API Request Library in Swift
import Cocoa
// MARK: Protocols
/// Protocol abstraction of common rest api characteristics
protocol RestApi {
var host : String { get }
var scheme : String { get }
var basePath : String { get }
var requiredParameters : Array<URLQueryItem> { get }
@jbfbell
jbfbell / wide_schema_generator.py
Last active September 28, 2023 20:50
Generate Wide Schema
"""
String {"type": "string"} "foo bar"
Boolean {"type": "boolean"} true or false
Date {"type": "string", "format": "date"} "2021-01-23", "2021-01-23 BC"
Timestamp without timezone {"type": "string", "format": "date-time", "airbyte_type": "timestamp_without_timezone"} "2022-11-22T01:23:45", "2022-11-22T01:23:45.123456 BC"
Timestamp with timezone {"type": "string", "format": "date-time"}; optionally "airbyte_type": "timestamp_with_timezone" "2022-11-22T01:23:45.123456+05:00", "2022-11-22T01:23:45Z BC"
Time without timezone {"type": "string", "format": "time", "airbyte_type": "time_without_timezone"} "01:23:45.123456", "01:23:45"
Time with timezone {"type": "string", "format": "time", "airbyte_type": "time_with_timezone"} "01:23:45.123456+05:00", "01:23:45Z"
Integer {"type": "integer"} or {"type": "number", "airbyte_type": "integer"} 42
Number {"type": "number"} 1234.56
{"type": "object", "properties": {"id": {"type": "integer"}, "updated_at": {"type": "string", "format": "date-time", "airbyte_type": "timestamp_with_timezone"}, "string_2": {"type": "string"}, "boolean_3": {"type": "boolean"}, "date_4": {"type": ["null", "string"], "format": "date"}, "timestamp_wo_tz_5": {"type": ["null", "string"], "format": "date-time", "airbyte_type": "timestamp_without_timezone"}, "timestamp_w_tz_6": {"type": ["null", "string"], "format": "date-time", "airbyte_type": "timestamp_with_timezone"}, "time_wo_tz_7": {"type": ["null", "string"], "format": "time", "airbyte_type": "time_without_timezone"}, "time_w_tz_8": {"type": ["null", "string"], "format": "time", "airbyte_type": "time_with_timezone"}, "integer_9": {"type": "integer"}, "number_10": {"type": "number"}, "array_11": {"type": "array"}, "object_12": {"type": "object"}, "string_13": {"type": "string"}, "boolean_14": {"type": "boolean"}, "date_15": {"type": ["null", "string"], "format": "date"}, "timestamp_wo_tz_16": {"type": ["null",