This file contains hidden or 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
| FROM golang:1.12 as build | |
| WORKDIR $GOPATH/src/github.com/Irio/wohnung | |
| COPY scraper scraper | |
| COPY main.go . | |
| RUN go get -d -v ./... | |
| RUN go install | |
| FROM gcr.io/distroless/base |
This file contains hidden or 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
| URL = "https://api.ioannotator.com/api/export" | |
| # parameter | |
| apikey = "PZK888A-AEQMDPY-MKKPU2Q-JZ786NX" | |
| dataset = "5758665286207488" | |
| # defining a params dict for the parameters to be sent to the IO Annotator API | |
| PARAMS = {'apikey':apikey, 'dataset': dataset} | |
| # sending get request and saving the response (annotations) as response object | |
| r = requests.get(url = URL, params = PARAMS) | |
| # extracting data in json format | |
| data = r.json() |
This file contains hidden or 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
| // install the package | |
| // npm install simple-api-management-nodejs | |
| const simpleAPIManagement = require('simple-api-management-nodejs'); | |
| app.use(simpleAPIManagement( | |
| { | |
| apiKey: 'add your API key', | |
| } | |
| )); |
This file contains hidden or 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
| docker pull tensorflow/serving | |
| docker run -p 8501:8501 \ | |
| --mount type=bind,source=/path/to/my_model/,target=/models/my_model \ | |
| -e MODEL_NAME=my_model -t tensorflow/serving |
This file contains hidden or 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
| @component() | |
| def concat(a: str, b: str) -> str: | |
| return a + b | |
| @component | |
| def reverse(a: str)->NamedTuple("outputs", [("before", str), ("after", str)]): | |
| return a, a[::-1] |
This file contains hidden or 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 kfp | |
| from kfp.v2.dsl import pipeline | |
| from kfp.v2.dsl import component | |
| from kfp.v2 import compiler |
This file contains hidden or 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
| @component(output_component_file="component.yaml") |
This file contains hidden or 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
| @pipeline(name="basic-pipeline", | |
| description="A basic pipeline with function based components", | |
| pipeline_root='gs://doit-vertex-ai-demo/basic-pipeine') | |
| def basic_pipeline(a: str='stres', b: str='sed'): | |
| concat_task = concat(a, b) | |
| reverse_task = reverse(concat_task.output) |
This file contains hidden or 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
| compiler.Compiler().compile( | |
| pipeline_func=basic_pipeline, | |
| package_path="basic_pipeline.json" | |
| ) |
This file contains hidden or 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
| set_cpu_limit('CPU_LIMIT') | |
| set_memory_limit('MEMORY_LIMIT') |