Skip to content

Instantly share code, notes, and snippets.

View jacobtomlinson's full-sized avatar

Jacob Tomlinson jacobtomlinson

View GitHub Profile
@jacobtomlinson
jacobtomlinson / run.py
Created November 2, 2023 17:21
Databrick run
import os
import subprocess
import time
import socket
DB_IS_DRIVER = os.getenv('DB_IS_DRIVER')
DB_DRIVER_IP = os.getenv('DB_DRIVER_IP')
if DB_IS_DRIVER == "TRUE":
print("This node is the Dask scheduler.")
@jacobtomlinson
jacobtomlinson / beam_k8s.py
Last active May 12, 2023 13:42
Apache Beam Dask Limitation MRE
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.runners.dask.dask_runner import DaskRunner
from dask.distributed import Client, performance_report
class NoopDoFn(beam.DoFn):
def process(self, item):
import time
time.sleep(0.1)
@jacobtomlinson
jacobtomlinson / beam_k8s.py
Created May 11, 2023 13:41
Apache Beam Dask Limitation MRE
import warnings
import time
from contextlib import contextmanager
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.runners.dask.dask_runner import DaskRunner
from dask.distributed import Client
from distributed.versions import VersionMismatchWarning
@jacobtomlinson
jacobtomlinson / notebook.yaml
Last active February 2, 2023 17:40
Kubernetes manifest to launch a Jupyter Notebook running RAPIDS ready for use with the Dask Operator
apiVersion: v1
kind: ServiceAccount
metadata:
name: jovyan
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: jovyan
rules:
@jacobtomlinson
jacobtomlinson / example.yaml
Created November 7, 2022 14:34
Example DaskCluster resource
apiVersion: kubernetes.dask.org/v1
kind: DaskCluster
metadata:
name: demo
spec:
worker:
replicas: 2
spec:
containers:
- name: worker
@jacobtomlinson
jacobtomlinson / README.md
Last active October 28, 2022 11:41
Recording textual demos with vhs

Install vhs.

$ conda create -n textual-demo python=3.10 -y

$ conda activate textual-demo

$ pip install textual

$ vhs < demo.tape
@jacobtomlinson
jacobtomlinson / notebook.ipynb
Last active March 11, 2022 17:40
Launch a hybrid CPU and GPU Dask cluster and use annotations to pin work to specific hardware
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jacobtomlinson
jacobtomlinson / poke.py
Created January 6, 2022 14:36
Poke Dask dashboard
# A script that gives a local Dask cluster something to do without stressing hardware.
# Useful for testing the dashboard.
import time
from dask_ctl import get_cluster
from dask.distributed import Client, wait
from dask import delayed
@jacobtomlinson
jacobtomlinson / aws.md
Created August 26, 2021 10:05
Dask Cloudprovider AWS docs rst-to-myst

Amazon Web Services (AWS)

.. currentmodule:: dask_cloudprovider.aws
.. autosummary::
   EC2Cluster
 ECSCluster
@jacobtomlinson
jacobtomlinson / Introduction_to_Dask_with_RAPIDS.ipynb
Last active July 20, 2022 17:04
Intro to distributed computing on GPUs with Dask in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.