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 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' |
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
<html><body><h1>hello world</h1></body></html> |
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
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 |
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
classes: { | |
invisible: { | |
style.opacity: 0 | |
label: a | |
} | |
} | |
frame: { | |
*: { | |
style.font-size: 40 |
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
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): |
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
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): |
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 { 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) { |
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
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 |
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
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): |
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 os | |
import json | |
from subprocess import check_call | |
import click | |
def assume_role(role_arn): | |
import boto3 | |
sts_client = boto3.client('sts') |
NewerOlder