Skip to content

Instantly share code, notes, and snippets.

View mrakitin's full-sized avatar

Max Rakitin mrakitin

View GitHub Profile
#!/bin/bash
export GHA_TOKEN="${GITHUB_TOKEN}"
repo_name="nsls2-collection"
# https://github.com/nsls2-conda-envs/nsls2-collection/suites/11056519298/artifacts/562062216
artifact_id="562062216"
envname="2023-1.2-py39"
archive_name="${envname}.zip"
curl -L -H "Authorization: token ${GHA_TOKEN}" "https://api.github.com/repos/nsls2-conda-envs/${repo_name}/actions/artifacts/${artifact_id}/zip" > ${archive_name}

Commands to identify all importable modules/packages for a Python git repo


Update on 2024-03-02

blop  main 🐍 v3.11.7
🕙 12:27:07 ❯ cd src
import datetime
import pprint
import uuid
import cv2
import matplotlib.pyplot as plt
from bloptools.gp.utils import get_beam_stats
from bluesky_kafka import RemoteDispatcher
from bluesky_kafka.consume import BasicConsumer
from nslsii.kafka_utils import _read_bluesky_kafka_config_file
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from pyOlog.ophyd_tools import _normalize_positioners, _print_pos
def log_pos(positioners=None, extra_msg=None, objlen=200):
"""Get the current position of Positioners and make a logbook entry.
Print to the screen the position of the positioners and make a logbook text
entry. This routine also creates session information in the logbook so
positions can be recovered.
Parameters
----------
#!/bin/bash
# To be run as:
# $ docker run -it --rm -v $PWD:/build quay.io/condaforge/linux-anvil-comp7:latest bash /build/gen-conda-packed-env-collection-2021-1.2.sh
set -e
umask 0002
sudo yum install mesa-libGL -y
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrakitin
mrakitin / run.py
Last active November 30, 2021 16:15
#!/usr/bin/env python
import os
try:
__IPYTHON__
import sys
del sys.argv[1:]
except:
pass
@mrakitin
mrakitin / bluesky_org_releases.py
Last active October 13, 2021 18:40
Get a list of releases for `suitcase` packages in the `bluesky` org
import os
from github import Github
token = os.getenv("GITHUB_API_TOKEN", "")
g = Github(token)
repos = g.get_organization("bluesky").get_repos()
repos = [r for r in repos]
repos_releases = {}