- https://sidravic.github.io https://gitlab.com/sidravic
- @sidravic
- https://www.core27.co/post/
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 sys | |
import socket | |
import select | |
import random | |
from itertools import cycle | |
# dumb netcat server, short tcp connection | |
# $ ~ while true ; do nc -l 8888 < server1.html; done | |
# $ ~ while true ; do nc -l 9999 < server2.html; done | |
SERVER_POOL = [('10.157.0.238', 8888)] |
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 prefect import Flow | |
from prefect.executors import DaskExecutor | |
with Flow("daskcloudprovider-example") as flow: | |
# Add tasks to flow here... | |
# Execute this flow on a Dask cluster deployed on AWS Fargate | |
flow.executor = DaskExecutor( | |
cluster_class="dask_cloudprovider.aws.FargateCluster", | |
cluster_kwargs={"image": "prefecthq/prefect", "n_workers": 5} |
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 prefect import Flow | |
from prefect.executors import DaskExecutor | |
with Flow("daskcloudprovider-example") as flow: | |
# Add tasks to flow here... | |
# Execute this flow on a Dask cluster deployed on AWS Fargate | |
flow.executor = DaskExecutor( | |
cluster_class="dask_cloudprovider.aws.FargateCluster", | |
cluster_kwargs={"image": "prefecthq/prefect", "n_workers": 5} |
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
{ | |
"logging": { | |
"version": 1, | |
"disable_existing_loggers": true, | |
"formatters": { | |
"brief": { | |
"class": "logging.Formatter", | |
"datefmt": "%I:%M:%S", | |
"format": "%(levelname)-8s; %(name)-15s; %(message)s" | |
}, |