Skip to content

Instantly share code, notes, and snippets.

View wpbonelli's full-sized avatar

wpbonelli

  • UCAR / @usgs
  • 05:44 (UTC -04:00)
View GitHub Profile
@wpbonelli
wpbonelli / attrs_lazy_loading.py
Created August 26, 2024 18:54 — forked from waszil/attrs_lazy_loading.py
Lazy loading attributes with python attrs
"""
Example for creating classes with attrs that contain lazy-loaded fields.
"""
import attr
_lazy_fields_container_name = "_lazy_fields"
_lazy_field_metadata_key = "lazy"
_lazy_loader_function_prefix = "lazy_loader__"

Delete all Actions cache entries with GitHub CLI

A convenient one liner to empty all caches for a repository.

Installing the actions-cache extension

The gh CLI and actions-cache extension must be installed. To install the extension, run:

 gh extension install actions/gh-actions-cache
@wpbonelli
wpbonelli / dagster_start_pipeline_graphql.md
Last active June 11, 2020 22:11
Start Dagster pipeline via GraphQL API

GraphQL:

mutation ($executionParams: ExecutionParams!) {
  startPipelineExecution(executionParams: $executionParams) {
    ...startPipelineExecutionResultFragment
  }
}

fragment startPipelineExecutionResultFragment on StartPipelineExecutionResult {