Skip to content

Instantly share code, notes, and snippets.

@JAlexoid
Created March 27, 2013 17:30
Show Gist options
  • Save JAlexoid/5256357 to your computer and use it in GitHub Desktop.
Save JAlexoid/5256357 to your computer and use it in GitHub Desktop.
def find_sms(number, number_to, time_start, time_end):
for entry in source:
if (entry.type == "sms" and
entry.number == number and
entry.number_to == number_to and
entry.time > time_start and
entry.time < time_end) :
return entry
for entry in source :
if entry.type == "call":
sms = find_sms(entry.number,
entry.number_to,
entry.time,
entry.time + 5*60)
if sms != None:
found_items.append(entry+sms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment