This file contains hidden or 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
# retrieve all the oslo projects url by using openstack/governance | |
# https://github.com/openstack/governance | |
# first install niet | |
# pip install niet | |
niet "oslo.deliverables.*[repos][0]" governance/reference/projects.yaml | |
niet "oslo.deliverables.*[repos][0][0]" governance/reference/projects.yaml -f ifs | |
# openstack/automaton openstack/castellan openstack/cookiecutter openstack/debtcollector openstack/devstack-plugin-amqp1 openstack/devstack-plugin-kafka openstack/devstack-plugin-pika openstack/devstack-plugin-zmq openstack/futurist openstack/mox3 openstack/oslo-cookiecutter openstack/oslo-specs openstack/oslo.cache openstack/oslo.concurrency openstack/oslo.config openstack/oslo.context openstack/oslo.db openstack/oslo.i18n openstack/oslo.limit openstack/oslo.log openstack/oslo.messaging openstack/oslo.middleware openstack/oslo.policy openstack/oslo.privsep openstack/oslo.reports openstack/oslo.rootwrap openstack/oslo.serialization openstack/oslo.service openstack/oslo.tools openstack/oslo.upgradecheck openstac |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
enable_env() { | |
local env_name="$1" | |
local env_dir=".tox/${env_name}" | |
if [ ! -d "${env_dir}" ]; then | |
if [ ! -f tox.ini ]; then | |
echo 'No tox.ini found' >&2 |
This file contains hidden or 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 logging | |
from oslo_service import service | |
from oslo_config import cfg | |
import pdb | |
import traceback | |
import os | |
import time |
This file contains hidden or 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 eventlet | |
import threading | |
eventlet.monkey_patch() | |
print(threading.current_thread.__module__) | |
# Will print "eventlet.green.threading" | |
assert threading.current_thread.__module__ == 'threading' | |
# Will raise the following assertion error: | |
# Traceback (most recent call last): |
This file contains hidden or 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 eventlet | |
eventlet.monkey_patch() | |
if eventlet.patcher.is_monkey_patched("thread"): | |
print("Patched") | |
threading = eventlet.patcher.original("threading") | |
else: | |
print("Not Patched") | |
import threading |
This file contains hidden or 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
# So interestingly, Signature seems to be twice as fast in Python 3.6 and 3.7 as it | |
# was in Python 3.3 and 3.4. However, it is still 6-18 times slower than the old | |
# getargspec or getfullargspec that was in Python 3.3. | |
Python 2.7 getargspec (doesn't use Signature) : specimen_one (6 args) : 0.0503 | |
Python 2.7 getargspec (doesn't use Signature) : specimen_two (0 args) : 0.0496 | |
Python 2.7 getargspec (doesn't use Signature) : specimen_three (6 args) : 0.0500 | |
Python 2.7 getargspec (doesn't use Signature) : specimen_four (13 args) : 0.0652 | |
Python 3.3 getfullargspec (doesn't use Signature) : specimen_one (6 args) : 0.0539 |
This file contains hidden or 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
projects: | |
automaton: | |
Summary: a framework for building state machines. | |
Proposal: https://review.openstack.org/#/c/141961/ | |
Source: http://git.openstack.org/cgit/openstack/automaton | |
Bugs: https://bugs.launchpad.net/automaton | |
Core: https://review.openstack.org/#/admin/groups/106,members | |
Documentation: http://docs.openstack.org/developer/automaton/ | |
Github: https://github.com/openstack/automaton | |
castellan: |
This file contains hidden or 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
./tools/trigger-job.py --job periodic-foobar-proposal --project dev/foobar --pipeline periodic --url https://zuul.example.org/p --logpath /dev/null --newrev refs/heads/master --refname refs/heads/master |
This file contains hidden or 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
threads = [ | |
"", | |
"1111111111111-thread1-base ", | |
"1111111111111-thread2-base ", | |
"1111111111111-thread3-very-long ", | |
"1111111111111-short ", | |
"1111111111111-thread4-base ", | |
"1111111111111-thread3-very-long-long ", | |
"1111111111111-short ", | |
"1111111111111-thread5-base ", |
This file contains hidden or 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
cd /tmp | |
mkdir keystone | |
pipenv shell | |
pip install keystone | |
pypath=$(dirname $(which python) | sed 's/bin/lib/g') | |
grep -ri ${mypath} -e subprocess -exclude-dir="*/__pycache__" | grep import | more |