Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View karlschriek's full-sized avatar

Karl Schriek karlschriek

  • Block Markets Africa
  • Munich, Germany
View GitHub Profile
Launching language server: /home/karl/.vscode-server/extensions/hashicorp.terraform-2.25.2-linux-x64/bin/terraform-ls serve
2023/02/10 11:49:50 serve_command.go:101: Starting terraform-ls 0.30.1
2023/02/10 11:49:50 service.go:99: Preparing new session ...
2023/02/10 11:49:50 langserver.go:94: Starting server (pid 30167; concurrency: 6) ...
2023/02/10 11:49:50 opts.go:205: Received request batch of size 1 (qlen=0)
2023/02/10 11:49:50 opts.go:205: Dequeued request batch of length 1 (qlen=0)
2023/02/10 11:49:50 rpc_logger.go:29: Incoming request for "initialize" (ID 0): {"processId":30040,"clientInfo":{"name":"Visual Studio Code","version":"1.75.1"},"locale":"en","rootPath":"/home/karl/code/notes","rootUri":"file:///home/karl/code/notes","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"didChangeConfiguratio
import argparse
import matplotlib.pyplot as plt
from tensorflow.keras.applications.inception_v3 import preprocess_input, decode_predictions
import numpy as np
import requests
import json
import os
from PIL import Image
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
import json
import requests
files = {'uploadfile': open("compiled_pipeline.tar.gz", 'rb')}
reponse=requests.post(
f"https://www.{domain}/pipeline/apis/v1beta1/pipelines/upload?resource_reference_key.type=NAMESPACE&resource_reference_key.id={namespace}",
files=files,
cookies=cookies
)
reponse.raise_for_status()
name: JSON S3 Reader
description: Reads a JSON from S3
inputs:
- {name: s3_uri, type: String, description: 'Where to read JSON from'}
implementation:
container:
image: 863518836478.dkr.ecr.eu-central-1.amazonaws.com/dev/kubeflow-120/boto3
command: [python3, read_data.py]
args: [
--s3_uri, {inputValue: s3_uri}
@karlschriek
karlschriek / write_data.yaml
Last active December 10, 2020 13:18
write_data.yaml
name: JSON S3 Writer
description: Takes three values and writes them to S3 as JSON file
inputs:
- {name: s3_uri, type: String, description: 'Where to write JSON to'}
- {name: max_val, type: Integer, description: 'A value to add to JSON'}
- {name: min_val, type: Integer, description: 'A value to add to JSON'}
- {name: sum_val, type: Integer, description: 'A value to add to JSON'}
implementation:
container:
image: 863518836478.dkr.ecr.eu-central-1.amazonaws.com/dev/kubeflow-120/boto3
import logging
import os
import getpass
import requests
import os
import io
import re
import sys
import stat
import requests