Skip to content

Instantly share code, notes, and snippets.

View beckermr's full-sized avatar

Matthew R. Becker beckermr

View GitHub Profile
@sidneymau
sidneymau / main.py
Last active November 1, 2023 00:04
Chromatic Galaxy Image Simulations
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import Divider, Size
import numpy as np
from scipy import stats
import galsim
import dsps
from dsps.data_loaders import load_ssp_templates
from lsstdesc_diffsky import read_diffskypop_params
@wolfv
wolfv / oci_mirror.py
Last active March 23, 2022 18:38
conda OCI mirror things
from conda_package_handling import api as cph_api
from tempfile import TemporaryDirectory
import pathlib
import os
import subprocess
import shutil
import json
import requests
import tarfile
@brianv0
brianv0 / pinit
Last active September 3, 2020 01:25
Pin it - Get versions of a package's installed dependencies from conda in a form which is good for the pinned file
#!/bin/bash
pkg=$1
# Get the current versions of a package's installed dependencies
# get dist_name for the package so we can find it's json file
pkg_dist_name=$(conda list --json | jq -r '.[] | select(.name=="'${pkg}'") | .dist_name')
# get dependencies in the form of a regex
name_regex=$(jq -r '.depends | map(. | split(" ")[0]) | join("$|")' ${CONDA_PREFIX}/conda-meta/${pkg_dist_name}.json)
# print list of dependency=version for installed dependencies
conda list --json | jq -r '.[] | select(.name | match("'${name_regex}'")) | "\(.name)=\(.version)"'
@wagenet
wagenet / glibc.md
Last active May 13, 2024 03:57
glibc Versions

glibc Versions

List of oldest supported version of top 10 Linux Distros and their glibc version according to distrowatch.com.

Summary

Out of all versions with published EOLs, 2.12 is the oldest glibc still active, found in CentOS 6.8.

If CentOS 6 and 7 are eliminated, the oldest glibc is 2.23 in Ubuntu and Slackware.

@jseabold
jseabold / git_find_big.py
Created September 27, 2015 16:49
git filter-branch magic using Python
#! /usr/bin/env python
import glob
import os
import shutil
import re
from collections import namedtuple
import subprocess
from subprocess import PIPE
@beckermr
beckermr / supermongo.mplstyle
Last active January 23, 2019 17:35
supermongo
#lines
lines.linewidth : 1.0
lines.linestyle : -
lines.color : black
#fonts & text
font.family : serif
font.weight : normal
font.size : 12.0
text.color : black