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 logging | |
import json | |
import asyncio | |
from typing import Dict, Any | |
from threading import Thread | |
import confluent_kafka | |
from confluent_kafka.cimpl import KafkaException | |
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
stages: | |
- test | |
- deploy | |
test: | |
stage: test | |
image: golang:1.15-alpine | |
script: | |
- apk add build-base | |
- go test $(go list ./... | grep -v /vendor/) |
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 = (lambda fastapi, typing: (lambda app: (app,app.get("/")(lambda: {"Quite ": "ugly"}),app.post("/annotate",)(lambda x, y: {"How to annotate this": int(x) + int(y)}),)[0])(fastapi.FastAPI()))(__import__("fastapi"), __import__("typing")) |
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 send_100_requests(): | |
URL = "http://httpbin.org/uuid" | |
result = [] | |
async def send_request(): | |
r = requests.get(URL) | |
result.append(r.text) | |
async def main(): |