I hereby claim:
- I am lukeorland on github.
- I am orluke (https://keybase.io/orluke) on keybase.
- I have a public key ASAwfXXw2gairO6ye-QxD5TIuBCWX3Eq5Jr2y45GZMj7Iwo
To claim this, I am signing this object:
""" | |
Retrieve all the logs for a flow run. | |
E.g. | |
FLOW_RUN_ID=adff99c1-7dcf-40c1-bd1d-1c026ad930cb \ | |
python \ | |
notes-synced/snippets/fetch_flow_run_logs.py \ | |
print_concatenated_log_messages \ | |
$FLOW_RUN_ID \ |
#! /usr/bin/env zsh | |
# https://stackoverflow.com/questions/7726949/remove-tracking-branches-no-longer-on-remote/38404202#comment91928557_38404202 | |
function git-prune-not-fully-merged-branches { | |
git fetch | |
git checkout main | |
git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -d | |
git checkout - | |
} |
I hereby claim:
To claim this, I am signing this object:
from prefect import Flow, Parameter | |
from prefect.tasks.secrets import PrefectSecret | |
aws_secret = PrefectSecret(name=None) # initializes Task, unrelated to binding it within a Flow | |
with Flow("parameter_to_secret") as flow: | |
aws_credentials_secret_name = Parameter( | |
'aws_credentials_secret_name', default='AWS_CREDENTIALS', | |
) |
import prefect | |
from prefect import Flow, Parameter, task | |
@task | |
def func_factory(): | |
def func(): | |
prefect.context.get('logger').info('this is a func') | |
return func |
import inspect | |
import os | |
def get_dir_containing_this_file(): | |
return os.path.dirname( | |
os.path.abspath( | |
inspect.getframeinfo( | |
inspect.currentframe()).filename)) |
import multiprocessing | |
pool = multiprocessing.Pool(processes=multiprocessing.cpu_count()) | |
df['normalized_text'] = pool.map(normalize_text, df['text']) | |
pool.close() | |
pool.join() |
#!/usr/bin/env python3 | |
import concurrent.futures | |
import time | |
def slumber(seconds): | |
time.sleep(seconds) | |
print("slept %s seconds" % seconds) |
# -*- coding: utf-8 -*- | |
import argparse | |
import csv | |
import re | |
fields = ("Start Time", "End Time", "Activity", "Text", "Notes") | |
def parse_arguments(): | |
parser = argparse.ArgumentParser(description='') |
I hereby claim:
To claim this, I am signing this object: