Skip to content

Instantly share code, notes, and snippets.

View kunathj's full-sized avatar

Jonas Kunath kunathj

  • Germany
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kunathj
kunathj / build.sh
Last active January 14, 2022 20:47
Wrapper for SiW-ECAL eventbuilding in SiWECAL-TB-analysis repository
#!/bin/bash
# 1. Choose the software version.
source /cvmfs/sft.cern.ch/lcg/views/LCG_99/x86_64-centos7-gcc10-opt/setup.sh # python3, faster.
# source /cvmfs/ilc.desy.de/sw/x86_64_gcc82_centos7/v02-02-03/init_ilcsoft.sh # python2, standard calice software stack.
CALIB_TAG="3GeVMIPscan"
TB_FOLDER="/eos/project-s/siw-ecal/TB2021-11"
OUT_FOLDER="/afs/cern.ch/work/j/jokunath/public/buildfiles"
ROOT_PATH=$1
@kunathj
kunathj / make_frozen.py
Created January 5, 2022 08:14
Given a conda environment file (primary dependencies without versions), and the exported environment file from conda (specifying all dependencies with version and hash), create an environment file with the primary dependencies and versions. The resulting file was found to sometimes work best for recreating an environment.
#!/usr/bin/env python3
from pathlib import Path
import sys
import yaml
default_env_file_no_versions = "environment.yml"
default_env_file_exported = "env-template.yml"
@kunathj
kunathj / pdflatex.yml
Created August 4, 2021 10:02
github workflows
name: LaTeX build
on:
push:
branches-ignore:
- 'gh-action-result/pdflatex'
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
@kunathj
kunathj / .pre-commit-config.yaml
Last active July 9, 2021 15:22
My current standard configuration
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
@kunathj
kunathj / beamerx.sty
Last active December 7, 2020 16:17
LLR beamer Latex
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerx}[2017/01/31 v2.3.0, standard scientific slideshows layout for Ecole polytechnique (Palaiseau,France).]
% The original version is hosted at https://github.com/BinetReseau/polytechnique-beamer/blob/master/source/beamerx.sty.
%=======================================================================
% Popular redefinitions/steering options:
% \renewcommand{\titlegraphic}{} % Default, sets the title bkg to white.
% \renewcommand{\titlegraphic}{ % Choose beamerxbackground.jpg as title bkg.
name: higgsstrahlung
channels:
- conda-forge
dependencies:
- python=3.8
- jupyter
- matplotlib
- numpy
- numexpr
- pandas
# Show all files in the history.
git log --pretty=format: --name-only --diff-filter=A | sort -u
# Remove some files (F).
git filter-branch --tree-filter 'rm -f F' HEAD
# If you want to iterate this, it is necessary to remove the
# .git/refs/original folder.
rm -r .git/refs/original/
@kunathj
kunathj / manage.sh
Created May 12, 2020 16:49
Manage the ILD software environment additions on my machine.
#!/bin/bash
help="""
##############################################################################
#
# The script expects to be called with one of the following options:
#
# setup, status, pull, push.
#
# The goal is to stitch together the multiple parts that together form my