Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Namespaces | Functions
python.ext Namespace Reference

Namespaces

 lsprofcalltree
 
 silence
 
 table_printer
 
 thousands
 

Functions

def tally (stuff)
 

Function Documentation

◆ tally()

def python.ext.tally (   stuff)
From python thread http://mail.python.org/pipermail/python-dev/2006-April/063462.html
Subject: [Python-Dev] tally (and other accumulators)

Definition at line 4 of file DataQuality/DQUtils/python/ext/__init__.py.

4 def tally(stuff):
5  """
6  From python thread http://mail.python.org/pipermail/python-dev/2006-April/063462.html
7  Subject: [Python-Dev] tally (and other accumulators)
8  """
9  accumulator = defaultdict(int)
10  for element in stuff:
11  accumulator[element] += 1
12  return sorted(accumulator.iteritems())
13 
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename R::value_type > sorted(const R &r, PROJ proj={})
Helper function to create a sorted vector from an unsorted range.
python.ext.tally
def tally(stuff)
Definition: DataQuality/DQUtils/python/ext/__init__.py:4