Skip to content

Instantly share code, notes, and snippets.

View afeld's full-sized avatar

Aidan Feldman afeld

View GitHub Profile
@JJediny
JJediny / Jenkinsfile
Created February 22, 2017 20:17 — forked from abayer/Jenkinsfile
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@binaryfunt
binaryfunt / jupyter_notebook_config.py
Last active April 29, 2022 11:15
Jupyter notebooks - clear output pre-save hook (for cleaner git diffs)
# This file has to be saved in your Jupyter config directory (found by running
# jupyter --config-dir
# but usually C:\Users\<username>\.jupyter\jupyter_notebook_config.py on Windows
def scrub_output_pre_save(model, **kwargs):
"""scrub output before saving notebooks"""
# only run on notebooks
if model['type'] != 'notebook':
return
# only run on nbformat v4