This file contains 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
/** | |
* rabbithole.js | |
* | |
* There are 100 holes, all in a row, and a long tunnel connecting them. | |
* A rabbit lives down there, and you're trying to catch him. | |
* The rabbit starts down 1 one of the holes, but you don't know which. | |
* Every time you look down into a hole the rabbit moves. | |
* But he only moves one hole -- either left or right. | |
* How can you find the rabbit? And how long will it take? | |
* |
This file contains 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 json | |
import re | |
data = """ | |
{TopicPartition(topic='policy_result', partition=0): | |
[ConsumerRecord(topic='policy_result', partition=0, | |
offset=3, timestamp=1642648776263, timestamp_type=0, | |
key=b'1', | |
value=b'\n$02c144aa-6ca7-49c0-afb8-4276dbd93705\x12\x0fTest Automation\x1a\x0bPolicyEvent \x03*\xb4\x01\n(type.googleapis.com/common.entity.Policy\x12\x87\x01\x08\x83\x03\x12$febcda78-33be-4272-854e-371b85213086\x18\x01*\rsimple-alwaysZIAuthority company shake yard play. No kid after ahead source fish decide.`\x010\x03', headers=[], checksum=None, serialized_key_size=1, serialized_value_size=255, serialized_header_size=-1)]} | |
""" |