Skip to content

Instantly share code, notes, and snippets.

View matthewfeickert's full-sized avatar

Matthew Feickert matthewfeickert

View GitHub Profile
@matthewfeickert
matthewfeickert / .gitignore
Last active October 29, 2020 04:49
Henry's hist demo
.ipynb_checkpoints/
@matthewfeickert
matthewfeickert / .gitignore
Last active August 21, 2020 08:04
Notes on choices of asymptotic test statistics in the LHC-era of likelihood-based analyses
.ipynb_checkpoints*
@matthewfeickert
matthewfeickert / README.md
Last active July 29, 2020 19:41
pip is going to break your pip freeze requirements.txt so hard in October

Example of --use-feature=2020-resolver breaking a pip freeze requirements.txt

Breaking Example

If the environment that is created from

$ python -m pip install -r requirements_original.txt
@matthewfeickert
matthewfeickert / README.md
Last active July 15, 2020 03:08
Python dependency thoughts

This got long, so TLDR: Micky's reactions are what I would call "correct". If people want reproducible environments that's great, but pip freeze is not going to get you there.

The answer is (like most things in life) it depends. What are you trying to do? I tend to split along this line into two idea groups: "libraries" and "applications".

At this point I'd suggest that you read the following to make sure that we're on the same page about these words.

Hopefully you read them, but the TLDR on those is:

  • Libraries are supposed to work in an ecosystem of things and so should strive to only require the minimum restrictions on dependencies that will still gaurentee a stable API. Here you probably just want to have the core dependencies be specified with minimum version numbers or
@matthewfeickert
matthewfeickert / .gitignore
Last active July 10, 2020 08:43
xAH CMake FetchContent problem
*.asetup.save
build/
submitDir/
@matthewfeickert
matthewfeickert / CMakeLists.txt
Last active July 1, 2020 06:12
Minimal failing exampe of CMake
cmake_minimum_required (VERSION 3.14 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 14)
project(testing_frugal)
include(FetchContent)
FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.8.0
@matthewfeickert
matthewfeickert / roussou_debug.py
Last active October 29, 2020 03:42
David Rousso toys notebook converted to script
import numpy as np
import pyhf
stopRHadron_spec = {
'channels': [
{
'name': 'channel1',
'samples': [
{
'data': [1.364790054231882],
@matthewfeickert
matthewfeickert / README.md
Last active May 17, 2020 05:45
Example for Anna

Example of Python classes and the use of self

Click this button to run an example in Binder:

Binder

As you can see from requirements.txt I've added some fun Python libraries, that are available in the Binder instance so you can use them in this sandbox environment.

@matthewfeickert
matthewfeickert / .gitignore
Last active April 15, 2020 04:46
Giordon CLs example
*.pdf
HistFactory/
validation.txt
.xml2json_output
roundtrip.json
@matthewfeickert
matthewfeickert / hzz.txt
Created January 2, 2020 20:25
CMS Combine toy example
# derived from Table 4 (page 58) of http://arxiv.org/pdf/1312.5353v3
imax 3 number of bins
jmax 2 number of samples minus one
kmax * number of nuisance parameters
--------------------------------------------------------
bin bin4e bin2e2m bin4m
observation 4 13 8
--------------------------------------------------------
bin bin4e bin2e2m bin4m bin4e bin2e2m bin4m bin4e bin2e2m bin4m