Skip to content

Instantly share code, notes, and snippets.

"""
To use:
# in a python3 virtual env
pip install streamlit
streamlit run password_reset.py
"""
import streamlit as st
import numpy as np
import pandas as pd
# Solves A . x = y by x = A_inverse . y
df = pd.read_csv(
"https://docs.google.com/spreadsheets/d/11gz4F5TUjQL0hRl4gBYQrtCJ3SRY_jwIW-H3HJqUyuE/gviz/tq?tqx=out:csv&sheet=Sheet1"
).replace({np.nan: 0})
y_vector = df["TOTAL"].to_numpy()
A_df = df.drop(["TOTAL", "NAME"], axis=1)
echo Normal behavior, returns a:
echo '{}' | jq '(try (["a"]) catch null) as $selected | if $selected|length<2 then $selected[0] else "halt error" | halt_error end'
echo
echo Normal behavior, returns a:
echo '{}' | jq '(try (["a"]) catch null) as $selected | if $selected|length<2 then $selected[0] else "normal error" | error end'
echo
echo Normal behavior, returns halt error:
echo '{}' | jq '(try (["a","b"]) catch null) as $selected | if $selected|length<2 then $selected[0] else "halt error\n" | halt_error end'
echo
echo Unexpected behavior, returns null instead of "normal error":
git clone git@github.com:amajumder/JETSCAPE-COMP.git
cd JETSCAPE-COMP/
git checkout demo_2017_03_10
#add Pythia, only needed for runPythia part of example
cd external_packages
wget http://home.thep.lu.se/~torbjorn/pythia8/pythia8223.tgz
tar -xvf pythia8223.tgz
mv pythia8223 pythia
cd pythia
./configure
/*******************************************************************************
Example of a module which sees the JetscapeEvent and can read/modify it.
*******************************************************************************/
#include <string>
#include "Pythia8/Pythia.h"
using namespace Pythia8;

Keybase proof

I hereby claim:

  • I am velicanu on github.
  • I am velicanu (https://keybase.io/velicanu) on keybase.
  • I have a public key ASAKfXtx3tO4tzTVBlJcr3-p5At8lXMmsT06icgNjIkP_go

To claim this, I am signing this object:

// NEW
edm::EDGetTokenT<vector<reco::Vertex> > vtxCollection_;
ggHiNtuplizer::ggHiNtuplizer(const edm::ParameterSet& ps)
{
vtxCollection_ = consumes<vector<reco::Vertex> > (ps.getParameter<edm::InputTag>("VtxLabel"));
}
void ggHiNtuplizer::analyze(const edm::Event& e, const edm::EventSetup& es)