Skip to content

Instantly share code, notes, and snippets.

def find(key, dictionary):
if isinstance(dictionary, list):
for item in dictionary:
for result in find(key, item):
yield result
elif isinstance(dictionary, dict):
for k, v in dictionary.iteritems():
if k == key:
yield v
for result in find(key, v):
@neilsh
neilsh / clientx.py
Created March 31, 2023 22:31 — forked from gawel/clientx.py
Locust http2 client
# for HTTP/2 support in locust
# https://github.com/locustio/locust/issues/264
# https://gist.github.com/gawel/f48e577425f872e1a81028f3f53353cf#file-clientx-py
# has modifications to support breaking changes from locust 2.15.0
import re
import time
from locust import User
from locust.exception import LocustError
import httpx