instruction stringlengths 18 2.94k | input stringlengths 0 2.17k | output stringlengths 47 3.36k |
|---|---|---|
Declare queues when broker is instantiated
| """
sentry.queue.client
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from kombu import BrokerConnection
from kombu.common import maybe_declare
from kombu.pools import producers
from sentry.conf import settings
from sentry.q... | """
sentry.queue.client
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from kombu import BrokerConnection
from kombu.common import maybe_declare
from kombu.pools import producers
from sentry.conf import settings
from sentry.q... |
Fix interpretation of parameters for names list modification
| from txircd.modbase import Mode
class InvisibleMode(Mode):
def namesListEntry(self, recipient, channel, user, representation):
if channel not in recipient.channels and "i" in user.mode:
return ""
return representation
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
def spawn(self):
r... | from txircd.modbase import Mode
class InvisibleMode(Mode):
def namesListEntry(self, recipient, channel, user, representation):
if channel.name not in recipient.channels and "i" in user.mode:
return ""
return representation
class Spawner(object):
def __init__(self, ircd):
self.ircd = ircd
def spawn(self)... |
Include data files in built package
| # !/usr/bin/env python
from setuptools import setup, find_packages
setup(name='symbtrsynthesis',
version='1.0.1-dev',
description='An (adaptive) synthesizer for SymbTr-MusicXML scores',
author='Hasan Sercan Atli',
url='https://github.com/hsercanatli/symbtrsynthesis',
packages=find_packag... | # !/usr/bin/env python
from setuptools import setup, find_packages
setup(name='symbtrsynthesis',
version='1.0.1-dev',
description='An (adaptive) synthesizer for SymbTr-MusicXML scores',
author='Hasan Sercan Atli',
url='https://github.com/hsercanatli/symbtrsynthesis',
packages=find_packag... |
Increment minor version and set up for git flow
| try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'TRX',
'author': 'Kyle Maxwell, based on Paterva\'s library',
'url': 'https://github.com/krmaxwell/TRX',
'download_url': 'https://github.com/krmaxwell/TRX',
'author_email': 'krma... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'TRX',
'author': 'Kyle Maxwell, based on Paterva\'s library',
'url': 'https://github.com/krmaxwell/TRX',
'download_url': 'https://github.com/krmaxwell/TRX',
'author_email': 'krma... |
Use `open` instead of `file` for compatibility
|
import os
from setuptools import setup, find_packages
VERSION = '1.4.5'
setup(
namespace_packages = ['tiddlywebplugins'],
name = 'tiddlywebplugins.atom',
version = VERSION,
description = 'A TiddlyWeb plugin that provides an Atom feed of tiddler collections.',
long_description... |
import os
from setuptools import setup, find_packages
VERSION = '1.4.5'
setup(
namespace_packages = ['tiddlywebplugins'],
name = 'tiddlywebplugins.atom',
version = VERSION,
description = 'A TiddlyWeb plugin that provides an Atom feed of tiddler collections.',
long_description... |
Set 0.1.1 as minimum version of loam
| from setuptools import setup
with open('README.rst') as rdm:
README = rdm.read()
setup(
name='qjobs',
use_scm_version=True,
description='Get a clean and flexible output from qstat',
long_description=README,
url='https://github.com/amorison/qjobs',
author='Adrien Morison',
author_ema... | from setuptools import setup
with open('README.rst') as rdm:
README = rdm.read()
setup(
name='qjobs',
use_scm_version=True,
description='Get a clean and flexible output from qstat',
long_description=README,
url='https://github.com/amorison/qjobs',
author='Adrien Morison',
author_ema... |
Change version number for new pypi image
|
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# typing library was introduced as a core module in version 3.5.0
requires = ["dirlistproc", "jsonasobj", "rdflib", "rdflib-jsonld"]
if sys.version_info < (3, 5):
requires.append("typing")
setup(
name='S... |
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# typing library was introduced as a core module in version 3.5.0
requires = ["dirlistproc", "jsonasobj", "rdflib", "rdflib-jsonld"]
if sys.version_info < (3, 5):
requires.append("typing")
setup(
name='S... |
Remove plain 'django-admin-sortable' from requirements
This is only required to test migrations, not for new installs.
| # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from aldryn_faq import __version__
REQUIREMENTS = [
'aldryn-apphooks-config',
'aldryn-reversion',
'aldryn-search',
'django-admin-sortable',
'django-admin-sortable2>=0.5.0',
'django-parler',
'django-sortedm2m',
]
CLASSIFIER... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from aldryn_faq import __version__
REQUIREMENTS = [
'aldryn-apphooks-config',
'aldryn-reversion',
'aldryn-search',
# 'django-admin-sortable',
'django-admin-sortable2>=0.5.0',
'django-parler',
'django-sortedm2m',
]
CLASSIFI... |
Update outdated link to repository, per @cknv
| import os
import sys
from distutils.core import setup
if sys.version_info < (3,):
print('\nSorry, but Adventure can only be installed under Python 3.\n')
sys.exit(1)
README_PATH = os.path.join(os.path.dirname(__file__), 'adventure', 'README.txt')
with open(README_PATH, encoding="utf-8") as f:
README_TEXT ... | import os
import sys
from distutils.core import setup
if sys.version_info < (3,):
print('\nSorry, but Adventure can only be installed under Python 3.\n')
sys.exit(1)
README_PATH = os.path.join(os.path.dirname(__file__), 'adventure', 'README.txt')
with open(README_PATH, encoding="utf-8") as f:
README_TEXT ... |
Remove dev indentifier; crank Development Status; updated URL to point to project page
| from setuptools import setup
setup(
name='kf5py',
py_modules = ['kf5py'],
version='0.1.dev5',
author='Chris Teplovs',
author_email='dr.chris@problemshift.com',
url='https://github.com/problemshift/kf5py',
license='LICENSE.txt',
description='Python-based utilities for KF5.',
install_... | from setuptools import setup
setup(
name='kf5py',
py_modules = ['kf5py'],
version='0.1.0',
author='Chris Teplovs',
author_email='dr.chris@problemshift.com',
url='http://problemshift.github.io/kf5py/',
license='LICENSE.txt',
description='Python-based utilities for KF5.',
install_requ... |
Fix long description format to be markdown
| #! /usr/bin/env python
from setuptools import setup
import re
from os import path
version = ''
with open('cliff/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_... | #! /usr/bin/env python
from setuptools import setup
import re
from os import path
version = ''
with open('cliff/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_... |
Include static subdirectories in package
| """
Favien
======
Network canvas community.
"""
from setuptools import setup
setup(
name='Favien',
version='dev',
url='https://github.com/limeburst/favien',
author='Jihyeok Seo',
author_email='me@limeburst.net',
description='Network canvas community',
long_description=__doc__,
zip_sa... | """
Favien
======
Network canvas community.
"""
from setuptools import setup
setup(
name='Favien',
version='dev',
url='https://github.com/limeburst/favien',
author='Jihyeok Seo',
author_email='me@limeburst.net',
description='Network canvas community',
long_description=__doc__,
zip_sa... |
Install the proper version of Django
| #!/usr/bin/env python
from subprocess import check_call, CalledProcessError
from setuptools import setup
def convert_readme():
try:
check_call(["pandoc", "-f", "markdown_github", "-t",
"rst", "-o", "README.rst", "README.md"])
except (OSError, CalledProcessError):
return o... | #!/usr/bin/env python
from subprocess import check_call, CalledProcessError
from setuptools import setup
import six
requirements = ['setuptools', 'mongoengine>=0.10.0']
if six.PY3:
requirements.append('django')
else:
requirements.append('django<2')
def convert_readme():
try:
check_call(["pand... |
Include kafka-check, bump to v0.2.6
| from setuptools import setup
from setuptools import find_packages
from yelp_kafka_tool import __version__
setup(
name="yelp-kafka-tool",
version=__version__,
author="Distributed systems team",
author_email="team-dist-sys@yelp.com",
description="Kafka management tools",
packages=find_packages(... | from setuptools import setup
from setuptools import find_packages
from yelp_kafka_tool import __version__
setup(
name="yelp-kafka-tool",
version=__version__,
author="Distributed systems team",
author_email="team-dist-sys@yelp.com",
description="Kafka management tools",
packages=find_packages(... |
Enable module to be compiled with msvc and gcc compilers
| from setuptools import setup, Extension
import numpy
ext_modules=[
Extension(
"heat_diffusion_experiment.cython_versions",
["heat_diffusion_experiment/cython_versions.pyx"],
language='c++',
extra_compile_args=['/openmp'],
# extra_link_args=['/openmp'],
),
]
... | from setuptools import setup, Extension
import numpy
import sys
if sys.platform == 'linux'
extra_compile_args = ['-fopenmp'
extra_link_args = ['-fopenmp']
else:
extra_compile_args = ['-/openmp']
extra_link_args = ['-/openmp']
ext_modules=[
Extension(
"heat_diffusion_experi... |
Add pykqml dependency lower limit
| from setuptools import setup, find_packages
def main():
setup(name='bioagents',
version='0.0.1',
description='Biological Reasoning Agents',
long_description='Biological Reasoning Agents',
author='Benjamin Gyori',
author_email='benjamin_gyori@hms.harvard.edu',
... | from setuptools import setup, find_packages
def main():
setup(name='bioagents',
version='0.0.1',
description='Biological Reasoning Agents',
long_description='Biological Reasoning Agents',
author='Benjamin Gyori',
author_email='benjamin_gyori@hms.harvard.edu',
... |
BLD: Use PEP 508 version markers.
So that environment tooling, e.g. `pipenv` can use the python version markers
when determining dependencies.
| #!/usr/bin/env python
from setuptools import setup, find_packages
import sys
long_description = ''
if 'upload' in sys.argv:
with open('README.rst') as f:
long_description = f.read()
def extras_require():
return {
'test': [
'tox>=2.0',
'pytest>=2.8.5',
'pyt... | #!/usr/bin/env python
from setuptools import setup, find_packages
import sys
long_description = ''
if 'upload' in sys.argv:
with open('README.rst') as f:
long_description = f.read()
def extras_require():
return {
'test': [
'tox>=2.0',
'pytest>=2.8.5',
'pyt... |
[python] Add some paths where to find test binary
Adds /usr/lib/debug early to list, as some systems (debian) have unstripped libs in there
Adds /lib/i386-linux-gnu for systems that does multiarch (debian)
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@153174 91177308-0d34-0410-b5e6-96231b3b80d8
| import os.path
import unittest
POSSIBLE_TEST_BINARIES = [
'libreadline.so.5',
'libreadline.so.6',
]
POSSIBLE_TEST_BINARY_PATHS = [
'/lib',
'/usr/lib',
'/usr/local/lib',
]
class TestBase(unittest.TestCase):
def get_test_binary(self):
"""Helper to obtain a test binary for object file te... | import os.path
import unittest
POSSIBLE_TEST_BINARIES = [
'libreadline.so.5',
'libreadline.so.6',
]
POSSIBLE_TEST_BINARY_PATHS = [
'/usr/lib/debug',
'/lib',
'/usr/lib',
'/usr/local/lib',
'/lib/i386-linux-gnu',
]
class TestBase(unittest.TestCase):
def get_test_binary(self):
"""... |
Change task to create a taskHistory object
| # -*- coding: utf-8 -*-
from dbaas.celery import app
from util.decorators import only_one
from models import CeleryHealthCheck
#from celery.utils.log import get_task_logger
#LOG = get_task_logger(__name__)
import logging
LOG = logging.getLogger(__name__)
@app.task(bind=True)
def set_celery_healthcheck_last_update... | # -*- coding: utf-8 -*-
from dbaas.celery import app
from util.decorators import only_one
from models import CeleryHealthCheck
from notification.models import TaskHistory
import logging
LOG = logging.getLogger(__name__)
@app.task(bind=True)
@only_one(key="celery_healthcheck_last_update", timeout=20)
def set_celery_... |
Add Error Message To Server
| # Copyright 2015, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
# law or agreed to in writing, software d... | # Copyright 2015, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
# law or agreed to in writing, software d... |
Update regression test for variable-length pattern problem in the matcher.
| '''
Test Matcher matches with '*' operator and Boolean flag
'''
from __future__ import unicode_literals
import pytest
from ...matcher import Matcher
from ...vocab import Vocab
from ...attrs import LOWER
from ...tokens import Doc
@pytest.mark.xfail
def test_issue850():
matcher = Matcher(Vocab())
IS_ANY_TOKEN ... | '''
Test Matcher matches with '*' operator and Boolean flag
'''
from __future__ import unicode_literals
from __future__ import print_function
import pytest
from ...matcher import Matcher
from ...vocab import Vocab
from ...attrs import LOWER
from ...tokens import Doc
def test_basic_case():
matcher = Matcher(Vocab... |
Fix error in loading trees
Former-commit-id: 6fda03a47c5fa2d65c143ebdd81e158ba5e1ccda | #! /usr/bin/env python3
import os
import shutil
import datetime
import sys
import argparse
from ete3 import Tree
import logging
DEFAULT_FORMAT = 1
class TreeIndex:
def __init__(self,tree_newick_fn,format=DEFAULT_FORMAT):
self.tree_newick_fn=tree_newick_fn
self.tree=read_newick(tree_newick_fn,format=format)
... | #! /usr/bin/env python3
import os
import shutil
import datetime
import sys
from ete3 import Tree
DEFAULT_FORMAT = 1
class TreeIndex:
def __init__(self,tree_newick_fn,format=DEFAULT_FORMAT):
self.tree_newick_fn=tree_newick_fn
self.tree=Tree(tree_newick_fn,format=format)
def process_node(self,node):
if node... |
Load user from migration registry when creating system user
Always load models from the registry in migration files.
I hate the idea of touching a migration already released, but
this one prevents us from adding new properties to User.
If we load the User directly (not from registry) when creating
the user model, we'l... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth import get_user_model
from django.db import migrations
def add_user(*args):
User = get_user_model()
User(serial='__system__', full_name='System', password='!!').save()
class Migration(migrations.Migration):
depend... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def add_user(apps, *args):
User = apps.get_model('ideascube', 'User')
User(serial='__system__', full_name='System', password='!!').save()
class Migration(migrations.Migration):
dependencies = [
('i... |
Break out dispatch, and drop prepare. Easier testing
|
from .request import Request
from .response import Response, response
import logging
log = logging.getLogger()
class View:
def __call__(self, event, context):
request = Request(event, context)
resp = self.prepare(request)
if resp:
return resp
kwargs = event.get('path... |
from .request import Request
from .response import Response, response
import logging
log = logging.getLogger()
class View:
def __call__(self, event, context):
kwargs = event.get('pathParameters') or {}
self.dispatch(request, **kwargs)
def dispatch(self, request, **kwargs):
func = g... |
Fix tf session not being set as default
| from ..kernel import Kernel
from scannerpy import DeviceType
import tensorflow as tf
class TensorFlowKernel(Kernel):
def __init__(self, config):
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
visible_device_list = []
... | from ..kernel import Kernel
from scannerpy import DeviceType
import tensorflow as tf
class TensorFlowKernel(Kernel):
def __init__(self, config):
# If this is a CPU kernel, tell TF that it should not use
# any GPUs for its graph operations
cpu_only = True
visible_device_list = []
... |
migrations: Fix zulipinternal migration corner case.
It's theoretically possible to have configured a Zulip server where
the system bots live in the same realm as normal users (and may have
in fact been the default in early Zulip releases? Unclear.). We
should handle these without the migration intended to clean up ... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
def rename_zulip_realm_to_zulipinternal(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> Non... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
def rename_zulip_realm_to_zulipinternal(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> Non... |
Return project ordered by date
| import sys
from flask import Flask, render_template
from flask_flatpages import FlatPages
from flask_frozen import Freezer
DEBUG = True
FLATPAGES_AUTO_RELOAD = DEBUG
FLATPAGES_EXTENSION = '.md'
FREEZER_DESTINATION = 'dist'
app = Flask(__name__)
app.config.from_object(__name__)
pages = FlatPages(app)
freezer = Freeze... | import sys
from flask import Flask, render_template
from flask_flatpages import FlatPages, flatpages
from flask_frozen import Freezer
DEBUG = True
FLATPAGES_AUTO_RELOAD = DEBUG
FLATPAGES_EXTENSION = '.md'
FREEZER_DESTINATION = 'dist'
app = Flask(__name__)
app.config.from_object(__name__)
pages = FlatPages(app)
freez... |
Add teardown of integration test
| from kitten.server import KittenServer
from gevent.pool import Group
from mock import MagicMock
class TestPropagation(object):
def setup_method(self, method):
self.servers = Group()
for port in range(4):
ns = MagicMock()
ns.port = 9812 + port
server = Kitten... | from kitten.server import KittenServer
from gevent.pool import Group
from mock import MagicMock
class TestPropagation(object):
def setup_method(self, method):
self.servers = Group()
for port in range(4):
ns = MagicMock()
ns.port = 9812 + port
server = Kitten... |
Change single quotes to double | #!/usr/bin/env python
import unittest
import ghstats
class TestStats(unittest.TestCase):
def test_cli(self):
"""
Test command line arguments.
"""
count = ghstats.main_cli(["kefir500/apk-icon-editor", "-q", "-d"])
self.assertTrue(count > 0)
def test_releases(self):
... | #!/usr/bin/env python
import unittest
import ghstats
class TestStats(unittest.TestCase):
def test_cli(self):
"""
Test command line arguments.
"""
count = ghstats.main_cli(["kefir500/apk-icon-editor", "-q", "-d"])
self.assertTrue(count > 0)
def test_releases(self):
... |
Add match_distance flag to load_data_frame()
| import pandas as pd
def load_data_frame(data_frame_path, sort_reindex=False, class_labels=True):
"""
Load a sentence data set as pandas DataFrame from a given path.
:param data_frame_path: the path to load the pandas DataFrame from
:param sort_reindex: if True, the returned data frame will be sorted ... | import pandas as pd
def load_data_frame(data_frame_path, sort_reindex=False, class_labels=True, match_distance=False):
"""
Load a sentence data set as pandas DataFrame from a given path.
:param data_frame_path: the path to load the pandas DataFrame from
:param sort_reindex: if True, the returned data... |
Simplify the code for downloading resources.
Use downloadPage instead of our own class.
| import os
from twisted.internet import reactor, defer, protocol
from twisted.web.client import RedirectAgent, Agent
from ooni.settings import config
from ooni.resources import inputs, geoip
agent = RedirectAgent(Agent(reactor))
class SaveToFile(protocol.Protocol):
def __init__(self, finished, filesize, filenam... | import os
from twisted.internet import defer
from twisted.web.client import downloadPage
from ooni.settings import config
from ooni.resources import inputs, geoip
@defer.inlineCallbacks
def download_resource(resources):
for filename, resource in resources.items():
print "Downloading %s" % filename
... |
Reimplement using bottle and add 3 endpoints
| from flask import Flask, request
from flask_restful import Resource, Api, reqparse
from indra import reach
from indra.statements import *
import json
app = Flask(__name__)
api = Api(app)
parser = reqparse.RequestParser()
parser.add_argument('txt')
parser.add_argument('json')
class InputText(Resource):
def post(se... | import json
from bottle import route, run, request, post, default_app
from indra import trips, reach, bel, biopax
from indra.statements import *
@route('/trips/process_text', method='POST')
def trips_process_text():
body = json.load(request.body)
text = body.get('text')
tp = trips.process_text(text)
i... |
Revert "x,y should be y,x"
This reverts commit 7636eb6ce4f23c6f787aed02590499b6d2ea60b2.
| #!/usr/bin/env python
"""
Contains player and NPC-classes.
"""
import logging
from Item import Item
class Person(object):
"""
Base class for all characters in game.
"""
DEFAULT_HEALTH = 100
def __init__(self, health=DEFAULT_HEALTH, position):
"""
Defaults to facing north. Facing c... | #!/usr/bin/env python
"""
Contains player and NPC-classes.
"""
import logging
from Item import Item
class Person(object):
"""
Base class for all characters in game.
"""
DEFAULT_HEALTH = 100
def __init__(self, health=DEFAULT_HEALTH, position):
"""
Defaults to facing north. Facing c... |
Remove old exports from subdue.core
| __all__ = [
'color',
'BANNER',
'DEFAULT_DRIVER_CODE'
'die',
'verbose',
'use_colors',
'set_color_policy',
]
import sys as _sys
from . import color as _color
BANNER = """\
_ _
___ _ _| |__ __| |_ _ ___
/ __| | | | '_ \ / _` | | | |/ _ \\
\__ \ |_| | |_) | (_| | |_|... | __all__ = [
'BANNER',
'DEFAULT_DRIVER_CODE'
'die',
'verbose',
'set_color_policy',
]
import sys as _sys
from . import color as _color
BANNER = """\
_ _
___ _ _| |__ __| |_ _ ___
/ __| | | | '_ \ / _` | | | |/ _ \\
\__ \ |_| | |_) | (_| | |_| | __/
|___/\__,_|_.__/ \__,_|... |
Update to catch up with Sublime-Linter API
| #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ben Edwards
# Copyright (c) 2015 Ben Edwards
#
# License: MIT
#
"""This module exports the PugLint plugin class."""
from SublimeLinter.lint import NodeLinter, util, highlight
class PugLint(NodeLinter):
"""Prov... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ben Edwards
# Copyright (c) 2015 Ben Edwards
#
# License: MIT
#
"""This module exports the PugLint plugin class."""
from SublimeLinter.lint import NodeLinter, WARNING
class PugLint(NodeLinter):
"""Provides an ... |
FIX disable product supplier pricelist
| # -*- coding: utf-8 -*-
{
'name': 'Product Supplier Pricelist',
'version': '1.0',
'category': 'Product',
'sequence': 14,
'summary': '',
'description': """
Product Supplier Pricelist
==========================
Add sql constraint to restrict:
1. That you can only add one supplier to a product pe... | # -*- coding: utf-8 -*-
{
'name': 'Product Supplier Pricelist',
'version': '1.0',
'category': 'Product',
'sequence': 14,
'summary': '',
'description': """
Product Supplier Pricelist
==========================
Add sql constraint to restrict:
1. That you can only add one supplier to a product pe... |
Increment static resource to account for CDN JS
| import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a test environment s... | import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a test environment s... |
Use score as well in annotations table
| #!/usr/bin/env python
"""A script to sum the rpkm values for all genes for each annotation."""
import pandas as pd
import argparse
import sys
def main(args):
rpkm_table =pd.read_table(args.rpkm_table, index_col=0)
annotations = pd.read_table(args.annotation_table, header=None, names=["gene_id", "annotation", ... | #!/usr/bin/env python
"""A script to sum the rpkm values for all genes for each annotation."""
import pandas as pd
import argparse
import sys
def main(args):
rpkm_table =pd.read_table(args.rpkm_table, index_col=0)
annotations = pd.read_table(args.annotation_table, header=None, names=["gene_id", "annotation", ... |
Remove code which blanks patch files
| #! /usr/bin/python2.3
# vim:sw=8:ts=8:et:nowrap
import os
import shutil
def ApplyPatches(filein, fileout):
# Generate short name such as wrans/answers2003-03-31.html
(rest, name) = os.path.split(filein)
(rest, dir) = os.path.split(rest)
fileshort = os.path.join(dir, name)
# Lo... | #! /usr/bin/python2.3
# vim:sw=8:ts=8:et:nowrap
import os
import shutil
def ApplyPatches(filein, fileout):
# Generate short name such as wrans/answers2003-03-31.html
(rest, name) = os.path.split(filein)
(rest, dir) = os.path.split(rest)
fileshort = os.path.join(dir, name)
# Lo... |
DEVOPS-42: Fix webapp password reset link
| from django.contrib.auth import views
from django.urls import path, re_path
from accounts.forms import LoginForm, PasswordResetForm, SetPasswordForm
urlpatterns = [
path(
"login/",
views.LoginView.as_view(
template_name="accounts/login.html", authentication_form=LoginForm
),
... | from django.contrib.auth import views
from django.urls import path
from accounts.forms import LoginForm, PasswordResetForm, SetPasswordForm
urlpatterns = [
path(
"login/",
views.LoginView.as_view(
template_name="accounts/login.html", authentication_form=LoginForm
),
na... |
Reword about user giving dimensions | """
multiplication-table.py
Author: <your name here>
Credit: <list sources used, if any>
Assignment:
Write and submit a Python program that prints a multiplication table. The user
must be able to determine the width and height of the table before it is printed.
The final multiplication table should look like this:
... | """
multiplication-table.py
Author: <your name here>
Credit: <list sources used, if any>
Assignment:
Write and submit a Python program that prints a multiplication table. The user
must be prompted to give the width and height of the table before it is printed.
The final multiplication table should look like this:
W... |
Support to specify the valid external network name
In some deployments, the retrieved external network by the
def get_external_networks in Snaps checked by "router:external"
is not available. So it is necessary to specify the available
external network as an env by user.
Change-Id: I333e91dd106ed307541a9a197280199fde... | # Copyright (c) 2015 All rights reserved
# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
from snaps.openstack.utils import neutron_utils, nova_... | # Copyright (c) 2015 All rights reserved
# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
from functest.utils.constants import CONST
from snaps... |
Use the mint database for capsule data
| #
# Copyright (c) 2009 rPath, Inc.
#
# All Rights Reserved
#
from conary.lib import util
from mint.rest.db import manager
import rpath_capsule_indexer
class CapsuleManager(manager.Manager):
def getIndexerConfig(self):
capsuleDataDir = util.joinPaths(self.cfg.dataPath, 'capsules')
cfg = rpath_caps... | #
# Copyright (c) 2009 rPath, Inc.
#
# All Rights Reserved
#
from conary.lib import util
from mint.rest.db import manager
import rpath_capsule_indexer
class CapsuleManager(manager.Manager):
def getIndexerConfig(self):
capsuleDataDir = util.joinPaths(self.cfg.dataPath, 'capsules')
cfg = rpath_caps... |
Implement function to load data from directory
| from nltk.tokenize import word_tokenize, sent_tokenize
import getopt
import sys
import os
import io
def usage():
print("usage: " + sys.argv[0] + " -i directory-of-documents -d dictionary-file -p postings-file")
if __name__ == '__main__':
dir_doc = dict_file = postings_file = None
try:
opts, args = getopt.getopt... | from nltk.tokenize import word_tokenize, sent_tokenize
import getopt
import sys
import os
import io
def load_data(dir_doc):
docs = {}
for dirpath, dirnames, filenames in os.walk(dir_doc):
for name in filenames:
file = os.path.join(dirpath, name)
with io.open(file, 'r+') as f:
docs[name] = f.read()
retu... |
Set long description to current README.md content
| #!/usr/bin/python
from setuptools import setup, find_packages
with open('requirements.txt') as f:
requirements = f.read().splitlines()
setup(
name = "docker-scripts",
version = "0.3.0",
packages = find_packages(),
url='https://github.com/goldmann/docker-scripts',
author='Marek Goldmann',
... | #!/usr/bin/python
from setuptools import setup, find_packages
with open('requirements.txt') as f:
requirements = f.read().splitlines()
setup(
name = "docker-scripts",
version = "0.3.0",
packages = find_packages(),
url='https://github.com/goldmann/docker-scripts',
author='Marek Goldmann',
... |
Update install requires, add opps >= 0.2
| #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='opps-admin',
version='0.1',
description='Opps Admin, drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.',
long_description=open('README... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='opps-admin',
version='0.1',
description='Opps Admin, drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.',
long_description=open('README... |
Use requirement.txt entries to populate package requirements
| from setuptools import setup
setup(name="save_skype",
version="0.1",
description="Extract and save Skype chats.",
url="https://github.com/thismachinechills/save_skype",
author="thismachinechills (Alex)",
license="AGPL 3.0",
packages=['save_skype'],
zip_safe=True,
instal... | from setuptools import setup
with open('requirements.txt', 'r') as file:
requirements = file.readlines()
setup(name="save_skype",
version="0.1.1",
description="Extract and save Skype chats.",
url="https://github.com/thismachinechills/save_skype",
author="thismachinechills (Alex)",
li... |
Remove an install_requires library which is already part of Python since 2.7
| from setuptools import setup, find_packages
with open('README.md') as f:
long_description = f.read()
setup(
name='jiradoc',
version='0.1',
description='A JIRAdoc parser',
long_description=long_description,
url='https://github.com/lucianovdveekens/jiradoc',
author='Luciano van der Veekens',... | from setuptools import setup, find_packages
with open('README.md') as f:
long_description = f.read()
setup(
name='jiradoc',
version='0.1',
description='A JIRAdoc parser',
long_description=long_description,
url='https://github.com/lucianovdveekens/jiradoc',
author='Luciano van der Veekens',... |
Include contrib module in installed package
See https://github.com/yola/yolacom/pull/1775#issuecomment-76513787
| from setuptools import setup
import proxyprefix
setup(
name='proxyprefix',
version=proxyprefix.__version__,
description='Prefix SCRIPT_NAME with X-Forwarded-Prefix header',
long_description=proxyprefix.__doc__,
author='Yola',
author_email='engineers@yola.com',
license='MIT (Expat)',
u... | from setuptools import find_packages, setup
import proxyprefix
setup(
name='proxyprefix',
version=proxyprefix.__version__,
description='Prefix SCRIPT_NAME with X-Forwarded-Prefix header',
long_description=proxyprefix.__doc__,
author='Yola',
author_email='engineers@yola.com',
license='MIT ... |
Add requests and six as explicit dependencies
| from setuptools import setup
setup(
name = "ironic-discoverd",
version = "0.2.0",
description = "Simple hardware discovery for OpenStack Ironic",
author = "Dmitry Tantsur",
author_email = "dtansur@redhat.com",
url = "https://github.com/Divius/ironic-discoverd/",
packages = ['ironic_discove... | from setuptools import setup
setup(
name = "ironic-discoverd",
version = "0.2.0",
description = "Simple hardware discovery for OpenStack Ironic",
author = "Dmitry Tantsur",
author_email = "dtansur@redhat.com",
url = "https://github.com/Divius/ironic-discoverd/",
packages = ['ironic_discove... |
Fix broken GitHub repository URL
| try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'name' : 'Redis Grepper',
'description' : 'Perform regex searches through Redis values',
'author' : 'Ionut G. Stan',
'author_email' : 'ionut.g.stan@gmail.com',
'... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'name' : 'Redis Grepper',
'description' : 'Perform regex searches through Redis values',
'author' : 'Ionut G. Stan',
'author_email' : 'ionut.g.stan@gmail.com',
'... |
Bump package version forward to next development version
Change-Id: Ia04ceb0e83d4927e75a863252571ed76f83b2ef1
| #!/usr/bin/env python
import os
from setuptools import setup
# Utility function to read the README file.
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'voltha',
version = '1.3.0',
author = 'Open Networking Foundation, et al',
author_email = 'inf... | #!/usr/bin/env python
import os
from setuptools import setup
# Utility function to read the README file.
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'voltha',
version = '2.0.0-dev',
author = 'Open Networking Foundation, et al',
author_email = ... |
Install pyramid 1.5 or newer which has the new SignedCookieSessionFactory
| # -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = (
'cnx-archive',
'cnx-epub',
'openstax-accounts',
'psycopg2',
'pyramid',
'pyramid_multiauth',
)
tests_require = [
'webtest',
]
extras_require = {
... | # -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
IS_PY3 = sys.version_info > (3,)
install_requires = (
'cnx-archive',
'cnx-epub',
'openstax-accounts',
'psycopg2',
'pyramid>=1.5',
'pyramid_multiauth',
)
tests_require = [
'webtest',
]
extras_require = {... |
Add placeholder CAPAPI key for tests.
| # Django settings used by pytest
# WARNING: this imports from .settings_dev instead of config.settings, meaning it chooses to IGNORE any settings in
# config/settings/settings.py. This is potentially better (in that it doesn't return different results locally than
# it will on CI), but also potentially worse (in that ... | # Django settings used by pytest
# WARNING: this imports from .settings_dev instead of config.settings, meaning it chooses to IGNORE any settings in
# config/settings/settings.py. This is potentially better (in that it doesn't return different results locally than
# it will on CI), but also potentially worse (in that ... |
Set latitude of Lake Superior
| #!/usr/bin/env python
"""
Reduced Gravity Shallow Water Model
based Matlab code by: Francois Primeau UC Irvine 2011
Kelsey Jordahl
kjordahl@enthought.com
Time-stamp: <Tue Apr 10 08:31:42 EDT 2012>
"""
from scipy.io.netcdf import netcdf_file
from ocean_model import ShallowWaterModel, OceanPlot
from traits.api import I... | #!/usr/bin/env python
"""
Reduced Gravity Shallow Water Model
based Matlab code by: Francois Primeau UC Irvine 2011
Kelsey Jordahl
kjordahl@enthought.com
Time-stamp: <Tue Apr 10 08:44:50 EDT 2012>
"""
from scipy.io.netcdf import netcdf_file
from ocean_model import ShallowWaterModel, OceanPlot
from traits.api import I... |
Fix vx.expose so it works when a name is passed
| import vx
def _expose(f, name=None):
if name is None:
name = f.__name__.lstrip('_')
if getattr(vx, name, None) is not None:
raise AttributeError("Cannot expose duplicate name: '{}'".format(name))
setattr(vx, name, f)
return f
vx.expose = _expose
@vx.expose
def _repeat(c, times=4):
... | import vx
def _expose(f=None, name=None):
if name is None:
name = f.__name__.lstrip('_')
if getattr(vx, name, None) is not None:
raise AttributeError("Cannot expose duplicate name: '{}'".format(name))
if f is None:
def g(f):
setattr(vx, name, f)
return f
... |
Add mass_api_client as Package; fix typo
| #!/usr/bin/env python
from distutils.core import setup
setup(name='mass_api_client',
version=0.1,
install_required=['requests==2.13.0', 'marshmallow==2.12.2'])
| #!/usr/bin/env python
from distutils.core import setup
setup(name='mass_api_client',
version=0.1,
install_requires=['requests==2.13.0', 'marshmallow==2.12.2'],
packages=['mass_api_client', ],
)
|
Fix pyNeuroML dependecy link to go to specific commit
| from setuptools import setup
setup(
name='ChannelWorm',
long_description=open('README.md').read(),
install_requires=[
'cypy',
'sciunit',
'PyOpenWorm',
'PyNeuroML'
],
dependency_links=[
'git+https://github.com/scidash/sciunit.git#egg=sciunit',
'git+htt... | from setuptools import setup
setup(
name='ChannelWorm',
long_description=open('README.md').read(),
install_requires=[
'cypy',
'sciunit',
'PyOpenWorm',
'PyNeuroML'
],
dependency_links=[
'git+https://github.com/scidash/sciunit.git#egg=sciunit',
'git+htt... |
Upgrade tangled 0.1a9 => 1.0a12
| from setuptools import setup, PEP420PackageFinder
setup(
name='tangled.sqlalchemy',
version='1.0a6.dev0',
description='Tangled SQLAlchemy integration',
long_description=open('README.rst').read(),
url='https://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.sqlalchem... | from setuptools import setup, PEP420PackageFinder
setup(
name='tangled.sqlalchemy',
version='1.0a6.dev0',
description='Tangled SQLAlchemy integration',
long_description=open('README.rst').read(),
url='https://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.sqlalchem... |
Support Wagtail 1.0 -> 1.3.x
| import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='wagtailpress',
version='0.1',
packages=['wagtailpress'],
... | import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='wagtailpress',
version='0.1',
packages=['wagtailpress'],
... |
Upgrade SQLAlchemy 1.1.6 => 1.2.0
| from setuptools import setup
setup(
name='tangled.website',
version='1.0a1.dev0',
description='tangledframework.org',
long_description=open('README.rst').read(),
url='https://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.website/tags',
author='Wyatt Baldwin',
... | from setuptools import setup
setup(
name='tangled.website',
version='1.0a1.dev0',
description='tangledframework.org',
long_description=open('README.rst').read(),
url='https://tangledframework.org/',
download_url='https://github.com/TangledWeb/tangled.website/tags',
author='Wyatt Baldwin',
... |
Allow installation with Python 2
| """
Setup file for clowder
"""
import sys
from setuptools import setup
# Written according to the docs at
# https://packaging.python.org/en/latest/distributing.html
if sys.version_info[0] < 3:
sys.exit('This script requires python 3.0 or higher to run.')
setup(
name='clowder-repo',
description='A tool fo... | """
Setup file for clowder
"""
from setuptools import setup
# Written according to the docs at
# https://packaging.python.org/en/latest/distributing.html
setup(
name='clowder-repo',
description='A tool for managing code',
version='2.3.0',
url='http://clowder.cat',
author='Joe DeCapo',
author_... |
Increment version after change to get_base_url | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... |
Change version to 0.2.7 according to fix.
| # -*- coding: utf-8 -*-
from distutils.core import setup
__version__ = '0.2.6'
setup(name='tg2ext.express',
version=__version__,
description='tg2ext.express, a small extension for TurboGears2',
long_description=open("README.md").read(),
author='Mingcai SHEN',
author_email='archsh... | # -*- coding: utf-8 -*-
from distutils.core import setup
__version__ = '0.2.7'
setup(name='tg2ext.express',
version=__version__,
description='tg2ext.express, a small extension for TurboGears2',
long_description=open("README.md").read(),
author='Mingcai SHEN',
author_email='archsh... |
Update treeherder-client dependency from * to >=2.0.1
To ensure deprecated versions of TreeherderClient aren't being used if
the virtualenv is reused.
Notably 2.0.1 includes an API URL fix that will prevent 404s once
non-canonical URLs are disabled in bug 1234233.
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
readme = open('README.rst').read()
requirements = [
"Jinja2",
"taskcluster>=0.0.24",
"arrow",
"requests>=2.4.3,<=2.7.0",
"PyYAML",
"chunkify",
"tre... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
readme = open('README.rst').read()
requirements = [
"Jinja2",
"taskcluster>=0.0.24",
"arrow",
"requests>=2.4.3,<=2.7.0",
"PyYAML",
"chunkify",
"tre... |
Remove py3 for the moment
| from setuptools import setup
setup(
name='icapservice',
version='0.1.0',
description='ICAP service library for Python',
author='Giles Brown',
author_email='giles_brown@hotmail.com',
url='https://github.com/gilesbrown/icapservice',
license='MIT',
packages=['icapservice'],
zip_safe=F... | from setuptools import setup
setup(
name='icapservice',
version='0.1.0',
description='ICAP service library for Python',
author='Giles Brown',
author_email='giles_brown@hotmail.com',
url='https://github.com/gilesbrown/icapservice',
license='MIT',
packages=['icapservice'],
zip_safe=F... |
Add wider description for wheel and egg packages
| from setuptools import setup, find_packages
setup(
name="virgil-sdk",
version="5.0.0",
packages=find_packages(),
install_requires=[
'virgil-crypto',
],
author="Virgil Security",
author_email="support@virgilsecurity.com",
url="https://virgilsecurity.com/",
classifiers=[
... | from setuptools import setup, find_packages
setup(
name="virgil-sdk",
version="5.0.0",
packages=find_packages(),
install_requires=[
'virgil-crypto',
],
author="Virgil Security",
author_email="support@virgilsecurity.com",
url="https://virgilsecurity.com/",
classifiers=[
... |
Remove readme from package data.
| from distutils.core import setup
setup(
name='Zinc',
version='0.1.7',
author='John Wang',
author_email='john@zinc.io',
packages=['zinc'],
package_dir={'zinc': ''},
package_data={'zinc': ['examples/*.py', 'examples/*.json', 'README', 'zinc/*']},
include_package_data=True,
url='https:... | from distutils.core import setup
setup(
name='Zinc',
version='0.1.8',
author='John Wang',
author_email='john@zinc.io',
packages=['zinc'],
package_dir={'zinc': ''},
package_data={'zinc': ['examples/*.py', 'examples/*.json', 'zinc/*']},
include_package_data=True,
url='https://github.c... |
Add classifier for Python 3.3
| #!/usr/bin/env python3
import sys
from distutils.core import setup
setup(
name='pathlib',
version=open('VERSION.txt').read().strip(),
py_modules=['pathlib'],
license='MIT License',
description='Object-oriented filesystem paths',
long_description=open('README.txt').read(),
author='Antoine P... | #!/usr/bin/env python3
import sys
from distutils.core import setup
setup(
name='pathlib',
version=open('VERSION.txt').read().strip(),
py_modules=['pathlib'],
license='MIT License',
description='Object-oriented filesystem paths',
long_description=open('README.txt').read(),
author='Antoine P... |
Fix Docker image tag inconsistency after merge commits
The image pushed is always given by `git rev-parse HEAD`, but the tag
for the image requested from Docker was retrieved from git log. Merge
commits were ignored by the latter. Now the tag is set to `git
rev-parse HEAD` both on push and retrieve.
| from setuptools import setup, find_packages
import os
import subprocess
os.system("pip install git+https://github.com/ComparativeGenomicsToolkit/sonLib@toil")
versionFile = "src/cactus/shared/version.py"
if os.path.exists(versionFile):
os.remove(versionFile)
git_commit = subprocess.check_output('git log --pretty=... | from setuptools import setup, find_packages
import os
import subprocess
os.system("pip install git+https://github.com/ComparativeGenomicsToolkit/sonLib@toil")
versionFile = "src/cactus/shared/version.py"
if os.path.exists(versionFile):
os.remove(versionFile)
git_commit = subprocess.check_output(['git', 'rev-parse... |
Fix exclude of sample_project for installation.
| import os
from setuptools import setup, find_packages
packages = find_packages()
packages.remove('sample_project')
classifiers = """
Topic :: Internet :: WWW/HTTP :: Dynamic Content
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Programming Language :: Python
Topic :: Software Development :: L... | import os
from setuptools import setup, find_packages
packages = find_packages(exclude=['sample_project'])
classifiers = """
Topic :: Internet :: WWW/HTTP :: Dynamic Content
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Programming Language :: Python
Topic :: Software Development :: Libraries... |
Remove data_sets from backdrop user search. Fixes
| from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... |
Use the latest version of openstax-accounts
| # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
install_requires = (
'cnx-epub',
'cnx-query-grammar',
'colander',
'openstax-accounts>=0.5',
'PasteDeploy',
'pyramid',
'psycopg2>=2.5',
'requests',
'tzlocal',
'waitress',
... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
install_requires = (
'cnx-epub',
'cnx-query-grammar',
'colander',
'openstax-accounts>=0.6',
'PasteDeploy',
'pyramid',
'psycopg2>=2.5',
'requests',
'tzlocal',
'waitress',
... |
Use py_modules and not packages
| import os
from distutils.core import setup
requirements = map(str.strip, open('requirements.txt').readlines())
setup(
name='py_eventsocket',
version='0.1.4',
author="Aaron Westendorf",
author_email="aaron@agoragames.com",
packages = ['eventsocket'],
url='https://github.com/agoragames/py-events... | import os
from distutils.core import setup
requirements = map(str.strip, open('requirements.txt').readlines())
setup(
name='py_eventsocket',
version='0.1.4',
author="Aaron Westendorf",
author_email="aaron@agoragames.com",
url='https://github.com/agoragames/py-eventsocket',
license='LICENSE.txt... |
Include generated static content in package manifest
| from setuptools import setup, find_packages
setup(name='git-auto-deploy',
version='0.9',
url='https://github.com/olipo186/Git-Auto-Deploy',
author='Oliver Poignant',
author_email='oliver@poignant.se',
packages = find_packages(),
package_data={'gitautodeploy': ['data/*', 'wwwroot/*']... | from setuptools import setup, find_packages
import os
import sys
def package_files(package_path, directory_name):
paths = []
directory_path = os.path.join(package_path, directory_name)
for (path, directories, filenames) in os.walk(directory_path):
relative_path = os.path.relpath(path, package_path... |
Revert "Move beautifulsoup4 from requires to install_requires"
This reverts commit cb5ddc006489920eb43e5b0815c8ff75f74b1107.
install_requires is not supported by distutils and would need setuptools
instead. Perhaps move to setuptools in the future, but revert for now.
| #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from distutils.core import setup
import gygax
setup(
name="gygax",
version=gygax.__version__,
description="A minimalistic IRC bot",
long_description=open("README").read(),
author="Tiit Pikma",
author_email="1042524+thsnr@u... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from distutils.core import setup
import gygax
setup(
name="gygax",
version=gygax.__version__,
description="A minimalistic IRC bot",
long_description=open("README").read(),
author="Tiit Pikma",
author_email="1042524+thsnr@u... |
Convert MD to reST for pypi
| #!/usr/bin/env python
from setuptools import setup
setup(name='xml_models2',
version='0.7.0',
description='XML backed models queried from external REST apis',
author='Geoff Ford and Chris Tarttelin and Cam McHugh',
author_email='g_ford@hotmail.ccom',
url='http://github.com/alephnullplex/... | #!/usr/bin/env python
from setuptools import setup
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
setup(
name='xml_models2',
version='0.7.0',
description='XML backed models queried from ex... |
Increment version for 0.0.2 release.
| from setuptools import setup
setup(
name='twisted-hl7',
version='0.0.2dev',
author='John Paulett',
author_email = 'john@paulett.org',
url = 'http://twisted-hl7.readthedocs.org',
license = 'BSD',
platforms = ['POSIX', 'Windows'],
keywords = ['HL7', 'Health Level 7', 'healthcare', 'health... | from setuptools import setup
setup(
name='twisted-hl7',
version='0.0.2',
author='John Paulett',
author_email = 'john@paulett.org',
url = 'http://twisted-hl7.readthedocs.org',
license = 'BSD',
platforms = ['POSIX', 'Windows'],
keywords = ['HL7', 'Health Level 7', 'healthcare', 'health ca... |
Exclude tests package from distribution
| #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... | #!/usr/bin/env python
import sys, os
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
# Hack to prevent "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when setup.py exits
# (see http://www.eby-sarna.com/pi... |
Change extra from 3 to 0.
| # coding: utf-8
import re
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cmsplugin_bootstrap_carousel.models import *
from django.utils.translation import ugettext as _
from django.contrib import admin
from django.forms import ModelForm, ValidationError
class CarouselForm(ModelF... | # coding: utf-8
import re
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cmsplugin_bootstrap_carousel.models import *
from django.utils.translation import ugettext as _
from django.contrib import admin
from django.forms import ModelForm, ValidationError
class CarouselForm(ModelF... |
Update version number to 1.0.
| #!/usr/bin/env python
import sys
from distutils.core import setup
setup_args = {}
setup_args.update(dict(
name='param',
version='0.05',
description='Declarative Python programming using Parameters.',
long_description=open('README.txt').read(),
author= "IOAM",
author_email= "developers@topogr... | #!/usr/bin/env python
import sys
from distutils.core import setup
setup_args = {}
setup_args.update(dict(
name='param',
version='1.0',
description='Declarative Python programming using Parameters.',
long_description=open('README.txt').read(),
author= "IOAM",
author_email= "developers@topogra... |
Allow two command arguments for in and out files, or none for standard filter operations
| #!/usr/bin/env python
# mdstrip.py: makes new notebook from old, stripping md out
"""A tool to copy cell_type=("code") into a new file
without grabbing headers/markdown (most importantly the md)
NOTE: may want to grab the headers after all, or define new ones?"""
import os
import IPython.nbformat.current as nbf
from... | #!/usr/bin/env python
# mdstrip.py: makes new notebook from old, stripping md out
"""A tool to copy cell_type=("code") into a new file
without grabbing headers/markdown (most importantly the md)
NOTE: may want to grab the headers after all, or define new ones?"""
import os
import IPython.nbformat.current as nbf
from... |
Fix GStreamer packages use of prefix
| GstreamerXzPackage (project = 'gstreamer', name = 'gstreamer', version = '1.4.5', configure_flags = [
'--disable-gtk-doc',
'--prefix="%{prefix}'
])
| GstreamerXzPackage (project = 'gstreamer', name = 'gstreamer', version = '1.4.5', configure_flags = [
'--disable-gtk-doc',
'--prefix=%{prefix}'
])
|
Downgrade script already running to info
| #!/usr/bin/env python
'''Checks processes'''
#===============================================================================
# Import modules
#===============================================================================
# Standard Library
import os
import subprocess
import logging
# Third party modules
# App... | #!/usr/bin/env python
'''Checks processes'''
#===============================================================================
# Import modules
#===============================================================================
# Standard Library
import os
import subprocess
import logging
# Third party modules
# App... |
Modify test_extract_listings() to account for the change in output from extract_listings()
| from scraper import search_CL
from scraper import read_search_results
from scraper import parse_source
from scraper import extract_listings
import bs4
def test_search_CL():
test_body, test_encoding = search_CL(minAsk=100, maxAsk=100)
assert "<span class=\"desktop\">craigslist</span>" in test_body
assert t... | from scraper import search_CL
from scraper import read_search_results
from scraper import parse_source
from scraper import extract_listings
import bs4
def test_search_CL():
test_body, test_encoding = search_CL(minAsk=100, maxAsk=100)
assert "<span class=\"desktop\">craigslist</span>" in test_body
assert t... |
Make shared static path OS-agnostic
| from datetime import datetime
import alabaster
# Alabaster theme + mini-extension
html_theme_path = [alabaster.get_path()]
extensions = ['alabaster']
# Paths relative to invoking conf.py - not this shared file
html_static_path = ['../_shared_static']
html_theme = 'alabaster'
html_theme_options = {
'description':... | from os.path import join
from datetime import datetime
import alabaster
# Alabaster theme + mini-extension
html_theme_path = [alabaster.get_path()]
extensions = ['alabaster']
# Paths relative to invoking conf.py - not this shared file
html_static_path = [join('..', '_shared_static')]
html_theme = 'alabaster'
html_th... |
Update BrowserifyCompiler for n Pipeline settings.
| import re
from django.conf import settings
from django.utils.encoding import smart_bytes
from pipeline.compilers import CompilerBase
from pipeline.exceptions import CompilerError
class BrowserifyCompiler(CompilerBase):
output_extension = 'browserified.js'
def match_file(self, path):
# Allow for cac... | import re
from django.conf import settings
from django.utils.encoding import smart_bytes
from pipeline.compilers import CompilerBase
from pipeline.exceptions import CompilerError
class BrowserifyCompiler(CompilerBase):
output_extension = 'browserified.js'
def match_file(self, path):
# Allow for cac... |
Switch UI tests back to google chrome.
| import pytest
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
import time
from webdriver_manager.chrome import ChromeDri... | import pytest
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
import time
from webdriver_manager.chrome import ChromeDri... |
Fix add pool member code
| from lib.actions import BaseAction
__all__ = [
'CreatePoolMemberAction'
]
class CreatePoolMemberAction(BaseAction):
api_type = 'loadbalancer'
def run(self, region, pool_id, node_id, port):
driver = self._get_lb_driver(region)
pool = driver.ex_get_pool(pool_id)
node = driver.ex.ge... | from lib.actions import BaseAction
__all__ = [
'CreatePoolMemberAction'
]
class CreatePoolMemberAction(BaseAction):
api_type = 'loadbalancer'
def run(self, region, pool_id, node_id, port):
driver = self._get_lb_driver(region)
pool = driver.ex_get_pool(pool_id)
node = driver.ex_ge... |
Add url_validator function and respond aciton to test url
| from slackbot.bot import respond_to
from slackbot.bot import listen_to
import re
import urllib
| from slackbot.bot import respond_to
from slackbot.bot import listen_to
import re
import urllib
def url_validator(url):
try:
code = urllib.urlopen(url).getcode()
if code == 200:
return True
except:
return False
def test_url(message, url):
if url_validator(url[1:len(url... |
Define noop close() for FakeFile
| import os
import stat
from StringIO import StringIO
from types import StringTypes
import paramiko as ssh
class FakeFile(StringIO):
def __init__(self, value=None, path=None):
init = lambda x: StringIO.__init__(self, x)
if value is None:
init("")
ftype = 'dir'
si... | import os
import stat
from StringIO import StringIO
from types import StringTypes
import paramiko as ssh
class FakeFile(StringIO):
def __init__(self, value=None, path=None):
init = lambda x: StringIO.__init__(self, x)
if value is None:
init("")
ftype = 'dir'
si... |
Fix issues due to module rename
| #!/usr/bin/env python
# Copyright 2016 University of Chicago
# Licensed under the APL 2.0 license
import log
import log.handlers
import os
LOG_FILENAME = '~/logs/fsurf.log'
MAX_BYTES = 1024*1024*50 # 50 MB
NUM_BACKUPS = 10 # 10 files
def initialize_logging():
"""
Initialize logging for fsurf
:retur... | #!/usr/bin/env python
# Copyright 2016 University of Chicago
# Licensed under the APL 2.0 license
import logging
import logging.handlers
import os
LOG_FILENAME = '~/logs/fsurf.log'
MAX_BYTES = 1024*1024*50 # 50 MB
NUM_BACKUPS = 10 # 10 files
def initialize_logging():
"""
Initialize logging for fsurf
... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 49