Skip to content

Instantly share code, notes, and snippets.

View msarahan's full-sized avatar

Mike Sarahan msarahan

  • Austin, TX
  • 03:23 (UTC -05:00)
View GitHub Profile
@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 / 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 / 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:
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 / Conda-build rendering tour.ipynb
Last active February 14, 2020 17:28
Conda-build rendering overview
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This is an attempt at reproducing behavior in Grafana Tempo where traces are delayed for hours after being submitted.

The files included here are:

  • docker-compose.yaml: Runs a tempo, grafana, and jaeger instance to send data to
  • .vscode/launch.json: VS Code launch file with configurations for running the parser script to send data to Tempo and to Jaeger
  • telemetry-tools-env-vars/telemetry-env-vars: This is where traceparent gets set. We compute it ourselves instead of randomly generating it, so that we can reproduce it in different places rather than carry it around.
  • bump_time.py: Used to update timestamps in all_jobs.json so that data is new enough for Tempo to consider it
  • all_jobs.json: Job timing information obtained from the GitHub Actions API. The input to the parser.

To run this example: