View producer
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
./bin/kafka-console-producer.sh --bootstrap-server 127.0.0.1:9092 --topic metrics |
View consumer
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
./bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic metrics |
View covid.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 falcon | |
from json import load, dumps | |
import datetime | |
with open('db.json') as f: | |
db = load(f)["records"] | |
def trans(r): | |
return { | |
"Land": r["geoId"], |
View corona.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 matplotlib.pyplot as plt | |
p = 1000 | |
i = 1 | |
r = 3 | |
imun = 0 |
View open-api-3-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
openapi: "3.0.0" | |
info: | |
version: 1.0.0 | |
title: X API | |
paths: {} |
View open-api-3-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
openapi: "3.0.0" | |
info: | |
version: 1.0.0 | |
title: ASA API | |
paths: {} |
View order.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
{ | |
"id": 731, | |
"date": "16th of May 2011", | |
"customer": 17, | |
"items" : [ | |
{ | |
"quantity": 5, | |
"description": "Oolong", | |
"price": 5.98, | |
"in-stock": true |
View detection.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
{ | |
"id": "060EE52B-B3A5-4650-85B3-76B7F9BFE5C3", | |
"number": "DN-34-1323", | |
"date": "2020-23-02", | |
"image": { | |
"type": "jpeg", | |
"size": 50000 | |
}, | |
"tags": ["ANPR", "Transportation","Whitelist"] | |
} |
View poll.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 requests | |
from requests.auth import HTTPBasicAuth | |
import logging | |
import json | |
from uuid import uuid4 | |
from time import sleep | |
headers= { "Accept": "application/vnd.eventstore.events+json" } | |
auth=HTTPBasicAuth('changeit', 'changeit'); |
View shop.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
swagger: '2.0' | |
host: 'api.predic8.de:443' | |
basePath: /shop | |
schemes: | |
- https | |
info: | |
title: Fruit Shop API | |
version: 1.0.0 | |
description: >- | |
This is a showcase for REST API design and serves as a public API for |
NewerOlder