View LICENSE
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
MIT License | |
Copyright (c) 2020 Florian Schulze | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
View reset_mirror_names.py
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
from devpi_server.log import threadlog as log | |
from devpi_server.main import get_pluginmanager | |
from devpi_server.main import _main | |
import sys | |
def main(): | |
pm = get_pluginmanager() | |
pm.register(Plugin()) | |
_main(pm, sys.argv) |
View reindex_root_pypi.py
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
from devpi_common.types import ensure_unicode | |
from devpi_server.log import threadlog as log | |
from devpi_server.main import get_pluginmanager | |
from devpi_server.main import _main | |
from devpi_web.indexing import preprocess_project | |
from devpi_web.main import get_indexer | |
import sys | |
import time |
View db_compaction.py
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
from devpi_server.main import get_pluginmanager | |
from devpi_server.main import _main | |
import sys | |
def main(): | |
pm = get_pluginmanager() | |
pm.register(Plugin()) | |
_main(pm, sys.argv) |
View .coveragerc
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
[run] | |
plugins = | |
chameleon_coverage_plugin |
View devpi-pypi-warehouse.sh
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
devpi index -c root/warehouse type=mirror "mirror_web_url_fmt=https://pypi.org/project/{name}/" "mirror_url=https://pypi.org/simple/" title=Warehouse |
View iOS-32bit-finder.py
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
# run in a temporary folder to list 32 bit only iOS apps from your iTunes Library | |
from glob import glob | |
import os | |
import plistlib | |
import subprocess | |
import textwrap | |
import zipfile | |
ipas = glob(os.path.expanduser('~/Music/iTunes/Mobile Applications/*.ipa')) |
View failed_tests
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 python | |
import subprocess | |
def get_tests_from_paste_buffer(): | |
return subprocess.check_output('pbpaste') | |
def run(): | |
raw_tests = get_tests_from_paste_buffer() |
View main.py
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
from pkg_resources import resource_filename | |
from pyramid.events import subscriber | |
from pyramid.events import BeforeRender | |
def devpiserver_cmdline_run(xom): | |
# this is slightly hacky, because accessing the command line args like that | |
# is not part of the official API, but this is just for convenience | |
if xom.config.args.theme is None: | |
xom.config.args.theme = resource_filename('devpi_example_theme', 'theme') |
View gist:aca6e098b714951d7f43
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 datetime | |
import pytz | |
def testcase(tzinfo, dt, delta): | |
dt = dt.replace(tzinfo=tzinfo) | |
earlier = dt - delta | |
later = earlier + delta | |
assert dt == later |
NewerOlder