Skip to content

Instantly share code, notes, and snippets.

View jacobtomlinson's full-sized avatar

Jacob Tomlinson jacobtomlinson

View GitHub Profile
@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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jacobtomlinson
jacobtomlinson / docker-compose.yml
Created March 25, 2021 16:43
Monitoring RAPIDS with Prometheus and Grafana (configs)
version: "3.9"
services:
rapids:
image: rapidsai/rapidsai:0.18-cuda11.0-runtime-ubuntu16.04-py3.8
ports:
- "8888:8888" # Jupyter
- "8786:8786" # Dask communication
- "8787:8787" # Dask dashboard
@jacobtomlinson
jacobtomlinson / rapids-aws-dask-cloudprovider.ipynb
Created December 3, 2020 16:35
Launching a RAPIDS cluster on AWS with Dask Cloudprovider
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jacobtomlinson
jacobtomlinson / intro-to-gpu-development-in-python.ipynb
Last active September 27, 2021 11:05
Tech Exeter Conference 2020: Intro to GPU Development in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jacobtomlinson
jacobtomlinson / good-timeout.py
Last active July 19, 2021 22:49
Asyncio wait_for can be foiled by blocking code
import asyncio
async def eternity():
await asyncio.sleep(2) # Sleep asynchronously
print("I should've timed out")
async def main():
# Wait for at most 1 second
try:
await asyncio.wait_for(eternity(), timeout=1.0)
@jacobtomlinson
jacobtomlinson / Dask CuPy cuDF Example.ipynb
Created February 11, 2020 16:02
Example of using CuPy and cuDF with Dask CUDA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jacobtomlinson
jacobtomlinson / 2020-02-03 Azure UCX-Py Testing.ipynb
Last active September 27, 2021 11:06
UCX-Py testing on Azure
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jacobtomlinson
jacobtomlinson / config.yaml
Created January 8, 2020 08:55
Opsdroid Home Assistant example config
## Set the logging level
logging:
level: info
## Show welcome message
welcome-message: true
## Connector modules
connectors:
homeassistant:
@jacobtomlinson
jacobtomlinson / sun.py
Created January 8, 2020 08:30
Opsdroid Home Assistant sun lights
from opsdroid_homeassistant import HassSkill, match_sunrise, match_sunset
class SunriseSkill(HassSkill):
@match_sunset
async def lights_on_at_sunset(self, event):
await self.turn_on("light.outside")
@match_sunrise
@jacobtomlinson
jacobtomlinson / skill.py
Created January 8, 2020 08:25
Opsdroid Home Assistant example
from asyncio import sleep
from opsdroid_homeassistant import HassSkill, match_hass_state_changed
class MotionLights(HassSkill):
@match_hass_state_changed("binary_sensor.drive", state="on")
async def motion_lights(self, event):
"""Turn the outside light on with motion if after sunset."""
if await self.sun_down():