Skip to content

Instantly share code, notes, and snippets.

View tuulos's full-sized avatar

Ville Tuulos tuulos

View GitHub Profile
import streamlit as st
import streamlit.components.v1 as components
from metaflow import Flow, Run, namespace
from metaflow.cards import get_cards
from metaflow.integrations import ArgoEvent
CARD_PREFIX = '/p/default/api/flows'
RUN_PREFIX = '/dashboard/runs/p/default'
<html><body><h1>hello world</h1></body></html>
async function openFile(uri) {
const options = {
preview: false,
viewColumn: vscode.ViewColumn.One,
};
const workspaceFolder = getWorkspaceUri();
const docURI = vscode.Uri.joinPath(workspaceFolder, uri.path);
const files = await vscode.workspace.textDocuments.filter(doc => doc.fileName === docURI.fsPath);
if (files.length === 0) {
// no active file, open it and return
classes: {
invisible: {
style.opacity: 0
label: a
}
}
frame: {
*: {
style.font-size: 40
from metaflow import FlowSpec, Parameter, step, JSONType, Task, current
from datetime import datetime
from functools import wraps
from pydantic import BaseModel
class Config(BaseModel):
id: int
name = 'John Doe'
def validate(f):
from metaflow import FlowSpec, Parameter, step, JSONType, Task, current
from datetime import datetime
from functools import wraps
from pydantic import BaseModel
class Config(BaseModel):
id: int
name = 'John Doe'
def validate(f):
import { spawnSync, ChildProcessWithoutNullStreams } from "child_process";
import { readFileSync } from 'fs';
import tmp from 'tmp';
tmp.setGracefulCleanup();
function waitFlow(flowname: string,
runID: string,
resolve: (reason?: any) => void,
reject: (value?: any) => void) {
from metaflow import metaflow_runner
from tempfile import NamedTemporaryFile
import ast
# fixme - it runner shouldn't require nest_asyncio in notebooks
import nest_asyncio
nest_asyncio.apply()
def get_cell():
from IPython import get_ipython
from metaflow import FlowSpec, step
from functools import wraps
def log_to_sentry(x):
print('sentry', x)
def sentry_logger(f):
@wraps(f)
def func(self):
@tuulos
tuulos / send_event.py
Created September 27, 2023 04:52
send events to OBP
import os
import json
from subprocess import check_call
import click
def assume_role(role_arn):
import boto3
sts_client = boto3.client('sts')