[Commotion-admin] [mlab-observatory] Adding sample checking module, Telescope data parser (#29)

mtlynch notifications at github.com
Wed Dec 10 11:07:54 EST 2014


> +import aggregate
> +import telescope_data_parser
> +
> +
> +def setup_logger():
> +  logger = logging.getLogger('prepare-for-server')
> +  console_handler = logging.StreamHandler()
> +  logger.addHandler(console_handler)
> +  logger.setLevel(logging.INFO)
> +
> +
> +class SampleCounter(object):
> +  """Tracks the number of samples per day in a collection of datasets."""
> +
> +  def __init__(self):
> +    self.sample_counts = {}

Cool, I didn't know about `defaultdict`. Good tip!

---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/mlab-observatory/pull/29/files#r21613082
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20141210/484a6e7c/attachment.html>


More information about the Commotion-admin mailing list