This file contains 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 argparse | |
from collections import namedtuple as Namedtuple | |
class ArgumentParserDelegator(argparse.ArgumentParser): | |
'''Supports mutliple nested subparsers (structured parser) | |
A structured parser is one that supports multiple 'stages', or | |
'subcommands'. |
This file contains 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
#include <memory> | |
#include <vector> | |
int main(int argc, char** argv) { | |
// Create a unique pointer | |
auto a = std::make_unique<int>(argc); | |
// One can get a reference to its contents! | |
int const & b = *a; |
This file contains 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
# | |
# NOTE: Requires that you have run `python create_dataset.py` | |
# from https://github.com/stwunsch/tmva_mnist first. | |
# | |
import ROOT | |
from resnet import ResnetBuilder | |
# Setup TMVA |
This file contains 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
from __future__ import division | |
import six | |
from keras.models import Model | |
from keras.layers import ( | |
Input, | |
Reshape, | |
Activation, | |
Dense, | |
Flatten |
This file contains 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
# version 1 | |
def function_with_snake_case_and_long_name(fix_param1, fix_param2, | |
keyword_param1='some default', | |
keyword_param2='some other defualt'): | |
# TODO: Implement function body | |
pass | |
# version 2 | |
def function_with_snake_case_and_long_name( |
This file contains 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
void test() { | |
// === Provokes error | |
// root -l -q test.C | |
// or | |
// lldb -- root.exe -l -q test.C | |
// break set --name TH1::KolmogorovTest | |
const size_t NBINS = 200; |
This file contains 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
# Configuring and building ROOT | |
# | |
# The three lines for Python is to make cmake pick up the brew installation | |
# instead of the system one (important if you want to use pyROOT). | |
# Modify as you please. | |
# | |
cd /path/to/where/you/build/root | |
cmake /path/to/root/src \ |