Skip to content

Instantly share code, notes, and snippets.

@postpostscript
postpostscript / deep_extend.py
Created March 23, 2023 18:27
deep_extend.py
def deep_extend(base, arg):
if not (isinstance(base, dict) and isinstance(arg, dict)):
return arg
return dict([
*base.items(),
*map(
lambda item: (
item[0],
deep_extend(base.get(item[0], None), item[1])),
function useOmniboxQuery() {
const query = ref<string>();
type EventConfig<T extends (...args: any[]) => any> = [
bus: Events.Event<T>,
listener: T
];
const omniboxListeners: EventConfig<any>[] = [
[