Make sure you are subscribed to “Cloud Infrastructure” in CERN services: https://resources.web.cern.ch/resources/Manage/ListServices.aspx
Colormap is a way to convert some value with given range to RGB color.
There are multiple colormaps available in matplotlib package.
If you don't want to bring matplotlib's numerous dependencies with you, here is a simple solution, based on matplotlib data:
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 sys | |
import json | |
print sys.argv | |
from DIRAC.Core.Base import Script | |
Script.parseCommandLine( ignoreErrors = True ) | |
from LHCbDIRAC.BookkeepingSystem.Client.BookkeepingClient import BookkeepingClient | |
bk = BookkeepingClient() | |
#print bk.setRunAndProcessingPassDataQuality(158013 ,'/Real Data','OK') |
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 os | |
class u(str): | |
""" | |
Class to deal with urls concat. | |
""" | |
def __init__(self, url): | |
self.url = str(url) | |
def __add__(self, other): |
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
#include <stdio.h> | |
#define BUF_SIZE 256 | |
int main() | |
{ | |
char A[BUF_SIZE], B[BUF_SIZE], C[BUF_SIZE]; | |
scanf("%s %s %s", &A, &B , &C); |
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 sys | |
from multiprocessing import Pool | |
from random import random | |
def calculate_pi(iters): | |
""" Worker function """ | |
points = 0 # points inside circle |
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
TBranch *BDTBranch = new TBranch(); | |
BDTBranch = theTree->Branch("BDT_MVA", &BDT_MVA, "BDT_MVA/F"); | |
theTree->SetBranchAddress("Bctau",&TBctau); | |
theTree->SetBranchAddress("BmipCHI2PV",&TBmipCHI2PV); | |
theTree->SetBranchAddress("Mu1ipChi2BPV",&TMu1ipChi2BPV); | |
theTree->SetBranchAddress("Mu2ipChi2BPV",&TMu2ipChi2BPV); | |
theTree->SetBranchAddress("PipipChi2BPV",&TPipipChi2BPV); | |
theTree->SetBranchAddress("PimipChi2BPV",&TPimipChi2BPV); | |
theTree->SetBranchAddress("Bvchi2",&TBvchi2); |