commit stringlengths 40 40 | subject stringlengths 1 1.49k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | new_contents stringlengths 1 29.8k | old_contents stringlengths 0 9.9k | lang stringclasses 3
values | proba float64 0 1 |
|---|---|---|---|---|---|---|---|
aa5d9c85dc8267a5e3172c8e7792c2a059e1815c | sql db query: improved query timer logging | cantools/db/sql/query.py | cantools/db/sql/query.py | from sqlalchemy.sql import func
from cantools.util import start_timer, end_timer
from properties import *
from getters import *
from setters import *
from session import session, testSession, metadata, Session
_passthru = ["count", "all"]
_qmod = ["filter", "limit", "offset", "join"]
class Query(object):
def __in... | from sqlalchemy.sql import func
from cantools.util import start_timer, end_timer
from properties import *
from getters import *
from setters import *
from session import session, testSession, metadata, Session
_passthru = ["count", "all"]
_qmod = ["filter", "limit", "offset", "join"]
class Query(object):
def __in... | Python | 0.999852 |
5826f791e824b7aa0b38b76570212b7de6e5d1e2 | Index descriptor_data as Text field in ES | resolwe/flow/elastic_indexes/collection.py | resolwe/flow/elastic_indexes/collection.py | """Elastic Search indexes for Collection model."""
import elasticsearch_dsl as dsl
from resolwe.elastic.indices import BaseIndex
from resolwe.flow.utils import dict_dot, iterate_schema
from ..models import Collection
from .base import BaseDocument, BaseIndexMixin
class CollectionDocument(BaseDocument):
"""Docum... | """Elastic Search indexes for Collection model."""
import elasticsearch_dsl as dsl
from resolwe.elastic.fields import Name
from resolwe.elastic.indices import BaseIndex
from resolwe.flow.utils import dict_dot, iterate_schema
from ..models import Collection
from .base import BaseDocument, BaseIndexMixin
class Collec... | Python | 0 |
c7b79f1bcd3616b7d780b8a99ae2fbea7d61886e | Check for malformed output path | cclib/scripts/ccframe.py | cclib/scripts/ccframe.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Script for writing data tables from computational chemistry files."""
import argparse
import os.p... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Script for writing data tables from computational chemistry files."""
import argparse
import os.p... | Python | 0 |
ec6f54e52050cecb6bf88b3cfcaa6957f9ea0c60 | Fix unicode handling in selenium var templates | bzt/resources/selenium_taurus_extras.py | bzt/resources/selenium_taurus_extras.py | """
Copyright 2018 BlazeMeter 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... | """
Copyright 2018 BlazeMeter 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... | Python | 0.000013 |
7381f177f392b699eed3d93f2e36b7fa39d33ad0 | remove unused import | build_and_push_images.py | build_and_push_images.py | #!/usr/bin/env python
IMAGES = [
dict(image_name='geometalab/osmaxx-mediator', dockerfile='Dockerfile.mediator'),
dict(image_name='geometalab/osmaxx-worker', dockerfile='Dockerfile.worker'),
dict(image_name='geometalab/osmaxx-frontend', dockerfile='Dockerfile.frontend'),
]
def docker_build(dockerfile, ima... | #!/usr/bin/env python
import argparse
IMAGES = [
dict(image_name='geometalab/osmaxx-mediator', dockerfile='Dockerfile.mediator'),
dict(image_name='geometalab/osmaxx-worker', dockerfile='Dockerfile.worker'),
dict(image_name='geometalab/osmaxx-frontend', dockerfile='Dockerfile.frontend'),
]
def docker_buil... | Python | 0.000001 |
674bb111c11bfcfcbd00f4527e35f1c87312d738 | Append common VS directory to the path to fix build on x86 | cerbero/utils/msbuild.py | cerbero/utils/msbuild.py | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation... | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation... | Python | 0 |
7ca3308ced87a51ac073e50229d15b0784f5aed7 | Update chainerx/_docs/device.py | chainerx/_docs/device.py | chainerx/_docs/device.py | import chainerx
from chainerx import _docs
def _set_docs_device():
Device = chainerx.Device
_docs.set_doc(
Device,
"""Represents a physical computing unit.
""")
_docs.set_doc(
Device.synchronize,
"""Synchronizes the device.
""")
_docs.set_doc(
Device.name,
... | import chainerx
from chainerx import _docs
def _set_docs_device():
Device = chainerx.Device
_docs.set_doc(
Device,
"""Represents a physical computing unit.
""")
_docs.set_doc(
Device.synchronize,
"""Synchronizes the device.
""")
_docs.set_doc(
Device.name,
... | Python | 0 |
9a9d968f979dd12ee2bf4b1922aa1e0d70d27974 | switch to cmake | packages/dependencies/libogg.py | packages/dependencies/libogg.py | {
'repo_type' : 'git',
'url' : 'https://github.com/xiph/ogg.git',
'conf_system' : 'cmake',
'source_subfolder' : '_build',
'configure_options' : '.. {cmake_prefix_options} -DCMAKE_INSTALL_PREFIX={target_prefix} -DBUILD_SHARED_LIBS=0 -DCMAKE_BUILD_TYPE=Release',
'_info' : { 'version' : None, 'fancy_name' : 'ogg' },... | {
'repo_type' : 'git',
'url' : 'https://github.com/xiph/ogg.git',
# 'folder_name' : 'ogg-1.3.2',
'configure_options' : '{autoconf_prefix_options}',
'_info' : { 'version' : None, 'fancy_name' : 'ogg' },
} | Python | 0.000001 |
5d136b1fc8d2d4945352e7ee9e6d25ebd2190e56 | rename tags to subjects to better match schema | scrapi/base/schemas.py | scrapi/base/schemas.py | from __future__ import unicode_literals
from dateutil.parser import parse
from .helpers import (
default_name_parser,
oai_extract_url,
# oai_extract_doi,
oai_process_contributors,
compose,
single_result,
format_tags,
language_code
)
CONSTANT = lambda x: lambda *_, **__: x
BASEXMLSCH... | from __future__ import unicode_literals
from dateutil.parser import parse
from .helpers import (
default_name_parser,
oai_extract_url,
# oai_extract_doi,
oai_process_contributors,
compose,
single_result,
format_tags,
language_code
)
CONSTANT = lambda x: lambda *_, **__: x
BASEXMLSCH... | Python | 0 |
076d3831aa04941e6ae8d36dc95f03269a05436f | Fix python formatting issues. | backend/mcapi/machine.py | backend/mcapi/machine.py | from mcapp import app
from decorators import crossdomain, apikey, jsonp
from flask import request, g
import rethinkdb as r
import dmutil
import args
import access
@app.route('/machines', methods=['GET'])
@jsonp
def get_all_machines():
rr = r.table('machines').order_by(r.desc('birthtime'))
selection = list(rr.... | from mcapp import app
from decorators import crossdomain, apikey, jsonp
from flask import request, g
import error
import rethinkdb as r
import dmutil
import json
import args
import access
@app.route('/machines', methods=['GET'])
@jsonp
def get_all_machines():
rr = r.table('machines').order_by(r.desc('birthtime'))... | Python | 0.000003 |
520d7f4d00f58ad1f6367ea627d9de074aacf8d5 | Fix redirect to checkout | satchless/contrib/checkout/common/views.py | satchless/contrib/checkout/common/views.py | # -*- coding:utf-8 -*-
try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps # Python 2.4 fallback.
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.utils.decorators import available_attrs
from django.views.decorat... | # -*- coding:utf-8 -*-
try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps # Python 2.4 fallback.
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.utils.decorators import available_attrs
from django.views.decorat... | Python | 0 |
d19bcad058ba617b9fec91583be0a0f019a7d3dc | Replace spaces with underscores in ansible inventories | src/mist/io/inventory.py | src/mist/io/inventory.py | import mist.io.methods
class MistInventory(object):
def __init__(self, user, machines=None):
self.user = user
self.hosts = {}
self.keys = {}
self._cache = {}
self.load(machines)
def load(self, machines=None):
self.hosts = {}
self.keys = {}
if no... | import mist.io.methods
class MistInventory(object):
def __init__(self, user, machines=None):
self.user = user
self.hosts = {}
self.keys = {}
self._cache = {}
self.load(machines)
def load(self, machines=None):
self.hosts = {}
self.keys = {}
if no... | Python | 0.999317 |
1ebc38cd78a1453ab404714acb73fbe16840d0ed | Use `yaml.full_load_all` instead of `yaml.load_all` (#13577) | chart/tests/helm_template_generator.py | chart/tests/helm_template_generator.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Python | 0.000001 |
f8f63d4b15ce68797d6e16943bd85efb19a77752 | Fix recording failure for system pollster | ceilometer/hardware/pollsters/system.py | ceilometer/hardware/pollsters/system.py | # 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
# distributed under t... | # 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
# distributed under t... | Python | 0.999017 |
cd28805878328e87a4c2f16d5d912a31805de332 | Add description to IPNetworkField | helpers/models.py | helpers/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
from . import validators
# Create your models here.
class IPNetworkField(models.CharField):
description = _("IP address or network")
def __init__(self, *args, **kwargs):
kwargs['max_length'] = 18
self.defa... | from django.db import models
from . import validators
# Create your models here.
class IPNetworkField(models.CharField):
def __init__(self, *args, **kwargs):
kwargs['max_length'] = 18
self.default_validators = [validators.validate_ipv4_network]
super().__init__(*args, **kwargs)
def... | Python | 0 |
18618a56ce674c479a0737dcabd4a47913ae2dde | Add functionality to copy any missing files to the other folder | scripts/compare_dir.py | scripts/compare_dir.py | import os
from shutil import copyfile
FOLDER_A = '/media/itto/TOSHIBA EXT/Photos/Southeast Asia'
FOLDER_B = '/media/itto/disk/PRIVATE/AVCHD/BDMV/STREAM'
files_a = []
files_b = []
for dirpath, dirnames, filenames in os.walk(FOLDER_A):
files_a += filenames
for dirpath, dirnames, filenames in os.walk(FOLDER_B):
... | import os
dropboxFiles = []
localFiles = []
for dirpath, dirnames, filenames in os.walk(
'/media/itto/TOSHIBA EXT/Photos/Dropbox/ITTO/Southeast Asia 2017'):
dropboxFiles += filenames
for dirpath, dirnames, filenames in os.walk(
'/media/itto/TOSHIBA EXT/Photos/Southeast Asia'):
if ('Process' no... | Python | 0 |
b20a571c83d8c7727e7a8864e12b9ccde80af7cf | Update settings.py to use basedir more intelligently. | clintools/settings.py | clintools/settings.py | """
Django settings for clintools project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... | """
Django settings for clintools project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... | Python | 0 |
8f24cd709aa5e8e4e5c1273c028344d7e934aeba | Use bson | scripts/serial_read.py | scripts/serial_read.py | #!/usr/bin/python3
import time
import datetime
import json
import bson.json_util as json_util
import zmq
import pymongo
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from panoptes.utils import config, logger, serial, error, database
# @logger.set_log_level(level='debug')
@logg... | #!/usr/bin/python3
import time
import datetime
import json
import zmq
import pymongo
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from panoptes.utils import config, logger, serial, error, database
# @logger.set_log_level(level='debug')
@logger.has_logger
@config.has_config
cl... | Python | 0.000002 |
b40d9aaf107fadc477d0a8463c25945c2e83153c | Make it easier to override has_sudo_privileges check in middleware | django_sudo/middleware.py | django_sudo/middleware.py | """
django_sudo.middleware
~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2014 by Matt Robenolt.
:license: BSD, see LICENSE for more details.
"""
from django_sudo import COOKIE_NAME
from django_sudo.utils import has_sudo_privileges
class SudoMiddleware(object):
def has_sudo_privileges(self, request):
## Override... | """
django_sudo.middleware
~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2014 by Matt Robenolt.
:license: BSD, see LICENSE for more details.
"""
from django_sudo import COOKIE_NAME
from django_sudo.utils import has_sudo_privileges
class SudoMiddleware(object):
def process_request(self, request):
assert hasattr(... | Python | 0.00001 |
31231afea71b3fd9213b39cf1bb32e10b2a9e843 | Add Bitpay config model to Django Admin panel | djangovirtualpos/admin.py | djangovirtualpos/admin.py | # coding=utf-8
from django.contrib import admin
from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal, VPOSBitpay
admin.site.register(VirtualPointOfSale)
admin.site.register(VPOSRefundOperation)
admin.site.register(VPOSCeca)
admin.site.regis... | # coding=utf-8
from django.contrib import admin
from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal
admin.site.register(VirtualPointOfSale)
admin.site.register(VPOSRefundOperation)
admin.site.register(VPOSCeca)
admin.site.register(VPOSReds... | Python | 0 |
3811543581d8c0ce31f7db332444f31802e68b46 | Bump version to 0.1a15 | chirptext/__version__.py | chirptext/__version__.py | # -*- coding: utf-8 -*-
# chirptext's package version information
__author__ = "Le Tuan Anh"
__email__ = "tuananh.ke@gmail.com"
__copyright__ = "Copyright (c) 2012, Le Tuan Anh"
__credits__ = []
__license__ = "MIT License"
__description__ = "ChirpText is a collection of text processing tools for Python."
__url__ = "ht... | # -*- coding: utf-8 -*-
# chirptext's package version information
__author__ = "Le Tuan Anh"
__email__ = "tuananh.ke@gmail.com"
__copyright__ = "Copyright (c) 2012, Le Tuan Anh"
__credits__ = []
__license__ = "MIT License"
__description__ = "ChirpText is a collection of text processing tools for Python."
__url__ = "ht... | Python | 0 |
ef15a8ba699e10b9f2d059669b63af6f4c768d39 | Change to console command prompt | casspy/admin_commands.py | casspy/admin_commands.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Cassoundra: admin-commands
~~~~~~~~~~
Module to handle special commands to control the bot once it is already running.
Created by Joshua Prince, 2017
"""
import discord
from casspy import cassoundra
async def process_input(loop):
while True:
command ... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Cassoundra: admin-commands
~~~~~~~~~~
Module to handle special commands to control the bot once it is already running.
Created by Joshua Prince, 2017
"""
import discord
from casspy import cassoundra
async def process_input(loop):
while True:
command ... | Python | 0 |
2d8570f35dd507236d9c3bdc9209da248f572ef2 | update version | cloudaux/__about__.py | cloudaux/__about__.py | __all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ = 'https://githu... | __all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ = 'https://githu... | Python | 0 |
11aa00c96a456c3e3bb9699fc96c61ebbe7574d4 | fix removal of temp file | cerbero/bootstrap/osx.py | cerbero/bootstrap/osx.py | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | Python | 0.000001 |
d5a9d238ebdb312d3bc69071227175d0d49756a9 | Fix the security filtering to handle None as a severity. | security_check/main.py | security_check/main.py | """Checks the specified image for security vulnerabilities."""
import argparse
import json
import logging
import sys
import subprocess
_GCLOUD_CMD = ['gcloud', 'beta', 'container', 'images', '--format=json']
# Severities
_LOW = 'LOW'
_MEDIUM = 'MEDIUM'
_HIGH = 'HIGH'
_CRITICAL = 'CRITICAL'
_SEV_MAP = {
_LOW: ... | """Checks the specified image for security vulnerabilities."""
import argparse
import json
import logging
import sys
import subprocess
_GCLOUD_CMD = ['gcloud', 'beta', 'container', 'images', '--format=json']
# Severities
_LOW = 'LOW'
_MEDIUM = 'MEDIUM'
_HIGH = 'HIGH'
_SEV_MAP = {
_LOW: 0,
_MEDIUM: 1,
... | Python | 0 |
661f048364a44e70f5c70202b392692c58850bee | Revert "Revert "Add after hana environment set up (#12878)" (#12900)" (#12901) | sap_hana/tests/conftest.py | sap_hana/tests/conftest.py | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from contextlib import closing
from copy import deepcopy
import pytest
from hdbcli.dbapi import Connection as HanaConnection
from datadog_checks.dev import WaitFor, docker_run
from datadog_checks.dev.con... | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from contextlib import closing
from copy import deepcopy
import pytest
from hdbcli.dbapi import Connection as HanaConnection
from datadog_checks.dev import WaitFor, docker_run
from datadog_checks.dev.con... | Python | 0 |
da9a50ad2d5a5a254c7a842407d046485e410057 | Drop excessive import | satchless/util/__init__.py | satchless/util/__init__.py | from decimal import Decimal
def decimal_format(value, min_decimal_places=0):
decimal_tuple = value.as_tuple()
have_decimal_places = -decimal_tuple.exponent
digits = list(decimal_tuple.digits)
while have_decimal_places < min_decimal_places:
digits.append(0)
have_decimal_places += 1
w... | from decimal import Decimal
import locale
def decimal_format(value, min_decimal_places=0):
decimal_tuple = value.as_tuple()
have_decimal_places = -decimal_tuple.exponent
digits = list(decimal_tuple.digits)
while have_decimal_places < min_decimal_places:
digits.append(0)
have_decimal_pla... | Python | 0 |
b32eab807b54c9c378542474631b3bdbced94456 | add filter | cogs/r9k.py | cogs/r9k.py | import asyncio
import logging
import re
from cogs.cog import Cog
from utils import unzalgo
logger = logging.getLogger('terminal')
class R9K(Cog):
def __init__(self, bot):
super().__init__(bot)
self._messages = []
self._update_task = asyncio.run_coroutine_threadsafe(self._update_loop(), lo... | import asyncio
import logging
import re
from cogs.cog import Cog
from utils import unzalgo
logger = logging.getLogger('terminal')
class R9K(Cog):
def __init__(self, bot):
super().__init__(bot)
self._messages = []
self._update_task = asyncio.run_coroutine_threadsafe(self._update_loop(), lo... | Python | 0.000002 |
75c0861608871de2a2b1a6b4f2ea89c800dd8c07 | Make verbose loading messages optional | pava/implementation/__init__.py | pava/implementation/__init__.py | import new
import sys
DEBUG = False
method_count = 0
def method(argcount, nlocals, stacksize, flags, codestring, constants, names,
varnames, filename, name, firstlineno, lnotab, modules, static):
global method_count
if DEBUG:
print 'define', name, method_count
method_count += 1
g... | import sys
method_count = 0
def method(argcount, nlocals, stacksize, flags, codestring, constants, names,
varnames, filename, name, firstlineno, lnotab, modules, static):
global method_count
print 'define', name, method_count
method_count += 1
globals_dict = {}
for module_name in modu... | Python | 0.000037 |
c62d69249f7413e2142f7147ccce0872dbbae90a | Fix nipap CLI setup.py to include man file | nipap-cli/setup.py | nipap-cli/setup.py | #!/usr/bin/env python
from distutils.core import setup
import subprocess
import sys
import nipap_cli
# return all the extra data files
def get_data_files():
# This is a bloody hack to circumvent a lack of feature with Python distutils.
# Files specified in the data_files list cannot be renamed upon installa... | #!/usr/bin/env python
from distutils.core import setup
import nipap_cli
# This is a bloody hack to circumvent a lack of feature with Python distutils.
# Files specified in the data_files list cannot be renamed upon installation
# and we don't want to keep two copies of the .nipaprc file in git
import shutil
shutil.c... | Python | 0 |
60b705ac031aa885306c31c96743b0fbc4c963a3 | Fix dbcursor issue | sso/services/__init__.py | sso/services/__init__.py | import settings
from django.db import load_backend, transaction, IntegrityError
def get_api(api):
if settings.DISABLE_SERVICES:
return BaseService()
try:
mod = __import__(api)
except ImportError:
raise Exception('Error creating service')
for i in api.split(".")[1:]:
m... | import settings
from django.db import load_backend, transaction, IntegrityError
def get_api(api):
if settings.DISABLE_SERVICES:
return BaseService()
try:
mod = __import__(api)
except ImportError:
raise Exception('Error creating service')
for i in api.split(".")[1:]:
m... | Python | 0 |
aacace8b3215a3303325b5ad848b4b69b92261f3 | update keypair hook to match route53 update | stacker/hooks/keypair.py | stacker/hooks/keypair.py | import logging
import os
import boto3
from . import utils
logger = logging.getLogger(__name__)
def find(lst, key, value):
for i, dic in enumerate(lst):
if dic[key] == value:
return lst[i]
return False
def ensure_keypair_exists(provider, context, **kwargs):
"""Ensure a specific key... | import logging
import os
import boto3
from . import utils
logger = logging.getLogger(__name__)
def find(lst, key, value):
for i, dic in enumerate(lst):
if dic[key] == value:
return lst[i]
return False
def ensure_keypair_exists(provider, context, **kwargs):
"""Ensure a specific key... | Python | 0 |
dc007104ad760c8e07e7444a8d620d8b2d90fbef | Fix preferences API authentication | smart/accesscontrol/rules/accesstoken.py | smart/accesscontrol/rules/accesstoken.py | """
Rules for Accounts
"""
from smart.views import *
from smart.models.rdf_rest_operations import *
from smart.models.record_object import *
try:
from smart.plugins import *
except ImportError: pass
def check_token_for_record_wrapper(token):
def check_token_for_record(request, view_func, view_args, vie... | """
Rules for Accounts
"""
from smart.views import *
from smart.models.rdf_rest_operations import *
from smart.models.record_object import *
try:
from smart.plugins import *
except ImportError: pass
def check_token_for_record_wrapper(token):
def check_token_for_record(request, view_func, view_args, vie... | Python | 0.000013 |
b16d5c08b5766e40fbf1773e3490dce461b20098 | Exit code as int. | ci/github-pullrequest.py | ci/github-pullrequest.py | import json
import sys
import os
import requests
token = os.environ['GITHUB_ACCESS_TOKEN']
with open('version/version') as version_file:
version = version_file.read()
print("Making PR request to this release {}".format(version))
response = requests.post(
url='https://api.github.com/repos/aws-quickstart/quic... | import json
import sys
import os
import requests
token = os.environ['GITHUB_ACCESS_TOKEN']
with open('version/version') as version_file:
version = version_file.read()
print("Making PR request to this release {}".format(version))
response = requests.post(
url='https://api.github.com/repos/aws-quickstart/quic... | Python | 0 |
b1bc019320eaa8ceb7a70eca21b20fcda9cf609e | Add a timeout to the nginx cache clearing request | ckanext/nhm/lib/cache.py | ckanext/nhm/lib/cache.py | # !/usr/bin/env python
# encoding: utf-8
#
# This file is part of ckanext-nhm
# Created by the Natural History Museum in London, UK
import logging
import requests
from ckan.plugins import toolkit
log = logging.getLogger(__name__)
def cache_clear_nginx_proxy():
'''Clear NGINX Proxy Cache - issue PURGE request t... | # !/usr/bin/env python
# encoding: utf-8
#
# This file is part of ckanext-nhm
# Created by the Natural History Museum in London, UK
import logging
import requests
from ckan.plugins import toolkit
log = logging.getLogger(__name__)
def cache_clear_nginx_proxy():
'''Clear NGINX Proxy Cache - issue PURGE request t... | Python | 0 |
c7990836b51cc5e05c5ae3bd49a316c418bac44e | Revert "redirect www.storycheck.co.za to storycheck.co.za" | code4sa/middleware.py | code4sa/middleware.py | from django.http import HttpResponse, HttpResponsePermanentRedirect, Http404
import newrelic.agent
class RedirectsMiddleware(object):
redirects = {
# domain (without www.) -> full new URL
'living-wage.code4sa.org': 'http://livingwage.code4sa.org/',
'livingwagestory.code4sa.org': 'http://l... | from django.http import HttpResponse, HttpResponsePermanentRedirect, Http404
import newrelic.agent
class RedirectsMiddleware(object):
redirects = {
# domain (without www.) -> full new URL
'living-wage.code4sa.org': 'http://livingwage.code4sa.org/',
'livingwagestory.code4sa.org': 'http://l... | Python | 0 |
7e6dc283dbecf4bf9674559198b4a2c06e9f4c2e | Fix unicode import in test | spacy/tests/regression/test_issue1799.py | spacy/tests/regression/test_issue1799.py | '''Test sentence boundaries are deserialized correctly,
even for non-projective sentences.'''
from __future__ import unicode_literals
import pytest
import numpy
from ... tokens import Doc
from ... vocab import Vocab
from ... attrs import HEAD, DEP
def test_issue1799():
problem_sentence = 'Just what I was looking... | '''Test sentence boundaries are deserialized correctly,
even for non-projective sentences.'''
import pytest
import numpy
from ... tokens import Doc
from ... vocab import Vocab
from ... attrs import HEAD, DEP
def test_issue1799():
problem_sentence = 'Just what I was looking for.'
heads_deps = numpy.asarray([[... | Python | 0.00034 |
b4214ec8cbacfe383b0f436df5cf49653a609e12 | Fix formatting of print in run function. | scripts/lib/zulip_tools.py | scripts/lib/zulip_tools.py | #!/usr/bin/env python
from __future__ import print_function
import datetime
import errno
import os
import pwd
import shutil
import subprocess
import sys
import time
if False:
from typing import Sequence, Any
DEPLOYMENTS_DIR = "/home/zulip/deployments"
LOCK_DIR = os.path.join(DEPLOYMENTS_DIR, "lock")
TIMESTAMP_FOR... | #!/usr/bin/env python
from __future__ import print_function
import datetime
import errno
import os
import pwd
import shutil
import subprocess
import sys
import time
if False:
from typing import Sequence, Any
DEPLOYMENTS_DIR = "/home/zulip/deployments"
LOCK_DIR = os.path.join(DEPLOYMENTS_DIR, "lock")
TIMESTAMP_FOR... | Python | 0.000003 |
ebdf2f9eb47ac52adb02ad87f40dcc8874910c21 | Change witness heading information; sort reference texts to the top. | scripts/proteus-cluster.py | scripts/proteus-cluster.py | from __future__ import print_function
import sys
from re import sub
from pyspark.sql import SparkSession, Row
from pyspark.sql.functions import col, udf, regexp_replace
def formatPassage(r):
text = ""
source = 'From ' + (('<cite>%s</cite>' % r.source) or 'unknown source')
title = r.title or source
if... | from __future__ import print_function
import sys
from re import sub
from pyspark.sql import SparkSession, Row
from pyspark.sql.functions import col, udf, regexp_replace
def formatPassage(r):
text = ""
if r.url:
text += "<h2><a href=\"%s\">%s</a></h2>" % (r.url, (r.title or r.id))
else:
te... | Python | 0 |
a2f66370843658090ccca3fbdbb2ff9d12c7605a | Update to current spotpy code stlye | spotpy/examples/tutorial_own_database.py | spotpy/examples/tutorial_own_database.py | '''
Copyright 2015 by Tobias Houska
This file is part of Statistical Parameter Estimation Tool (SPOTPY).
:author: Tobias Houska
This example implements the Rosenbrock function into SPOT.
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ im... | '''
Copyright 2015 by Tobias Houska
This file is part of Statistical Parameter Estimation Tool (SPOTPY).
:author: Tobias Houska
This example implements the Rosenbrock function into SPOT.
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ im... | Python | 0 |
2ccdaf4ac5397a7fb1795cf3f3e52348e775dbbb | Bump version. | settingsjs/__init__.py | settingsjs/__init__.py | __version__ = (0, 1, 3)
def get_version():
return '.'.join(map(str, __version__))
| __version__ = (0, 1, 2)
def get_version():
return '.'.join(map(str, __version__))
| Python | 0 |
2b299ab6b26ab5f0cfdbe08d3bff57a03483ca93 | update import script for Epsom & Ewell (closes #2134) | polling_stations/apps/data_collection/management/commands/import_epsom_and_ewell.py | polling_stations/apps/data_collection/management/commands/import_epsom_and_ewell.py | from addressbase.models import Address
from uk_geo_utils.helpers import Postcode
from data_collection.github_importer import BaseGitHubImporter
class Command(BaseGitHubImporter):
srid = 27700
districts_srid = 27700
council_id = "E07000208"
elections = ["parl.2019-12-12"]
scraper_name = "wdiv-scra... | from addressbase.models import Address
from uk_geo_utils.helpers import Postcode
from data_collection.github_importer import BaseGitHubImporter
class Command(BaseGitHubImporter):
srid = 27700
districts_srid = 27700
council_id = "E07000208"
elections = ["europarl.2019-05-23"]
scraper_name = "wdiv-... | Python | 0 |
55d7749ca06dda5c636aced8aed3f0bd9a3d6acc | Print tracebacks on exception | commands.py | commands.py | import asyncio
import sys
import traceback
client = None
class Event: #Class to store event data
def __init__(self, f, triggerType, name, **kwargs):
self.handler = f
self.name=name
self.triggerType = triggerType
triggerHandlers = {
"\\message" : {},
"\\... | import asyncio
import sys
client = None
class Event: #Class to store event data
def __init__(self, f, triggerType, name, **kwargs):
self.handler = f
self.name=name
self.triggerType = triggerType
triggerHandlers = {
"\\message" : {},
"\\messageNoBot" : {}... | Python | 0.000001 |
f4f600a82d652d25cb7fe8fcc3bbea8efa49c0b8 | update help | commands.py | commands.py | import requests
import random
import config
def help():
msg = """
*Command list*
`/js <library>` - checks if library is cool or not
`/help` - return this
`/sadness` - cry
"""
return 'message', {'text': msg, 'parse_mode': 'Markdown'}
def js(string):
if string:
return 'message', {'text': '{} i... | import requests
import random
import config
def help():
msg = """
*Commands:*
`/js <library>`: checks if library is cool or not
`/help`: return this
"""
return 'message', {'text': msg, 'parse_mode': 'Markdown'}
def js(string):
if string:
return 'message', {'text': '{} is gay'.format(string)}... | Python | 0 |
cf1728cd472b6675ce3e253ec350972c09e7c5f6 | fix update-ordinals.py for posterity to reflect best scripting practices | scripts/update-ordinals.py | scripts/update-ordinals.py | import sys
import logging
from pylons import c
from ming.orm import session
from ming.orm.ormsession import ThreadLocalORMSession
from allura import model as M
log = logging.getLogger('update-ordinals')
log.addHandler(logging.StreamHandler(sys.stdout))
def main():
test = sys.argv[-1] == 'test'
num_projects_... | import sys
import logging
from pylons import c
from ming.orm import session
from ming.orm.ormsession import ThreadLocalORMSession
from allura import model as M
log = logging.getLogger(__name__)
handler = logging.StreamHandler(sys.stdout)
log.addHandler(handler)
def main():
test = sys.argv[-1] == 'test'
num_... | Python | 0 |
a9b7115f2dadf568317dfa26d5835c669133308e | implement builder + operator | simpleplotly/figure.py | simpleplotly/figure.py | # -*- coding: utf-8 -*-
import plotly.graph_objs as go
from plotly import tools
from .layout import ElementBuilder
from .plot import AtomBuilder
from .subplot import SubPlotSpec, PlotCanvas
import itertools
class FigureHolder(object):
def __init__(self, figure):
self.figure = figure
def plot(self, ... | # -*- coding: utf-8 -*-
import plotly.graph_objs as go
from plotly import tools
from .layout import ElementBuilder
from .plot import AtomBuilder
from .subplot import SubPlotSpec, PlotCanvas
import itertools
class FigureHolder(object):
def __init__(self, figure):
self.figure = figure
def plot(self, ... | Python | 0.000004 |
0c5daf77caaa6674a011b94ac06c308dbb430cc5 | add PDF and TXT minetype | composer.py | composer.py | #!/usr/bin/python
from types import *
import db
import json
class Composer():
def __init__(self, output_format, db):
self.output_format = output_format
self.db = db
def compose(self, content, path):
if self.output_format == "JSON":
if type(content) is ListType: # directory list, DIR
r... | #!/usr/bin/python
from types import *
import db
import json
class Composer():
def __init__(self, output_format, db):
self.output_format = output_format
self.db = db
def compose(self, content, path):
if self.output_format == "JSON":
if type(content) is ListType: # directory list, DIR
r... | Python | 0 |
e9cb40d1c044aa48beb221686df3cbfb47524a72 | Remove unused import | statirator/blog/views.py | statirator/blog/views.py | from __future__ import absolute_import
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from django.views.generic.base import TemplateView
from .models import Post, I18NTag
class PostView(DetailView):
models = Post
def get_queryset(self):
qs = Post.... | from __future__ import absolute_import
from django.db.models import Count
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from django.views.generic.base import TemplateView
from .models import Post, I18NTag
class PostView(DetailView):
models = Post
def get... | Python | 0.000001 |
c767ec0308d61c73b41bf20f9c5bf069238a04e4 | change in the iteration state to make things slightly more readable. | src/python/Problem066.py | src/python/Problem066.py | '''
Created on Feb 21, 2012
@author: mchrzanowski
'''
from math import sqrt
from Problem064 import getQuotients
from Problem065 import findRationalApproximation
from time import time
LIMIT = 10 ** 3
def getConvergentPair(i, difference=1):
''' a generator that will return iterations of increasingly-precise nume... | '''
Created on Feb 21, 2012
@author: mchrzanowski
'''
from math import sqrt
from Problem064 import getQuotients
from Problem065 import findRationalApproximation
from time import time
LIMIT = 10 ** 3
def getConvergentPair(i, difference=1):
''' a generator that will return iterations of increasingly-precise nume... | Python | 0.000002 |
4532880091643d48bfb9df2a0a028d80c7db6864 | Use same metavar for --scripts in up and provision | cloudenvy/commands/up.py | cloudenvy/commands/up.py | import logging
from cloudenvy import exceptions
import cloudenvy.envy
class Up(cloudenvy.envy.Command):
def _build_subparser(self, subparsers):
help_str = 'Create and optionally provision an ENVy.'
subparser = subparsers.add_parser('up', help=help_str,
d... | import logging
from cloudenvy import exceptions
import cloudenvy.envy
class Up(cloudenvy.envy.Command):
def _build_subparser(self, subparsers):
help_str = 'Create and optionally provision an ENVy.'
subparser = subparsers.add_parser('up', help=help_str,
d... | Python | 0 |
d6b51c610ac6002217785107858eb4f749e6367b | Fix bug in project get_yaml method | clowder/model/project.py | clowder/model/project.py | """Model representation of clowder.yaml project"""
import os
from clowder.utility.print_utilities import (
print_project_status,
print_validation,
print_verbose_status
)
from clowder.utility.git_utilities import (
git_groom,
git_stash,
git_is_dirty
)
from clowder.utility.git_utilities import (
... | """Model representation of clowder.yaml project"""
import os
from clowder.utility.print_utilities import (
print_project_status,
print_validation,
print_verbose_status
)
from clowder.utility.git_utilities import (
git_groom,
git_stash,
git_is_dirty
)
from clowder.utility.git_utilities import (
... | Python | 0 |
da3c550bfd935fcdf18c04c021b3ff0cd33e13b3 | Fix show_launcher logic | sugar/activity/bundle.py | sugar/activity/bundle.py | import logging
import os
from ConfigParser import ConfigParser
class Bundle:
"""Info about an activity bundle. Wraps the activity.info file."""
def __init__(self, path):
self._name = None
self._icon = None
self._service_name = None
self._show_launcher = False
self._valid = True
self._path = path
self.... | import logging
import os
from ConfigParser import ConfigParser
class Bundle:
"""Info about an activity bundle. Wraps the activity.info file."""
def __init__(self, path):
self._name = None
self._icon = None
self._service_name = None
self._show_launcher = False
self._valid = True
self._path = path
self.... | Python | 0.000002 |
a21c0ec3ee4518f9072fbc5181fb419b1973afd3 | Fix style #373 | shinken/reactionnerlink.py | shinken/reactionnerlink.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012 :
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012 :
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you ... | Python | 0 |
8d59abab151cbdecb623b7b184dade6193144497 | Store Group enums as strings in Database (internally still as enums) | sigma_core/models/group.py | sigma_core/models/group.py | from django.db import models
class Group(models.Model):
class Meta:
pass
VIS_PUBLIC = 'public'
VIS_PRIVATE = 'private'
VISIBILITY_CHOICES = (
(VIS_PUBLIC, 'Anyone can see the group'),
(VIS_PRIVATE, 'Group is not visible')
)
MEMBER_ANYONE = 'anyo... | from django.db import models
class Group(models.Model):
class Meta:
pass
VIS_PUBLIC = 0
VIS_PRIVATE = 1
VISIBILITY_CHOICES = (
(VIS_PUBLIC, 'PUBLIC'),
(VIS_PRIVATE, 'PRIVATE')
)
MEMBER_ANYONE = 0
MEMBER_REQUEST = 1
MEMBER_INVITATION = 2
MEMBERSHIP_CHOICES ... | Python | 0 |
5e66929d051047385cce9d7e910ce02b61fa1afe | Use joined loading for follower lists | skylines/model/follower.py | skylines/model/follower.py | # -*- coding: utf-8 -*-
from datetime import datetime
from sqlalchemy import ForeignKey, Column
from sqlalchemy.types import Integer, DateTime
from sqlalchemy.orm import relationship
from .base import DeclarativeBase
from .session import DBSession
class Follower(DeclarativeBase):
__tablename__ = 'followers'
... | # -*- coding: utf-8 -*-
from datetime import datetime
from sqlalchemy import ForeignKey, Column
from sqlalchemy.types import Integer, DateTime
from sqlalchemy.orm import relationship
from .base import DeclarativeBase
from .session import DBSession
class Follower(DeclarativeBase):
__tablename__ = 'followers'
... | Python | 0 |
244d46b9cfb3d3420979dd3d747b20ab384707d3 | Fix ImportError in test | smbackend/test/conftest.py | smbackend/test/conftest.py | import os
import json
import pytest
import haystack
from django.utils import timezone
from django.conf import settings
from django.core.management import call_command
from services.models import Unit, UnitConnection, Organization, OntologyWord
def read_config(name):
return json.load(open(
os.path.join(
... | import os
import json
import pytest
import haystack
from django.utils import timezone
from django.conf import settings
from django.core.management import call_command
from services.models import Unit, UnitConnection, Organization, Service
def read_config(name):
return json.load(open(
os.path.join(
... | Python | 0.000003 |
40f4f721b59108a929ca0f8a8f9df6619ebccea3 | Fix persona backend | social/backends/persona.py | social/backends/persona.py | """
BrowserID support
"""
from social.backends.base import BaseAuth
from social.exceptions import AuthFailed, AuthMissingParameter
class PersonaAuth(BaseAuth):
"""BrowserID authentication backend"""
name = 'persona'
def get_user_id(self, details, response):
"""Use BrowserID email as ID"""
... | """
BrowserID support
"""
from social.backends.base import BaseAuth
from social.exceptions import AuthFailed, AuthMissingParameter
class PersonaAuth(BaseAuth):
"""BrowserID authentication backend"""
name = 'persona'
def get_user_id(self, details, response):
"""Use BrowserID email as ID"""
... | Python | 0.000002 |
538bae320ba46764fbe8cce3aef19f22ddd1b1ec | Add simple Lede to ClustersInJSON | articulate/clustering/clusterformats.py | articulate/clustering/clusterformats.py | """Clusters for Humans"""
import itertools
import simplejson as json
from articulate.pymotherlode.api import *
def getLede(content):
#ledeRE = re.compile('^(.*?(?<!\b\w)[.?!])\s+[A-Z0-9]')
#ledes = ledeRE.match(content)
#return ledes.group(0)
lede = content[:50]
lede += "..."
return lede
def clustersToJSON(art... | """Clusters for Humans"""
import itertools
import simplejson as json
from articulate.pymotherlode.api import *
def clustersToJSON(articles, assignments, insertContent):
tag = "kmeans"
clusters = list(set(assignments))
clustersForHumans = []
if insertContent:
print "Inserting content into ClusterInJSON"
else:... | Python | 0.000002 |
273a0b264955780dbc0341a46936e2cc8941f5cd | Simplify get_name | binstar_client/utils/projects/models.py | binstar_client/utils/projects/models.py | import inspect
import os
import tarfile
from tempfile import SpooledTemporaryFile
from binstar_client.errors import BinstarError
class CondaProject(object):
# TODO: This class will be moved into Anaconda-Project
def __init__(self, project_path, *args, **kwargs):
self.project_path = project_path
... | import inspect
import os
import tarfile
from tempfile import SpooledTemporaryFile
from binstar_client.errors import BinstarError
class CondaProject(object):
# TODO: This class will be moved into Anaconda-Project
def __init__(self, project_path, *args, **kwargs):
self.project_path = project_path
... | Python | 0.011797 |
f15ebf385bfc6ac706b2344db12a7be9967540ef | Test for symm.symmetrize_space | symm/test/test_addons.py | symm/test/test_addons.py | #
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import unittest
import numpy
from pyscf import gto
from pyscf import scf
from pyscf.symm import addons
mol = gto.Mole()
mol.build(
verbose = 0,
atom = [
["O" , (0. , 0. , 0.)],
[1 , (0. , -0.757 , 0.587)],
[1 , (0. , 0.757 , 0.587)] ],
b... | #
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import unittest
import numpy
from pyscf import gto
from pyscf import scf
from pyscf.symm import addons
mol = gto.Mole()
mol.build(
verbose = 0,
atom = [
["O" , (0. , 0. , 0.)],
[1 , (0. , -0.757 , 0.587)],
[1 , (0. , 0.757 , 0.587)] ],
b... | Python | 0 |
cd0eb0f8dc0f9cceb370407ba1fa876238951af5 | Fix Windows unittest build on VC2012 R=mark at https://breakpad.appspot.com/539003/ | src/client/windows/unittests/testing.gyp | src/client/windows/unittests/testing.gyp | # Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and t... | # Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and t... | Python | 0.000003 |
57d07fa351795dff22c7d706534b047c6720f829 | Default to 'text' rather than 'python' | splunk_handler/__init__.py | splunk_handler/__init__.py | import logging
import socket
import traceback
from threading import Thread
import requests
class SplunkHandler(logging.Handler):
"""
A logging handler to send events to a Splunk Enterprise instance
"""
def __init__(self, host, port, username, password, index, hostname=None, source=None, sourcetype=... | import logging
import socket
import traceback
from threading import Thread
import requests
class SplunkHandler(logging.Handler):
"""
A logging handler to send events to a Splunk Enterprise instance
"""
def __init__(self, host, port, username, password, index, hostname=None, source=None, sourcetype=... | Python | 0.999589 |
abebb922de7bfbaed75e14b2a53c9cf45534b72f | check loader | src/apps/loader/handler.py | src/apps/loader/handler.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from children.models import Child
from history.models import ParamHistory, Param
from common.utils import get_dictionary_item
def values_is_in_dictionary(values_list, type_name):
for value in values_list:
if get_dictionary_item(value, type_name):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from children.models import Child
from history.models import ParamHistory, Param
from common.utils import get_dictionary_item
def values_is_in_dictionary(values_list, type_name):
for value in values_list:
if get_dictionary_item(value, type_name):
... | Python | 0.000002 |
9839aa026986a35c1c13363169116193f4602355 | Coding is hard | conftest.py | conftest.py | #
# See https://github.com/dials/dials/wiki/pytest for documentation on how to
# write and run pytest tests, and an overview of the available features.
#
from __future__ import absolute_import, division, print_function
import os
import pytest
@pytest.fixture(scope="session")
def dials_regression():
'''Return the a... | #
# See https://github.com/dials/dials/wiki/pytest for documentation on how to
# write and run pytest tests, and an overview of the available features.
#
from __future__ import absolute_import, division, print_function
import os
import pytest
@pytest.fixture(scope="session")
def dials_regression():
'''Return the a... | Python | 0.999986 |
f07cbc4a36c857468869c075bc695e977bea19b8 | fix CATKIN_IGNORE to affect the folder where it is instead of only ignoring subfolders | src/catkin_pkg/packages.py | src/catkin_pkg/packages.py | # Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | # Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | Python | 0 |
2cd19b395f4320330b66dff1ef98d149f3a40a31 | Add test for notify dataset/update | ckanext/syndicate/tests/test_plugin.py | ckanext/syndicate/tests/test_plugin.py | from mock import patch
import unittest
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
from ckanext.syndicate.plugin import SyndicatePlugin
class TestNotify(unittest.TestCase):
def setUp(self):
super(TestNotify, self).setUp()
self.entity = model.Package()
... | from mock import patch
import unittest
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
from ckanext.syndicate.plugin import SyndicatePlugin
class TestPlugin(unittest.TestCase):
def test_notify_syndicates_task(self):
entity = model.Package()
entity.extras = ... | Python | 0 |
4339393275a347044cd656b84b05a4fe33a91914 | should have been part of 6ca53737b4a38fe | bin/assess-vulnerabilities-risk.py | bin/assess-vulnerabilities-risk.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This script analyzes Clair generated vulnerabilities.
The script is intended to be incorporated into a CI process
to generate a non-zero exit status when vulnerabilities
exceed an acceptable threshold.
"""
import logging
import optparse
import re
import sys
import time
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This script analyzes Clair generated vulnerabilities.
The script is intended to be incorporated into a CI process
to generate a non-zero exit status when vulnerabilities
exceed an acceptable threshold.
"""
import logging
import optparse
import re
import sys
import time
... | Python | 0.999972 |
6d6fc2ed77db220ddfeeaa8709a3518724bb278a | Correct paths in extraction of shape per msa | bin/data_prep/extract_shape_msa.py | bin/data_prep/extract_shape_msa.py | """extract_shape_msa.py
Output one shapefile per MSA containing all the blockgroups it contains
"""
import os
import csv
import fiona
#
# Import MSA to blockgroup crosswalk
#
msa_to_bg = {}
with open('data/crosswalks/msa_blockgroup.csv', 'r') as source:
reader = csv.reader(source, delimiter='\t')
reader.nex... | """extract_shape_msa.py
Output one shapefile per MSA containing all the blockgroups it contains
"""
import os
import csv
import fiona
#
# Import MSA to blockgroup crosswalk
#
msa_to_bg = {}
with open('data/2000/crosswalks/msa_blockgroup.csv', 'r') as source:
reader = csv.reader(source, delimiter='\t')
reade... | Python | 0.00001 |
80a1912ce69fd356d6c54bb00f946fbc7874a9ce | Allow multiple alarms for same metric type | bluecanary/set_cloudwatch_alarm.py | bluecanary/set_cloudwatch_alarm.py | import boto3
from bluecanary.exceptions import NamespaceError
from bluecanary.utilities import throttle
@throttle()
def set_cloudwatch_alarm(identifier, **kwargs):
if not kwargs.get('Dimensions'):
kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs)
if not kwargs.get('AlarmName'):
kw... | import boto3
from bluecanary.exceptions import NamespaceError
from bluecanary.utilities import throttle
@throttle()
def set_cloudwatch_alarm(identifier, **kwargs):
if not kwargs.get('Dimensions'):
kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs)
if not kwargs.get('AlarmName'):
kw... | Python | 0.00001 |
ecc5f2a1e1638bf2a97b1a41a22c67802d077fc0 | fix monogo-insert can not get collection if it is not exist. | boliau/plugins/mongo/missionlib.py | boliau/plugins/mongo/missionlib.py | #!/usr/bin/env python
# -*- encoding=utf8 -*-
#
# File: missionlib.py
#
# Copyright (C) 2013 Hsin-Yi Chen (hychen)
# Author(s): Hsin-Yi Chen (hychen) <ossug.hychen@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Sof... | #!/usr/bin/env python
# -*- encoding=utf8 -*-
#
# File: missionlib.py
#
# Copyright (C) 2013 Hsin-Yi Chen (hychen)
# Author(s): Hsin-Yi Chen (hychen) <ossug.hychen@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Sof... | Python | 0 |
b514f1c20e479732a0e636bb5fb484abb9f34662 | fix test that fails certain times of day | springboard_iogt/tests/test_filters.py | springboard_iogt/tests/test_filters.py | from operator import attrgetter
from datetime import datetime, timedelta
from mock import Mock
from pyramid import testing
from springboard.tests import SpringboardTestCase
from springboard.views.base import SpringboardViews
from springboard_iogt import filters
class TestFilters(SpringboardTestCase):
maxDiff ... | from operator import attrgetter
from datetime import datetime, timedelta
from mock import Mock
from pyramid import testing
from springboard.tests import SpringboardTestCase
from springboard.views.base import SpringboardViews
from springboard_iogt import filters
class TestFilters(SpringboardTestCase):
maxDiff ... | Python | 0.000026 |
5c1576ae50f18d5ff96a3d564df120465b060e04 | add tab loop to bundle readme view (#255) | conjure/ui/views/bundle_readme_view.py | conjure/ui/views/bundle_readme_view.py | """ Service Walkthrough view
List out the updated bundle in a cleaner view showing what
charms and their relations will be done.
"""
from glob import glob
import os
from urwid import BoxAdapter, Filler, ListBox, Pile, Text, WidgetWrap
from conjure import utils
from conjure.app_config import app
from ubuntui.ev impor... | """ Service Walkthrough view
List out the updated bundle in a cleaner view showing what
charms and their relations will be done.
"""
from glob import glob
import os
from urwid import BoxAdapter, Filler, ListBox, Pile, Text, WidgetWrap
from conjure import utils
from conjure.app_config import app
from ubuntui.ev impor... | Python | 0 |
67d0388102c2bbf7abff17a23979bbfd02940ee1 | fix gmock/gtest installation | build/fbcode_builder/specs/gmock.py | build/fbcode_builder/specs/gmock.py | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
def fbcode_builder_spec(builder):
builder.add_option(
'google/googletest:cmake_defines',
{'BUILD_GTEST': 'ON'}
)
return... | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
def fbcode_builder_spec(builder):
return {
'steps': [
# google mock also provides the gtest libraries
builder.g... | Python | 0.000005 |
e65dd84adb878d073383bb681e4a38c8b94444e4 | Fix from_torch paths | src/models/from_torch.py | src/models/from_torch.py | # coding=utf-8
from __future__ import absolute_import, division, print_function
import numpy as np
import os
import pickle as pkl
import torchfile
CONV_TRANSPOSE = (2, 3, 1, 0)
def from_torch(torch_model):
def expand_module(module):
if 'weight' in module._obj or b'weight' in module._obj:
ret... | # coding=utf-8
from __future__ import absolute_import, division, print_function
import numpy as np
import os
import pickle as pkl
import torchfile
CONV_TRANSPOSE = (2, 3, 1, 0)
def from_torch(torch_model):
def expand_module(module):
if 'weight' in module._obj or b'weight' in module._obj:
ret... | Python | 0.000007 |
f5d419c95ea86719afff9924dbd837f574c216ae | Revert "Restore proper default color for Toolbar" | kivymd/toolbar.py | kivymd/toolbar.py | # -*- coding: utf-8 -*-
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.metrics import dp
from kivy.properties import ListProperty, StringProperty, OptionProperty
from kivy.uix.boxlayout import BoxLayout
from kivymd.backgroundcolorbehavior import BackgroundColorBehavior
from kivymd.button import MD... | # -*- coding: utf-8 -*-
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.metrics import dp
from kivy.properties import ListProperty, StringProperty, OptionProperty
from kivy.uix.boxlayout import BoxLayout
from kivymd.backgroundcolorbehavior import BackgroundColorBehavior
from kivymd.button import MD... | Python | 0 |
a84ccc871b5f85f80844d1cd413ddbf44194da17 | Add version information to documentation | doc/conf.py | doc/conf.py | # coding=utf-8
import ibei
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup ------------------------------------------... | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | Python | 0 |
c2d622e1d800c7d89c20ba224550a1692d5e497f | update intersphinx for sqlalchemy | doc/conf.py | doc/conf.py | # -*- coding: utf-8 -*-
import os
import sys
import alagitpull
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
sys.path.insert(0, project_root)
sys.path.append(os.path.abspath(
os.path.join(os.path.dirname(__file__), "_ext")))
# package data
abo... | # -*- coding: utf-8 -*-
import os
import sys
import alagitpull
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
sys.path.insert(0, project_root)
sys.path.append(os.path.abspath(
os.path.join(os.path.dirname(__file__), "_ext")))
# package data
abo... | Python | 0 |
94c09cb1442f064496a80be7f49781f640bd3a70 | Merge [14531] from 1.0-stable | sample-plugins/workflow/StatusFixer.py | sample-plugins/workflow/StatusFixer.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2013 Edgewall Software
# Copyright (C) 2007 Eli Carter <retracile@gmail.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2013 Edgewall Software
# Copyright (C) 2007 Eli Carter <retracile@gmail.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.... | Python | 0.000001 |
7611a4b3e064868c37b9f52778c8fe9f721e86c5 | Update namespace monitor with exception handling | polyaxon/events/management/commands/monitor_namespace.py | polyaxon/events/management/commands/monitor_namespace.py | import time
from kubernetes.client.rest import ApiException
from django.conf import settings
from django.db import InterfaceError, ProgrammingError, OperationalError
from clusters.models import Cluster
from events.management.commands._base_monitor import BaseMonitorCommand
from events.monitors import namespace
from ... | import time
from kubernetes.client.rest import ApiException
from django.conf import settings
from clusters.models import Cluster
from events.management.commands._base_monitor import BaseMonitorCommand
from events.monitors import namespace
from polyaxon_k8s.manager import K8SManager
class Command(BaseMonitorCommand... | Python | 0 |
ad26a38263655ddfb3421f7cb748ce7782a91aeb | Fix tests_require | setup.py | setup.py | #
# Copyright 2014 Infoxchange Australia
#
# 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... | #
# Copyright 2014 Infoxchange Australia
#
# 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... | Python | 0.000003 |
969acffd6562c27a53973a1fd7551bcf5c6c6cbc | tweak setup to include new version and reqs | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup, find_packages
APP_NAME = 'tarbell'
VERSION = '0.9b3'
settings = dict()
# Publish Helper.
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
settings.update(
name=APP_NAME,
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup, find_packages
APP_NAME = 'tarbell'
VERSION = '0.9b2'
settings = dict()
# Publish Helper.
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
settings.update(
name=APP_NAME,
... | Python | 0 |
0e178c8bcb0bad2146fede1e6361bc57bdbf8102 | Bump version for 0.3.0 | setup.py | setup.py | #!/usr/bin/env python
try:
from Cython.Build import cythonize
import Cython
except ImportError:
raise RuntimeError('No cython installed. Please run `pip install cython`')
if Cython.__version__ < '0.19.1':
raise RuntimeError('Old cython installed. Please run `pip install -U cython`')
from distutils.cor... | #!/usr/bin/env python
try:
from Cython.Build import cythonize
import Cython
except ImportError:
raise RuntimeError('No cython installed. Please run `pip install cython`')
if Cython.__version__ < '0.19.1':
raise RuntimeError('Old cython installed. Please run `pip install -U cython`')
from distutils.cor... | Python | 0 |
1f14b95b26e84336e4c1e8a11ea2fd06fa1a802d | Bump version to make PyPI happy | setup.py | setup.py | import os
import sys
from setuptools import setup, Extension, find_packages
ext_modules = []
# C speedups are no good for PyPy
if '__pypy__' not in sys.builtin_module_names:
ext_modules.append(
Extension('gevent_fastcgi.speedups', ['gevent_fastcgi/speedups.c']))
setup(
name='gevent-fastcgi',
vers... | import os
import sys
from setuptools import setup, Extension, find_packages
ext_modules = []
# C speedups are no good for PyPy
if '__pypy__' not in sys.builtin_module_names:
ext_modules.append(
Extension('gevent_fastcgi.speedups', ['gevent_fastcgi/speedups.c']))
setup(
name='gevent-fastcgi',
vers... | Python | 0 |
c4ec856f26e4d83eb11296480ab8180f14588934 | Update python versions | setup.py | setup.py | #!/usr/bin/env python3
from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='ogn-python',
versio... | #!/usr/bin/env python3
from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='ogn-python',
versio... | Python | 0 |
e2455de9a8a9a4d1147b75307d73f513cc866e11 | Bump setup.py version to 0.3.0. | setup.py | setup.py | from setuptools import setup
requirements = ["dataclasses==0.8;python_version<'3.7'"]
setup(
name="clr",
version="0.3.0",
description="A command line tool for executing custom python scripts.",
author="Color",
author_email="dev@getcolor.com",
url="https://github.com/color/clr",
packages=["... | from setuptools import setup
requirements = ["dataclasses==0.8;python_version<'3.7'"]
setup(
name="clr",
version="0.2.0",
description="A command line tool for executing custom python scripts.",
author="Color",
author_email="dev@getcolor.com",
url="https://github.com/color/clr",
packages=["... | Python | 0 |
0404c2d0b25d8d8e3bb542b4872361b24ea568e9 | add long description | setup.py | setup.py | # No shebang line, this module is meant to be imported
#
# Copyright 2013 Oliver Palmer
#
# 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
#
# U... | # No shebang line, this module is meant to be imported
#
# Copyright 2013 Oliver Palmer
#
# 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
#
# U... | Python | 0.999999 |
b79e11ccc4a07a5a257d2135aa9c7d3c2ff75546 | Fix released | setup.py | setup.py | from setuptools import setup
setup(
name='edn',
version='0.0.1',
packages=['edn'],
package_data={'edn': ['edn.parsley']},
install_requires=[
'iso8601>=0.1.6',
'parsley>=1.2',
'perfidy',
],
)
| from setuptools import setup
setup(
name='edn',
version='0.0.1',
packages=['edn'],
package_data={'edn': ['edn.parsley']},
install_requires=[
# iso8601 0.1.5 introduces a timezone parsing bug.
# https://bitbucket.org/micktwomey/pyiso8601/issue/8/015-parses-negative-timezones-incorre... | Python | 0 |
834c2fc600ffa6d705eb7646c0a52a1d8e4c49d9 | remove 3.6, 3.3 support | setup.py | setup.py | # coding: utf-8
import os
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
def read():
"""Build a file path from *paths* and return the contents."""
with codecs.open(os.path.join("README.rst"), "r", "utf-8") as f:
return f.read()
class... | # coding: utf-8
import os
import codecs
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
def read():
"""Build a file path from *paths* and return the contents."""
with codecs.open(os.path.join('README.rst'), 'r', "utf-8") as f:
return f.read()
class P... | Python | 0.001307 |
763d59db4d6369434c55af25caa69cf57f8d712f | Fix user statement rendering issues. | libapol/policyrep/user.py | libapol/policyrep/user.py | # Copyright 2014, Tresys Technology, LLC
#
# This file is part of SETools.
#
# SETools is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 2.1 of
# the License, or (at your option) any later ... | # Copyright 2014, Tresys Technology, LLC
#
# This file is part of SETools.
#
# SETools is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 2.1 of
# the License, or (at your option) any later ... | Python | 0 |
af3a7217b94254f2ce533deefd4d9e636b9937f9 | Bump version to 0.2-dev | setup.py | setup.py | from distutils.core import setup
setup(
name='Zuice',
version='0.2-dev',
description='A dependency injection framework for Python',
author='Michael Williamson',
author_email='mike@zwobble.org',
url='http://gitorious.org/zuice',
packages=['zuice'],
)
| from distutils.core import setup
setup(
name='Zuice',
version='0.1',
description='A dependency injection framework for Python',
author='Michael Williamson',
author_email='mike@zwobble.org',
url='http://gitorious.org/zuice',
packages=['zuice'],
)
| Python | 0 |
cfec28aca4a4da5ec89b831b1ad13e551d8d73fa | Modify setup.py | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
__version__ = "0.1.1"
setup(
name='RSK Mind',
version=__version__,
description='Framework for machine learning platform',
keywords='machine learning deep learning',
url='git@bitbucket.org:rasarmy/framework.git',
author='RSK Proj... | #!/usr/bin/env python
from setuptools import setup, find_packages
__version__ = "0.1.1"
setup(
name='RSK Mind',
version=__version__,
description='Framework for machine learning platform',
keywords='machine learning deep learning',
url='git@bitbucket.org:rasarmy/framework.git',
author='RSK Proj... | Python | 0.000001 |
c7124022925c71bc5b89e02cac059f7f9a03625d | Fix license filename in setup.py | setup.py | setup.py | import pwnedcheck
from distutils.core import setup
setup(
name="PwnedCheck",
packages=["pwnedcheck"],
package_dir={"pwnedcheck": "pwnedcheck"},
version=pwnedcheck.__version__,
description="Python package to interact with http://haveibeenpwned.com",
long_description=open("README.rst").read() + ... | import pwnedcheck
from distutils.core import setup
setup(
name="PwnedCheck",
packages=["pwnedcheck"],
package_dir={"pwnedcheck": "pwnedcheck"},
version=pwnedcheck.__version__,
description="Python package to interact with http://haveibeenpwned.com",
long_description=open("README.rst").read() + ... | Python | 0.000003 |
528d43ffdf1ae3182f20aab30d73183a6210d3be | include pxd file in depends | setup.py | setup.py | import os
from distutils.util import get_platform
import numpy as np
from Cython.Distutils import build_ext
from setuptools import Extension, find_packages, setup
platform = get_platform()
if platform.startswith("win"):
extra_compile_args = []
extra_link_args = []
else:
extra_compile_args = [
"-fP... | import os
from distutils.util import get_platform
import numpy as np
from Cython.Distutils import build_ext
from setuptools import Extension, find_packages, setup
platform = get_platform()
if platform.startswith("win"):
extra_compile_args = []
extra_link_args = []
else:
extra_compile_args = [
"-fP... | Python | 0 |
176107d2de6b559b0d7045b006941e0da5927336 | Bump SoS version requirement (INFO field fix) | setup.py | setup.py | #!/usr/bin/env python
__author__ = "Gao Wang"
__copyright__ = "Copyright 2016, Stephens lab"
__email__ = "gaow@uchicago.edu"
__license__ = "MIT"
import os, sys
sys.path.append('src')
_py_ver = sys.version_info
if _py_ver.major == 2 or (_py_ver.major == 3 and (_py_ver.minor, _py_ver.micro) < (6, 0)):
raise SystemErr... | #!/usr/bin/env python
__author__ = "Gao Wang"
__copyright__ = "Copyright 2016, Stephens lab"
__email__ = "gaow@uchicago.edu"
__license__ = "MIT"
import os, sys
sys.path.append('src')
_py_ver = sys.version_info
if _py_ver.major == 2 or (_py_ver.major == 3 and (_py_ver.minor, _py_ver.micro) < (6, 0)):
raise SystemErr... | Python | 0 |
ad15cc955413575008d6fe242d253c9fce5d744a | update setup.py | setup.py | setup.py | import os
from setuptools import setup, find_packages
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-facebox',
version='0.2',
packages=fi... | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-facebox',
version='0.2',
packages=['facebox'],
... | Python | 0.000001 |
ca1ef6d34d5ba04c6c1364b60d10314d49d00a8b | add classifiers to setup.py | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='easymail',
version='0.1.0',
author='Mathias Fussenegger',
author_email='pip@zignar.net',
url='http://pypi.python.org/pypi/easymail/',
license='LICENSE.txt',
description='abstraction layer on top of... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='easymail',
version='0.1.0',
author='Mathias Fussenegger',
author_email='pip@zignar.net',
url='http://pypi.python.org/pypi/easymail/',
license='LICENSE.txt',
description='abstraction layer on top of... | Python | 0.000001 |
ca166c74914f570fa08d95380760fc5a1bea59ba | build new fast integration | setup.py | setup.py | # coding: utf-8
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os
from distutils.core import setup
from distutils.extension import Extension
# Third-party
import numpy as np
from Cython.Distutils import build_ext
from Cython.Build import cytho... | # coding: utf-8
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os
from distutils.core import setup
from distutils.extension import Extension
# Third-party
import numpy as np
from Cython.Distutils import build_ext
from Cython.Build import cytho... | Python | 0 |
2ffa5e8f5c8b3beb0026727d12f8d83cc9f931fe | Bump up version | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup(
name='djaccount',
version='0.0.4-alpha1',
description='Django account manager',
author='Yehuda Deutsch',
author_email='yeh@uda.co.il',
l... | import os
from setuptools import setup, find_packages
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup(
name='djaccount',
version='0.0.3-alpha2',
description='Django account manager',
author='Yehuda Deutsch',
author_email='yeh@uda.co.il',
l... | Python | 0 |
f7909707a96d82492a5b569cc50939b379c64b5d | Bump version to 0.0.30 | setup.py | setup.py |
from setuptools import setup
setup(name='servicemanager',
version='0.0.30',
description='A python tool to manage developing and testing with lots of microservices',
url='https://github.com/hmrc/service-manager',
author='vaughansharman',
license='Apache Licence 2.0',
packages=['serv... |
from setuptools import setup
setup(name='servicemanager',
version='0.0.29',
description='A python tool to manage developing and testing with lots of microservices',
url='https://github.com/hmrc/service-manager',
author='vaughansharman',
license='Apache Licence 2.0',
packages=['serv... | Python | 0 |
509bf6be9bd139f79a16a32bba45d3198d1da74a | Fix for setup.py | setup.py | setup.py | """Setup script for oct2py package.
"""
DISTNAME = 'oct2py'
DESCRIPTION = 'Python to GNU Octave bridge --> run m-files from python.'
LONG_DESCRIPTION = open('README.rst', 'rb').read().decode('utf-8')
MAINTAINER = 'Steven Silvester'
MAINTAINER_EMAIL = 'steven.silvester@ieee.org'
URL = 'http://github.com/blink1073... | """Setup script for oct2py package.
"""
DISTNAME = 'oct2py'
DESCRIPTION = 'Python to GNU Octave bridge --> run m-files from python.'
LONG_DESCRIPTION = open('README.rst', 'rb').read().decode('utf-8')
MAINTAINER = 'Steven Silvester'
MAINTAINER_EMAIL = 'steven.silvester@ieee.org'
URL = 'http://github.com/blink1073... | Python | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.