Skip to content

Instantly share code, notes, and snippets.

@msarahan
msarahan / Conda-build rendering tour.ipynb
Last active February 14, 2020 17:28
Conda-build rendering overview
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
diff --git a/conda/core/subdir_data.py b/conda/core/subdir_data.py
index ec4a60958..cde9b5b75 100644
--- a/conda/core/subdir_data.py
+++ b/conda/core/subdir_data.py
@@ -7,6 +7,7 @@ import bz2
from collections import defaultdict
from contextlib import closing
from errno import EACCES, ENODEV, EPERM, EROFS
+from functools import partial
from genericpath import getmtime, isfile
@msarahan
msarahan / example output
Created July 8, 2019 15:28
conda 4.7.5 install/update/remove with free channel
CONDA_RESTORE_FREE_CHANNEL: command not found
(base) msarahan@ubuntu:~$ CONDA_RESTORE_FREE_CHANNEL=1 conda create -n old_python python=3.5.1
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/msarahan/miniconda3/envs/old_python
added / updated specs:
@msarahan
msarahan / gdal-activate.bat
Last active February 25, 2019 20:12
post-link scripts for Fonnesbeck env
@REM Store existing GDAL env vars and set to this conda env
@REM so other GDAL installs don't pollute the environment
@if defined GDAL_DATA (
set "_CONDA_SET_GDAL_DATA=%GDAL_DATA%"
)
@set "GDAL_DATA=%CONDA_PREFIX%\Library\share\gdal"
@if defined GDAL_DRIVER_PATH (
set "_CONDA_SET_GDAL_DRIVER_PATH=%GDAL_DRIVER_PATH%"
@msarahan
msarahan / migrate.py
Created January 30, 2019 22:06
Migrate an MRO-based conda environment to an Anaconda-R-based environment
from argparse import ArgumentParser
import os
import subprocess
import tempfile
from fnmatch import fnmatch
from six import string_types
import yaml
@msarahan
msarahan / mistakes.md
Last active August 22, 2018 19:02
Metadata mistakes & how to address them

pin_compatible on numpy's numpy-base dependency

Comes from:

# metapackage for things that don't use numpy's C interface, or things
- name: numpy
  requirements:
    build:
      # for runtime alignment
  • {{ compiler('c') }}
From 9147d00f50fafd45d6df6c4dbb7ec0dcd6b3dfe0 Mon Sep 17 00:00:00 2001
From: Michael Sarahan <msarahan@gmail.com>
Date: Fri, 29 Jun 2018 12:30:19 +0100
Subject: [PATCH] incorporate
https://github.com/tensorflow/tensorflow/pull/20284 up to c858523
---
tensorflow/tools/pip_package/BUILD | 8 +-
tensorflow/tools/pip_package/build_pip_package.sh | 2 +-
tensorflow/workspace.bzl | 14 ++
@msarahan
msarahan / ext.pyx
Last active July 25, 2019 03:32
validation of MKL 2018.0.3 openmp initialization fixes
cimport numpy as np
import numpy as np
import cython
from cython.parallel import prange
@cython.boundscheck(False)
@cython.wraparound(False)
@cython.cdivision(True)
def p_arange(int n):
'''
@msarahan
msarahan / gerrymandr_env.txt
Last active June 3, 2018 02:35
Conda env spec for gerrymandr school 2018
python >=3.6
descartes
geopandas
cartopy
fiona
gdal
geos
matplotlib
numpy
pandas
@msarahan
msarahan / build order - linux
Created April 23, 2018 19:40
AnacondaRecipesSync build order - linux
bzip2-feedstock
ncurses-feedstock
perl-feedstock
libedit-feedstock
sqlite-feedstock
zlib-feedstock
readline-feedstock
openssl-feedstock
tk-feedstock
libffi-feedstock