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
| body.rise-enabled div.prompt_container { | |
| background-color: red !important; | |
| } | |
| div#notebook { | |
| background-color: green !important; | |
| } |
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
| # coding: utf-8 | |
| """ | |
| Command to run the tasks: | |
| luigi --module progress_tasks TaskB --workers 2 | |
| """ | |
| import time | |
| import luigi |
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
| # coding: utf-8 | |
| import time | |
| import law | |
| def test_htcondor(): | |
| # load the htcondor contrib package, making all exported objects available under law.htcondor |
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
| /* | |
| * Performance test of the DeepJet model with both TensorFlow and ONNXRuntime. | |
| * Place this file into a cmssw test directory and add the following to the BuildFile.xml: | |
| * | |
| * <bin name="testTFDeepJetPerformance" file="testRunner.cpp,testDeepJetPerformance.cc"> | |
| * <use name="cppunit" /> | |
| * <use name="FWCore/Utilities" /> | |
| * <use name="PhysicsTools/TensorFlow" /> | |
| * <use name="PhysicsTools/ONNXRuntime" /> | |
| * </bin> |
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
| // custom TensorFlow ThreadPool implementations for CMSSW | |
| #include "tensorflow/core/lib/core/threadpool.h" | |
| #include "tbb/task_arena.h" | |
| #include "tbb/task_group.h" | |
| // thread pool that schedules all tasks within the caller thread | |
| class NoThreadPoolImpl : public tensorflow::thread::ThreadPoolInterface { | |
| public: |
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
| # coding: utf-8 | |
| import sys | |
| import gc | |
| import ctypes | |
| # configuration of Py_IncRef and Py_DecRef | |
| _c_inc_ref = ctypes.pythonapi.Py_IncRef |
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
| # coding: utf-8 | |
| """ | |
| This example demonstrates the usage of the LBN different approaches: | |
| - TF eager mode | |
| - TF AutoGraph | |
| - Keras model / layer | |
| """ | |
| import numpy as np |
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
| action() { | |
| local base="$( /bin/pwd )" | |
| git clone https://github.com/cms-sw/pkgtools.git | |
| git clone --single-branch --branch tf-2.0 https://github.com/riga/cmsdist.git | |
| ./pkgtools/cmsBuild -i tf-2.0 -c cmsdist/ --repository cms.week0 --arch slc7_amd64_gcc820 -j 10 build cmssw-tool-conf --no-cleanup | |
| export SCRAM_ARCH="slc7_amd64_gcc820" | |
| export CMSSW_VERSION="CMSSW_11_0_0_pre12" |
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
| # coding: utf-8 | |
| import os | |
| import tensorflow as tf | |
| def read_constant_graph(graph_path, create_session=True, as_text=False): | |
| graph = tf.Graph() | |
| with graph.as_default(): |
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
| # coding: utf-8 | |
| import os | |
| def fwlite_loop(path, handle_data=None, start=0, end=-1, object_type="Event"): | |
| """ | |
| Opens one or more ROOT files defined by *path* and yields the FWLite event. When *handle_data* | |
| is not *None*, it is supposed to be a dictionary ``key -> {"type": ..., "label": ...}``. In that |