Skip to content

Instantly share code, notes, and snippets.

@ak1211
Created March 2, 2016 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ak1211/72787235c64f7e4501c7 to your computer and use it in GitHub Desktop.
Save ak1211/72787235c64f7e4501c7 to your computer and use it in GitHub Desktop.
覚えておいた開始ログ,終了ログの対応関係を調べる
for start in start_session_logs:
term = next(itertools.ifilter(lambda it:it["DateTime"] >= start["DateTime"] and it["IP"] == start["IP"], terminate_session_logs), None)
if term:
start["terminate log"] = term
term["start log"] = start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment