- Is UV the FUTURE of Python PACKAGING? 🐍📦, by Hynek Schlawack
- Which Python Package Manager Should You Use?
- How virtual environments work by Brett Cannon
# check.packages function: install and load multiple R packages. | |
# Check to see if packages are installed. Install them if they are not, then load them into the R session. | |
check.packages <- function(pkg){ | |
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
if (length(new.pkg)) | |
install.packages(new.pkg, dependencies = TRUE) | |
sapply(pkg, require, character.only = TRUE) | |
} | |
# Usage example |
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
from IPython.display import HTML | |
# Youtube | |
HTML('<iframe width="560" height="315" src="https://www.youtube.com/embed/S_f2qV2_U00?rel=0&controls=0&showinfo=0" frameborder="0" allowfullscreen></iframe>') | |
# Vimeo | |
HTML('<iframe src="https://player.vimeo.com/video/26763844?title=0&byline=0&portrait=0" width="700" height="394" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p><a href="https://vimeo.com/26763844">BAXTER DURY - CLAIRE (Dir Cut)</a> from <a href="https://vimeo.com/dannysangra">Danny Sangra</a> on <a href="https://vimeo.com">Vimeo</a>.</p>') |
import json | |
import pyhf | |
from pyhf.contrib.utils import download | |
import cabinetry | |
download("https://www.hepdata.net/record/resource/1935437?view=true", "bottom-squarks") | |
ws = pyhf.Workspace(json.load(open("bottom-squarks/RegionC/BkgOnly.json"))) | |
patchset = pyhf.PatchSet(json.load(open("bottom-squarks/RegionC/patchset.json"))) | |
ws = patchset.apply(ws, "sbottom_600_280_150") | |
cabinetry.workspace.save(ws, "bottom-squarks.json") |
Disclaimer: I wrote the packages language-latex2e
, autocomplete-latex
, latex-wordcount
, and hyperclick-latex
. I still try to provide a list of all useful packages though, so let me know if I have missed one.
This is a general guide for how to get started with LaTeX in Atom.
NOTE: This guide assumes you already have LaTeX installed on your computer. If you do not, I recommend TeX Live.
#!/bin/bash -e | |
# check for CMSSW environment | |
if [ -z "$CMSSW_BASE" ]; then | |
echo '$CMSSW_BASE not set' | |
exit 1 | |
fi | |
# check for python3 in actual CMSSW area | |
if ! (cd $CMSSW_BASE && scram tool info python3 >& /dev/null); then |