Matthew Martin β β
π on Nostr: HBN (repr + write to .py file + import + reload module) : 9.7 seconds WOW. This ...
HBN (repr + write to .py file + import + reload module) : 9.7 seconds
WOW. This stupid hack is 2x faster than ast.literal_eval, eval and exec!
#python
Published at
2023-08-12 16:21:46Event JSON
{
"id": "7b019e369ec4a7fda30567b62d86b02756cc60b1c3b09ee468433a48722f87dc",
"pubkey": "ece51acfc6c84a5f625a755bed921f6eac6a9daa6f90817047901dbe0231522f",
"created_at": 1691857306,
"kind": 1,
"tags": [
[
"e",
"c9f8478a54ef29e304751950cd6d3fc1051ac54c03109d84a816958ba02b70a7",
"wss://relay.mostr.pub",
"reply"
],
[
"t",
"python"
],
[
"proxy",
"https://mastodon.social/users/mistersql/statuses/110877560457019969",
"activitypub"
]
],
"content": "HBN (repr + write to .py file + import + reload module) : 9.7 seconds\n\nWOW. This stupid hack is 2x faster than ast.literal_eval, eval and exec!\n\n#python",
"sig": "6ef7a4a6c236a0b868169515002d03517f7cc05bbe0fddc22b4590b1053b2929933f7ad65051f17cbe7d94e35887e5912b7cd67e65a5e09b875a4240ab5254cd"
}