Skip to content

Instantly share code, notes, and snippets.

@wiso
wiso / gist:b30c3197503a4cb9ad3d5402ebb27883
Created November 2, 2021 08:08
power_plant_wikidata.sparql
SELECT DISTINCT ?item ?itemLabel ?countryLabel ?capacity_in_Mw ?stateLabel ?coords ?layer
WHERE
{
?item (wdt:P31/(wdt:P279*)) wd:Q159719;
p:P2109 ?stmnode;
wdt:P625 ?coords .
?stmnode psn:P2109 ?valuenode. # normalised value
?valuenode wikibase:quantityAmount ?capacity_in_W.
BIND(?capacity_in_W / "1e6"^^xsd:double AS ?capacity_in_Mw)
@wiso
wiso / MassFitGlobal.ipynb
Created November 4, 2020 09:52
Global RooFit fit mass
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wiso
wiso / efficiency tpr fpr roc curve.ipynb
Last active July 19, 2020 22:18
To summarize tpr = P[pass cut | signal], fpr = P[pass cut | background]. Where pass cut means otuput > threshold and signal is closer to 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wiso
wiso / rucio_xrootd.sh
Last active February 4, 2020 09:19
rucio xrootd (old fax) list files
rucio list-file-replicas --protocol root --pfns <did>
@wiso
wiso / Dockerfile
Created January 24, 2020 10:06
root hsg7 Dockerfile
FROM rootproject/root-ubuntu16-base
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
RUN git clone https://:@gitlab.cern.ch:8443/turra/root.git -b hsg7-v6-08-00 /usr/src/root
RUN cd /tmp \
&& cmake /usr/src/root \
-Dfail-on-missing=ON \
-Dbuiltin_pcre=ON \
-Dexplicitlink=ON \
@wiso
wiso / silence_roofit.py
Last active September 5, 2019 15:48
Silence RooFit
import ROOT
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.NumIntegration)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.Fitting)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.Minimization)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.InputArguments)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.Eval)
ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.DataHandling)
ROOT.RooMsgService.instance().setGlobalKillBelow(ROOT.RooFit.ERROR)
ROOT.RooMsgService.instance().setSilentMode(True)
@wiso
wiso / tangent.ipynb
Created March 7, 2019 14:46
Example using tangent and tensorflow to get covariance matrix from a statistical model (fit to Higgs gamma gamma production modes)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wiso
wiso / AtlasStyle.ipynb
Created March 6, 2019 11:27
Atlas Style in matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wiso
wiso / Bootstrap with weighting.ipynb
Created March 23, 2018 10:42
Bootstrap with weights
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.