Skip to content

Instantly share code, notes, and snippets.

View pkgw's full-sized avatar

Peter Williams pkgw

View GitHub Profile
@pkgw
pkgw / manual-rebuild.py
Last active October 16, 2018 19:04
Manually perform the "rebuild" conda-forge operation (update for Python 3.7, etc.)
#! /usr/bin/env python
from conda_forge_tick import auto_tick
import networkx as nx
HARDCODED_GRAPH_PATH = '/home/peter/sw/conda/cf-graph3/graph.pkl'
def go(package_name, recipe_dir):
print('= A ==================================================================')
gx = nx.read_gpickle(HARDCODED_GRAPH_PATH)
@pkgw
pkgw / bindings.rs
Created May 27, 2018 19:27
Example generated slurm-sys Rust binding code
/* automatically generated by rust-bindgen */
pub const SLURM_SUCCESS: u32 = 0;
pub const SLURM_ERROR: i32 = -1;
pub const SLURM_FAILURE: i32 = -1;
pub const SLURM_SOCKET_ERROR: i32 = -1;
pub const SLURM_PROTOCOL_SUCCESS: u32 = 0;
pub const SLURM_PROTOCOL_ERROR: i32 = -1;
pub const SLURM_VERSION_NUMBER: u32 = 1116933;
pub const SLURM_PENDING_STEP: u32 = 4294967293;
1/643 pyagrum-feedstock build #61 job #1 277.50 days
2/643 pyagrum-feedstock build #61 job #2 277.50 days
3/643 pyagrum-feedstock build #61 job #3 277.50 days
4/643 staged-recipes build #13059 job #1 277.50 days
5/643 python-blosc-feedstock build #28 job #1 277.50 days
6/643 python-blosc-feedstock build #28 job #2 277.50 days
7/643 python-blosc-feedstock build #28 job #3 277.50 days
8/643 staged-recipes build #13061 job #1 277.50 days
9/643 staged-recipes build #13063 job #1 277.50 days
10/643 mumps-feedstock build #24 job #1 277.50 days
@pkgw
pkgw / five-hours.diff
Created January 23, 2018 22:23
Change in the list of pending conda-forge Travis CI jobs, sorted by job id, 2018 Jan 23, five hour time span
--- diffable-earlier.txt 2018-01-23 17:19:00.965739367 -0500
+++ diffable-later.txt 2018-01-23 17:18:56.938713677 -0500
@@ -145,6 +145,19 @@
flask-sqlalchemy-feedstock build #13 job #2
flask-sqlalchemy-feedstock build #13 job #3
staged-recipes build #13877 job #1
+pvlib-python-feedstock build #28 job #1
+pvlib-python-feedstock build #28 job #2
+pvlib-python-feedstock build #28 job #3
+staged-recipes build #25180 job #1
@pkgw
pkgw / 20180123.txt
Last active January 25, 2018 14:01
Check Travis CI queue for conda-forge feedstocks
Repo 1 of 3827 ...
Repo 101 of 3827 ...
Repo 201 of 3827 ...
Repo 301 of 3827 ...
Repo 401 of 3827 ...
Repo 501 of 3827 ...
Repo 601 of 3827 ...
Repo 701 of 3827 ...
Repo 801 of 3827 ...
Repo 901 of 3827 ...
#! /usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 Peter Williams <peter@newton.cx> and collaborators.
# Licensed under the MIT License.
# XXX remove hashbang
"""Compute phase closure diagnostics from a Measurement Set
For most results to make sense, the data should be observations of a bright
@pkgw
pkgw / chandra_repro.py
Created March 28, 2016 22:25
Overcomplicated untested work on automagical ninja pipeline for X-ray processing
# -*- mode: python; coding: utf-8 -*-
# Copyright 2016 Peter Williams <peter@newton.cx> and collaborators.
# Licensed under the MIT License.
"""Framework to call the CIAO chandra_repro program in the context of a Ninja
build system.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
@pkgw
pkgw / affils.sty
Last active March 16, 2016 15:58
Automatically-numbered affiliations using textual keys.
% affils.sty -- automatically number affiliations
% Copyright 2016 Peter Williams <peter@newton.cx>
% Licensed under the MIT License.
%
% To use:
%
% 1. Save this file next to your .tex file and add \usepackage{affils} at its top.
%
% 2. Before your author list, write:
%
@pkgw
pkgw / clean.py
Last active December 25, 2015 16:25
Simple pwkit CLEAN implementation, never really used so who knows if it works
# Copyright 2015 Peter Williams
# Licensed under the MIT License.
import numpy as np
from scipy.signal import lombscargle
from pwkit import lsqmdl
twopi = 2 * np.pi
ncoarse = 512
commit fc673a66958ee26213c4be766b7cfa4858a39754
Author: Peter Williams <peter@newton.cx>
Date: Tue Oct 20 09:25:43 2015 -0400
fipy/meshes/uniformGrid3D.py: fix
diff --git a/fipy/meshes/uniformGrid3D.py b/fipy/meshes/uniformGrid3D.py
index 304bb69..827ca9e 100644
--- a/fipy/meshes/uniformGrid3D.py
+++ b/fipy/meshes/uniformGrid3D.py