Matplotlib is a plotting library. It relies on some backend to actually render
the plots. The default backend is the agg backend. This backend only renders
PNGs. On Jupyter notebooks the matplotlib backends are special as they are
rendered to the browser. Generally you will not need to explicitly set the
backend on a Jupyter notebook. This does introduce a discrepancy between code
that runs in Jupyter and code that runs as a script natively in the Python
interpreter. So you need to understand that the 2 environments are not the same
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ... Other .zshrc contents above | |
| function cursor() { | |
| /opt/cursor.appimage --no-sandbox "$@" >/dev/null 2>&1 & | |
| } | |
| # I used the default settings in the cursor install script here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
| <script src="http://cmx.io/v/0.1/cmx.js"></script> | |
| <body> | |
| <div style="max-width:1800px; -webkit-transform:rotate(0deg)"> | |
| <scene id="scene1" height="400" width="400"> | |
| <label t="translate(0,400)"> | |
| <tspan x="0" y="0em">SM Neutrinos are massless</tspan> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Default termtype. If the rcfile sets $TERM, that overrides this value. | |
| set -g default-terminal screen-256color | |
| # support logging out and back in | |
| set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION" | |
| # pbcopy support | |
| set-option -g default-command "reattach-to-user-namespace -l bash" | |
| # vi mode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0) You can get the complete tutorial about CRAB3 | |
| https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookCRAB3Tutorial (UPDATED TWIKI PAGE) | |
| For impatient users, a cheat-sheet is available | |
| https://twiki.cern.ch/twiki/bin/viewauth/CMS/CRAB3CheatSheet | |
| 1) login to lxplus SLC6 machine by doing | |
| ssh -Y [email protected] | |
| 2) source LCG GRID UI by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import uproot4, uproot | |
| import awkward1 as ak | |
| import numba as nb | |
| from uproot3_methods import TLorentzVectorArray, TLorentzVector | |
| import os | |
| import feather | |
| import numpy as np | |
| import boost_histogram as bh | |
| import matplotlib.pyplot as plt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import FWCore.ParameterSet.Config as cms | |
| externalLHEProducer = cms.EDProducer("ExternalLHEProducer", | |
| args = cms.vstring("/home/stqian/gridpack/herwig_dyellell012j_5f_NLO_FXFX_slc6_amd64_gcc630_CMSSW_9_3_16_tarball.tar.xz"), | |
| nEvents = cms.untracked.uint32(5000), | |
| numberOfParameters = cms.uint32(1), | |
| outputFile = cms.string('cmsgrid_final.lhe'), | |
| scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh') | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Helper module for displaying ROOT canvases in ipython notebooks | |
| Usage example: | |
| # Save this file as rootnotes.py to your working directory. | |
| import rootnotes | |
| c1 = rootnotes.default_canvas() | |
| fun1 = TF1( 'fun1', 'abs(sin(x)/x)', 0, 10) | |
| c1.SetGridx() |