View join-api.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
openapi: 3.0.0 | |
info: | |
description: API for the Ordina conference event | |
version: '1' | |
title: Conference-API | |
servers: | |
- url: "https://your-conference-domain.com/api/" | |
description: 'Base URL for the API' | |
paths: |
View openapi-generator-maven-plugin-configuration.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.openapitools</groupId> | |
<artifactId>openapi-generator-maven-plugin</artifactId> | |
<executions> | |
<execution> | |
<goals> | |
<goal>generate</goal> | |
</goals> | |
<configuration> | |
<skipValidateSpec>false</skipValidateSpec> |
View template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion : "2010-09-09" | |
Transform: AWS::Serverless-2016-10-31 | |
Description: Conference API Service | |
Globals: | |
Api: | |
Cors: | |
AllowMethods: "'*'" | |
AllowHeaders: "'Content-Type'" | |
AllowOrigin: "'*'" |
View delete-all-models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
from pprint import pprint | |
client = boto3.client('sagemaker') | |
def main(): | |
model_names = [] | |
for key in paginate(client.list_models): |
View oauth2-cognito-foobar.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APP_ID=2kou24pdi9pagm6bawd3jb0jrd | |
APP_SECRET=be9noij0kc98u80asfnomjnm7ppk1pm240vvae | |
URL="my-test-poo.auth.eu-west-1.amazoncognito.com" | |
BASIC=$(echo -n $APP_ID:$APP_SECRET | base64) | |
AUTHENTICATE="Basic $BASIC" | |
echo "https://$URL/oauth2/authorize?response_type=code&client_id=$APP_ID&state=12345&redirect_uri=http://localhost&scope=aws.cognito.signin.user.admin%20email%20openid%20profile&" | pbcopy | |
https://my-test-pool.auth.eu-west-1.amazoncognito.com/oauth2/authorize? | |
response_type=code |
View create-stream-pump.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE STREAM "INCOMING_STREAM" ( | |
"uniqueId" INTEGER, | |
"speed" INTEGER, | |
"bezettingsgraad" INTEGER, | |
"recordTimestamp" TIMESTAMP); | |
CREATE OR REPLACE PUMP "INCOMING_STREAM_PUMP" AS | |
INSERT INTO "INCOMING_STREAM" | |
SELECT STREAM | |
"unieke_id", |
View event.JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"beschrijvende_id": "H101L20", | |
"unieke_id": "3159", | |
"lve_nr": "18", | |
"tijd_waarneming": "2020-04-06T17:51:00+01:00", | |
"tijd_laatst_gewijzigd": "2020-04-06T17:52:20+01:00", | |
"actueel_publicatie": "1", | |
"beschikbaar": "1", | |
"defect": "0", | |
"geldig": "0", |
View handler.python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handle(event, context): | |
output = [] | |
for record in event['records']: | |
payload = base64.b64decode(record['data']) | |
result = dropped_or_okay(payload) | |
if result == 'Ok': | |
payload = preprocess_payload(payload) |
View window.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE PUMP "STREAM_PUMP_SPEED" AS | |
INSERT INTO "SPEED_SQL_STREAM" | |
SELECT STREAM | |
"uniqueId", | |
AVG("speed") over W0, | |
AVG("speed") over W2, | |
AVG("speed") over W10 | |
FROM "INCOMING_STREAM" | |
WINDOW | |
W0 AS ( PARTITION BY "uniqueId" |
View lag.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE PUMP "SPEED_CHANGE_PUMP" AS | |
INSERT INTO "SPEED_CHANGE_SQL_STREAM" | |
SELECT STREAM "s"."uniqueId", | |
LAG("s"."speed", 1, "s"."speed") OVER CURRENT_WINDOW AS "previousSpeed", | |
"s"."speed" AS "currentSpeed" | |
FROM "SPEED_SQL_STREAM" AS "s" | |
WINDOW CURRENT_WINDOW AS (PARTITION BY "s"."uniqueId" ROWS 3 PRECEDING); |
OlderNewer