magichour.api.local.util package¶
Subpackages¶
Submodules¶
magichour.api.local.util.log module¶
-
class
magichour.api.local.util.log.
HandlerInfo
(handler, level, formatter)¶ Bases:
tuple
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__
()¶ Exclude the OrderedDict from pickling
-
__repr__
()¶ Return a nicely formatted representation string
-
formatter
¶ Alias for field number 2
-
handler
¶ Alias for field number 0
-
level
¶ Alias for field number 1
-
-
magichour.api.local.util.log.
disable_logging
(*args, **kwargs)¶
-
magichour.api.local.util.log.
get_logger
(name, level=20, handler_infos=None)¶
-
magichour.api.local.util.log.
log_exc
(logger, msg, exc_type=<type 'exceptions.Exception'>)¶
-
magichour.api.local.util.log.
log_time
(f)¶
-
magichour.api.local.util.log.
run_once
(f)¶
magichour.api.local.util.modeleval module¶
magichour.api.local.util.modelgen module¶
-
magichour.api.local.util.modelgen.
event_is_subset
(not_subsets, candidate)¶
magichour.api.local.util.namedtuples module¶
-
class
magichour.api.local.util.namedtuples.
Event
(id, template_ids)¶ Bases:
tuple
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__
()¶ Exclude the OrderedDict from pickling
-
__repr__
()¶ Return a nicely formatted representation string
-
id
¶ Alias for field number 0
-
template_ids
¶ Alias for field number 1
-
-
class
magichour.api.local.util.namedtuples.
LogLine
(ts, text, processed, replacements, supportId)¶ Bases:
tuple
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__
()¶ Exclude the OrderedDict from pickling
-
__repr__
()¶ Return a nicely formatted representation string
-
processed
¶ Alias for field number 2
-
replacements
¶ Alias for field number 3
-
supportId
¶ Alias for field number 4
-
text
¶ Alias for field number 1
-
ts
¶ Alias for field number 0
-
-
class
magichour.api.local.util.namedtuples.
ModelEvalWindow
(start_time, end_time, timed_templates)¶ Bases:
tuple
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__
()¶ Exclude the OrderedDict from pickling
-
__repr__
()¶ Return a nicely formatted representation string
-
end_time
¶ Alias for field number 1
-
start_time
¶ Alias for field number 0
-
timed_templates
¶ Alias for field number 2
-
-
class
magichour.api.local.util.namedtuples.
ModelGenWindow
(template_ids)¶ Bases:
tuple
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__
()¶ Exclude the OrderedDict from pickling
-
__repr__
()¶ Return a nicely formatted representation string
-
template_ids
¶ Alias for field number 0
-
-
class
magichour.api.local.util.namedtuples.
Template
(id, match, str)¶ Bases:
tuple
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__
()¶ Exclude the OrderedDict from pickling
-
__repr__
()¶ Return a nicely formatted representation string
-
id
¶ Alias for field number 0
-
match
¶ Alias for field number 1
-
str
¶ Alias for field number 2
-
-
class
magichour.api.local.util.namedtuples.
TimedEvent
(start_time, end_time, event_id)¶ Bases:
tuple
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__
()¶ Exclude the OrderedDict from pickling
-
__repr__
()¶ Return a nicely formatted representation string
-
end_time
¶ Alias for field number 1
-
event_id
¶ Alias for field number 2
-
start_time
¶ Alias for field number 0
-
-
class
magichour.api.local.util.namedtuples.
TimedTemplate
(ts, template_id)¶ Bases:
tuple
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__
()¶ Exclude the OrderedDict from pickling
-
__repr__
()¶ Return a nicely formatted representation string
-
template_id
¶ Alias for field number 1
-
ts
¶ Alias for field number 0
-
-
class
magichour.api.local.util.namedtuples.
Transform
(id, type, name, transform, compiled)¶ Bases:
tuple
-
__getnewargs__
()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__
()¶ Exclude the OrderedDict from pickling
-
__repr__
()¶ Return a nicely formatted representation string
-
compiled
¶ Alias for field number 4
-
id
¶ Alias for field number 0
-
name
¶ Alias for field number 2
-
transform
¶ Alias for field number 3
-
type
¶ Alias for field number 1
-
magichour.api.local.util.pickl module¶
-
magichour.api.local.util.pickl.
read_pickle_file
(pickle_file)¶
-
magichour.api.local.util.pickl.
write_pickle_file
(data, pickle_file)¶
magichour.api.local.util.tfidf module¶
-
magichour.api.local.util.tfidf.
idf
(elem, elemss)¶
-
magichour.api.local.util.tfidf.
tf
(elem, elems)¶
-
magichour.api.local.util.tfidf.
tf_idf
(elem, elems, elemss)¶
-
magichour.api.local.util.tfidf.
tf_idf_filter
(elemss, threshold)¶
magichour.api.local.util.window module¶
-
magichour.api.local.util.window.
window
(timed_templates, window_size=60, remove_junk_drawer=False, template_ids_only=False)¶