Skip to content

Instantly share code, notes, and snippets.

View wpbonelli's full-sized avatar

wpbonelli

  • UCAR / @usgs
  • 03:52 (UTC -04:00)
View GitHub Profile
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active August 19, 2026 21:37
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

from dagster import pipeline, solid, RepositoryDefinition, InputDefinition, execute_pipeline_iterator, DagsterInstance
@solid(input_defs=[InputDefinition("number", int)])
def my_solid(context, number):
context.log.info("Number: {}".format(number))
# Stop condition to prevent infinite recursion
if number == 5:
return
@wolfv
wolfv / github_actions.yaml
Last active August 15, 2025 11:04
micromamba usage
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
@pacarvalho
pacarvalho / slurm-enqueue-job.yml
Last active March 23, 2024 13:40
Sample Github Action Workflow To Enqueue Job With SLURM Cluster
name: SLURM Enqueue Workflow
on:
push:
branches:
- 'master'
jobs:
enqueue:
runs-on: ubuntu-latest
@amir9480
amir9480 / tests.yml
Created January 10, 2021 18:57
Install Mesa3D Github Actions workflow
- name: Install Mesa
shell: cmd
run: |
curl.exe -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/20.3.2/mesa3d-20.3.2-release-msvc.7z
"C:\Program Files\7-Zip\7z.exe" x mesa.7z
mklink opengl32.dll "x64\opengl32.dll"
mklink libglapi.dll "x64\libglapi.dll"
working-directory: build\tests\Debug

About variadics in Rust

This is an analysis of how variadic generics could be added to Rust. It's not a proposal so much as a summary of existing work, and a toolbox for creating an eventual proposal.

Introduction

Variadic generics (aka variadic templates, or variadic tuples), are an often-requested feature that would enable traits, functions and data structures to be generic over a variable number of types.

To give a quick example, a Rust function with variadic generics might look like this:

@33eyes
33eyes / commit_jupyter_notebooks_code_to_git_and_keep_output_locally.md
Last active July 10, 2026 09:11
How to commit jupyter notebooks without output to git while keeping the notebooks outputs intact locally

Commit jupyter notebooks code to git and keep output locally

  1. Add a filter to git config by running the following command in bash inside the repo:
git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'  
  1. Create a .gitattributes file inside the directory with the notebooks

  2. Add the following to that file:

@waszil
waszil / attrs_lazy_loading.py
Last active August 26, 2024 18:54
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__"
from shapely.geometry import LineString, MultiLineString, Point
from collections import deque
def split_line_string(line_string):
"""Break a LineString"""
for start, end in zip(line_string.coords[:-1], line_string.coords[1:]):
yield LineString((start, end))