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
| [ | |
| { | |
| "result": [ | |
| { | |
| "count": 23, | |
| "incident_category": "Other Request" | |
| }, | |
| { | |
| "count": 21, | |
| "incident_category": "Preventative Maintenance" |
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 collections | |
| def dict_merge(dct, merge_dct): | |
| """ Recursive dict merge. Inspired by :meth:``dict.update()``, instead of | |
| updating only top-level keys, dict_merge recurses down into dicts nested | |
| to an arbitrary depth, updating keys. The ``merge_dct`` is merged into | |
| ``dct``. | |
| :param dct: dict onto which the merge is executed | |
| :param merge_dct: dct merged into dct |
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
| from functools import reduce, partial | |
| from ast import literal_eval | |
| from math import * | |
| # make a function an infix operator | |
| class infix: | |
| def __init__(self, f): | |
| self.f = f | |
| def __or__(self, other): |