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
#!/usr/bin/env bash | |
# Builds mpv & mpv.app on Apple silicon Macs. | |
# Run this script from the root directory of the mpv repo. | |
# if anything fails, gtfo | |
set -ex | |
meson setup build | |
meson compile -C build |
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
# based on https://gist.github.com/asfaltboy/b3e6f9b5d95af8ba2cc46f2ba6eae5e2 | |
# based on https://gist.github.com/blueyed/4fb0a807104551f103e6 | |
from django.db import connection | |
from django.db.migrations.executor import MigrationExecutor | |
from django.core.management import call_command | |
import pytest | |
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
def elem2dict(node): | |
""" | |
Convert an lxml.etree node tree into a dict. | |
""" | |
d = {} | |
for e in node.iterchildren(): | |
key = e.tag.split('}')[1] if '}' in e.tag else e.tag | |
value = e.text if e.text else elem2dict(e) | |
d[key] = value | |
return d |