Skip to content

Instantly share code, notes, and snippets.

View mcg1969's full-sized avatar

Michael C. Grant mcg1969

  • Anaconda, Inc. / CVX Research Inc.
  • Austin, TX
View GitHub Profile
@mcg1969
mcg1969 / vmware-ae5prep.sh
Last active March 31, 2023 17:55 — forked from amccarty/vmware-ae5prep.sh
Preparing a CentOS node for AE5
#!/usr/bin/env bash
set -eux
OS="$(gawk -F= '/^NAME/{print $2}' /etc/os-release | sed 's/"//g')"
echo "Detected ${OS} Distro"
if [[ "$OS" =~ ^(CentOS\ Linux|RedHat|Ubuntu)$ ]]; then
@mcg1969
mcg1969 / bikeshare.csv
Created July 27, 2021 16:33
Pittsburgh bike share data
Date Max Temp Month Holiday Weekend Home Game Rides
2015-05-31 83.0 5.0 0.0 1.0 0.0 469
2015-06-01 56.0 6.0 0.0 0.0 0.0 113
2015-06-02 63.0 6.0 0.0 0.0 0.0 139
2015-06-03 71.0 6.0 0.0 0.0 0.0 131
2015-06-04 78.0 6.0 0.0 0.0 0.0 207
2015-06-05 83.0 6.0 0.0 0.0 0.0 270
2015-06-06 76.0 6.0 0.0 1.0 0.0 368
2015-06-07 85.0 6.0 0.0 1.0 0.0 414
2015-06-08 80.0 6.0 0.0 0.0 1.0 121
@mcg1969
mcg1969 / rearch.py
Last active May 31, 2019 19:08
rearch.py: building arch-dependent versions of noarch python packages
# usage: python rearch.py <spec-that-resolves-to-noarch-package>
# 1. creates a directory derived from the spec (replacing ':/=' with dashes)
# 2. creates a conda recipe to build a python-version-specific package
# 3. runs the conda recipe for PYTHON_VERSIONS
# 4. runs conda-convert to obtain the other platforms
# leaves everything in the given directory.
import os
import shutil
import sys
@mcg1969
mcg1969 / circle.yml
Last active July 11, 2019 16:47
Cached Miniconda in CircleCI
machine:
environment:
MINICONDA: "$HOME/miniconda"
MINICONDA_PATH: "$MINICONDA/bin"
PATH: "$MINICONDA_PATH:$PATH"
CONDA: "$MINICONDA_PATH/conda"
ANACONDA: "$MINICONDA_PATH/anaconda"
# This ensures we don't accidentally pull in ~/.condarc
# if it happens to be there for some strange reason
CONDARC: "$MINICONDA/condarc.none"
@mcg1969
mcg1969 / virtual_hotfixing_build_groups.md
Last active May 5, 2017 15:59
Conda hackery: virtual hotfixing via build groups

Conda proposal: virtual hotfixing via build groups

In this note, I propose a modification to conda and to its implied package specification that will provide, in my view, a solution to a common pitall of the conda ecosystem, and will provide additional performance benefits as well.

Motivation

With conda, as with many package ecosystems, it is often necessary for a package to place version constraints on its dependencies to ensure that they interoperate properly. In practice, such constraints must balance two competing concerns:

  • if the constraints are specified too tightly, then packages will often unable to coexist, because their version constraints will conflict. For example, if package A depends on B <2.0, and package C depends on B >2.0, then packages A, B, and C cannot coexist. The tighter the constraints, the more likely this is to happen.
  • on the other hand, if the constraints are specifed too loosely, then packages will often break if one of their dependencies ce
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mcg1969
mcg1969 / spaces.md
Last active November 12, 2021 14:28
Conda hackery: namespaces

Conda Proposal: namespaces

Motivation

We would like to position Conda as a language-agnostic package manager, but at present it maintains a distinct bias towards Python. Given its origins this was expected and, frankly, reasonable. Nevertheless, as we begin to use it to subsume other packaging ecosystems, such as CRAN, NPM, Ruby Gems, etc., we are going to want to overcome this history; and one key challenge is to address naming conflicts across platforms.