commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
f6cad1777023ceb53db8599bc2e74bf0ab2aa0a7 | orchestrator/__init__.py | orchestrator/__init__.py | from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.1'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.2'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| Prepare for next dev release | Prepare for next dev release | Python | mit | totem/cluster-orchestrator,totem/cluster-orchestrator,totem/cluster-orchestrator | ---
+++
@@ -2,7 +2,7 @@
from celery.signals import setup_logging
import orchestrator.logger
-__version__ = '0.5.1'
+__version__ = '0.5.2'
__author__ = 'sukrit'
orchestrator.logger.init_logging() |
569c056e016131ec4325185ee9fe814018d5e1fe | server/bands/__init__.py | server/bands/__init__.py | from flask import session, redirect, url_for, g, jsonify, Response
from flask.views import MethodView
from server.models import Band
class RestrictedBandPage(MethodView):
def dispatch_request(self, *args, **kwargs):
if not 'bandId' in session:
return redirect(url_for('bands.session.index'))
... | from flask import session, redirect, url_for, g, jsonify, Response
from flask.views import MethodView
from server.models import Band
class RestrictedBandPage(MethodView):
def dispatch_request(self, *args, **kwargs):
if not 'bandId' in session:
return redirect(url_for('bands.session.index'))
... | Fix problem on no-longer existing bands that are still as logged in session available | Fix problem on no-longer existing bands that are still as logged in session available
| Python | apache-2.0 | dennisausbremen/tunefish,dennisausbremen/tunefish,dennisausbremen/tunefish | ---
+++
@@ -10,6 +10,7 @@
else:
self.band = Band.query.get(session['bandId'])
if not self.band:
+ del session['bandId']
return redirect(url_for('bands.session.index'))
else:
g.band = self.band |
ec2456eac36a96c9819920bf8b4176e6a37ad9a5 | saleor/product/migrations/0020_attribute_data_to_class.py | saleor/product/migrations/0020_attribute_data_to_class.py | from __future__ import unicode_literals
from django.db import migrations, models
def move_data(apps, schema_editor):
Product = apps.get_model('product', 'Product')
ProductClass = apps.get_model('product', 'ProductClass')
for product in Product.objects.all():
attributes = product.attributes.all()... | from __future__ import unicode_literals
from django.db import migrations, models
def move_data(apps, schema_editor):
Product = apps.get_model('product', 'Product')
ProductClass = apps.get_model('product', 'ProductClass')
for product in Product.objects.all():
attributes = product.attributes.all()... | Rename productclass made during migration | Rename productclass made during migration
| Python | bsd-3-clause | KenMutemi/saleor,HyperManTT/ECommerceSaleor,mociepka/saleor,maferelo/saleor,maferelo/saleor,tfroehlich82/saleor,tfroehlich82/saleor,car3oon/saleor,itbabu/saleor,KenMutemi/saleor,KenMutemi/saleor,UITools/saleor,UITools/saleor,jreigel/saleor,mociepka/saleor,tfroehlich82/saleor,itbabu/saleor,car3oon/saleor,UITools/saleor,... | ---
+++
@@ -16,7 +16,7 @@
product_class = product_class.first()
if product_class is None:
product_class = ProductClass.objects.create(
- name='Migrated Product Class',
+ name='Unnamed product type',
has_variants=True)
product_c... |
f31e8215838e40960abff6c86be8c66cbf113c95 | server/rest/twofishes.py | server/rest/twofishes.py | import requests
from girder.api import access
from girder.api.describe import Description
from girder.api.rest import Resource
class TwoFishes(Resource):
def __init__(self):
self.resourceName = 'minerva_geocoder'
self.route('GET', (), self.geocode)
self.route('GET', ('autocomplete',), sel... | import requests
from shapely.wkt import loads
from shapely.geometry import mapping
from girder.api import access
from girder.api.describe import Description
from girder.api.rest import Resource
class TwoFishes(Resource):
def __init__(self):
self.resourceName = 'minerva_geocoder'
self.route('GET',... | Make the endpoint return geojson as opposed to wkt geometry | Make the endpoint return geojson as opposed to wkt geometry
| Python | apache-2.0 | Kitware/minerva,Kitware/minerva,Kitware/minerva | ---
+++
@@ -1,4 +1,6 @@
import requests
+from shapely.wkt import loads
+from shapely.geometry import mapping
from girder.api import access
from girder.api.describe import Description
@@ -16,7 +18,8 @@
r = requests.get(params['twofishes'],
params={'query': params['location'],
... |
3665b8859f72ec416682857ab22f7e29fc30f0df | alignment/models.py | alignment/models.py | from django.db import models
# Create your models here.
class AlignmentConsensus(models.Model):
slug = models.SlugField(max_length=100, unique=True)
alignment = models.BinaryField() | from django.db import models
# Create your models here.
class AlignmentConsensus(models.Model):
slug = models.SlugField(max_length=100, unique=True)
alignment = models.BinaryField()
gn_consensus = models.BinaryField(blank=True) # Store conservation calculation for each GN | Add field on cached alignments to store more information | Add field on cached alignments to store more information
| Python | apache-2.0 | cmunk/protwis,protwis/protwis,fosfataza/protwis,cmunk/protwis,fosfataza/protwis,protwis/protwis,protwis/protwis,fosfataza/protwis,cmunk/protwis,cmunk/protwis,fosfataza/protwis | ---
+++
@@ -5,3 +5,4 @@
class AlignmentConsensus(models.Model):
slug = models.SlugField(max_length=100, unique=True)
alignment = models.BinaryField()
+ gn_consensus = models.BinaryField(blank=True) # Store conservation calculation for each GN |
5d8e6e47964d80f380db27acd120136a43e80550 | aimpoint_mon/make_web_page.py | aimpoint_mon/make_web_page.py | #!/usr/bin/env python
import os
import argparse
import json
from pathlib import Path
from jinja2 import Template
import pyyaks.logger
def get_opt():
parser = argparse.ArgumentParser(description='Get aimpoint drift data '
'from aspect solution files')
parser.add_argument(... | #!/usr/bin/env python
import os
import argparse
import json
from pathlib import Path
from jinja2 import Template
import pyyaks.logger
def get_opt():
parser = argparse.ArgumentParser(description='Make aimpoint monitor web page')
parser.add_argument("--data-root",
default=".",
... | Fix tool description in argparse help | Fix tool description in argparse help | Python | bsd-2-clause | sot/aimpoint_mon,sot/aimpoint_mon | ---
+++
@@ -10,8 +10,7 @@
def get_opt():
- parser = argparse.ArgumentParser(description='Get aimpoint drift data '
- 'from aspect solution files')
+ parser = argparse.ArgumentParser(description='Make aimpoint monitor web page')
parser.add_argument("--data-root",
... |
2c03171b75b6bb4f3a77d3b46ee8fd1e5b022077 | template_engine/jinja2_filters.py | template_engine/jinja2_filters.py | from email import utils
import re
import time
import urllib
def digits(s):
if not s:
return ''
return re.sub('[^0-9]', '', s)
def floatformat(num, num_decimals):
return "%.{}f".format(num_decimals) % num
def strftime(datetime, formatstr):
"""
Uses Python's strftime with some tweaks
... | from email import utils
import re
import time
import urllib
def digits(s):
if not s:
return ''
if type(s) is int:
return s
return re.sub('[^0-9]', '', s)
def floatformat(num, num_decimals):
return "%.{}f".format(num_decimals) % num
def strftime(datetime, formatstr):
"""
Use... | Fix type error if input is int | Fix type error if input is int
| Python | mit | bdaroz/the-blue-alliance,the-blue-alliance/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,verycumbersome/the-blue-alliance,synth3tk/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,tsteward/the-blue-alliance,phil-lopreiato/t... | ---
+++
@@ -7,6 +7,8 @@
def digits(s):
if not s:
return ''
+ if type(s) is int:
+ return s
return re.sub('[^0-9]', '', s)
|
6c7c02f9f0c8d39d5c6b12ad7285b6da54ebbea5 | shoop/core/migrations/0028_roundingbehaviorcomponent.py | shoop/core/migrations/0028_roundingbehaviorcomponent.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from decimal import Decimal
import shoop.core.models
import enumfields.fields
class Migration(migrations.Migration):
dependencies = [
('shoop', '0027_contact_group_behavior'),
]
operations =... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from decimal import Decimal
import shoop.core.models
import enumfields.fields
class Migration(migrations.Migration):
dependencies = [
('shoop', '0027_contact_group_behavior'),
]
operations =... | Remove bytes from migration 0028 | Core: Remove bytes from migration 0028
| Python | agpl-3.0 | shoopio/shoop,shawnadelic/shuup,suutari/shoop,shawnadelic/shuup,suutari/shoop,hrayr-artunyan/shuup,suutari-ai/shoop,hrayr-artunyan/shuup,shoopio/shoop,shoopio/shoop,hrayr-artunyan/shuup,suutari-ai/shoop,suutari/shoop,suutari-ai/shoop,shawnadelic/shuup | ---
+++
@@ -19,7 +19,7 @@
fields=[
('servicebehaviorcomponent_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='shoop.ServiceBehaviorComponent')),
('quant', models.DecimalField(default=Decimal('0.05'), verbose_name='ro... |
350bd08bdea2df07928d8203680a8bc33d1a7eb1 | keops/settings.py | keops/settings.py | from katrid.conf.app_settings import *
DATABASES = {
'default': {
'ENGINE': 'katrid.db.backends.sqlite3',
'NAME': 'db.sqlite3',
}
}
AUTH_USER_MODEL = 'base.user'
INSTALLED_APPS.append('keops')
SERIALIZATION_MODULES = {
'python': 'keops.core.serializers.python',
'json': 'keops.core.se... | from katrid.conf.app_settings import *
DATABASES = {
'default': {
'ENGINE': 'katrid.db.backends.sqlite3',
'NAME': 'db.sqlite3',
}
}
AUTH_USER_MODEL = 'base.user'
INSTALLED_APPS.append('keops')
SERIALIZATION_MODULES = {
'python': 'keops.core.serializers.python',
'json': 'keops.core.se... | Add exclude fields to model options | Add exclude fields to model options
| Python | bsd-3-clause | katrid/keops,katrid/keops,katrid/keops | ---
+++
@@ -18,5 +18,4 @@
'yaml': 'keops.core.serializers.pyyaml',
'csv': 'keops.core.serializers.csv_serializer',
'txt': 'keops.core.serializers.txt_serializer',
- 'mako': 'keops.core.serializers.mako_serializer',
} |
78f3e210a105d4b096b48c33889ec1ed1f7fa1e9 | app/models/completed_application.py | app/models/completed_application.py | import random
from faker import Faker
from .. import db
from sqlalchemy.orm import validates
class CompletedApplication(db.Model):
id = db.Column(db.Integer, primary_key=True)
student_profile_id = db.Column(
db.Integer, db.ForeignKey('student_profile.id'), nullable=False)
# college name
college... | import random
from faker import Faker
from .. import db
from sqlalchemy.orm import validates
class CompletedApplication(db.Model):
id = db.Column(db.Integer, primary_key=True)
student_profile_id = db.Column(
db.Integer, db.ForeignKey('student_profile.id'), nullable=False)
# college name
college... | Fix __repr__ bug for CompletedApplication | Fix __repr__ bug for CompletedApplication
| Python | mit | hack4impact/next-gen-scholars,hack4impact/next-gen-scholars,hack4impact/next-gen-scholars | ---
+++
@@ -38,4 +38,4 @@
def __repr__(self):
return '<CompletedApplication {}, {}>'.format(
- self.name, self.status)
+ self.college, self.status) |
0a4ee589b81c8d16bf3e0628081b45a7f67f670f | backend/servers/etlserver/setup.py | backend/servers/etlserver/setup.py | from setuptools import setup, find_packages
setup(
name='etlserver',
version='0.1.0',
packages=find_packages(),
install_requires=[
'materials_commons==0.7.7b2',
'configparser',
'flask-api',
'faktory',
'rethinkdb',
'argparse',
'six',
'xlsxw... | from setuptools import setup, find_packages
setup(
name='etlserver',
version='0.1.0',
packages=find_packages(),
install_requires=[
'materials_commons==0.7.7b3',
'configparser',
'flask-api',
'faktory',
'rethinkdb',
'argparse',
'six',
'xlsxw... | Correct materials-commons version for requirements | Correct materials-commons version for requirements
| Python | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | ---
+++
@@ -5,7 +5,7 @@
version='0.1.0',
packages=find_packages(),
install_requires=[
- 'materials_commons==0.7.7b2',
+ 'materials_commons==0.7.7b3',
'configparser',
'flask-api',
'faktory', |
80918b006ddf490096dbe4817162b3c1b8afd0d4 | components/includes/utilities.py | components/includes/utilities.py | import random
import json
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg(sock))
if result['retu... | import random
import json
import SocketExtend as SockExt
import config as conf
import parser as p
def ping(sock):
try:
rand = random.randint(1, 99999)
data = {'request':'ping', 'contents': {'value':rand}}
SockExt.send_msg(sock, json.dumps(data))
result = json.loads(SockExt.recv_msg(sock))
if result['retu... | Clean up, comments, liveness checking, robust data transfer | Clean up, comments, liveness checking, robust data transfer
| Python | bsd-2-clause | mavroudisv/Crux | ---
+++
@@ -42,8 +42,10 @@
try:
if utilities.multiping(port, machines):
success = True
+ print "hey"
break
except Exception as e:
+ print "ouups"
attempted += 1
return success |
e90c7d034f070361893f77d7a257640d647be0c7 | mbuild/tests/test_xyz.py | mbuild/tests/test_xyz.py | import numpy as np
import pytest
import mbuild as mb
from mbuild.utils.io import get_fn
from mbuild.tests.base_test import BaseTest
from mbuild.exceptions import MBuildError
class TestXYZ(BaseTest):
def test_load_no_top(self, ethane):
ethane.save(filename='ethane.xyz')
ethane_in = mb.load('ethane... | import numpy as np
import pytest
import mbuild as mb
from mbuild.formats.xyz import write_xyz
from mbuild.utils.io import get_fn
from mbuild.tests.base_test import BaseTest
from mbuild.exceptions import MBuildError
class TestXYZ(BaseTest):
def test_load_no_top(self, ethane):
ethane.save(filename='ethane.... | Add test to ensure write_xyz does not directly take in compound | Add test to ensure write_xyz does not directly take in compound
| Python | mit | iModels/mbuild,iModels/mbuild | ---
+++
@@ -2,6 +2,7 @@
import pytest
import mbuild as mb
+from mbuild.formats.xyz import write_xyz
from mbuild.utils.io import get_fn
from mbuild.tests.base_test import BaseTest
from mbuild.exceptions import MBuildError
@@ -21,6 +22,11 @@
with pytest.raises(MBuildError):
mb.load(get_fn('... |
5682c2a311dbaf94f0b7876b10cabbc90eb88628 | hooks/post_gen_project.py | hooks/post_gen_project.py | """
Does the following:
1. Removes _version file and run versionner install if use_versionner == y
"""
from __future__ import print_function
import os
from subprocess import call
# Get the root project directory
PROJECT_DIRECTORY = os.path.realpath(os.path.curdir)
def remove_file(file_name):
if os.path.exists(... | """
Does the following:
1. Removes _version file and run versionner install if use_versionner == y
"""
from __future__ import print_function
import os
from subprocess import call
# Get the root project directory
PROJECT_DIRECTORY = os.path.realpath(os.path.curdir)
def remove_file(file_name):
if os.path.exists(... | Add git init to post hooks, and move error handling to functions | Add git init to post hooks, and move error handling to functions
| Python | mit | rlaverde/spyder-plugin-cookiecutter | ---
+++
@@ -27,14 +27,24 @@
def install_versioneer():
"""Start versioneer in the repository, this will create
versioneer.py and _version.py."""
- call(['versioneer', 'install'])
+ try:
+ call(['versioneer', 'install'])
+ except Exception:
+ print(
+ "versioneer isn't avala... |
75d3ad43874e0db206958cdbd26fe4ab039d8d20 | reaper.py | reaper.py | #!/usr/bin/python
from redis import Redis
import time
from messages import addSystemMessage
STARTTIME = 1302231346
PING_PERIOD = 10
SEARCH_PERIOD = 1
def getTime():
return time.time() - STARTTIME
def getD(db, session, key, defaultValue=''):
v = db.hget("session-"+session, key)
if v is not None:
... | #!/usr/bin/python
from redis import Redis
import time
from messages import addSystemMessage
STARTTIME = 1302231346
PING_PERIOD = 10
SEARCH_PERIOD = 1
def getTime():
return time.time() - STARTTIME
def getD(db, session, key, defaultValue=''):
v = db.hget("session-"+session, key)
if v is not None:
... | Update user list when reaping. | Update user list when reaping.
| Python | mit | MSPARP/MSPARP,MSPARP/MSPARP,MSPARP/MSPARP | ---
+++
@@ -30,7 +30,7 @@
db.srem('sessions-chatting', session)
name = getD(db, session, 'name', 'UNKNOWN USER')
print 'dead', dead, name
- addSystemMessage(db, chat, '%s\'s connection timed out. Please don\'t quit straight away; they could be back.' % (name))
+ ... |
309e4a922729e38a855bd89982cef9b40ba55831 | cabot/metricsapp/models/elastic.py | cabot/metricsapp/models/elastic.py | from django.db import models
from cabot.metricsapp.api import create_es_client
from .base import MetricsSourceBase
class ElasticsearchSource(MetricsSourceBase):
class Meta:
app_label = 'metricsapp'
def __str__(self):
return self.name
urls = models.TextField(
max_length=250,
... | from django.db import models
from cabot.metricsapp.api import create_es_client
from .base import MetricsSourceBase
class ElasticsearchSource(MetricsSourceBase):
class Meta:
app_label = 'metricsapp'
def __str__(self):
return self.name
urls = models.TextField(
max_length=250,
... | Create new clients if timeout/urls change and store in a dict keyed by urls_timeout | Create new clients if timeout/urls change and store in a dict keyed by urls_timeout
| Python | mit | Affirm/cabot,Affirm/cabot,Affirm/cabot,Affirm/cabot | ---
+++
@@ -26,7 +26,7 @@
help_text='Timeout for queries to this index.'
)
- _client = None
+ _clients = {}
@property
def client(self):
@@ -34,13 +34,11 @@
Return a global elasticsearch-py client for this ESSource (recommended practice
for elasticsearch-py).
... |
5ac675b36c7c7ba9110b6b16e11a56f554ff8c8e | signbank/video/urls.py | signbank/video/urls.py | from django.conf.urls import *
urlpatterns = patterns('',
(r'^video/(?P<videoid>.*)$', 'signbank.video.views.video'),
(r'^upload/', 'signbank.video.views.addvideo'),
(r'^delete/(?P<videoid>.*)$', 'signbank.video.views.deletevideo'),
(r'^poster/(?P<videoid>.*)$', 'signbank.video.views.poster'),
... | from django.conf.urls import *
urlpatterns = patterns('',
(r'^video/(?P<videoid>\d+)$', 'signbank.video.views.video'),
(r'^upload/', 'signbank.video.views.addvideo'),
(r'^delete/(?P<videoid>\d+)$', 'signbank.video.views.deletevideo'),
(r'^poster/(?P<videoid>\d+)$', 'signbank.video.views.poster'),
... | Use more explicit pattern for video id in URL to prevent matching trailing slash. | Use more explicit pattern for video id in URL to prevent matching trailing slash.
| Python | bsd-3-clause | Signbank/Auslan-signbank,Signbank/Auslan-signbank,Signbank/BSL-signbank,Signbank/BSL-signbank,Signbank/BSL-signbank,Signbank/Auslan-signbank,Signbank/BSL-signbank,Signbank/Auslan-signbank | ---
+++
@@ -2,11 +2,11 @@
urlpatterns = patterns('',
- (r'^video/(?P<videoid>.*)$', 'signbank.video.views.video'),
+ (r'^video/(?P<videoid>\d+)$', 'signbank.video.views.video'),
(r'^upload/', 'signbank.video.views.addvideo'),
- (r'^delete/(?P<videoid>.*)$', 'signbank.video.views.deletevideo'),
... |
5dc5de9dab24cf698dc26db24d1e1697472c2e05 | tests/integration/pillar/test_pillar_include.py | tests/integration/pillar/test_pillar_include.py | from __future__ import unicode_literals
from tests.support.case import ModuleCase
class PillarIncludeTest(ModuleCase):
def test_pillar_include(self):
'''
Test pillar include
'''
ret = self.minion_run('pillar.items')
assert 'a' in ret['element']
assert ret['element'... | # -*- coding: utf-8 -*-
'''
Pillar include tests
'''
from __future__ import unicode_literals
from tests.support.case import ModuleCase
class PillarIncludeTest(ModuleCase):
def test_pillar_include(self):
'''
Test pillar include
'''
ret = self.minion_run('pillar.items')
ass... | Use file encoding and add docstring | Use file encoding and add docstring
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | ---
+++
@@ -1,4 +1,9 @@
+# -*- coding: utf-8 -*-
+'''
+Pillar include tests
+'''
from __future__ import unicode_literals
+
from tests.support.case import ModuleCase
|
443c7f0758b8131069aa0ef9e89eeed6f2d086c1 | pyheufybot/bothandler.py | pyheufybot/bothandler.py | import os
from twisted.internet import reactor
from heufybot import HeufyBot, HeufyBotFactory
from config import Config
class BotHandler(object):
factories = {}
globalConfig = None
def __init__(self):
print "--- Loading configs..."
self.globalConfig = Config("globalconfig.yml")
sel... | import os
from twisted.internet import reactor
from heufybot import HeufyBot, HeufyBotFactory
from config import Config
class BotHandler(object):
factories = {}
globalConfig = None
def __init__(self):
print "--- Loading configs..."
self.globalConfig = Config("globalconfig.yml")
sel... | Make debug logging a bit more consistent | Make debug logging a bit more consistent | Python | mit | Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot | ---
+++
@@ -14,7 +14,7 @@
configList = self.getConfigList()
if len(configList) == 0:
- print "*** WARNING: No server configs found. Using the global config instead."
+ print "WARNING: No server configs found. Using the global config instead."
else:
for f... |
a01d87c77db46eeb61ff175e6f7cb6973fe80fa2 | python/misc/functions.py | python/misc/functions.py | #!/usr/bin/env python
import socket
def convert_filetime_to_epoch(filetime):
return (filetime / 10000000) - 11644473600
# Can be used to test connectivity if telnet isn't installed (https://stackoverflow.com/a/33117579/399105)
def test_connectivity(host, port, timeout=3):
try:
socket.setdefaulttimeou... | #!/usr/bin/env python
import socket
def convert_filetime_to_epoch(filetime):
return (filetime / 10000000) - 11644473600
# Can be used to test connectivity if telnet isn't installed (https://stackoverflow.com/a/33117579/399105)
def test_connectivity(host, port, timeout=3):
try:
socket.setdefaulttimeou... | Fix DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 | Fix DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
| Python | mit | bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile | ---
+++
@@ -12,5 +12,5 @@
socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host, port))
return True
except Exception as ex:
- print(ex.message)
+ print(ex)
return False |
55476a86ed482d2e1f473dc629848d2068225c73 | keras/dtensor/__init__.py | keras/dtensor/__init__.py | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# 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 applica... | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# 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 applica... | Change keras to use dtensor public API. | Change keras to use dtensor public API.
PiperOrigin-RevId: 438605222
| Python | apache-2.0 | keras-team/keras,keras-team/keras | ---
+++
@@ -19,11 +19,8 @@
# Conditional import the dtensor API, since it is currently broken in OSS.
if _DTENSOR_API_ENABLED:
- # pylint: disable=g-direct-tensorflow-import, g-import-not-at-top
- from tensorflow.dtensor import python as dtensor_api
+ from tensorflow.compat.v2.experimental import dtensor as dt... |
0b88b8e2cf1f841535a679bea249fba19cd2ba1d | maas/client/viscera/tests/test_sshkeys.py | maas/client/viscera/tests/test_sshkeys.py | """Test for `maas.client.viscera.sshkeys`."""
from .. import sshkeys
from ...testing import (
make_string_without_spaces,
TestCase,
)
from ..testing import bind
def make_origin():
return bind(sshkeys.SSHKeys, sshkeys.SSHKey)
class TestSSHKeys(TestCase):
def test__sshkeys_create(self):
""... | """Test for `maas.client.viscera.sshkeys`."""
import random
from .. import sshkeys
from ...testing import (
make_string_without_spaces,
TestCase,
)
from ..testing import bind
from testtools.matchers import Equals
def make_origin():
return bind(sshkeys.SSHKeys, sshkeys.SSHKey)
class TestSSHKeys(Test... | Add tests for .read methods | Add tests for .read methods
| Python | agpl-3.0 | alburnum/alburnum-maas-client,blakerouse/python-libmaas | ---
+++
@@ -1,4 +1,6 @@
"""Test for `maas.client.viscera.sshkeys`."""
+
+import random
from .. import sshkeys
@@ -8,6 +10,8 @@
)
from ..testing import bind
+
+from testtools.matchers import Equals
def make_origin():
@@ -29,3 +33,33 @@
SSHKeys._handler.create.assert_called_once_with(
... |
0633a9dbc2dd5972c41a1d3a21243af7f1a11055 | core/migrations/0065_alter_machinerequest_required_fields.py | core/migrations/0065_alter_machinerequest_required_fields.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-09-29 19:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0064_remove_ssh_keys_toggle'),
]
operations = [
migrations.AlterMode... | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-09-29 19:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0064_remove_ssh_keys_toggle'),
]
operations = [
migrations.AlterFiel... | Remove Meta-class change for AtmosphereUser | Remove Meta-class change for AtmosphereUser
Fixed in solitary-snipe, so not needed anymore. | Python | apache-2.0 | CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend | ---
+++
@@ -12,10 +12,6 @@
]
operations = [
- migrations.AlterModelOptions(
- name='atmosphereuser',
- options={'verbose_name': 'user', 'verbose_name_plural': 'users'},
- ),
migrations.AlterField(
model_name='machinerequest',
name='new... |
52f85821e35389741f5c595c1808b7b7efab2850 | config.py | config.py | FFMPEG_PATH = '/usr/local/bin/ffmpeg'
VIDEO_CODEC = 'h264' # used with ffprobe to detect whether or not we need to encode
VIDEO_ENCODER = 'h264_omx'
AUDIO_CODEC = 'aac' # used with ffprobe to detect whether or not we need to encode
AUDIO_ENCODER = 'aac'
BITRATE = '2500k'
INPUT_EXTS = ['.mkv', '.mp4']
OUTPUT_EXT = '... | FFMPEG_PATH = '/usr/local/bin/ffmpeg'
VIDEO_CODEC = 'h264' # used with ffprobe to detect whether or not we need to encode
VIDEO_ENCODER = 'h264_omx'
AUDIO_CODEC = 'aac' # used with ffprobe to detect whether or not we need to encode
AUDIO_ENCODER = 'aac'
BITRATE = '2500k'
INPUT_EXTS = ['.mkv', '.mp4', '.avi']
OUTPUT... | Add avi as input ext | Add avi as input ext
| Python | mit | danielbreves/auto_encoder | ---
+++
@@ -8,5 +8,5 @@
BITRATE = '2500k'
-INPUT_EXTS = ['.mkv', '.mp4']
+INPUT_EXTS = ['.mkv', '.mp4', '.avi']
OUTPUT_EXT = '.mp4' |
3e66c6546eda367bfef4038a4bb512862a9dd01f | config.py | config.py | # -*- coding: utf-8 -*-
DOMAIN = 'studyindenmark-newscontrol.appspot.com'
MAIL_SENDER = "Per Thulin <per@youtify.com>" | # -*- coding: utf-8 -*-
DOMAIN = 'studyindenmark-newscontrol.appspot.com'
MAIL_SENDER = "Study in Denmark <studyindenmark@gmail.com>" | Change email sender to studyindenmark@gmail.com | Change email sender to studyindenmark@gmail.com
| Python | mit | studyindenmark/newscontrol,youtify/newscontrol,studyindenmark/newscontrol,youtify/newscontrol | ---
+++
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
DOMAIN = 'studyindenmark-newscontrol.appspot.com'
-MAIL_SENDER = "Per Thulin <per@youtify.com>"
+MAIL_SENDER = "Study in Denmark <studyindenmark@gmail.com>" |
aee3fa76d0d61778f17d200f630bbed145fd69c8 | nova/policies/instance_usage_audit_log.py | nova/policies/instance_usage_audit_log.py | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# 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 r... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# 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 r... | Add policy description for instance-usage-audit-log | Add policy description for instance-usage-audit-log
This commit adds policy doc for instance-usage-audit-log policies.
Partial implement blueprint policy-docs
Change-Id: I8baedb9cb69ccb04361cc0003311487599bc9440
| Python | apache-2.0 | rahulunair/nova,jianghuaw/nova,mahak/nova,klmitch/nova,Juniper/nova,rahulunair/nova,klmitch/nova,mahak/nova,phenoxim/nova,rajalokan/nova,openstack/nova,mikalstill/nova,mikalstill/nova,klmitch/nova,gooddata/openstack-nova,Juniper/nova,Juniper/nova,mahak/nova,gooddata/openstack-nova,phenoxim/nova,jianghuaw/nova,rahulunai... | ---
+++
@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from oslo_policy import policy
-
from nova.policies import base
@@ -22,9 +20,21 @@
instance_usage_audit_log_policies = [
- policy.RuleDefault(
- name=BASE_POLICY_NAME... |
d8b5aa8d51fa61c400dd1929d3586e202b860b9d | registration/__init__.py | registration/__init__.py | from django.utils.version import get_version as django_get_version
VERSION = (0, 9, 0, 'beta', 1)
def get_version():
return django_get_version(VERSION) # pragma: no cover
| VERSION = (0, 9, 0, 'beta', 1)
def get_version():
from django.utils.version import get_version as django_get_version
return django_get_version(VERSION) # pragma: no cover
| Move import of Django's get_version into django-registration's get_version, to avoid dependency-order problems. | Move import of Django's get_version into django-registration's get_version, to avoid dependency-order problems.
| Python | bsd-3-clause | remarkablerocket/django-mailinglist-registration,remarkablerocket/django-mailinglist-registration | ---
+++
@@ -1,8 +1,6 @@
-from django.utils.version import get_version as django_get_version
-
-
VERSION = (0, 9, 0, 'beta', 1)
def get_version():
+ from django.utils.version import get_version as django_get_version
return django_get_version(VERSION) # pragma: no cover |
fedf78926b7c135f0f86934975a2b70aa1256884 | app/models.py | app/models.py | from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from . import db
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
email = db.Column(db.String(64),
... | from datetime import datetime
from flask.ext.login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from . import db, login_manager
class User(UserMixin, db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
ema... | Add user_loader function for loading a user | Add user_loader function for loading a user
| Python | mit | finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is | ---
+++
@@ -1,10 +1,12 @@
from datetime import datetime
+
+from flask.ext.login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
-from . import db
+from . import db, login_manager
-class User(db.Model):
+class User(UserMixin, db.Model):
__tablename__ = 'users'
i... |
5fba86c9f9b0d647dc8f821a97a7cc2dbb76deeb | basis_set_exchange/tests/test_aux_sanity.py | basis_set_exchange/tests/test_aux_sanity.py | """
Tests for sanity of auxiliary basis sets
"""
import pytest
from .common_testvars import bs_names, bs_metadata
@pytest.mark.parametrize('basis_name', bs_names)
def test_aux_sanity(basis_name):
"""For all basis sets, check that
1. All aux basis sets exist
2. That the role of the aux basis set m... | """
Tests for sanity of auxiliary basis sets
"""
import pytest
from .common_testvars import bs_names, bs_metadata
from ..misc import transform_basis_name
@pytest.mark.parametrize('basis_name', bs_names)
def test_aux_sanity(basis_name):
"""For all basis sets, check that
1. All aux basis sets exist
... | Fix test: Auxiliaries can have multiple names | Fix test: Auxiliaries can have multiple names
| Python | bsd-3-clause | MOLSSI-BSE/basis_set_exchange | ---
+++
@@ -5,6 +5,7 @@
import pytest
from .common_testvars import bs_names, bs_metadata
+from ..misc import transform_basis_name
@pytest.mark.parametrize('basis_name', bs_names)
@@ -31,17 +32,22 @@
"""
this_metadata = bs_metadata[basis_name]
- r = this_metadata['role']
- if r == 'orbital' ... |
eb28f042e1fdc6b18fbbc75b2dc31825b9ee70ee | dev/scripts/milestone2rst.py | dev/scripts/milestone2rst.py | from __future__ import print_function
import urllib, json, sys
def generate(milestone):
# Find the milestone number for the given name
milestones_json = json.loads(urllib.urlopen('https://api.github.com/repos/CoolProp/CoolProp/milestones').read())
# Map between name and number
title_to_number_map... | from __future__ import print_function
import urllib, json, sys
def generate(milestone):
# Find the milestone number for the given name
milestones_json = json.loads(urllib.urlopen('https://api.github.com/repos/CoolProp/CoolProp/milestones').read())
# Map between name and number
title_to_number_map... | Allow to get up to 100 issues at once | Allow to get up to 100 issues at once
| Python | mit | dcprojects/CoolProp,DANA-Laboratory/CoolProp,JonWel/CoolProp,henningjp/CoolProp,JonWel/CoolProp,DANA-Laboratory/CoolProp,dcprojects/CoolProp,JonWel/CoolProp,CoolProp/CoolProp,CoolProp/CoolProp,CoolProp/CoolProp,dcprojects/CoolProp,CoolProp/CoolProp,henningjp/CoolProp,dcprojects/CoolProp,henningjp/CoolProp,JonWel/CoolPr... | ---
+++
@@ -13,7 +13,7 @@
number = title_to_number_map[milestone]
# Get the issues associated with the milestone
- issues = json.loads(urllib.urlopen('https://api.github.com/repos/CoolProp/CoolProp/issues?state=all&milestone='+str(number)).read())
+ issues = json.loads(urllib.urlopen('https://api.gi... |
f69125a2e9dcd614057c87a36b415f8966075334 | distarray/tests/test_odin.py | distarray/tests/test_odin.py | import numpy as np
from IPython.parallel import Client
from distarray.client import DistArrayContext
from distarray import odin
import unittest
c = Client()
dv = c[:]
dac = DistArrayContext(dv)
@odin.local(dac)
def localsin(da):
return np.sin(da)
@odin.local(dac)
def localadd50(da):
return da + 50
@odi... | import numpy as np
from IPython.parallel import Client
from distarray.client import DistArrayContext
from distarray import odin
import unittest
c = Client()
dv = c[:]
dac = DistArrayContext(dv)
@odin.local(dac)
def local_sin(da):
return np.sin(da)
@odin.local(dac)
def local_add50(da):
return da + 50
@o... | Refactor names a bit for PEP8. | Refactor names a bit for PEP8. | Python | bsd-3-clause | enthought/distarray,RaoUmer/distarray,RaoUmer/distarray,enthought/distarray | ---
+++
@@ -12,17 +12,17 @@
@odin.local(dac)
-def localsin(da):
+def local_sin(da):
return np.sin(da)
@odin.local(dac)
-def localadd50(da):
+def local_add50(da):
return da + 50
@odin.local(dac)
-def localsum(da):
+def local_sum(da):
return np.sum(da)
@@ -33,15 +33,14 @@
self... |
e4332261b557c9567568517d33b55eaaa5d1468c | run_test_BMI_ku_model.py | run_test_BMI_ku_model.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import sys
from permamodel.components import bmi_Ku_component
x=bmi_Ku_component.BmiKuMethod()
x.initialize()
x.update()
x.finalize()
print x._values["ALT"][:]
| #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 10 10:56:16 2017
@author: kangwang
"""
import os
import sys
from permamodel.components import bmi_Ku_component
from permamodel.tests import examples_directory
cfg_file = os.path.join(examples_directory, 'Ku_method.cfg')
x = bmi_Ku_component.BmiKu... | Initialize takes exactly one parameter | Initialize takes exactly one parameter
See http://bmi-python.readthedocs.io/en/latest/basic_modeling_interface.base.html#basic_modeling_interface.base.BmiBase.initialize
| Python | mit | permamodel/permamodel,permamodel/permamodel | ---
+++
@@ -6,13 +6,16 @@
@author: kangwang
"""
+import os
import sys
+from permamodel.components import bmi_Ku_component
+from permamodel.tests import examples_directory
-from permamodel.components import bmi_Ku_component
-x=bmi_Ku_component.BmiKuMethod()
+cfg_file = os.path.join(examples_directory, 'Ku_met... |
dcbb22300663f0484e81c13770f196e078e83ca5 | api/base/parsers.py | api/base/parsers.py |
from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_class = JSONAPIRenderer
| from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_class = JSONAPI... | Add parse method which flattens data dictionary. | Add parse method which flattens data dictionary.
| Python | apache-2.0 | icereval/osf.io,RomanZWang/osf.io,cwisecarver/osf.io,abought/osf.io,sloria/osf.io,aaxelb/osf.io,zamattiac/osf.io,KAsante95/osf.io,GageGaskins/osf.io,TomHeatwole/osf.io,pattisdr/osf.io,laurenrevere/osf.io,zamattiac/osf.io,emetsger/osf.io,rdhyee/osf.io,cslzchen/osf.io,mluke93/osf.io,samchrisinger/osf.io,mattclark/osf.io,... | ---
+++
@@ -1,6 +1,7 @@
+from rest_framework.parsers import JSONParser
-from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
+from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
@@ -8,3 +9,25 @@
"""
media_type = 'applicatio... |
6c59040e8c4aab37ff0c053e295b5b9705365d94 | diylang/interpreter.py | diylang/interpreter.py | # -*- coding: utf-8 -*-
from os.path import dirname, join
from .evaluator import evaluate
from .parser import parse, unparse, parse_multiple
from .types import Environment
def interpret(source, env=None):
"""
Interpret a DIY Lang program statement
Accepts a program statement as a string, interprets it,... | # -*- coding: utf-8 -*-
from .evaluator import evaluate
from .parser import parse, unparse, parse_multiple
from .types import Environment
def interpret(source, env=None):
"""
Interpret a DIY Lang program statement
Accepts a program statement as a string, interprets it, and then
returns the resulting... | Remove unused imports in interpeter. | Remove unused imports in interpeter. | Python | bsd-3-clause | kvalle/diy-lang,kvalle/diy-lang,kvalle/diy-lisp,kvalle/diy-lisp | ---
+++
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
-
-from os.path import dirname, join
from .evaluator import evaluate
from .parser import parse, unparse, parse_multiple |
ad00d75cac0afe585853092d458a0d99c1373fc8 | dlstats/fetchers/__init__.py | dlstats/fetchers/__init__.py | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from . import eurostat, insee, world_bank, IMF, BEA
| #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from .eurostat import Eurostat
from .insee import Insee
from .world_bank import WorldBank
from .IMF import IMF
from .BEA import BEA
__all__ = ['Eurostat', 'Insee', 'WorldBank', 'IMF', 'BEA']
| Clean up the fetchers namespace | Clean up the fetchers namespace
| Python | agpl-3.0 | MichelJuillard/dlstats,mmalter/dlstats,MichelJuillard/dlstats,Widukind/dlstats,mmalter/dlstats,MichelJuillard/dlstats,Widukind/dlstats,mmalter/dlstats | ---
+++
@@ -1,3 +1,9 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
-from . import eurostat, insee, world_bank, IMF, BEA
+from .eurostat import Eurostat
+from .insee import Insee
+from .world_bank import WorldBank
+from .IMF import IMF
+from .BEA import BEA
+
+__all__ = ['Eurostat', 'Insee', 'WorldBank', '... |
e1a7b583f7651322861b07606daac2d9e6d8c2d2 | setup.py | setup.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='kittengroomer',
version='1.0',
author='Raphaël Vinot',
author_email='raphael.vinot@circl.lu',
maintainer='Raphaël Vinot',
url='https://github.com/CIRCL/CIRCLean',
description='Standalone CIRCLean/KittenGroom... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='kittengroomer',
version='1.0',
author='Raphaël Vinot',
author_email='raphael.vinot@circl.lu',
maintainer='Raphaël Vinot',
url='https://github.com/CIRCL/CIRCLean',
description='Standalone CIRCLean/KittenGroom... | Add filecheck in the scripts | Add filecheck in the scripts
| Python | bsd-3-clause | Rafiot/PyCIRCLean,CIRCL/PyCIRCLean,Rafiot/PyCIRCLean,CIRCL/PyCIRCLean,Dymaxion00/PyCIRCLean | ---
+++
@@ -11,7 +11,7 @@
url='https://github.com/CIRCL/CIRCLean',
description='Standalone CIRCLean/KittenGroomer code.',
packages=['kittengroomer'],
- scripts=['bin/generic.py', 'bin/pier9.py', 'bin/specific.py'],
+ scripts=['bin/generic.py', 'bin/pier9.py', 'bin/specific.py', 'bin/filecheck.py'... |
ffb1634e89a4ca82d62f35b8befb05b29fe5b401 | setup.py | setup.py | from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
tests_require=[
... | from setuptools import setup
setup(
name='pyretry',
version="0.9",
description='Separate your retry logic from your business logic',
author='Bob Renwick',
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
classifiers=(
'D... | Revert "Add missing `tests_require` for `mock`" | Revert "Add missing `tests_require` for `mock`"
This reverts commit 08347214e93d9cfe9ad53a528aea3428afeb49a0.
I hadn't noticed the requirements.pip file!
| Python | mit | bobbyrenwick/pyretry | ---
+++
@@ -9,9 +9,6 @@
author_email='bob.renwick@gmail.com',
url='https://github.com/bobbyrenwick/pyretry',
packages=['pyretry'],
- tests_require=[
- 'mock>=1.0,<1.1',
- ],
classifiers=(
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers... |
798c4489912ab0f6706adc626d930268f2244986 | setup.py | setup.py | #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='ILAMB',
version=__version__,
author='Mark Piper',
author_email='mark.piper@colorado.edu',
description='Python BMI for ILAMB',
... | #! /usr/bin/env python
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from pylamb import __version__
setup(name='pylamb',
version=__version__,
author='Mark Piper',
author_email='mark.piper@colorado.edu',
description='Python BMI for ILAMB',
... | Change package name to 'pylamb' | Change package name to 'pylamb'
| Python | mit | permamodel/ILAMB,permamodel/ILAMB,permamodel/ILAMB | ---
+++
@@ -5,7 +5,7 @@
from pylamb import __version__
-setup(name='ILAMB',
+setup(name='pylamb',
version=__version__,
author='Mark Piper',
author_email='mark.piper@colorado.edu', |
c2a1e32ac0ebfb2b575d8d2b852f6fdd3a4080f9 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
version='4.0.0',
name='vcdriver',
description='A vcenter driver based on pyvmomi, fabric and pywinrm',
url='https://github.com/Osirium/vcdriver',
license='MIT',
install_requires=['colorama', 'Fabric3', 'pyvmomi', 'pywinrm', 'six'],
package... | from setuptools import setup, find_packages
setup(
version='4.0.0',
name='osirium-vcdriver',
description='A vcenter driver based on pyvmomi, fabric and pywinrm',
url='https://github.com/Osirium/vcdriver',
license='MIT',
install_requires=['colorama', 'Fabric3', 'pyvmomi', 'pywinrm', 'six'],
... | Use osirium prefix to avoid possible conflicts with PyPI | Use osirium prefix to avoid possible conflicts with PyPI
| Python | mit | Osirium/vcdriver | ---
+++
@@ -3,7 +3,7 @@
setup(
version='4.0.0',
- name='vcdriver',
+ name='osirium-vcdriver',
description='A vcenter driver based on pyvmomi, fabric and pywinrm',
url='https://github.com/Osirium/vcdriver',
license='MIT', |
706661c45a35fd03784a335ee58030c2a0a2e34e | setup.py | setup.py | import os
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
with open("README.rst") as f:
long_desc = f.read()
setup(
name="custodian",
packages=find_packages(),
version="0.1.0a",
install_requires=[],
extras_require={"vasp": ["pymatgen>=2... | import os
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
with open("README.rst") as f:
long_desc = f.read()
setup(
name="custodian",
packages=find_packages(),
version="0.1.0a",
install_requires=[],
extras_require={"vasp": ["pymatgen>=2... | Add 2.5.0 to extra requirements. | Add 2.5.0 to extra requirements.
| Python | mit | materialsproject/custodian,materialsproject/custodian,materialsproject/custodian,specter119/custodian,alberthxf/custodian,specter119/custodian,davidwaroquiers/custodian,xhqu1981/custodian,specter119/custodian | ---
+++
@@ -12,7 +12,7 @@
packages=find_packages(),
version="0.1.0a",
install_requires=[],
- extras_require={"vasp": ["pymatgen>=2.4.3"]},
+ extras_require={"vasp": ["pymatgen>=2.5.0"]},
package_data={},
author="Shyue Ping Ong",
author_email="shyuep@gmail.com", |
f8428dbfa7ed6628c3f46227e768d3b3afcfe93b | setup.py | setup.py | """setup.py file."""
import uuid
from setuptools import setup
from pip.req import parse_requirements
install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
reqs = [str(ir.req) for ir in install_reqs]
setup(
name="napalm-ansible",
version='0.7.1',
packages=["napalm_ansible"],
au... | """setup.py file."""
import uuid
from setuptools import setup
from pip.req import parse_requirements
install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
reqs = [str(ir.req) for ir in install_reqs]
setup(
name="napalm-ansible",
version='0.7.2',
packages=["napalm_ansible"],
au... | Tag error, rolling to 0.7.2 | Tag error, rolling to 0.7.2
| Python | apache-2.0 | napalm-automation/napalm-ansible,napalm-automation/napalm-ansible | ---
+++
@@ -11,7 +11,7 @@
setup(
name="napalm-ansible",
- version='0.7.1',
+ version='0.7.2',
packages=["napalm_ansible"],
author="David Barroso, Kirk Byers, Mircea Ulinic",
author_email="dbarrosop@dravetech.com, ktbyers@twb-tech.com", |
f8b229b3f769ddbb21cfd57a8e0ad5341f965439 | pylearn2/costs/tests/test_lp_norm_cost.py | pylearn2/costs/tests/test_lp_norm_cost.py | """
Test LpNorm cost
"""
import numpy
import theano
from theano import tensor as T
from nose.tools import raises
def test_shared_variables():
'''
LpNorm should handle shared variables.
'''
assert False
def test_symbolic_expressions_of_shared_variables():
'''
LpNorm should handle symbolic exp... | """
Test LpNorm cost
"""
import os
from nose.tools import raises
from pylearn2.models.mlp import Linear
from pylearn2.models.mlp import Softmax
from pylearn2.models.mlp import MLP
from pylearn2.costs.cost import LpNorm
from pylearn2.datasets.cifar10 import CIFAR10
from pylearn2.training_algorithms.sgd import SGD
from p... | Add more code to LpNorm unit tests | Add more code to LpNorm unit tests
| Python | bsd-3-clause | JesseLivezey/pylearn2,lisa-lab/pylearn2,w1kke/pylearn2,theoryno3/pylearn2,jeremyfix/pylearn2,se4u/pylearn2,mkraemer67/pylearn2,caidongyun/pylearn2,abergeron/pylearn2,aalmah/pylearn2,junbochen/pylearn2,daemonmaker/pylearn2,alexjc/pylearn2,jamessergeant/pylearn2,matrogers/pylearn2,alexjc/pylearn2,CIFASIS/pylearn2,goodfel... | ---
+++
@@ -1,16 +1,48 @@
"""
Test LpNorm cost
"""
-import numpy
-import theano
-from theano import tensor as T
+import os
from nose.tools import raises
+from pylearn2.models.mlp import Linear
+from pylearn2.models.mlp import Softmax
+from pylearn2.models.mlp import MLP
+from pylearn2.costs.cost import LpNorm
+fr... |
77919331207033e7d6f77d86978bed3280cf05ff | setup.py | setup.py | """
iniconfig: brain-dead simple config-ini parsing.
compatible CPython 2.3 through to CPython 3.2, Jython, PyPy
(c) 2010 Ronny Pfannschmidt, Holger Krekel
"""
from setuptools import setup
def main():
with open('README.txt') as fp:
readme = fp.read()
setup(
name='iniconfig',
package... | """
iniconfig: brain-dead simple config-ini parsing.
compatible CPython 2.3 through to CPython 3.2, Jython, PyPy
(c) 2010 Ronny Pfannschmidt, Holger Krekel
"""
from setuptools import setup
def main():
with open('README.txt') as fp:
readme = fp.read()
setup(
name='iniconfig',
package... | Fix version autodetection from git tags | Fix version autodetection from git tags | Python | mit | ronnypfannschmidt/iniconfig,RonnyPfannschmidt/iniconfig | ---
+++
@@ -18,6 +18,7 @@
package_dir={'': 'src'},
description='iniconfig: brain-dead simple config-ini parsing',
long_description=readme,
+ use_scm_version=True,
url='http://github.com/RonnyPfannschmidt/iniconfig',
license='MIT License',
platforms=['unix',... |
0d6c2ed446cfd56f922ea7202362de2f505c1a91 | setup.py | setup.py | """Setuptools entrypoint."""
import codecs
import os
from setuptools import setup
from s3keyring import __version__, __author__
dirname = os.path.dirname(__file__)
long_description = (
codecs.open(os.path.join(dirname, "README.rst"), encoding="utf-8").read() + "\n" + # noqa
codecs.open(os.path.join(dirnam... | """Setuptools entrypoint."""
import codecs
import os
from setuptools import setup
from s3keyring import __version__, __author__
dirname = os.path.dirname(__file__)
long_description = (
codecs.open(os.path.join(dirname, "README.rst"), encoding="utf-8").read() + "\n" + # noqa
codecs.open(os.path.join(dirnam... | Upgrade boto3facade: not setting signature version v4 globally | Upgrade boto3facade: not setting signature version v4 globally
| Python | mit | InnovativeTravel/s3-keyring | ---
+++
@@ -29,7 +29,7 @@
install_requires=[
"click>=5.1",
"keyring",
- "boto3facade>=0.2.5",
+ "boto3facade>=0.2.8",
"awscli",
],
classifiers=[ |
3767e12cb429c5e96139b149cd9e66a3b1a1e2c1 | setup.py | setup.py | from setuptools import setup, find_packages
import codecs
import os
import re
def get_version(package_name):
version_re = re.compile(r"^__version__ = [\"']([\w_.-]+)[\"']$")
package_components = package_name.split('.')
init_path = os.path.join(root_dir, *(package_components + ['__init__.py']))
with co... | from setuptools import setup, find_packages
import codecs
import os
import re
root_dir = os.path.abspath(os.path.dirname(__file__))
PACKAGE = 'hackernews_scraper'
def get_version(package_name):
version_re = re.compile(r"^__version__ = [\"']([\w_.-]+)[\"']$")
package_components = package_name.split('.')
i... | Add the root dir variable | Add the root dir variable
| Python | bsd-2-clause | NiGhTTraX/hackernews-scraper | ---
+++
@@ -3,6 +3,9 @@
import codecs
import os
import re
+
+root_dir = os.path.abspath(os.path.dirname(__file__))
+PACKAGE = 'hackernews_scraper'
def get_version(package_name):
version_re = re.compile(r"^__version__ = [\"']([\w_.-]+)[\"']$")
@@ -15,8 +18,6 @@
return match.groups()[0]
... |
165b1c9528205c96f94abf63dc327c1299c61f04 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
install_requires = [
"bleach",
"jinja2",
"celery-haystack",
"Django>=1.4",
"django-celery",
"django-haystack",
"django-jsonfield",
"django-model-utils",
"django-tastypie",
"docutils",
"isoweek",
"lxml",
... | #!/usr/bin/env python
from setuptools import setup, find_packages
install_requires = [
"bleach",
"jinja2",
"Django>=1.4",
"django-celery",
"django-jsonfield",
"django-model-utils",
"django-tastypie",
"docutils",
"isoweek",
"lxml",
]
setup(
name="crate.web",
version="0.1... | Remove install_requires that are not on PyPI yet. | Remove install_requires that are not on PyPI yet.
| Python | bsd-2-clause | crateio/crate.web,crateio/crate.web | ---
+++
@@ -4,17 +4,14 @@
install_requires = [
"bleach",
"jinja2",
- "celery-haystack",
"Django>=1.4",
"django-celery",
- "django-haystack",
"django-jsonfield",
"django-model-utils",
"django-tastypie",
"docutils",
"isoweek",
"lxml",
- "saved_searches",
]
... |
58a73f87a8d2250d306e21c0d510d0d88497bf33 | setup.py | setup.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup, find_packages
PACKAGE_VERSION = '0.1'
deps = ['flask',
'Jinja2',
'manife... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup, find_packages
PACKAGE_VERSION = '0.1'
deps = ['flask',
'Jinja2',
'manife... | Add entry point for test-informant | Add entry point for test-informant
| Python | mpl-2.0 | mozilla/test-informant,ahal/test-informant,ahal/test-informant,mozilla/test-informant | ---
+++
@@ -33,4 +33,8 @@
packages=find_packages(),
include_package_data=True,
zip_safe=False,
- install_requires=deps)
+ install_requires=deps,
+ entry_points="""
+ [console_scripts]
+ test-informant = informant.pulse_listener:run
+ """) |
0982d077dceea70e536353bc7a8a23a30ed45cb1 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
try:
with open('README.rst', 'r', encoding='utf-8') as f:
readme = f.read()
except IOError:
readme = ''
setup(
name='cr8',
author='Mathias Fußenegger',
author_email='pip@zignar.net',
url='https://github.com/mfussenegger/cr8',
des... | #!/usr/bin/env python
from setuptools import setup
try:
with open('README.rst', 'r', encoding='utf-8') as f:
readme = f.read()
except IOError:
readme = ''
setup(
name='cr8',
author='Mathias Fußenegger',
author_email='pip@zignar.net',
url='https://github.com/mfussenegger/cr8',
des... | Set content type for long_description | Set content type for long_description
| Python | mit | mfussenegger/cr8 | ---
+++
@@ -16,6 +16,7 @@
url='https://github.com/mfussenegger/cr8',
description='A collection of command line tools for crate devs',
long_description=readme,
+ long_description_content_type='text/x-rst',
entry_points={
'console_scripts': [
'cr8 = cr8.__main__:main', |
c051fa4d653af34f1b7ccad88b6d06805e709278 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
install_requires = [
"bleach",
"jinja2",
"celery-haystack",
"Django>=1.4",
"django-celery",
"django-haystack",
"django-jsonfield",
"django-model-utils",
"django-tastypie",
"docutils",
"isoweek",
"lxml",
... | #!/usr/bin/env python
from setuptools import setup, find_packages
install_requires = [
"bleach",
"jinja2",
"celery-haystack",
"Django>=1.4",
"django-celery",
"django-haystack",
"django-jsonfield",
"django-model-utils",
"django-tastypie",
"docutils",
"isoweek",
"lxml",
... | Mark crate as a namepsace package in the metadata | Mark crate as a namepsace package in the metadata
| Python | bsd-2-clause | crateio/crate.web,crateio/crate.web | ---
+++
@@ -25,6 +25,7 @@
url="https://github.com/crateio/crate.web",
description="crate.web is a Django app that provides the building blocks to build a Package Index Server.",
license=open("LICENSE").read(),
+ namespace_packages=["crate"],
packages=find_packages(exclude=("tests",)),
pack... |
5e189930d66be1b9fd8c0e1edb1aff8078b56962 | setup.py | setup.py | """
PIP setup script for the SafeID package.
"""
from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
description=\
"""
SafeID is a proof-of-concept web server library that protects user passwords
using the Pythia protocol. Web servers can interact with a Pythia s... | """
PIP setup script for the SafeID package.
"""
from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
description=\
"""
SafeID is a proof-of-concept web server library that protects user passwords
using the Pythia protocol. Web servers can interact with a Pythia s... | Update to pypi package info | Update to pypi package info
| Python | mit | ace0/safeid | ---
+++
@@ -16,7 +16,7 @@
description = ' '.join(description.split())
setup(name='safeid',
- version='1.3.1',
+ version='1.4',
description=description,
classifiers=[
'Development Status :: 4 - Beta',
@@ -33,13 +33,13 @@
'Topic :: Security :: Cryptography',
... |
4f7c8188a33d671c080b643cc8105976f6810391 | setup.py | setup.py | """Install Mesh TensorFlow."""
from setuptools import find_packages
from setuptools import setup
setup(
name='mesh-tensorflow',
version='0.1.2',
description='Mesh TensorFlow',
author='Google Inc.',
author_email='no-reply@google.com',
url='http://github.com/tensorflow/mesh',
license='Apache... | """Install Mesh TensorFlow."""
from setuptools import find_packages
from setuptools import setup
setup(
name='mesh-tensorflow',
version='0.1.3',
description='Mesh TensorFlow',
author='Google Inc.',
author_email='no-reply@google.com',
url='http://github.com/tensorflow/mesh',
license='Apache... | Move mesh_tensorflow transformer/auto_mtf deps back into subpackages. | Move mesh_tensorflow transformer/auto_mtf deps back into subpackages.
PiperOrigin-RevId: 275558894
| Python | apache-2.0 | tensorflow/mesh,tensorflow/mesh | ---
+++
@@ -5,7 +5,7 @@
setup(
name='mesh-tensorflow',
- version='0.1.2',
+ version='0.1.3',
description='Mesh TensorFlow',
author='Google Inc.',
author_email='no-reply@google.com',
@@ -14,19 +14,19 @@
packages=find_packages(),
package_data={
# Include gin files.
- ... |
3a3b2b40191bda7acebf084aece8e6f5ed000db4 | setup.py | setup.py | #!/usr/bin/env python
from setuptools.depends import get_module_constant
from setuptools import setup
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name = 'detectlanguage',
packages = ['detectlanguage'],
version = get_module_constant('detectlanguage', '__ver... | #!/usr/bin/env python
from setuptools.depends import get_module_constant
from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'detectlanguage',
packages = ['detectlanguage'],
version = get_module_constant('detectlanguage', '__version__'),
desc... | Fix long description loading on python 2.7 | Fix long description loading on python 2.7
| Python | mit | detectlanguage/detectlanguage-python | ---
+++
@@ -3,7 +3,7 @@
from setuptools.depends import get_module_constant
from setuptools import setup
-with open("README.md", "r", encoding="utf-8") as fh:
+with open("README.md", "r") as fh:
long_description = fh.read()
setup( |
d6f598abee19d45029998e663aaa5645a1771936 | server/migrations/0058_auto_20170822_1430.py | server/migrations/0058_auto_20170822_1430.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-08-22 21:30
from __future__ import unicode_literals
import os
from django.conf import settings
from django.db import migrations, models
import sal.plugin
from server.models import Plugin
from server import utils
# TODO: I don't think we need this in the DB... | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-08-22 21:30
from __future__ import unicode_literals
import os
from django.conf import settings
from django.db import migrations, models
import sal.plugin
from server.models import Plugin
from server import utils
# TODO: I don't think we need this in the DB... | Fix namespace issue in plugin manager. | Fix namespace issue in plugin manager.
| Python | apache-2.0 | salopensource/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal | ---
+++
@@ -15,7 +15,7 @@
# TODO: I don't think we need this in the DB.
def update_os_families(apps, schema_editor):
enabled_plugins = Plugin.objects.all()
- manager = PluginManager()
+ manager = sal.plugin.PluginManager()
enabled_plugins = apps.get_model("server", "MachineDetailPlugin")
for it... |
a154611449f1f5a485ac0e12a9feb9e28e342331 | server/pypi/packages/grpcio/test/__init__.py | server/pypi/packages/grpcio/test/__init__.py | from __future__ import absolute_import, division, print_function
import unittest
# Adapted from https://github.com/grpc/grpc/blob/master/examples/python/helloworld.
class TestGrpcio(unittest.TestCase):
def setUp(self):
from concurrent import futures
import grpc
from . import helloworld_p... | from __future__ import absolute_import, division, print_function
import unittest
# Adapted from https://github.com/grpc/grpc/blob/master/examples/python/helloworld.
class TestGrpcio(unittest.TestCase):
def setUp(self):
from concurrent import futures
import grpc
from . import helloworld_p... | Fix hardcoded port number in grpcio test | Fix hardcoded port number in grpcio test
| Python | mit | chaquo/chaquopy,chaquo/chaquopy,chaquo/chaquopy,chaquo/chaquopy,chaquo/chaquopy | ---
+++
@@ -17,14 +17,15 @@
self.server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
helloworld_pb2_grpc.add_GreeterServicer_to_server(Greeter(), self.server)
- self.server.add_insecure_port('[::]:50051')
+ self.port = self.server.add_insecure_port('localhost:0')
+ ... |
556bda5688f86949b48d52a997b6de6f4edef45f | fields.py | fields.py | import logging
import remoteobjects.dataobject
import remoteobjects.fields
from remoteobjects.fields import *
import typepad.tpobject
class Link(remoteobjects.fields.Link):
"""A `TypePadObject` property representing a link from one TypePad API
object to another.
This `Link` works like `remoteobjects.fi... | import logging
import remoteobjects.dataobject
import remoteobjects.fields
from remoteobjects.fields import *
import typepad.tpobject
class Link(remoteobjects.fields.Link):
"""A `TypePadObject` property representing a link from one TypePad API
object to another.
This `Link` works like `remoteobjects.fi... | Return the Link instance itself when accessed through a class (so sphinx autodoc works) | Return the Link instance itself when accessed through a class (so sphinx autodoc works)
| Python | bsd-3-clause | typepad/python-typepad-api | ---
+++
@@ -25,6 +25,9 @@
URLs used in the TypePad API.
"""
+ if instance is None:
+ return self
+
try:
if instance._location is None:
raise AttributeError('Cannot find URL of %s relative to URL-less %s' % (type(self).__name__, owner.__name_... |
2e3fed0aa1e3c01ed2e831a387cbfd6e5e8a1709 | names/__init__.py | names/__init__.py | from __future__ import unicode_literals
from os.path import abspath, join, dirname
import random
__title__ = 'names'
__version__ = '0.2'
__author__ = 'Trey Hunner'
__license__ = 'MIT'
full_path = lambda filename: abspath(join(dirname(__file__), filename))
FILES = {
'first:male': full_path('dist.male.first'),
... | from __future__ import unicode_literals
from os.path import abspath, join, dirname
import random
__title__ = 'names'
__version__ = '0.2.0.post1'
__author__ = 'Trey Hunner'
__license__ = 'MIT'
full_path = lambda filename: abspath(join(dirname(__file__), filename))
FILES = {
'first:male': full_path('dist.male.f... | Bump version (a little late) | Bump version (a little late)
| Python | mit | treyhunner/names,treyhunner/names | ---
+++
@@ -4,7 +4,7 @@
__title__ = 'names'
-__version__ = '0.2'
+__version__ = '0.2.0.post1'
__author__ = 'Trey Hunner'
__license__ = 'MIT'
|
b8154abba5e1ea176566af2dcfa6eb2407dad9c6 | chrome/test/chromedriver/embed_version_in_cpp.py | chrome/test/chromedriver/embed_version_in_cpp.py | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Embeds Chrome user data files in C++ code."""
import optparse
import os
import sys
import chrome_paths
import cpp_source
sys.path... | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Embeds Chrome user data files in C++ code."""
import optparse
import os
import sys
import chrome_paths
import cpp_source
sys.path... | Add revision info only if available. | [chromedriver] Add revision info only if available.
This may not be available if building on a branch.
BUG=305371
NOTRY=true
Review URL: https://codereview.chromium.org/26754002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@227842 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | fujunwei/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,patrickm/chromium.src,Chilledheart/chromium,ltilve/chromium,M4sse/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-... | ---
+++
@@ -25,9 +25,12 @@
options, args = parser.parse_args()
version = open(options.version_file, 'r').read().strip()
- revision = lastchange.FetchVersionInfo(None).revision.strip()
+ revision = lastchange.FetchVersionInfo(None).revision
+ if revision:
+ version += '.' + revision.strip()
+
global_s... |
cc103392eea1f620b656e0dfdb1432a1a589385c | euler_python/problem55.py | euler_python/problem55.py | """
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import iterate, quantify,... | """
problem55.py
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. A number
that never forms a palindrome through the reverse and add process is called a
Lychrel number. How many Lychrel numbers are there below ten-thousand? (Only
consider fifty iterations)
"""
from toolset import iterate, quantify,... | Use clearer function name in is_lychrel | Use clearer function name in is_lychrel
| Python | mit | mjwestcott/projecteuler,mjwestcott/projecteuler,mjwestcott/projecteuler | ---
+++
@@ -20,7 +20,7 @@
return to_digits(num) == list(reversed(to_digits(num)))
def is_lychrel(num):
- rev = lambda x: to_num(to_digits(x)[::-1])
+ rev = lambda x: to_num(reversed(to_digits(x)))
start = num + rev(num)
iterations = iterate(lambda x: x + rev(x), start)
return not any(is_p... |
7a1351c7f677380eeee8027399e69b0d34e3e858 | daybed/tests/features/model_data.py | daybed/tests/features/model_data.py | import json
from lettuce import step, world
@step(u'post "([^"]*)" records?')
def post_record(step, model_name):
world.path = '/data/%s' % str(model_name.lower())
for record in step.hashes:
data = json.dumps(record)
world.response = world.browser.post(world.path, params=data, status='*')
@st... | import json
from lettuce import step, world
@step(u'post "([^"]*)" records?')
def post_record(step, model_name):
world.path = '/data/%s' % str(model_name.lower())
for record in step.hashes:
data = json.dumps(record)
world.response = world.browser.post(world.path, params=data, status='*')
@st... | Fix bug of adding the id to the resulting data | Fix bug of adding the id to the resulting data
| Python | bsd-3-clause | spiral-project/daybed,spiral-project/daybed | ---
+++
@@ -25,4 +25,5 @@
results = world.response.json['data']
assert len(results) >= len(step.hashes)
for i, result in enumerate(results):
+ step.hashes[i]['id'] = result['id'] # We cannot guess it
assert result == step.hashes[i] |
57bc5d89450633ffed33460ae18842f728d601ed | enthought/qt/QtCore.py | enthought/qt/QtCore.py | import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
# Emulate PySide version metadata.
__version__ = QT_VERSION_STR
__version_info__... | import os
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
from PyQt4.QtCore import *
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
__version__ = QT_VERSION_STR
__version_info__ = tuple(map(int, QT_VERSION_STR.split(... | Add version info for PySide as well. | Add version info for PySide as well.
| Python | bsd-3-clause | burnpanck/traits,burnpanck/traits | ---
+++
@@ -9,9 +9,12 @@
from PyQt4.Qt import QCoreApplication
from PyQt4.Qt import Qt
- # Emulate PySide version metadata.
__version__ = QT_VERSION_STR
__version_info__ = tuple(map(int, QT_VERSION_STR.split('.')))
else:
+ import PySide
from PySide.QtCore import *
+
+ __version_... |
ba2618e5ca63cad92e17ea154c9d8332064f7771 | pdvega/_axes.py | pdvega/_axes.py | from vega3 import VegaLite
class VegaLiteAxes(object):
"""Class representing a pdvega plot axes"""
def __init__(self, spec=None, data=None):
self.vlspec = VegaLite(spec, data)
@property
def spec(self):
return self.vlspec.spec
@property
def data(self):
return self.vlsp... | from vega3 import VegaLite
class VegaLiteAxes(object):
"""Class representing a pdvega plot axes"""
def __init__(self, spec=None, data=None):
self.vlspec = VegaLite(spec, data)
@property
def spec(self):
return self.vlspec.spec
@property
def spec_no_data(self):
return {... | Add spec_no_data attribute to axes | Add spec_no_data attribute to axes
| Python | mit | jakevdp/pdvega | ---
+++
@@ -11,6 +11,10 @@
return self.vlspec.spec
@property
+ def spec_no_data(self):
+ return {key: val for key, val in self.spec.items() if key != 'data'}
+
+ @property
def data(self):
return self.vlspec.data
|
4f47fef587b520e4110b232a2eaf175e79be375a | binstar_client/utils/notebook/__init__.py | binstar_client/utils/notebook/__init__.py | import re
from ...errors import BinstarError
from .downloader import *
from .uploader import *
from .finder import *
from .scm import *
def parse(handle):
"""
>>> parse("user/project:main.ipynb")
('user', 'project', 'main.ipynb')
>>> parse("project")
(None, 'project', None)
>>> parse("user/pro... | import re
from ...errors import BinstarError
from .downloader import *
from .uploader import *
from .finder import *
from .scm import *
def parse(handle):
"""
>>> parse("user/project:main.ipynb")
('user', 'project', 'main.ipynb')
>>> parse("project")
(None, 'project', None)
>>> parse("user/pro... | Allow extensions on last parameter | Allow extensions on last parameter
| Python | bsd-3-clause | Anaconda-Platform/anaconda-client,Anaconda-Platform/anaconda-client,Anaconda-Platform/anaconda-client | ---
+++
@@ -18,7 +18,7 @@
:param handle: String
:return: username, project, file
"""
- r = r'^(?P<user0>\w+)/(?P<project0>\w+):(?P<notebook0>\w+)$|^(?P<user1>\w+)/(?P<project1>\w+)$|^(?P<project2>\w+)$'
+ r = r'^(?P<user0>\w+)/(?P<project0>\w+):(?P<notebook0>\w+)$|^(?P<user1>\w+)/(?P<project1>\w+... |
a3b31c0a3157accb76611d57caa591cd2cdf8d7a | tests/test_mgi_load.py | tests/test_mgi_load.py | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import mgi
import mgi.load
import mgi.models
def test_mgi_load():
engine = create_engine('sqlite://')
metadata = mgi.models.Base.metadata
metadata.bind = engine
metadata.create_all()
sessionmaker_ = sessionmaker(engine)
... | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy import and_
import mgi
import mgi.load
import mgi.models
from translations.models import Translation
def test_mgi_load():
engine = create_engine('sqlite://')
metadata = mgi.models.Base.metadata
metadata.bind = eng... | Test MGI translation loading too. | Test MGI translation loading too.
| Python | mit | luispedro/waldo,luispedro/waldo | ---
+++
@@ -1,9 +1,11 @@
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
+from sqlalchemy import and_
import mgi
import mgi.load
import mgi.models
+from translations.models import Translation
def test_mgi_load():
engine = create_engine('sqlite://')
@@ -22,3 +24,9 @@
# ... |
f19fb3bf2eb90f77b193dc25f5b8bec0dfd253bc | fabtools/require/mysql.py | fabtools/require/mysql.py | """
Idempotent API for managing MySQL users and databases
"""
from __future__ import with_statement
from fabtools.mysql import *
from fabtools.deb import is_installed, preseed_package
from fabtools.require.deb import package
from fabtools.require.service import started
def server(version='5.1', password=None):
"... | """
Idempotent API for managing MySQL users and databases
"""
from __future__ import with_statement
from fabtools.mysql import *
from fabtools.deb import is_installed, preseed_package
from fabtools.require.deb import package
from fabtools.require.service import started
def server(version=None, password=None):
""... | Fix require MySQL server on Ubuntu 12.04 LTS | Fix require MySQL server on Ubuntu 12.04 LTS
| Python | bsd-2-clause | pombredanne/fabtools,ronnix/fabtools,fabtools/fabtools,badele/fabtools,sociateru/fabtools,davidcaste/fabtools,pahaz/fabtools,n0n0x/fabtools-python,ahnjungho/fabtools,hagai26/fabtools,prologic/fabtools,AMOSoft/fabtools,bitmonk/fabtools,wagigi/fabtools-python | ---
+++
@@ -9,11 +9,16 @@
from fabtools.require.service import started
-def server(version='5.1', password=None):
+def server(version=None, password=None):
"""
Require a MySQL server
"""
- if not is_installed("mysql-server-%s" % version):
+ if version:
+ pkg_name = 'mysql-server-%s' %... |
d540b7c14b9411acdedfe41a77fd4911ef2eb660 | src/cmdtree/tests/functional/test_command.py | src/cmdtree/tests/functional/test_command.py | from cmdtree import INT
from cmdtree import command, argument, option
@argument("host", help="server listen address")
@option("reload", is_flag=True, help="if auto-reload on")
@option("port", help="server port", type=INT, default=8888)
@command(help="run a http server on given address")
def run_server(host, reload, p... | import pytest
from cmdtree import INT
from cmdtree import command, argument, option
@argument("host", help="server listen address")
@option("reload", is_flag=True, help="if auto-reload on")
@option("port", help="server port", type=INT, default=8888)
@command(help="run a http server on given address")
def run_server(h... | Add functional test for reverse decorator order | Update: Add functional test for reverse decorator order
| Python | mit | winkidney/cmdtree,winkidney/cmdtree | ---
+++
@@ -1,3 +1,4 @@
+import pytest
from cmdtree import INT
from cmdtree import command, argument, option
@@ -10,9 +11,24 @@
return host, port, reload
+@command(help="run a http server on given address")
+@argument("host", help="server listen address")
+@option("port", help="server port", type=INT, de... |
d91f12a36e7980111511a6eb94aea2b09a18cb42 | app/models.py | app/models.py | from app import db
class Base(db.Model):
__abstract__ = True
pk = db.Column(db.Integer, primary_key=True)
created_at = db.Column(db.DateTime, default=db.func.current_timestamp())
updated_at = db.Column(db.DateTime, default=db.func.current_timestamp())
class Route(Base):
__tablename__ = 'route... | from app import db
from app.dijkstra import Graph, get_shortest_path
class Base(db.Model):
__abstract__ = True
pk = db.Column(db.Integer, primary_key=True)
created_at = db.Column(db.DateTime, default=db.func.current_timestamp())
updated_at = db.Column(db.DateTime, default=db.func.current_timestamp()... | Add "calculate" method to Route model to calculate the cost | Add "calculate" method to Route model to calculate the cost
| Python | mit | mdsrosa/routes_api_python | ---
+++
@@ -1,4 +1,5 @@
from app import db
+from app.dijkstra import Graph, get_shortest_path
class Base(db.Model):
@@ -22,3 +23,26 @@
return '<Route <{0}-{1}-{2}>'.format(self.origin_point,
self.destination_point,
... |
be94babb7feb7c32c0d269a8cfa8b722c70e0ab0 | map_service/lib/wso2/carbon_connect.py | map_service/lib/wso2/carbon_connect.py | __author__ = 'tmkasun'
from suds.client import Client
from suds.transport.https import HttpAuthenticated
class AdminService(object):
client = None
def __init__(self, api, service_name):
self.tenant = HttpAuthenticated(username=api['username'], password=api['password'])
self.protocol = 'http... | __author__ = 'tmkasun'
from suds.client import Client
from suds.transport.https import HttpAuthenticated
class AdminService(object):
client = None
def __init__(self, api, service_name):
self.tenant = HttpAuthenticated(username=api['username'], password=api['password'])
self.protocol = 'http... | Add support to non-ssl webservices | Add support to non-ssl webservices
| Python | apache-2.0 | tmkasun/Knnect,tmkasun/Knnect,tmkasun/Knnect,tmkasun/Knnect | ---
+++
@@ -11,12 +11,16 @@
self.tenant = HttpAuthenticated(username=api['username'], password=api['password'])
self.protocol = 'http'
+ self.port = api['port']
+
+ # TODO: Is Admin service available without ssl ?
if api['ssl']:
self.protocol = 'https'
+ ... |
8f264af74ca4f1b956af33853134ff8ec722fc40 | huecli.py | huecli.py | import click
from hue import bridge, configuration
@click.group()
def cli():
"""
Control Philips HUE lighting from the command line
"""
@cli.command()
def setup():
"""
Setup connection to Bridge
"""
ip_address = bridge.discover()
bridge.connect(ip_address)
config = configuration.... | import click
from hue import bridge, configuration
@click.group()
def cli():
"""
Control Philips HUE lighting from the command line
"""
@cli.command()
def setup():
"""
Setup connection to Bridge
"""
ip_address = bridge.discover()
bridge.connect(ip_address)
config = configuration.... | Add status to list output | Add status to list output
| Python | mit | projectweekend/HUEcli | ---
+++
@@ -30,4 +30,5 @@
config = configuration.get()
b = bridge.connect(config['ip_address'])
for light in b.lights:
- click.echo(light.name)
+ message = '{0}: {1}'.format(light.name, 'ON' if light.on else 'OFF')
+ click.echo(message) |
09d10b24fabbc5982d118b4ba292732945c0e78d | vocab.py | vocab.py | import sys
from collections import defaultdict
counter = defaultdict(int)
cut = 10
with open(sys.argv[1]) as f:
for line in f:
for word in line.split():
counter[word] += 1
from operator import itemgetter
for word,count in sorted( counter.iteritems(), key=itemgetter(1), reverse=True ):
... | from __future__ import print_function
import sys
from collections import Counter
from operator import itemgetter
def main():
cut = 10
counter = Counter()
with open(sys.argv[1], 'r') as f:
for line in f:
for word in line.split():
counter[word] += 1
for word, count i... | Clean Python code and make it compatible with both python2 and python3 | Clean Python code and make it compatible with both python2 and python3
| Python | mit | alexalemi/textbench,alexalemi/textbench,alexalemi/textbench,alexalemi/textbench,alexalemi/textbench | ---
+++
@@ -1,20 +1,21 @@
+from __future__ import print_function
import sys
-
-from collections import defaultdict
-
-counter = defaultdict(int)
-cut = 10
-
-with open(sys.argv[1]) as f:
- for line in f:
- for word in line.split():
- counter[word] += 1
+from collections import Counter
+from oper... |
c5a2cdf6f0a5d94a3f059677ca95383b1dd0be29 | src/python/twitter/common/python/__init__.py | src/python/twitter/common/python/__init__.py | # ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | # ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | Work around the twitter.common.python egg including the pex binary in a non-namespace package defeating twitter.common.python imports. | Work around the twitter.common.python egg including the pex binary in a non-namespace package defeating twitter.common.python imports.
(sapling split of 53156b2acfc0f37e12d1cc78fbf747ec72da210a) | Python | apache-2.0 | pantsbuild/pex,sixninetynine/pex,URXtech/pex,jamesbroadhead/pex,rouge8/pex,jsirois/pex,snyaggarwal/pex,kwlzn/pex,mzdanieltest/pex,snyaggarwal/pex,jsirois/pex,jamesbroadhead/pex,URXtech/pex,pombredanne/pex,mzdanieltest/pex,rouge8/pex,pantsbuild/pex,sixninetynine/pex,kwlzn/pex,pombredanne/pex | ---
+++
@@ -13,3 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ==================================================================================================
+
+# TODO(John Sirois): This works around a bug in namespace package injection for t... |
05c3775c589b5afdb9f3d7d3e347615d699669c7 | catwatch/blueprints/issue/views.py | catwatch/blueprints/issue/views.py | from flask import (
Blueprint,
flash,
redirect,
url_for,
render_template)
from flask_login import current_user
from flask_babel import gettext as _
from catwatch.blueprints.issue.models import Issue
from catwatch.blueprints.issue.forms import SupportForm
issue = Blueprint('issue', __name__, templ... | from flask import (
Blueprint,
flash,
redirect,
url_for,
render_template)
from flask_login import current_user
from flask_babel import gettext as _
from catwatch.blueprints.issue.models import Issue
from catwatch.blueprints.issue.forms import SupportForm
issue = Blueprint('issue', __name__, templ... | Normalize the issue blueprint's code base | Normalize the issue blueprint's code base
| Python | mit | nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask | ---
+++
@@ -16,7 +16,6 @@
@issue.route('/support', methods=['GET', 'POST'])
def support():
- # Pre-populate the email field if the user is signed in.
form = SupportForm(obj=current_user)
if form.validate_on_submit(): |
ca48a722fbfeaf8a9e0db5f507ca064e2d90b7dd | update_station_data.py | update_station_data.py | import json
from ns_api import Station, NSAPI
from local_settings import USERNAME, APIKEY
def update_station_data():
nsapi = NSAPI(USERNAME, APIKEY)
stations = nsapi.get_stations()
data = {'stations': []}
for station in stations:
# if station.country == "NL" and "Utrecht" in station.names['l... | import json
from ns_api import Station, NSAPI
from local_settings import USERNAME, APIKEY
def update_station_data():
nsapi = NSAPI(USERNAME, APIKEY)
stations = nsapi.get_stations()
data = {'stations': []}
for station in stations:
# if station.country == "NL" and "Utrecht" in station.names['l... | Move location of generated stations.json to data directory | Move location of generated stations.json to data directory
| Python | mit | bartromgens/nsmaps,bartromgens/nsmaps,bartromgens/nsmaps | ---
+++
@@ -16,7 +16,7 @@
data['stations'].append({'names': names, 'lon': station.lon, 'lat': station.lat, 'type': station.stationtype})
json_data = json.dumps(data, indent=4, sort_keys=True)
- with open('stations.json', 'w') as fileout:
+ with open('./data/stations.json', 'w') as fileout:
... |
4c0173263b59b9f2940c70a362ced8bfeb26c4f3 | databaker/framework.py | databaker/framework.py | import xlutils, xypath
import databaker
import os
import databaker.constants
from databaker.constants import * # also brings in template
import databaker.databakersolo as ds # causes the xypath.loader to be overwritten
from databaker.jupybakeutils import HDim, HDimConst, savepreviewhtml, writetechnicalCSV, Conve... | import xlutils, xypath
import databaker
import os
import databaker.constants
from databaker.constants import * # also brings in template
import databaker.databakersolo as ds # causes the xypath.loader to be overwritten
from databaker.jupybakeutils import HDim, HDimConst, savepreviewhtml, writetechnicalCSV, Conve... | Add table sheet selection capabilit | Add table sheet selection capabilit
| Python | agpl-3.0 | scraperwiki/databaker,scraperwiki/databaker | ---
+++
@@ -6,10 +6,10 @@
import databaker.databakersolo as ds # causes the xypath.loader to be overwritten
from databaker.jupybakeutils import HDim, HDimConst, savepreviewhtml, writetechnicalCSV, ConversionSegment
-def loadxlstabs(inputfile):
+def loadxlstabs(inputfile, sheetids="*"):
print("Loading %s wh... |
a78b305ec1624bc76b527094e937a831f6ea37dd | h2o-py/tests/testdir_misc/pyunit_make_metrics.py | h2o-py/tests/testdir_misc/pyunit_make_metrics.py | from __future__ import division
from __future__ import print_function
import sys
sys.path.insert(1,"../../")
import h2o
from tests import pyunit_utils
from h2o.estimators import H2OGradientBoostingEstimator
def pyunit_make_metrics():
fr = h2o.import_file(pyunit_utils.locate("smalldata/logreg/prostate.csv"))
fr["C... | from __future__ import division
from __future__ import print_function
import sys
sys.path.insert(1,"../../")
import h2o
from tests import pyunit_utils
from h2o.estimators import H2OGradientBoostingEstimator
def pyunit_make_metrics():
fr = h2o.import_file(pyunit_utils.locate("smalldata/logreg/prostate.csv"))
fr["C... | Disable unused test for now. | Disable unused test for now.
| Python | apache-2.0 | spennihana/h2o-3,jangorecki/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,mathemage/h2o-3,michalkurka/h2o-3,jangorecki/h2o-3,spennihana/h2o-3,spennihana/h2o-3,h2oai/h2o-3,h2oai/h2o-dev,michalkurka/h2o-3,h2oai/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,jangorecki/h2o-3,h2oai/h2o-3,spenni... | ---
+++
@@ -15,10 +15,10 @@
response = "AGE"
predictors = range(1,fr.ncol)
- model = H2OGradientBoostingEstimator()
- model.train(x=predictors,y=response,training_frame=fr)
+# model = H2OGradientBoostingEstimator()
+# model.train(x=predictors,y=response,training_frame=fr)
- p = model.model_performance(... |
11443eda1a192c0f3a4aa8225263b4e312fa5a55 | spam_lists/exceptions.py | spam_lists/exceptions.py | # -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError):
'''The API key used to query the s... | # -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError):
'''The API key used to q... | Make UnknownCodeError additionally extend KeyError | Make UnknownCodeError additionally extend KeyError
| Python | mit | piotr-rusin/spam-lists | ---
+++
@@ -3,7 +3,7 @@
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
-class UnknownCodeError(SpamListsError):
+class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyEr... |
8b4cc54e55ac222f444c512b6dc1b1d55475cddb | rusts.py | rusts.py | #!/usr/bin/env python2
import valve.source.a2s
SERVER="163.172.17.175"
PORT=30616
def playerList(server):
server = valve.source.a2s.ServerQuerier(server)
info = server.info()
players = server.players()
for p in players['players']:
if p["name"]:
print(p["name"]) + " (" + str(int((p... | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import valve.source.a2s
SERVER="163.172.17.175"
PORT=30616
def playerList(server):
"""Retreive player and limited server/game information and print the results
Specifically, this retrieves information re: a Rust server.
----------------------------
... | Update server info, game info, add pretty print, general cleanup. | Update server info, game info, add pretty print, general cleanup.
| Python | unlicense | saildata/steamscript,lluis/steamscript,oleerik/steamscript | ---
+++
@@ -1,17 +1,54 @@
#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
+
import valve.source.a2s
SERVER="163.172.17.175"
PORT=30616
def playerList(server):
+ """Retreive player and limited server/game information and print the results
+
+ Specifically, this retrieves information re: a Rust server... |
c8ad21096311971e985ac5705af280a09d66aa15 | setup.py | setup.py | from setuptools import setup, find_packages
import os
import os.path as op
import uuid
ver_file = os.path.join('popylar', 'version.py')
with open(ver_file) as f:
exec(f.read())
popylar_path = op.join(op.expanduser('~'), '.popylar')
uid = uuid.uuid1()
fhandle = open(popylar_path, 'a')
fhandle.write(uid)
fhandle.c... | from setuptools import setup, find_packages
import os
import os.path as op
import uuid
ver_file = os.path.join('popylar', 'version.py')
with open(ver_file) as f:
exec(f.read())
popylar_path = op.join(op.expanduser('~'), '.popylar')
uid = uuid.uuid1()
fhandle = open(popylar_path, 'a')
fhandle.write(uid.hex)
fhand... | Use the hex representation of the UUID. | Use the hex representation of the UUID.
| Python | bsd-2-clause | popylar/popylar | ---
+++
@@ -11,7 +11,7 @@
uid = uuid.uuid1()
fhandle = open(popylar_path, 'a')
-fhandle.write(uid)
+fhandle.write(uid.hex)
fhandle.close()
PACKAGES = find_packages() |
9c4cac1eb19cb05fa03fd163cef348331e00820c | setup.py | setup.py | """CodeJail: manages execution of untrusted code in secure sandboxes."""
from setuptools import setup
setup(
name="codejail",
version="3.0.1",
packages=['codejail'],
zip_safe=False,
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Ub... | """CodeJail: manages execution of untrusted code in secure sandboxes."""
from setuptools import setup
setup(
name="codejail",
version="3.0.2",
packages=['codejail'],
install_requires=['six'],
zip_safe=False,
classifiers=[
"License :: OSI Approved :: Apache Software License",
"O... | Add required dependency on "six" package | Add required dependency on "six" package | Python | apache-2.0 | edx/codejail | ---
+++
@@ -4,8 +4,9 @@
setup(
name="codejail",
- version="3.0.1",
+ version="3.0.2",
packages=['codejail'],
+ install_requires=['six'],
zip_safe=False,
classifiers=[
"License :: OSI Approved :: Apache Software License", |
0c1463324d4bdee685fb8ac767168413cc4ee2d0 | setup.py | setup.py | #!/usr/bin/env python
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.version_info < (2,5):
raise NotImplementedError("Sorry, you need at least Python 2.5 or Python 3.x")
import contexter
with contexter.Contexter() as ctx:
long_description = '... | #!/usr/bin/env python
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.version_info < (2,5):
raise NotImplementedError("Sorry, you need at least Python 2.5 or Python 3.x")
import contexter
with contexter.Contexter() as ctx:
long_description = '... | Indent and strip package metadata strings. | Indent and strip package metadata strings.
The Python package metadata was not being correctly formatted due to the
presence of unindented lines. I think setuptools should be responsible
for this formatting, but it seems easier to just fix it here.
With this change, it becomes possible for the standard pkg_resources
... | Python | mit | defnull/contexter | ---
+++
@@ -12,11 +12,11 @@
import contexter
with contexter.Contexter() as ctx:
- long_description = ''.join(ctx << open('README.rst'))
+ long_description = ' '.join(ctx << open('README.rst')).rstrip()
setup(name='contexter',
version=contexter.__version__,
- description=contexter.__doc__,
+ ... |
57c62f4107ba53445e7368bfb870fe393bd19dde | setup.py | setup.py | import codecs
from setuptools import find_packages, setup
import digestive
setup(
name='digestive',
version=digestive.__version__, # TODO: don't read this from (uninstalled) module
url='https://github.com/akaIDIOT/Digestive',
packages=find_packages(),
description='Run several digest algorithms o... | import codecs
from setuptools import find_packages, setup
import digestive
setup(
name='digestive',
version=digestive.__version__, # TODO: don't read this from (uninstalled) module
url='https://github.com/akaIDIOT/Digestive',
packages=find_packages(),
description='Run several digest algorithms o... | Update pyyaml dep to 5.1+ | Update pyyaml dep to 5.1+
Allows to turn off automatic sorting of dict keys.
| Python | isc | akaIDIOT/Digestive | ---
+++
@@ -25,7 +25,7 @@
],
install_requires=(
'decorator~=4.0',
- 'pyyaml~=5.0'
+ 'pyyaml~=5.1'
),
entry_points={
'console_scripts': { |
20e447005b70d29fc9f3852bcd526fc6fb337ea3 | setup.py | setup.py | from distutils.core import setup
setup(
name = 'pycolors2',
py_modules = ['colors',],
version = '0.0.3',
author = 'Chris Gilmer',
author_email = 'chris.gilmer@gmail.com',
maintainer = 'Chris Gilmer',
maintainer_email = 'chris.gilmer@gmail.com',
url = 'http://github.com/chrisgilmerproj/... | from distutils.core import setup
setup(
name = 'pycolors2',
py_modules = ['colors',],
version = '0.0.4',
author = 'Chris Gilmer',
author_email = 'chris.gilmer@gmail.com',
maintainer = 'Chris Gilmer',
maintainer_email = 'chris.gilmer@gmail.com',
url = 'http://github.com/chrisgilmerproj/... | Fix version and classifiers tuple to list | Fix version and classifiers tuple to list
| Python | mit | chrisgilmerproj/pycolors2 | ---
+++
@@ -3,7 +3,7 @@
setup(
name = 'pycolors2',
py_modules = ['colors',],
- version = '0.0.3',
+ version = '0.0.4',
author = 'Chris Gilmer',
author_email = 'chris.gilmer@gmail.com',
maintainer = 'Chris Gilmer',
@@ -17,7 +17,7 @@
long_description = open('README.markdown').read()... |
f430bfecc2a4022967260ff4cb80e3cb9ff84790 | setup.py | setup.py | #!/usr/bin/python
#
# 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... | #!/usr/bin/python
#
# 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... | Change name from heat_jeos to heat-jeos | Change name from heat_jeos to heat-jeos
Signed-off-by: Jeff Peeler <d776211e63e47e40d00501ffdb86a800e0782fea@redhat.com>
| Python | apache-2.0 | sdake/heat-jeos,steveb/heat-cfntools,openstack/heat-cfntools,bbandaru/heat-cfntools,steveb/heat-cfntools | ---
+++
@@ -20,7 +20,7 @@
import setuptools
setuptools.setup(
- name='heat_jeos',
+ name='heat-jeos',
version='1',
description='The heat-jeos project provides services for creating '
'(J)ust (E)nough (O)perating (S)ystem images', |
23a082d4035eec48f1b0aba08fcec5ea9d73b848 | setup.py | setup.py | from setuptools import setup
setup(
name='tablo',
description='A PostGIS table to feature service app for Django',
keywords='feature service, map server, postgis, django',
version='1.3.0',
packages=['tablo', 'tablo.migrations', 'tablo.interfaces', 'tablo.interfaces.arcgis'],
install_requires=[
... | from setuptools import setup
setup(
name='tablo',
description='A PostGIS table to feature service app for Django',
keywords='feature service, map server, postgis, django',
version='1.3.0',
packages=['tablo', 'tablo.migrations', 'tablo.interfaces', 'tablo.interfaces.arcgis'],
install_requires=[
... | Upgrade Django for security vulnerability | Upgrade Django for security vulnerability | Python | bsd-3-clause | consbio/tablo | ---
+++
@@ -7,7 +7,7 @@
version='1.3.0',
packages=['tablo', 'tablo.migrations', 'tablo.interfaces', 'tablo.interfaces.arcgis'],
install_requires=[
- 'Django>=1.11.19,<2.0', 'sqlparse>=0.1.18', 'pyproj', 'six', 'pandas==0.24.*',
+ 'Django>=1.11.28,<2.0', 'sqlparse>=0.1.18', 'pyproj', 'six'... |
ca56c84b90e0ab7553afb27a23648f5d43fe2176 | tests/functional/firefox/desktop/test_all.py | tests/functional/firefox/desktop/test_all.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.desktop.all import FirefoxDesktopBasePage
@pytest.mark.skip_if_firefox(reason='Downl... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from pages.firefox.desktop.all import FirefoxDesktopBasePage
@pytest.mark.skip_if_firefox(reason='Downl... | Fix locale for old Firefox desktop page functional test | Fix locale for old Firefox desktop page functional test
| Python | mpl-2.0 | mozilla/bedrock,sgarrity/bedrock,mkmelin/bedrock,kyoshino/bedrock,gerv/bedrock,Sancus/bedrock,alexgibson/bedrock,sgarrity/bedrock,MichaelKohler/bedrock,MichaelKohler/bedrock,MichaelKohler/bedrock,alexgibson/bedrock,kyoshino/bedrock,alexgibson/bedrock,ericawright/bedrock,schalkneethling/bedrock,sgarrity/bedrock,alexgibs... | ---
+++
@@ -10,7 +10,7 @@
@pytest.mark.skip_if_firefox(reason='Download button is not shown for up-to-date Firefox browsers.')
@pytest.mark.nondestructive
@pytest.mark.parametrize(('slug', 'locale'), [
- ('', None),
+ ('', 'de'),
('customize', None),
('fast', 'de'),
('trust', None)]) |
773568ab481588fada2b84c8bf9deb5c870290b7 | setup.py | setup.py |
from setuptools import setup, find_packages
setup(
name = "v1pysdk",
version = "0.1",
description = "VersionOne API client",
author = "Joe Koberg (VersionOne, Inc.)",
author_email = "Joe.Koberg@versionone.com",
license = "MIT/BSD",
keywords = "versionone v1 api sdk",
url = "http://github.com/Ve... |
from setuptools import setup, find_packages
setup(
name = "v1pysdk",
version = "0.1",
description = "VersionOne API client",
author = "Joe Koberg (VersionOne, Inc.)",
author_email = "Joe.Koberg@versionone.com",
license = "MIT/BSD",
keywords = "versionone v1 api sdk",
url = "http://github.com/Ve... | Add python-ntlm as a dependency | Add python-ntlm as a dependency
| Python | bsd-3-clause | coddingtonbear/VersionOne.SDK.Python,versionone/VersionOne.SDK.Python,doubleO8/versionone-sdk-spoon,aarcro/VersionOne.SDK.Python | ---
+++
@@ -22,6 +22,7 @@
'elementtree',
'testtools',
'iso8601',
+ 'python-ntlm',
],
test_suite = "v1pysdk.tests", |
f6d086aa0be14dd2f0c8d87e728939053408f2c9 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name = "py-trello",
version = "0.2.3",
description = 'Python wrapper around the Trello API',
long_description = open('README.rst').read(),
author = 'Richard Kolkovich',
author_email = 'richard@sig... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name = "py-trello",
version = "0.2.3",
description = 'Python wrapper around the Trello API',
long_description = open('README.rst').read(),
author = 'Richard Kolkovich',
author_email = 'richard@sig... | Change requirement dateutil to python-dateutil. | Change requirement dateutil to python-dateutil.
| Python | bsd-3-clause | gchp/py-trello,WoLpH/py-trello,mehdy/py-trello,portante/py-trello,ntrepid8/py-trello,nMustaki/py-trello,merlinpatt/py-trello,sarumont/py-trello,Wooble/py-trello | ---
+++
@@ -24,7 +24,7 @@
'Programming Language :: Python 3',
'Programming Language :: Python 3.3',
],
- install_requires = ["requests", "requests-oauthlib >= 0.4.1", "dateutil"],
+ install_requires = ["requests", "requests-oauthlib >= 0.4.1", "python-dateutil"],
... |
744cbe22784b7b9db537ce89ddf3b55b72980da2 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='typogrify',
version='2.0.0',
packages=find_packages(),
author='Christian Metts',
author_email='xian@mintchaos.com',
license='BSD',
description='Typography related template filters for Django & Jinja2 applicatio... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='typogrified',
version='0.0.0',
packages=find_packages(),
author='Justin Mayer',
author_email='entroP@gmail.com',
license='BSD',
description='Filters to enhance web typography, including support for Django & Jinj... | Prepare new package for PyPI publication | Prepare new package for PyPI publication
| Python | bsd-3-clause | Chimrod/typogrify | ---
+++
@@ -2,17 +2,16 @@
from setuptools import setup, find_packages
-
setup(
- name='typogrify',
- version='2.0.0',
+ name='typogrified',
+ version='0.0.0',
packages=find_packages(),
- author='Christian Metts',
- author_email='xian@mintchaos.com',
+ author='Justin Mayer',
+ author... |
011949b266ab33df8c0f9bec29ba693824e7d8ef | setup.py | setup.py | #!/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... | Add classifier for Python 3.3 | Add classifier for Python 3.3
| Python | mit | pombreda/pathlib | ---
+++
@@ -20,6 +20,7 @@
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
+ 'Programming Language :: Python :: 3.3',
'Topic :: Software Development :: Libraries',
'Topic :: System :: Filesystem... |
a248756d67d55388503c4e0a1788e0546bf6905c | setup.py | setup.py | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
setup(name='yith-libra... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pymongo',
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
setup(n... | Add pymongo as a dependency | Add pymongo as a dependency
| Python | agpl-3.0 | lorenzogil/yith-library-server,Yaco-Sistemas/yith-library-server,Yaco-Sistemas/yith-library-server,Yaco-Sistemas/yith-library-server,lorenzogil/yith-library-server,lorenzogil/yith-library-server | ---
+++
@@ -7,6 +7,7 @@
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
+ 'pymongo',
'pyramid',
'pyramid_debugtoolbar',
'waitress', |
d3650454eed490e4c91216b26463ae135c47e305 | setup.py | setup.py | import os, os.path, sys, shutil
from distutils.sysconfig import get_python_inc
from distutils.core import setup, Extension
from distutils.command.build_ext import build_ext
libs = ['user32']
setup(name="pyHook", version="1.1",
author="Peter Parente",
author_email="parente@cs.unc.edu",
url="http://ww... | '''pyHook: Python wrapper for out-of-context input hooks in Windows
The pyHook package provides callbacks for global mouse and keyboard events in Windows. Python
applications register event handlers for user input events such as left mouse down, left mouse up,
key down, etc. and set the keyboard and/or mouse hook. T... | Put in specific metadata to register with pyPI | Put in specific metadata to register with pyPI
| Python | mit | carolus-rex/pyhook_3000,Answeror/pyhook_py3k | ---
+++
@@ -1,16 +1,39 @@
-import os, os.path, sys, shutil
-from distutils.sysconfig import get_python_inc
+'''pyHook: Python wrapper for out-of-context input hooks in Windows
+
+The pyHook package provides callbacks for global mouse and keyboard events in Windows. Python
+applications register event handlers for us... |
09ec38cdf1bf6be59f6961fbcbf9847e2b29ccfe | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
import colors
setup(
name='ansicolors',
version=colors.__version__,
description='ANSI colors for Python',
long_description=open('README.rst').read(),
author='Giorgos Verigakis',
author_email='verigak@gmail.com',
url='http://github.com/ve... | #!/usr/bin/env python
from setuptools import setup
import colors
setup(
name='ansicolors',
version=colors.__version__,
description='ANSI colors for Python',
long_description=open('README.rst').read(),
author='Giorgos Verigakis',
author_email='verigak@gmail.com',
url='http://github.com/ve... | Add requirement for version 2.6 and higher | Add requirement for version 2.6 and higher
Fixes #1 | Python | isc | Vietworm/colors,verigak/colors,jonathaneunice/colors,pombredanne/colors,grnet/colors | ---
+++
@@ -19,6 +19,8 @@
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: ISC License (ISCL)',
- 'Programming Language :: Python'
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Pro... |
8fdb05f6327249fe945b5310b7a3ca585eddc5d0 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='glue',
version='0.9',
url='http://github.com/jorgebastida/glue',
license='BSD',
author='Jorge Bastida',
author_email='me@jorgebastida.com',
description='Glue is a simple command line tool to generate sprites.',
long_description=('... | from setuptools import setup, find_packages
setup(
name='glue',
version='0.9',
url='http://github.com/jorgebastida/glue',
license='BSD',
author='Jorge Bastida',
author_email='me@jorgebastida.com',
description='Glue is a simple command line tool to generate sprites.',
long_description=('... | Add argparse 1.2 for python <2.7 | Add argparse 1.2 for python <2.7
| Python | bsd-3-clause | WillsB3/glue,zhiqinyigu/glue,dext0r/glue,jorgebastida/glue,dext0r/glue,beni55/glue,jorgebastida/glue,zhiqinyigu/glue,WillsB3/glue,beni55/glue | ---
+++
@@ -18,7 +18,8 @@
platforms='any',
install_requires=[
'Pillow>=2.2,<2.3',
- 'Jinja2>=2.7,<2.8'
+ 'Jinja2>=2.7,<2.8',
+ 'argparse>=1.2'
],
tests_require=[
'cssutils>=0.9,<1.0' |
36e678daf3c9d619f6e6013a33d59104f61e291a | setup.py | setup.py | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requirements = [
]
test_requirements = [
]
setup(
name='adb_android',
version='0.5.0',
description="Enables android adb in your python script",
long_description='This python package is... | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requirements = [
]
test_requirements = [
]
setup(
name='adb_android',
version='1.0.0',
description="Enable android adb in your python script",
long_description='This python package is ... | Increase package version to 1.0.0 | Increase package version to 1.0.0
Change-Id: I8f5b3ec5a1a1f49a0c0a111ff16bb48f917221fb
| Python | bsd-3-clause | vmalyi/adb_android | ---
+++
@@ -12,8 +12,8 @@
setup(
name='adb_android',
- version='0.5.0',
- description="Enables android adb in your python script",
+ version='1.0.0',
+ description="Enable android adb in your python script",
long_description='This python package is a wrapper for standard android adb\
imp... |
a0adfab8c2fdac2f2b8bad8b1f036bd35b27a06c | setup.py | setup.py | import re
import setuptools
import sys
if not sys.version_info >= (3, 5):
exit("Sorry, Python must be later than 3.5.")
setuptools.setup(
name="tensorflow-qnd",
version=re.search(r'__version__ *= *"([0-9]+\.[0-9]+\.[0-9]+)" *\n',
open("qnd/__init__.py").read()).group(1),
descri... | import re
import setuptools
import sys
if not sys.version_info >= (3, 5):
exit("Sorry, Python must be later than 3.5.")
setuptools.setup(
name="tensorflow-qnd",
version=re.search(r'__version__ *= *"([0-9]+\.[0-9]+\.[0-9]+)" *\n',
open("qnd/__init__.py").read()).group(1),
descri... | Add Python 3.6 to topics | Add Python 3.6 to topics
| Python | unlicense | raviqqe/tensorflow-qnd,raviqqe/tensorflow-qnd | ---
+++
@@ -24,6 +24,7 @@
"Intended Audience :: Developers",
"License :: Public Domain",
"Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: System :: Networking"... |
ab864d340999fcbfad5677cbb3d0da301e1bce45 | setup.py | setup.py |
from setuptools import setup, find_packages
setup(
name = "django-overextends",
version = __import__("overextends").__version__,
author = "Stephen McDonald",
author_email = "stephen.mc@gmail.com",
description = ("A Django reusable app providing the ability to use "
"circular te... |
from setuptools import setup, find_packages
setup(
name = "django-overextends",
version = __import__("overextends").__version__,
author = "Stephen McDonald",
author_email = "stephen.mc@gmail.com",
description = ("A Django reusable app providing the ability to use "
"circular te... | Allow Django 1.10 in installation | Allow Django 1.10 in installation
| Python | bsd-2-clause | dwaynebailey/django-overextends | ---
+++
@@ -16,7 +16,7 @@
packages = find_packages(),
install_requires = [
"sphinx-me >= 0.1.2",
- "django >= 1.8, < 1.10",
+ "django >= 1.8, <= 1.10",
],
classifiers = [
"Development Status :: 5 - Production/Stable", |
70bd7c85bb0860d24b6a7d6291f2b24d5dc0a3bb | setup.py | setup.py | #!/usr/bin/env python
# Copyright 2014-2015 Boxkite Inc.
# This file is part of the DataCats package and is released under
# the terms of the GNU Affero General Public License version 3.0.
# See LICENSE.txt or http://www.fsf.org/licensing/licenses/agpl-3.0.html
from setuptools import setup
import sys
install_requir... | #!/usr/bin/env python
# Copyright 2014-2015 Boxkite Inc.
# This file is part of the DataCats package and is released under
# the terms of the GNU Affero General Public License version 3.0.
# See LICENSE.txt or http://www.fsf.org/licensing/licenses/agpl-3.0.html
from setuptools import setup
from os.path import realpa... | Change to directory of current file before getting version | Change to directory of current file before getting version
| Python | agpl-3.0 | datacats/datacats,JJediny/datacats,deniszgonjanin/datacats,wardi/datacats,datacats/datacats,poguez/datacats,deniszgonjanin/datacats,datawagovau/datacats,JackMc/datacats,JJediny/datacats,JackMc/datacats,datawagovau/datacats,reneenoble/datacats,poguez/datacats,wardi/datacats,reneenoble/datacats | ---
+++
@@ -7,6 +7,8 @@
# See LICENSE.txt or http://www.fsf.org/licensing/licenses/agpl-3.0.html
from setuptools import setup
+from os.path import realpath, dirname
+from os import chdir
import sys
install_requires = [
@@ -19,7 +21,9 @@
'watchdog' # For lesscd
]
-exec(open("datacats/version.py").read(... |
3ccf8471291ddfc39c7d86caa659ef4eab27bc13 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='check_ups_apc.py',
version='0.10',
description='Nagios Check for APC USVs',
author='Lukas Schauer',
author_email='l.schauer@cygnusnetworks.de',
license='Apache 2.0',
packages=['ups_apc_snmp'],
scripts=['check_ups_apc'],
ins... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
setup(name='check_ups_apc.py',
version='0.10',
description='Nagios Check for APC USVs',
author='Lukas Schauer',
author_email='l.schauer@cygnusnetworks.de',
license='Apache 2.0',
packages=['ups_apc_snmp'],
scripts=['check_ups_apc'],
zip... | Change zip_safe to false for manual source install | Change zip_safe to false for manual source install
Fixes #1
| Python | apache-2.0 | CygnusNetworks/check_ups_apc.py,CygnusNetworks/check_ups_apc.py | ---
+++
@@ -11,4 +11,5 @@
license='Apache 2.0',
packages=['ups_apc_snmp'],
scripts=['check_ups_apc'],
+ zip_safe=False,
install_requires=['configparser', 'nagiosplugin', 'pysnmp']) |
d198b96b1e5b35d1362694cd842d2804f31de7e2 | setup.py | setup.py | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='nova_limits',
version='0.5.2',
author='Kevin L. Mitchell',
author_email='kevin.mitchell@rackspace.com',
description="Nova-specific rate-limit class for turn... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='nova_limits',
version='0.5.2',
author='Kevin L. Mitchell',
author_email='kevin.mitchell@rackspace.com',
description="Nova-specific rate-limit class for turn... | Add nose to list of test requirements. | Add nose to list of test requirements.
| Python | apache-2.0 | klmitch/nova_limits | ---
+++
@@ -38,6 +38,7 @@
],
tests_require=[
'mox',
+ 'nose',
'unittest2>=0.5.1',
],
) |
e1f2f32b87f28f948e9f8321df910700f5a5ece2 | setup.py | setup.py | from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
version = {}
with open(path.join(here, 'emv', "__init__.py")) as fp:
exec(fp.read(), version)
setu... | from setuptools import setup
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
readme_rst = path.join(here, 'README.rst')
if path.isfile(readme_rst):
with open(readme_rst, encoding='utf-8') as f:
long_description = f.read()
else:
long_description = ''
version = ... | Handle pandoc-generated readme file not being present | Handle pandoc-generated readme file not being present
| Python | mit | russss/python-emv | ---
+++
@@ -4,8 +4,13 @@
here = path.abspath(path.dirname(__file__))
-with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
- long_description = f.read()
+readme_rst = path.join(here, 'README.rst')
+
+if path.isfile(readme_rst):
+ with open(readme_rst, encoding='utf-8') as f:
+ long_descr... |
38359ccf2e1269ea01ecb0df274ff47ea18b4e19 | setup.py | setup.py | from os.path import join
from setuptools import setup, find_packages
long_description = (open('README.rst').read() +
open('CHANGES.rst').read() +
open('TODO.rst').read())
def get_version():
with open(join('model_utils', '__init__.py')) as f:
for line in f:
... | from os.path import join
from setuptools import setup, find_packages
long_description = (open('README.rst').read() +
open('CHANGES.rst').read() +
open('TODO.rst').read())
def get_version():
with open(join('model_utils', '__init__.py')) as f:
for line in f:
... | Fix case of Django dependency. Thanks Travis Swicegood. | Fix case of Django dependency. Thanks Travis Swicegood.
| Python | bsd-3-clause | yeago/django-model-utils,carljm/django-model-utils,timmygee/django-model-utils,timmygee/django-model-utils,yeago/django-model-utils,nemesisdesign/django-model-utils,nemesisdesign/django-model-utils,patrys/django-model-utils,patrys/django-model-utils,carljm/django-model-utils | ---
+++
@@ -23,7 +23,7 @@
author_email='carl@oddbird.net',
url='https://github.com/carljm/django-model-utils/',
packages=find_packages(),
- install_requires=['django>=1.4.2'],
+ install_requires=['Django>=1.4.2'],
classifiers=[
'Development Status :: 5 - Production/Stable',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.