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 <fstream> | |
#include <map> | |
#include <boost/archive/binary_oarchive.hpp> | |
#include <boost/archive/binary_iarchive.hpp> | |
#include <boost/serialization/map.hpp> | |
int main() { | |
std::ofstream ofs("dead_pixels.archive", std::ios::binary); |
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
The big velo tidy |
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
inline void channel_neighbours(const LHCb::VPChannelID& seedChannel, | |
Pix* adjecent, | |
std::bitset<9>& adjecent_set) { | |
// Loop over the possible positions in the 3x3 cluster | |
// around the seedChannel | |
int pixY = (seedChannel).pixel_hp(); | |
int pixX = (seedChannel).pixel_lp(); | |
int chip = (seedChannel).chip(); | |
// hardcoded for the compact VP design | |
// number of chips in a ladder and |
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
std::vector<std::function<Matrix5d()>> covariances; | |
for (int i(0); i<10000000; ++i) { | |
// delay calculation by sending back a lambda | |
//r3 += m*c*m.transpose(); | |
covariances.push_back([=]() {return m*c*m.transpose();}); | |
} | |
for (auto fun: covariances) { | |
if (rand.Rndm() > 0.75) { | |
r3 += fun(); | |
} |
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 collections import namedtuple | |
from pprint import pprint | |
import numpy as np | |
np.random.seed(12345) | |
import matplotlib.pyplot as plt | |
Appointment = namedtuple("Appointment", "scheduled late_by emergency") |
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 random | |
random.seed(12345) | |
class Dice(object): | |
def __init__(self, sides=6): | |
print "creating a dice with %i sides."%sides | |
self.sides = sides |
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
# All sorts of stuff for setting up the Forward tracking | |
# itneresting stuff towards the bottom | |
FstForward = PrForwardTracking("FstForward") | |
FstForward.InputName = self.getProp("RootInTES") + "Track/VeloUTFst" | |
FstForward.OutputName = self.getProp("RootInTES") + "Track/Forward" | |
FstForward.addTool(PrForwardTool) | |
FstForward.PrForwardTool.AddUTHitsToolName = "" | |
# Now with the momentum estimate FstForward.PrForwardTool.UseMomentumEstimate = True | |
# MinPt determines the size of the search window, set # this to the lowest pT you want to be able to find |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 collections import namedtuple | |
Infos = namedtuple('Infos', ["bias"," threshold", "alignment"]) | |
# information about runs 1234 and 1235 | |
run_info = {1234: Infos(12.3, 2., 42.), | |
1235: Infos(12.2, 2.1, 42.3)} | |
# retrieve it | |
print run_info[1234] |
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
$ git clone https://github.com/scikit-learn/scikit-learn.git | |
$ git remote add pprett https://github.com/pprett/scikit-learn.git | |
$ git remote add ndawe https://github.com/ndawe/scikit-learn.git | |
$ git fetch | |
$ git checkout -b weighted_scores ndawe/weighted_scores | |
$ git rebase master | |
$ git checkout master | |
$ git merge weighted_scores | |
$ git checkout -b gbrt-sample-weight pprett/gbrt-sample-weight | |
$ git rebase master |
OlderNewer