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 |
|---|---|---|---|---|---|---|---|---|---|---|
120225323011a53d4a0564d0fcfe834d9ac27062 | build.py | build.py | import argparse
import os
import string
def generate_rpm_spec(template, patch_file):
spec_template = string.Template(template)
base_name, _ = os.path.splitext(patch_file)
values = {
'name': 'kpatch-module-{}'.format(base_name),
'patch_file': patch_file,
'kmod_filename': 'kpatch-{... | import argparse
import os
import string
def generate_rpm_spec(template, patch_file):
spec_template = string.Template(template)
base_name, _ = os.path.splitext(patch_file)
values = {
'name': 'kpatch-module-{}'.format(base_name),
'patch_file': patch_file,
'kmod_filename': 'kpatch-{... | Split arg parsing into function | Split arg parsing into function
| Python | mit | centos-livepatching/kpatch-package-builder | ---
+++
@@ -20,7 +20,8 @@
return spec_template.substitute(values)
-if __name__ == '__main__':
+
+def get_args():
parser = argparse.ArgumentParser(description='Generate RPM spec file to '
'build a kpatch package')
parser.add_argument('patch', metavar... |
511030652f4f411b4a97e3412899c6c7980348d4 | dailydevo/cac_actions.py | dailydevo/cac_actions.py | # coding=utf8
# Local modules
from common import debug
from common.action import action_classes
from common.telegram import telegram_utils
from dailydevo import cac_utils
class CACDevoAction(action_classes.Action):
def identifier(self):
return "/cacdevo"
def name(self):
return "Center for Ac... | # coding=utf8
# Local modules
from common import debug
from common.action import action_classes
from common.telegram import telegram_utils
from dailydevo import cac_utils
class CACDevoAction(action_classes.Action):
def identifier(self):
return "/cacdevo"
def name(self):
return "Center for Ac... | Fix for CACDevo hidden functionality | Fix for CACDevo hidden functionality
| Python | mit | julwrites/biblicabot | ---
+++
@@ -20,6 +20,8 @@
if passage is not None:
telegram_utils.send_msg(passage, userObj.get_uid())
+ return True
+
def get():
return [
CACDevoAction() |
b2d2f4e4bde02570e51537d4db72cebcba63c1f5 | malcolm/modules/builtin/parts/labelpart.py | malcolm/modules/builtin/parts/labelpart.py | from annotypes import Anno
from malcolm.core import Part, PartRegistrar, StringMeta
from ..infos import LabelInfo
from ..util import set_tags
with Anno("Initial value of Block label"):
ALabelValue = str
class LabelPart(Part):
"""Part representing a the title of the Block a GUI should display"""
def __i... | from annotypes import Anno
from malcolm.core import Part, PartRegistrar, StringMeta
from ..infos import LabelInfo
from ..util import set_tags
with Anno("Initial value of Block label"):
ALabelValue = str
class LabelPart(Part):
"""Part representing a the title of the Block a GUI should display"""
def __i... | Fix LabelPart to always report the validated set value | Fix LabelPart to always report the validated set value
| Python | apache-2.0 | dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm | ---
+++
@@ -19,12 +19,15 @@
self.initial_value = value
self.attr = meta.create_attribute_model(self.initial_value)
+ def _report(self):
+ self.registrar.report(LabelInfo(self.attr.value))
+
def setup(self, registrar):
# type: (PartRegistrar) -> None
super(LabelPart... |
8aec91209521d7f2701e63c681f4b765c1b2c6bb | src/program/lwaftr/tests/subcommands/run_test.py | src/program/lwaftr/tests/subcommands/run_test.py | """
Test the "snabb lwaftr run" subcommand. Needs NIC names.
"""
import unittest
from test_env import DATA_DIR, SNABB_CMD, BaseTestCase, nic_names
SNABB_PCI0, SNABB_PCI1 = nic_names()
@unittest.skipUnless(SNABB_PCI0 and SNABB_PCI1, 'NICs not configured')
class TestRun(BaseTestCase):
cmd_args = (
str(S... | """
Test the "snabb lwaftr run" subcommand. Needs NIC names.
"""
import unittest
from test_env import DATA_DIR, SNABB_CMD, BaseTestCase, nic_names, ENC
SNABB_PCI0, SNABB_PCI1 = nic_names()
@unittest.skipUnless(SNABB_PCI0 and SNABB_PCI1, 'NICs not configured')
class TestRun(BaseTestCase):
cmd_args = (
... | Add test for migration using --on-a-stick command | Add test for migration using --on-a-stick command
When --on-a-stick command is used with a single instance defined it
should migrate the instance to work in a stick (replace the device
with the one provided in the flag and remove the device in
`external-device`). It just checks that it works by not crashing and
says ... | Python | apache-2.0 | alexandergall/snabbswitch,Igalia/snabbswitch,snabbco/snabb,snabbco/snabb,snabbco/snabb,dpino/snabbswitch,dpino/snabb,eugeneia/snabb,Igalia/snabb,dpino/snabb,eugeneia/snabb,eugeneia/snabbswitch,eugeneia/snabb,SnabbCo/snabbswitch,eugeneia/snabb,Igalia/snabb,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,Igalia/snabb,dpino/s... | ---
+++
@@ -4,7 +4,7 @@
import unittest
-from test_env import DATA_DIR, SNABB_CMD, BaseTestCase, nic_names
+from test_env import DATA_DIR, SNABB_CMD, BaseTestCase, nic_names, ENC
SNABB_PCI0, SNABB_PCI1 = nic_names()
@@ -26,5 +26,20 @@
self.assertIn(b'link report', output,
b'\n'.join((b... |
2bdc9561461dbd830285ca1478f828b0b89ac727 | tests/extensions/functional/show_chrome.py | tests/extensions/functional/show_chrome.py | """
Show chrome with extension loaded.
Useful for DOM HTML tree elements inspection with
chrome extension loaded, like when running the tests.
"""
from tests.base import TestBaseTouchscreen
from tests.base import MAPS_URL
klass = TestBaseTouchscreen
klass.setup_class()
# if browser automatically redirects to nat... | """
Show chrome with extension loaded.
Useful for DOM HTML tree elements inspection with
chrome extension loaded, like when running the tests.
"""
from tests.base import TestBaseTouchscreen
from tests.base import MAPS_URL
klass = TestBaseTouchscreen
klass.setup_class()
# if browser automatically redirects to nat... | Add test to print information about chrome version | Add test to print information about chrome version
| Python | apache-2.0 | EndPointCorp/appctl,EndPointCorp/appctl | ---
+++
@@ -14,4 +14,7 @@
# our chrome extensions are loaded, yet do not work
# redirection doesn't happen with MAPS_URL
browser = klass.run_browser()
-browser.get(MAPS_URL)
+#browser.get(MAPS_URL)
+
+
+print browser.capabilities |
22b87959099056e8189f40805bb8320c2cfbfb57 | go/api/go_api/tests/test_action_dispatcher.py | go/api/go_api/tests/test_action_dispatcher.py | """Tests for go.api.go_api.action_dispatcher."""
from twisted.trial.unittest import TestCase
from go.api.go_api.action_dispatcher import (
ActionDispatcher, ActionError, ConversationActionDispatcher,
RouterActionDispatcher)
class ActionDispatcherTestCase(TestCase):
def test_dispatcher_type_name(self):
... | """Tests for go.api.go_api.action_dispatcher."""
from mock import Mock
from twisted.trial.unittest import TestCase
from vumi.tests.utils import LogCatcher
from go.api.go_api.action_dispatcher import (
ActionDispatcher, ActionError, ConversationActionDispatcher,
RouterActionDispatcher)
class ActionDispatch... | Add tests for unknown_action and dispatching to action handlers that generate exceptions. | Add tests for unknown_action and dispatching to action handlers that generate exceptions.
| Python | bsd-3-clause | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | ---
+++
@@ -1,6 +1,10 @@
"""Tests for go.api.go_api.action_dispatcher."""
+from mock import Mock
+
from twisted.trial.unittest import TestCase
+
+from vumi.tests.utils import LogCatcher
from go.api.go_api.action_dispatcher import (
ActionDispatcher, ActionError, ConversationActionDispatcher,
@@ -8,8 +12,2... |
61574797dd211773cc065c73df450e76d930b698 | puzzlehunt_server/settings/env_settings.py | puzzlehunt_server/settings/env_settings.py | from .base_settings import *
import dj_database_url
import os
DEBUG = os.environ.get("DJANGO_ENABLE_DEBUG").lower() == "true"
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY")
DATABASES = {'default': dj_database_url.config(conn_max_age=600)}
if(DATABASES['default']['ENGINE'] == 'django.db.backends.mysql'):
DATABASES[... | from .base_settings import *
import dj_database_url
import os
DEBUG = os.getenv("DJANGO_ENABLE_DEBUG", default="False").lower() == "true"
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY")
DATABASES = {'default': dj_database_url.config(conn_max_age=600)}
if(DATABASES['default']['ENGINE'] == 'django.db.backends.mysql'):... | Fix for when debug isn't specified | Fix for when debug isn't specified
| Python | mit | dlareau/puzzlehunt_server,dlareau/puzzlehunt_server,dlareau/puzzlehunt_server,dlareau/puzzlehunt_server | ---
+++
@@ -2,7 +2,7 @@
import dj_database_url
import os
-DEBUG = os.environ.get("DJANGO_ENABLE_DEBUG").lower() == "true"
+DEBUG = os.getenv("DJANGO_ENABLE_DEBUG", default="False").lower() == "true"
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY")
DATABASES = {'default': dj_database_url.config(conn_max_age=600)... |
1c9eed527c60666f43d807be786ad3be5499282e | changes/api/project_commit_details.py | changes/api/project_commit_details.py | from __future__ import absolute_import, division, unicode_literals
from changes.api.base import APIView
from changes.models import Project, Revision
class ProjectCommitDetailsAPIView(APIView):
def get(self, project_id, commit_id):
project = Project.get(project_id)
if not project:
retu... | from __future__ import absolute_import, division, unicode_literals
from changes.api.base import APIView
from changes.models import Project, Revision
class ProjectCommitDetailsAPIView(APIView):
def get(self, project_id, commit_id):
project = Project.get(project_id)
if not project:
retu... | Correct commit details to use an outerjoin | Correct commit details to use an outerjoin
| Python | apache-2.0 | dropbox/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes,bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,wfxiang08/changes | ---
+++
@@ -11,7 +11,7 @@
return '', 404
repo = project.repository
- revision = Revision.query.join(
+ revision = Revision.query.outerjoin(
'author',
).filter(
Revision.repository_id == repo.id, |
046fe99e4e2de0503c44555287eedaedc56ef280 | skimage/filters/tests/test_filter_import.py | skimage/filters/tests/test_filter_import.py | from warnings import catch_warnings, simplefilter
def test_filter_import():
with catch_warnings():
simplefilter('ignore')
from skimage import filter as F
assert('sobel' in dir(F))
assert any(['has been renamed' in w
for (w, _, _) in F.__warningregistry__]), F.__warningregi... | from warnings import catch_warnings, simplefilter
def test_filter_import():
with catch_warnings():
simplefilter('always')
from skimage import filter as F
assert('sobel' in dir(F))
assert any(['has been renamed' in w
for (w, _, _) in F.__warningregistry__])
| Make sure warning is raised upon import | Make sure warning is raised upon import
| Python | bsd-3-clause | bennlich/scikit-image,vighneshbirodkar/scikit-image,ofgulban/scikit-image,youprofit/scikit-image,pratapvardhan/scikit-image,robintw/scikit-image,ofgulban/scikit-image,GaZ3ll3/scikit-image,Midafi/scikit-image,Britefury/scikit-image,pratapvardhan/scikit-image,ofgulban/scikit-image,Hiyorimi/scikit-image,Britefury/scikit-i... | ---
+++
@@ -3,9 +3,9 @@
def test_filter_import():
with catch_warnings():
- simplefilter('ignore')
+ simplefilter('always')
from skimage import filter as F
assert('sobel' in dir(F))
assert any(['has been renamed' in w
- for (w, _, _) in F.__warningregistry__]),... |
d3f72f3ded76fb49eedb0c93c58211aab0231b97 | jetson/networkTable.py | jetson/networkTable.py | import time
from networktables import NetworkTables
rioIP = '10.58.06.2' # this shouldn't change
tableName = 'JetsonToRio' # should be same in rio's java NT program
def initTable():
NetworkTables.initialize(server=rioIP)
return NetworkTables.getTable(tableName)
def pushVals(table, jetsonVals):
table.putNumberArra... | import time
from networktables import NetworkTables
def initTable():
NetworkTables.initialize(server=rioIP)
return NetworkTables.getTable(tableName)
def pushVals(table, jetsonVals):
table.putNumberArray(jetsonVals)
class NetworkInterface(object):
"""docstring for NetworkInterface."""
rioIP = '10.58.06.2' # t... | Put network table interface in class format | Put network table interface in class format
| Python | mit | frc5806/Steamworks,frc5806/Steamworks,frc5806/Steamworks,frc5806/Steamworks | ---
+++
@@ -1,8 +1,7 @@
import time
from networktables import NetworkTables
-rioIP = '10.58.06.2' # this shouldn't change
-tableName = 'JetsonToRio' # should be same in rio's java NT program
+
def initTable():
NetworkTables.initialize(server=rioIP)
@@ -10,5 +9,18 @@
def pushVals(table, jetsonVals):
tabl... |
e17d8f9b8bd09b1b96cad3e61961f3833d2e486c | dataverse/file.py | dataverse/file.py | from __future__ import absolute_import
from dataverse.utils import sanitize
class DataverseFile(object):
def __init__(self, dataset, name, file_id=None):
self.dataset = dataset
self.name = sanitize(name)
self.id = file_id
self.download_url = '{0}/access/datafile/{1}'.format(
... | from __future__ import absolute_import
from dataverse.utils import sanitize
class DataverseFile(object):
def __init__(self, dataset, name, file_id=None):
self.dataset = dataset
self.name = sanitize(name)
self.id = file_id
self.download_url = '{0}/access/datafile/{1}'.format(
... | Fix 'class DataverseFile' to handle old and new response format Tests were failing after swith to new server/version | Fix 'class DataverseFile' to handle old and new response format
Tests were failing after swith to new server/version
| Python | apache-2.0 | CenterForOpenScience/dataverse-client-python,IQSS/dataverse-client-python | ---
+++
@@ -19,6 +19,10 @@
@classmethod
def from_json(cls, dataset, json):
- name = json['datafile']['name']
- file_id = json['datafile']['id']
+ try:
+ name = json['dataFile']['filename']
+ file_id = json['dataFile']['id']
+ except KeyError:
+ ... |
a7f5315633b5b3787593205cc7dc540023baf7ad | scripts/print_view_controller_hierarchy.py | scripts/print_view_controller_hierarchy.py | """Prints the current view controller hierarchy.
Usage: pvc
"""
def print_view_controller_hierarchy(debugger, command, result, internal_dict):
debugger.HandleCommand('po [[[UIWindow keyWindow] rootViewController] _printHierarchy]')
def __lldb_init_module(debugger, internal_dict):
debugger.HandleCommand('command ... | """Prints the current view controller hierarchy.
Usage: pvc
"""
def print_view_controller_hierarchy(debugger, command, result, internal_dict):
debugger.GetCommandInterpreter().HandleCommand('po [[[UIWindow keyWindow] rootViewController] _printHierarchy]', result)
def __lldb_init_module(debugger, internal_dict):
d... | Update the script to grab the results. This is needed for the tests. | Update the script to grab the results. This is needed for the tests.
| Python | mit | mrhappyasthma/happydebugging,mrhappyasthma/HappyDebugging | ---
+++
@@ -3,8 +3,7 @@
Usage: pvc
"""
def print_view_controller_hierarchy(debugger, command, result, internal_dict):
- debugger.HandleCommand('po [[[UIWindow keyWindow] rootViewController] _printHierarchy]')
-
+ debugger.GetCommandInterpreter().HandleCommand('po [[[UIWindow keyWindow] rootViewController] _print... |
02ac5dcfa6bdaf9b8152ef2f49fd61afe9faf8ab | client/python/plot_request_times.py | client/python/plot_request_times.py | import requests
from plotly.offline import plot
import plotly.graph_objs as go
r = requests.get('http://localhost:8081/monitor_results/1')
print(r.json())
# build traces for plotting from monitoring data
request_times = list()
timestamps = list()
timestamp = 0
url = r.json()[0]['urlToMonitor']['url']
for monitoring_d... | import requests
from plotly.offline import plot
import plotly.graph_objs as go
def build_data_for_monitored_url(id):
'''Fetches and prepares data for plotting for the given URL id'''
r = requests.get('http://localhost:8081/monitor_results/' + str(id))
# build traces for plotting from monitoring data
re... | Implement fetching all monitored data | Implement fetching all monitored data
| Python | mit | gernd/simple-site-mon | ---
+++
@@ -2,18 +2,27 @@
from plotly.offline import plot
import plotly.graph_objs as go
-r = requests.get('http://localhost:8081/monitor_results/1')
-print(r.json())
-# build traces for plotting from monitoring data
-request_times = list()
-timestamps = list()
-timestamp = 0
-url = r.json()[0]['urlToMonitor']['... |
876d995967c5f8e580fc8e89fff859860b648057 | wagtail/wagtailimages/backends/pillow.py | wagtail/wagtailimages/backends/pillow.py | from __future__ import absolute_import
import PIL.Image
from wagtail.wagtailimages.backends.base import BaseImageBackend
class PillowBackend(BaseImageBackend):
def __init__(self, params):
super(PillowBackend, self).__init__(params)
def open_image(self, input_file):
image = PIL.Image.open(in... | from __future__ import absolute_import
import PIL.Image
from wagtail.wagtailimages.backends.base import BaseImageBackend
class PillowBackend(BaseImageBackend):
def __init__(self, params):
super(PillowBackend, self).__init__(params)
def open_image(self, input_file):
image = PIL.Image.open(in... | Convert P images with transparency into RGBA | Convert P images with transparency into RGBA
Fixes #800
| Python | bsd-3-clause | jorge-marques/wagtail,gasman/wagtail,mikedingjan/wagtail,takeflight/wagtail,nimasmi/wagtail,chimeno/wagtail,kurtrwall/wagtail,Pennebaker/wagtail,mephizzle/wagtail,zerolab/wagtail,gogobook/wagtail,inonit/wagtail,m-sanders/wagtail,mikedingjan/wagtail,nealtodd/wagtail,timorieber/wagtail,takeshineshiro/wagtail,nutztherooki... | ---
+++
@@ -18,7 +18,11 @@
def resize(self, image, size):
if image.mode in ['1', 'P']:
- image = image.convert('RGB')
+ if 'transparency' in image.info:
+ image = image.convert('RGBA')
+ else:
+ image = image.convert('RGB')
+
retu... |
c9b0bfa8d7ced6b521fa4e0454e8640e11aa512b | hr_contract_reference/models/hr_contract.py | hr_contract_reference/models/hr_contract.py | # -*- coding:utf-8 -*-
##############################################################################
#
# Copyright (C) 2011,2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | # -*- coding:utf-8 -*-
##############################################################################
#
# Copyright (C) 2011,2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | Update code as commented, update readme. | Update code as commented, update readme.
| Python | agpl-3.0 | OCA/hr,OCA/hr,OCA/hr | ---
+++
@@ -27,12 +27,10 @@
_inherit = 'hr.contract'
name = fields.Char('Contract Reference', required=False,
- readonly=True, copy=False)
+ readonly=True, copy=False, default='/')
@api.model
def create(self, vals):
- contract = super(hr_contract, self).... |
a2d373ac4cedbfa556b54f8a29382554290d7532 | chaos.py | chaos.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from os.path import dirname, abspath, join
import time
import sys
import logging
import subprocess
import settings
import schedule
import cron
import github_api as gh
def main():
"""main entry"""
logging.basicConfig(level=logging.DEBUG,
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import os
import sys
import logging
import threading
import http.server
import random
import subprocess
import settings
import patch
import schedule
from os.path import dirname, abspath, join
import cron
import github_api as gh
import github_api.prs
import gi... | Revert "Code cleanup and removed unused imports" | Revert "Code cleanup and removed unused imports"
This reverts commit b4fc4f3d767c7f738dcb5cd784826dcc02c577bb.
| Python | mit | mpnordland/chaos,g19fanatic/chaos,rudehn/chaos,Chaosthebot/Chaos,g19fanatic/chaos,amoffat/Chaos,mark-i-m/Chaos,chaosbot/Chaos,chaosbot/Chaos,eamanu/Chaos,amoffat/Chaos,botchaos/Chaos,phil-r/chaos,eukaryote31/chaos,Chaosthebot/Chaos,eukaryote31/chaos,hongaar/chaos,mark-i-m/Chaos,eamanu/Chaos,mark-i-m/Chaos,mark-i-m/Chao... | ---
+++
@@ -1,22 +1,34 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+import time
import os
-from os.path import dirname, abspath, join
-
-import time
import sys
import logging
+import threading
+import http.server
+import random
import subprocess
import settings
+import patch
import schedule
+
+from os.... |
00cffc4197d393e6fc8d8031a4d1f8e78d5c532c | IPython/config/profile/pysh/ipython_config.py | IPython/config/profile/pysh/ipython_config.py | c = get_config()
app = c.InteractiveShellApp
# This can be used at any point in a config file to load a sub config
# and merge it into the current one.
load_subconfig('ipython_config.py', profile='default')
c.InteractiveShell.prompt_in1 = r'\C_LightGreen\u@\h\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> '
c.I... | c = get_config()
app = c.InteractiveShellApp
# This can be used at any point in a config file to load a sub config
# and merge it into the current one.
load_subconfig('ipython_config.py', profile='default')
c.PromptManager.in_template = r'{color.LightGreen}\u@\h{color.LightBlue}[{color.LightCyan}\Y1{color.LightBlue}]... | Update prompt config for pysh profile. | Update prompt config for pysh profile.
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | ---
+++
@@ -5,11 +5,11 @@
# and merge it into the current one.
load_subconfig('ipython_config.py', profile='default')
-c.InteractiveShell.prompt_in1 = r'\C_LightGreen\u@\h\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> '
-c.InteractiveShell.prompt_in2 = r'\C_Green|\C_LightGreen\D\C_Green> '
-c.InteractiveSh... |
24e9cd06f56f4b825a9e22b1974e573b34edb8b9 | ec2_security_group_list.py | ec2_security_group_list.py | #!/usr/bin/env python
import boto
print 'Security group information:\n'
ec2 = boto.connect_ec2()
sgs = ec2.get_all_security_groups()
for sg in sgs:
instances = sg.instances()
print 'id: %s, name: %s, count: %s' % (sg.id, sg.name, len(instances))
for inst in instances:
tag_name = 'UNKNOWN'
... | #!/usr/bin/env python
import boto3
print 'Security group information:\n'
ec2 = boto3.resource('ec2')
sgs = ec2.security_groups.all()
for sg in sgs:
tag_name = sg.group_name
if sg.tags is not None:
for tag in sg.tags:
if tag['Key'] == 'Name' and tag['Value'] != '':
tag_name... | Update script to use boto3 instead of boto2 | Update script to use boto3 instead of boto2
| Python | mit | thinhpham/aws-tools | ---
+++
@@ -1,17 +1,16 @@
#!/usr/bin/env python
-import boto
+import boto3
print 'Security group information:\n'
-ec2 = boto.connect_ec2()
-sgs = ec2.get_all_security_groups()
+ec2 = boto3.resource('ec2')
+sgs = ec2.security_groups.all()
for sg in sgs:
- instances = sg.instances()
- print 'id: %s, name... |
1324bec259bc8c0dd041d293a2ef60350c7a1f3c | db/alembic/versions/71213454a09a_7_remove_name_from_measurement.py | db/alembic/versions/71213454a09a_7_remove_name_from_measurement.py | """7_remove_name_from_measurement
Revision ID: 71213454a09a
Revises: f16c6875f138
Create Date: 2017-05-11 14:25:08.256463
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '71213454a09a'
down_revision = 'f16c6875f138'
branch_labels = None
depends_on = None
def ... | """7_remove_name_from_measurement
Revision ID: 71213454a09a
Revises: f16c6875f138
Create Date: 2017-05-11 14:25:08.256463
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '71213454a09a'
down_revision = 'f16c6875f138'
branch_labels = None
depends_on = None
def ... | Fix migration: measurement did not have column key. | Fix migration: measurement did not have column key.
| Python | mit | atlefren/pitilt-api,atlefren/pitilt-api,atlefren/pitilt-api,atlefren/pitilt-api | ---
+++
@@ -17,10 +17,7 @@
def upgrade():
- op.execute('''
- UPDATE measurement SET key = name
- ''')
- op.execute('''
+ op.execute('''
ALTER TABLE measurement DROP COLUMN name;
''')
|
b79108c849b5b729eaf35c9c217e04e974474753 | tree.py | tree.py | from PySide import QtGui, QtCore
class Tree(QtGui.QTreeView):
def __init__(self, parent=None):
super(Tree, self).__init__(parent)
def load_from_path(self, path):
""" Load directory containing file into the tree. """
# Link the tree to a model
model = QtGui.QFileSystemModel()
model.setRootPath(path)
... | from PySide import QtGui, QtCore
class Tree(QtGui.QTreeView):
def __init__(self, parent=None):
super(Tree, self).__init__(parent)
def load_from_path(self, path):
""" Load directory containing file into the tree. """
# Link the tree to a model
model = QtGui.QFileSystemModel()
model.setRootPath(path)
... | Print selection in selectionChanged handler. | Print selection in selectionChanged handler.
| Python | bsd-3-clause | techdragon/sphinx-gui,audreyr/sphinx-gui,audreyr/sphinx-gui,techdragon/sphinx-gui | ---
+++
@@ -19,6 +19,10 @@
# Display tree cleanly
self.hide_unwanted_info()
+
+ # Connect the selection changed signal
+ # selmodel = self.listing.selectionModel()
+ # self.selectionChanged.connect(self.handleSelectionChanged)
def hide_unwanted_info(self):
""" Hides unneeded columns and header. ""... |
ac088c3278e509bfaf6fa7b86af1831c7fbb010d | argyle/postgres.py | argyle/postgres.py | from argyle.base import upload_template
from fabric.api import sudo, task
@task
def create_db_user(username, password=None, flags=None):
"""Create a databse user."""
flags = flags or u'-D -A -R'
sudo(u'createuser %s %s' % (flags, username), user=u'postgres')
if password:
change_db_user_passwo... | from argyle.base import upload_template
from fabric.api import sudo, task
@task
def create_db_user(username, password=None, flags=None):
"""Create a databse user."""
flags = flags or u'-D -A -R'
sudo(u'createuser %s %s' % (flags, username), user=u'postgres')
if password:
change_db_user_passwo... | Use sudo to change db user password. | Use sudo to change db user password.
| Python | bsd-2-clause | mlavin/argyle,mlavin/argyle,mlavin/argyle | ---
+++
@@ -31,7 +31,7 @@
"""Change a db user's password."""
sql = "ALTER USER %s WITH PASSWORD '%s'" % (username, password)
- excute_query(sql)
+ excute_query(sql, use_sudo=True)
@task |
725b3a9db33c90187b913123deefeb180c7fee4c | client/app.py | client/app.py | #!/usr/bin/env python3
import argparse
from server import *
from commandRunner import *
class App:
def __init__(self, baseurl, clientid):
self.server = Server(baseurl, clientid)
def run(self):
runner = CommandRunner()
command = self.server.get()
while command is not None:
response = runner... | #!/usr/bin/env python3
import argparse
from server import *
from commandRunner import *
class App:
server = None
runner = None
def __init__(self, baseurl, clientid):
self.server = Server(baseurl, clientid)
self.runner = CommandRunner()
def run(self):
command = self.server.get()
while co... | Add DI to App object | Add DI to App object
| Python | mit | CaminsTECH/owncloud-test | ---
+++
@@ -6,14 +6,17 @@
from commandRunner import *
class App:
+ server = None
+ runner = None
+
def __init__(self, baseurl, clientid):
self.server = Server(baseurl, clientid)
-
- def run(self):
- runner = CommandRunner()
+ self.runner = CommandRunner()
+
+ def run(self):
command = se... |
42b797b5a8eca483f68ca9b8e6fc123bc8f4cf9c | taOonja/taOonja/urls.py | taOonja/taOonja/urls.py | """taOonja URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | """taOonja URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | Add Basic URL for Project | Add Basic URL for Project
| Python | mit | Javid-Izadfar/TaOonja,Javid-Izadfar/TaOonja,Javid-Izadfar/TaOonja | ---
+++
@@ -18,8 +18,11 @@
from django.conf.urls import url
from django.contrib import admin
+from game.views import LocationListView
urlpatterns = [
url(r'^admin/', admin.site.urls),
+ url(r'^location/$', LocationListView.as_view(), name='location-list')
+
]
|
bf557dc589a776b432c1a43a96a09d93aa2b0a1e | tca/chat/serializers.py | tca/chat/serializers.py | from rest_framework import serializers
from rest_framework.reverse import reverse
from chat.models import Member
from chat.models import Message
from chat.models import ChatRoom
class MemberSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Member
class ChatRoomSerializer(serialize... | from rest_framework import serializers
from rest_framework.reverse import reverse
from chat.models import Member
from chat.models import Message
from chat.models import ChatRoom
class MemberSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Member
class ChatRoomSerializer(serialize... | Add a link to the messages of a ChatRoom in its representation | Add a link to the messages of a ChatRoom in its representation
The ChatRoom resource should provide a way for clients to access
its subordinate resource ``Message``.
| Python | bsd-3-clause | mlalic/TumCampusAppBackend,mlalic/TumCampusAppBackend | ---
+++
@@ -12,6 +12,15 @@
class ChatRoomSerializer(serializers.HyperlinkedModelSerializer):
+ messages = serializers.SerializerMethodField('get_messages_url')
+
+ def get_messages_url(self, chat_room):
+ return reverse(
+ 'message-list',
+ kwargs={'chat_room': chat_room.pk},
+... |
5ac6e5db05a81cc6f5b1b1fc4850424d526774c8 | flash_services/__init__.py | flash_services/__init__.py | """The services that can be shown on a Flash dashboard."""
from collections import OrderedDict
import logging
from uuid import uuid4
from flask import Blueprint
from .codeship import Codeship
from .github import GitHub
from .tracker import Tracker
from .travis import TravisOS
__author__ = 'Jonathan Sharpe'
__versio... | """The services that can be shown on a Flash dashboard."""
from collections import OrderedDict
import logging
from uuid import uuid4
from flask import Blueprint
from .codeship import Codeship
from .github import GitHub
from .tracker import Tracker
from .travis import TravisOS
__author__ = 'Jonathan Sharpe'
__versio... | Tag builds in the correct order | Tag builds in the correct order
| Python | isc | textbook/flash_services,textbook/flash_services,textbook/flash_services | ---
+++
@@ -12,7 +12,7 @@
from .travis import TravisOS
__author__ = 'Jonathan Sharpe'
-__version__ = '0.1.1'
+__version__ = '0.1.2'
blueprint = Blueprint('services', __name__, template_folder='templates')
|
b214a69136225459b514cbf6f3eb503228ae4ec4 | server/openslides/saml/management/commands/create-saml-settings.py | server/openslides/saml/management/commands/create-saml-settings.py | import os
from django.core.management.base import BaseCommand
from ...settings import create_saml_settings, get_settings_dir_and_path
class Command(BaseCommand):
"""
Command to create the saml_settings.json file.
"""
help = "Create the saml_settings.json settings file."
def add_arguments(self,... | import os
from django.core.management.base import BaseCommand
from ...settings import create_saml_settings, get_settings_dir_and_path
class Command(BaseCommand):
"""
Command to create the saml_settings.json file.
"""
help = "Create the saml_settings.json settings file."
def add_arguments(self,... | Fix check on wrong variable | Fix check on wrong variable | Python | mit | jwinzer/OpenSlides,CatoTH/OpenSlides,jwinzer/OpenSlides,jwinzer/OpenSlides,FinnStutzenstein/OpenSlides,FinnStutzenstein/OpenSlides,FinnStutzenstein/OpenSlides,jwinzer/OpenSlides,CatoTH/OpenSlides,CatoTH/OpenSlides,jwinzer/OpenSlides,CatoTH/OpenSlides,FinnStutzenstein/OpenSlides | ---
+++
@@ -25,7 +25,7 @@
if settings_dir is not None:
settings_path = os.path.join(settings_dir, "saml_settings.json")
- if not os.path.isdir(settings_path):
+ if not os.path.isdir(settings_dir):
print(f"The directory '{settings_dir}' does not exist. Abo... |
7d4f345443575974825ebc9bac8a274632ccb99d | python/brica1/__init__.py | python/brica1/__init__.py | # -*- coding: utf-8 -*-
"""
BriCA
=====
Brain-inspired Cognitive Architecture
A scalable, general purpose computing platform for cognitive architectures.
"""
__all__ = ["component", "connection", "module", "port", "ros", "scheduler", "unit", "utils"]
from .component import *
from .connection import *
from .module... | # -*- coding: utf-8 -*-
"""
BriCA
=====
Brain-inspired Cognitive Architecture
A scalable, general purpose computing platform for cognitive architectures.
"""
__all__ = ["component", "connection", "module", "port", "ros", "scheduler", "supervisor", "unit", "utils"]
from .component import *
from .connection import ... | Add supervisor to default modules | Add supervisor to default modules
| Python | apache-2.0 | wbap/BriCA1 | ---
+++
@@ -10,12 +10,13 @@
"""
-__all__ = ["component", "connection", "module", "port", "ros", "scheduler", "unit", "utils"]
+__all__ = ["component", "connection", "module", "port", "ros", "scheduler", "supervisor", "unit", "utils"]
from .component import *
from .connection import *
from .module import *
... |
222ac5f16004f45b17b0b04f71104eac9b2fd3d4 | jarvis.py | jarvis.py | import config
from flask import Flask, request
import json
import os
import requests
import modules
ACCESS_TOKEN = os.environ.get('ACCESS_TOKEN', config.ACCESS_TOKEN)
VERIFY_TOKEN = os.environ.get('VERIFY_TOKEN', config.VERIFY_TOKEN)
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
... | import config
from flask import Flask, request
import json
import os
import requests
import modules
ACCESS_TOKEN = os.environ.get('ACCESS_TOKEN', config.ACCESS_TOKEN)
VERIFY_TOKEN = os.environ.get('VERIFY_TOKEN', config.VERIFY_TOKEN)
app = Flask(__name__)
@app.route('/')
def about():
return 'Just A Rather Very I... | Add description on root route | Add description on root route
| Python | mit | ZuZuD/JARVIS-on-Messenger,jaskaransarkaria/JARVIS-on-Messenger,swapagarwal/JARVIS-on-Messenger,edadesd/JARVIS-on-Messenger | ---
+++
@@ -11,8 +11,8 @@
app = Flask(__name__)
@app.route('/')
-def hello_world():
- return 'Hello World!'
+def about():
+ return 'Just A Rather Very Intelligent System, now on Messenger!'
@app.route('/webhook/', methods=['GET', 'POST'])
def webhook(): |
9516621f2b4cfc5b541c3328df95b62111e77463 | app/main/__init__.py | app/main/__init__.py | from flask import Blueprint
main = Blueprint('main', __name__)
from . import errors
from .views import (
crown_hosting, digital_services_framework, g_cloud, login, marketplace, suppliers,
digital_outcomes_and_specialists
)
| from flask import Blueprint
main = Blueprint('main', __name__)
from . import errors
from .views import (
crown_hosting, g_cloud, login, marketplace, suppliers,
digital_outcomes_and_specialists
)
| Delete reference to removed view | Delete reference to removed view
| Python | mit | alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend | ---
+++
@@ -4,6 +4,6 @@
from . import errors
from .views import (
- crown_hosting, digital_services_framework, g_cloud, login, marketplace, suppliers,
+ crown_hosting, g_cloud, login, marketplace, suppliers,
digital_outcomes_and_specialists
) |
a0f31dc83ce36823022b5e26c85ad03fe639e79f | src/main/python/alppaca/compat.py | src/main/python/alppaca/compat.py | from __future__ import print_function, absolute_import, unicode_literals, division
""" Compatability module for different Python versions. """
try:
import unittest2 as unittest
except ImportError: # pragma: no cover
import unittest
try:
from ordereddict import OrderedDict
except ImportError: # pragma: n... | """ Compatability module for different Python versions. """
from __future__ import print_function, absolute_import, unicode_literals, division
try:
import unittest2 as unittest
except ImportError: # pragma: no cover
import unittest
try:
from ordereddict import OrderedDict
except ImportError: # pragma: n... | Move string above the import so it becomes a docstring | Move string above the import so it becomes a docstring
| Python | apache-2.0 | ImmobilienScout24/afp-alppaca,ImmobilienScout24/afp-alppaca,ImmobilienScout24/alppaca,ImmobilienScout24/alppaca | ---
+++
@@ -1,6 +1,6 @@
+""" Compatability module for different Python versions. """
+
from __future__ import print_function, absolute_import, unicode_literals, division
-
-""" Compatability module for different Python versions. """
try:
import unittest2 as unittest |
34d10f364518805f7e7918e62d4f7aecc4f472dc | corehq/apps/change_feed/connection.py | corehq/apps/change_feed/connection.py | from django.conf import settings
from corehq.util.io import ClosingContextProxy
from kafka import KafkaConsumer
from kafka.client import KafkaClient, SimpleClient
GENERIC_KAFKA_CLIENT_ID = 'cchq-kafka-client'
def get_simple_kafka_client(client_id=GENERIC_KAFKA_CLIENT_ID):
# this uses the old SimpleClient becaus... | from django.conf import settings
from corehq.util.io import ClosingContextProxy
from kafka import KafkaConsumer
from kafka.client import KafkaClient, SimpleClient
GENERIC_KAFKA_CLIENT_ID = 'cchq-kafka-client'
def get_simple_kafka_client(client_id=GENERIC_KAFKA_CLIENT_ID):
# this uses the old SimpleClient becaus... | Remove hard request timeout on kafka consumer | Remove hard request timeout on kafka consumer
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | ---
+++
@@ -28,5 +28,4 @@
return ClosingContextProxy(KafkaConsumer(
client_id='pillowtop_utils',
bootstrap_servers=settings.KAFKA_BROKERS,
- request_timeout_ms=1000
)) |
bfbe61ed014ad80ca80cd9fc15d961f4b969eeb8 | solum/tests/uploaders/test_common.py | solum/tests/uploaders/test_common.py | # Copyright 2014 - Rackspace Hosting
#
# 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 ... | # Copyright 2014 - Rackspace Hosting
#
# 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 ... | Fix typo in uploader tests | Fix typo in uploader tests
Change-Id: Ife7685d6113309d20bf90a24d73f793be2837314
| Python | apache-2.0 | stackforge/solum,ed-/solum,openstack/solum,ed-/solum,devdattakulkarni/test-solum,ed-/solum,stackforge/solum,openstack/solum,devdattakulkarni/test-solum,ed-/solum | ---
+++
@@ -14,7 +14,7 @@
from solum.tests import base
from solum.tests import utils
-from solum.uploader import common as uploader
+from solum.uploaders import common as uploader
class CommonTest(base.BaseTestCase): |
907a09311718859184a8e4015b35bde62efe47f7 | graphene/types/datetime.py | graphene/types/datetime.py | from __future__ import absolute_import
import datetime
try:
import iso8601
except:
raise ImportError("iso8601 package is required for DateTime Scalar.\nYou can install it using: pip install iso8601.")
from graphql.language import ast
from .scalars import Scalar
class DateTime(Scalar):
@staticmethod
... | from __future__ import absolute_import
import datetime
try:
import iso8601
except:
raise ImportError("iso8601 package is required for DateTime Scalar.\nYou can install it using: pip install iso8601.")
from graphql.language import ast
from .scalars import Scalar
class DateTime(Scalar):
@staticmethod
... | Allow dates in Datetime scalar | Allow dates in Datetime scalar
| Python | mit | graphql-python/graphene,graphql-python/graphene,Globegitter/graphene,Globegitter/graphene,sjhewitt/graphene,sjhewitt/graphene | ---
+++
@@ -14,7 +14,7 @@
@staticmethod
def serialize(dt):
- assert isinstance(dt, datetime.datetime)
+ assert isinstance(dt, (datetime.datetime, datetime.date)), 'Received not compatible datetime "{}"'.format(repr(dt))
return dt.isoformat()
@staticmethod |
d050210f3e5d8a6f119c89f24751604956af3e16 | setup.py | setup.py | from setuptools import setup
setup(name='openarc',
version='0.5.0',
description='Functional reactive graph backed by PostgreSQL',
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Topic ... | from setuptools import setup
setup(name='openarc',
version='0.5.0',
description='Functional reactive graph backed by PostgreSQL',
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7',
'Topic ... | Add inflection and toml as dependencies for the project | Add inflection and toml as dependencies for the project
| Python | bsd-3-clause | kchoudhu/openarc | ---
+++
@@ -17,8 +17,10 @@
packages=['openarc'],
install_requires=[
'gevent',
+ 'inflection',
'msgpack-python',
'psycopg2',
+ 'toml',
'zmq'
],
include_package_data=True, |
ba063bd052284571ab6e51b0fcebe238c415071f | setup.py | setup.py | import os
import sys
import setuptools
from keystoneclient.openstack.common import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
requires = setup.parse_requirements()
depend_links = setup.parse_dependency_links()
tests_require = setup.parse_requirements(['tools/test-r... | import os
import sys
import setuptools
from keystoneclient.openstack.common import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
requires = setup.parse_requirements()
depend_links = setup.parse_dependency_links()
tests_require = setup.parse_requirements(['tools/test-r... | Add OpenStack trove classifier for PyPI | Add OpenStack trove classifier for PyPI
Add trove classifier to have the client listed among the
other OpenStack-related projets on PyPI.
Change-Id: I1ddae8d1272a2b1c5e4c666c9aa4e4a274431415
Signed-off-by: Doug Hellmann <8c845c26a3868dadec615703cd974244eb2ac6d1@dreamhost.com>
| Python | apache-2.0 | jamielennox/keystoneauth,sileht/keystoneauth,citrix-openstack-build/keystoneauth | ---
+++
@@ -25,6 +25,7 @@
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
+ 'Environment :: OpenStack',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: Apache Software Licen... |
3bb0f94161966d04ab29fd1cd0b3e4ec34586c8c | setup.py | setup.py | #!/usr/bin/python
from setuptools import setup, find_packages
from prince import __author__, __license__, __title__, __version__
setup(
author=__author__,
author_email='maxhalford25@gmail.com',
description='Factor analysis for in-memory datasets in Python',
install_requires=[
'fbpca>=1.0',
... | #!/usr/bin/python
from setuptools import setup, find_packages
from prince import __author__, __license__, __title__, __version__
setup(
author=__author__,
author_email='maxhalford25@gmail.com',
description='Factor analysis for in-memory datasets in Python',
install_requires=[
'fbpca>=1.0',
... | Add bumpy requirement for rtd | Add bumpy requirement for rtd
| Python | mit | MaxHalford/Prince | ---
+++
@@ -12,6 +12,7 @@
install_requires=[
'fbpca>=1.0',
'matplotlib>=1.5',
+ 'numpy>=1.11.2',
'pandas>=0.19.0'
],
license=__license__, |
301f23067dde512f56ba5bf2201b666d125ffc96 | setup.py | setup.py | import sys
import os
from cx_Freeze import setup, Executable
paths = []
paths.extend(sys.path)
paths.append('whacked4')
build_exe_options = {
'packages': [],
'path': paths,
'include_files': ['res', 'cfg', 'docs', 'LICENSE', 'README.md'],
'optimize': 2,
'include_msvcr': True
}
build_exe_options['path'].append('sr... | import sys
import os
from cx_Freeze import setup, Executable
paths = []
paths.extend(sys.path)
paths.append('src')
build_exe_options = {
'path': paths,
'packages': ['whacked4'],
'include_files': ['res', 'cfg', 'docs', 'LICENSE', 'README.md'],
'optimize': 2,
'include_msvcr': True
}
base = None
if sys.platform ==... | Update distutils script. Release builds still twice the size though... | Update distutils script. Release builds still twice the size though...
| Python | bsd-2-clause | GitExl/WhackEd4,GitExl/WhackEd4 | ---
+++
@@ -4,16 +4,15 @@
paths = []
paths.extend(sys.path)
-paths.append('whacked4')
+paths.append('src')
build_exe_options = {
- 'packages': [],
'path': paths,
+ 'packages': ['whacked4'],
'include_files': ['res', 'cfg', 'docs', 'LICENSE', 'README.md'],
'optimize': 2,
'include_msvcr': True
}
-build_e... |
eb95c0f631e9f309aa6bbde82df84c05b55a357d | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import find_packages
from setuptools import setup
setup(
name='cheetah_lint',
description='Linting tools for the Cheetah templating language.',
url='https://github.com/asottile/cheetah_lint',
version='0.2.1',
author='Anthony Sottile',
author_email='asott... | # -*- coding: utf-8 -*-
from setuptools import find_packages
from setuptools import setup
setup(
name='cheetah_lint',
description='Linting tools for the Cheetah templating language.',
url='https://github.com/asottile/cheetah_lint',
version='0.2.1',
author='Anthony Sottile',
author_email='asott... | Upgrade the versions of things | Upgrade the versions of things
| Python | mit | asottile/cheetah_lint | ---
+++
@@ -23,8 +23,8 @@
'aspy.refactor_imports>=0.2.1',
'cached-property',
'flake8',
- 'refactorlib[cheetah]>=0.10.0,<=0.10.999',
- 'yelp-cheetah>=0.13.0,<=0.13.999',
+ 'refactorlib[cheetah]>=0.11.0,<=0.11.999',
+ 'yelp-cheetah>=0.15.0,<=0.15.999',
],
... |
ca3366bfdec91797c0a5406a5ba8094c4d13a233 | comics/feedback/forms.py | comics/feedback/forms.py | from bootstrap.forms import BootstrapForm
from django import forms
class FeedbackForm(BootstrapForm):
message = forms.CharField(label="What's on your heart",
help_text='Remember to sign with you mail address if you want a reply.',
widget=forms.Textarea(attrs={'rows': 5, 'cols': 100}))
| from bootstrap.forms import BootstrapForm
from django import forms
class FeedbackForm(BootstrapForm):
message = forms.CharField(label="What's on your heart",
help_text='Sign with your email address if you want a reply.',
widget=forms.Textarea(attrs={'rows': 5, 'cols': 100}))
| Fix typo in feedback form help text | Fix typo in feedback form help text
| Python | agpl-3.0 | datagutten/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics,jodal/comics,datagutten/comics,datagutten/comics | ---
+++
@@ -3,5 +3,5 @@
class FeedbackForm(BootstrapForm):
message = forms.CharField(label="What's on your heart",
- help_text='Remember to sign with you mail address if you want a reply.',
+ help_text='Sign with your email address if you want a reply.',
widget=forms.Textarea(attrs={'ro... |
cff9bc4b1967ded65ca580ec74842de0d3774cd3 | tddspry/django/settings.py | tddspry/django/settings.py | from django.conf import settings
from django.test import TransactionTestCase
from nose.util import resolve_name
__all__ = ('IP', 'PORT', 'SITE', 'DjangoTestCase')
IP = getattr(settings, 'TDDSPRY_IP', '127.0.0.1')
PORT = getattr(settings, 'TDDSPRY_PORT', 8080)
SITE = 'http://%s:%s/' % (IP, PORT)
DjangoTestCase = g... | from django.conf import settings
from django.test import TransactionTestCase
from nose.util import resolve_name
__all__ = ('IP', 'PORT', 'SITE', 'DjangoTestCase')
IP = getattr(settings, 'TDDSPRY_IP', '127.0.0.1')
PORT = getattr(settings, 'TDDSPRY_PORT', 8088)
SITE = 'http://%s:%s/' % (IP, PORT)
DjangoTestCase = g... | Fix default tddspry port for Twill journeys. | Fix default tddspry port for Twill journeys.
| Python | bsd-3-clause | playpauseandstop/tddspry,playpauseandstop/tddspry | ---
+++
@@ -8,7 +8,7 @@
IP = getattr(settings, 'TDDSPRY_IP', '127.0.0.1')
-PORT = getattr(settings, 'TDDSPRY_PORT', 8080)
+PORT = getattr(settings, 'TDDSPRY_PORT', 8088)
SITE = 'http://%s:%s/' % (IP, PORT)
DjangoTestCase = getattr(settings, 'TDDSPRY_TEST_CASE', TransactionTestCase) |
3c722947d8ece448dec7ce9f82c2a477c667c4a8 | setup.py | setup.py | from setuptools import setup
setup(
name='playlistfromsong',
packages=['playlistfromsong'],
version='0.22',
description='An offline music station generator',
author='schollz',
url='https://github.com/schollz/playlistfromsong',
author_email='hypercube.platforms@gmail.com',
download_url='... | from setuptools import setup
setup(
name='playlistfromsong',
packages=['playlistfromsong'],
version='1.0.0',
description='An offline music station generator',
author='schollz',
url='https://github.com/schollz/playlistfromsong',
author_email='hypercube.platforms@gmail.com',
download_url=... | Upgrade to 1.0.0 (switch to semantic versioning) | Upgrade to 1.0.0 (switch to semantic versioning)
| Python | mit | schollz/playlistfromsong | ---
+++
@@ -3,12 +3,12 @@
setup(
name='playlistfromsong',
packages=['playlistfromsong'],
- version='0.22',
+ version='1.0.0',
description='An offline music station generator',
author='schollz',
url='https://github.com/schollz/playlistfromsong',
author_email='hypercube.platforms@gm... |
431d3e960962543fd162770475a488bd9e21217e | setup.py | setup.py | from distutils.core import setup
version=__import__('sendfile').__version__
setup(
name='django-sendfile',
version=version,
description='Abstraction to offload file uploads to web-server (e.g. Apache with mod_xsendfile) once Django has checked permissions etc.',
long_description=open('README.rst').re... | from distutils.core import setup
version=__import__('sendfile').__version__
setup(
name='django-sendfile',
version=version,
description='Abstraction to offload file uploads to web-server (e.g. Apache with mod_xsendfile) once Django has checked permissions etc.',
long_description=open('README.rst').re... | Fix requirements so pip correctly installs Django and Unidecode. | Fix requirements so pip correctly installs Django and Unidecode.
| Python | bsd-3-clause | karyon/django-sendfile,nathanielvarona/django-sendfile,joshcartme/django-sendfile,NotSqrt/django-sendfile,johnsensible/django-sendfile,joshcartme/django-sendfile | ---
+++
@@ -15,6 +15,7 @@
license='BSD',
requires=['Django (>=1.4.2)', 'Unidecode'],
+ install_requires=['Django>=1.4.2', 'Unidecode'],
packages=['sendfile', 'sendfile.backends'],
package_dir={ |
3fc93588ad319d8f709d89b32782e530725db1ca | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup,find_packages
METADATA = dict(
name='django-socialregistration',
version='0.4.2',
author='Alen Mujezinovic',
author_email='alen@caffeinehit.com',
description='Django application enabling registration through a variety of APIs',
long_description... | #!/usr/bin/env python
from setuptools import setup,find_packages
METADATA = dict(
name='django-socialregistration',
version='0.4.2',
author='Alen Mujezinovic',
author_email='alen@caffeinehit.com',
description='Django application enabling registration through a variety of APIs',
long_description... | Remove django requirement to prevent installing two versions of django | Remove django requirement to prevent installing two versions of django
| Python | mit | coxmediagroup/django-socialregistration,coxmediagroup/django-socialregistration | ---
+++
@@ -10,7 +10,8 @@
long_description=open('README.rst').read(),
url='http://github.com/flashingpumpkin/django-socialregistration',
keywords='django facebook twitter oauth openid registration',
- install_requires=['django', 'oauth2', 'python-openid'],
+ #install_requires=['django', 'oauth2',... |
7c5518b8aa6c1f4421aac7b8a652d737a17c4e86 | setup.py | setup.py | from distutils.core import setup
setup(
name='passphrase',
version='0.0.2',
author='Rob Martin @version2beta',
author_email='rob@version2beta.com',
packages=['passphrase'],
scripts=[],
url='http://pypi.python.org/pypi/passphrase/',
license='LICENSE.txt',
description='List a series o... | from distutils.core import setup
setup(
name='passphrase',
version='0.0.2',
author='Rob Martin @version2beta',
author_email='rob@version2beta.com',
packages=['passphrase'],
scripts=[],
url='http://pypi.python.org/pypi/passphrase/',
license='LICENSE.txt',
description='List a series o... | Make it into a package | Make it into a package
| Python | bsd-3-clause | Version2beta/passphrase | ---
+++
@@ -9,7 +9,7 @@
scripts=[],
url='http://pypi.python.org/pypi/passphrase/',
license='LICENSE.txt',
- description='List a series of words for selection of a secure and rememberable passphrase.'
+ description='List a series of words for selection of a secure and rememberable passphrase.',
... |
4fa59bf4e68f01613c80eb584c15c882606019e7 | 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',
'manifestp... | # 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',
'manifestp... | Add entry point for generating reports | Add entry point for generating reports
| Python | mpl-2.0 | ahal/test-informant,mozilla/test-informant,ahal/test-informant,mozilla/test-informant | ---
+++
@@ -40,4 +40,5 @@
entry_points="""
[console_scripts]
test-informant = informant.pulse_listener:run
+ generate-informant-report = tools.generate_report:cli
""") |
882dc508a864d22ffb6879d9d8ed35012c13b656 | lifx/listen.py | lifx/listen.py |
from pprint import pprint
import socket
import packetcodec
from binascii import hexlify
UDP_IP = "0.0.0.0"
UDP_PORT = 56700
sock = socket.socket(socket.AF_INET,
socket.SOCK_DGRAM)
sock.bind((UDP_IP, UDP_PORT))
while True:
data, addr = sock.recvfrom(1024)
packet = packetcodec.decode_pac... |
from pprint import pprint
import socket
import packetcodec
from binascii import hexlify
UDP_IP = "0.0.0.0"
UDP_PORT = 56700
sock = socket.socket(socket.AF_INET,
socket.SOCK_DGRAM)
sock.bind((UDP_IP, UDP_PORT))
while True:
data, addr = sock.recvfrom(1024)
packet = packetcodec.decode_pac... | Print in python 3 requires parens | Print in python 3 requires parens
| Python | agpl-3.0 | sharph/lifx-python | ---
+++
@@ -15,6 +15,6 @@
while True:
data, addr = sock.recvfrom(1024)
packet = packetcodec.decode_packet(data)
- print addr, unicode(packet)
+ print(addr, unicode(packet))
pprint(packet.payload.data)
|
fda08d81e3b6a4aae5610973053890bf8b283bf0 | buffer/tests/test_profile.py | buffer/tests/test_profile.py | import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profile_schedules_getter():
'''
Test schedules gettering from buffer api
'''
mocked_api = Magic... | import json
from nose.tools import eq_, raises
from mock import MagicMock, patch
from buffer.models.profile import Profile, PATHS
mocked_response = {
'name': 'me',
'service': 'twiter',
'id': 1
}
def test_profile_schedules_getter():
'''
Test schedules gettering from buffer api
'''
mocked_api = Magic... | Test profile's relationship with updates | Test profile's relationship with updates
| Python | mit | vtemian/buffpy,bufferapp/buffer-python | ---
+++
@@ -40,3 +40,16 @@
mocked_api.post.assert_called_once_with(url=PATHS['UPDATE_SCHEDULES'] % 1,
data='schedules[0][times][]=mo&')
+
+def test_profile_updates():
+ '''
+ Test updates relationship with a profile
+ '''
+
+ mocked_api = MagicMock()
+
+ with patch('buffer.models.profile.Updates') ... |
232bffd6e41b87b05d9e0c65401ace3163bfc799 | djedi/templatetags/djedi_admin.py | djedi/templatetags/djedi_admin.py | import json
import logging
from django import template
from django.template.loader import render_to_string
from cio.pipeline import pipeline
from ..auth import has_permission
register = template.Library()
logger = logging.getLogger(__name__)
@register.simple_tag(takes_context=True)
def djedi_admin(context):
outp... | import json
import logging
from django import template
from django.template.loader import render_to_string
from cio.pipeline import pipeline
from ..auth import has_permission
register = template.Library()
logger = logging.getLogger(__name__)
@register.simple_tag(takes_context=True)
def djedi_admin(context):
outp... | Clear content-io pipeline after rendering admin panel | Clear content-io pipeline after rendering admin panel
| Python | bsd-3-clause | joar/djedi-cms,andreif/djedi-cms,joar/djedi-cms,5monkeys/djedi-cms,andreif/djedi-cms,5monkeys/djedi-cms,joar/djedi-cms,andreif/djedi-cms,5monkeys/djedi-cms | ---
+++
@@ -12,9 +12,14 @@
@register.simple_tag(takes_context=True)
def djedi_admin(context):
output = u''
+
if has_permission(context.get('user')):
defaults = dict((node.uri.clone(version=None), node.initial) for node in pipeline.history.list('get'))
output = render_to_string('djedi/cms... |
54d06439fd21f58208ddcf8583d070aba2674243 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Robin Deits
# Copyright (c) 2014 Robin Deits
#
# License: MIT
#
"""This module exports the Mlint plugin class."""
from SublimeLinter.lint import Linter, util, highlight
class Mlint(Linter):
"""Provides an int... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Robin Deits
# Copyright (c) 2014 Robin Deits
#
# License: MIT
#
"""This module exports the Mlint plugin class."""
from SublimeLinter.lint import Linter, util, highlight
class Mlint(Linter):
"""Provides an int... | Remove unnecessary '@' flag from command | Remove unnecessary '@' flag from command
| Python | mit | rdeits/SublimeLinter-contrib-mlint | ---
+++
@@ -15,10 +15,10 @@
class Mlint(Linter):
- """Provides an interface to mlint."""
+ """Provides an interface to mlint, the standalone MATLAB linter"""
syntax = 'matlab'
- cmd = 'mlint @'
+ cmd = 'mlint'
regex = r'L (?P<line>\d+) \(C (?P<col>\d+)-?(?P<c_end>\d+)?\): (?P<message>.*)'... |
d600cea1c86c3c3e56b41a7b57191ae35fea51b9 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides an interface to... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides an interface to... | Enable plugin for inline js in html files | Enable plugin for inline js in html files
| Python | mit | SublimeLinter/SublimeLinter-jscs,roberthoog/SublimeLinter-jscs | ---
+++
@@ -17,8 +17,7 @@
"""Provides an interface to jscs."""
- syntax = ('javascript')
- executable = 'jscs'
+ syntax = ('javascript', 'html', 'html 5')
cmd = 'jscs -r checkstyle'
regex = (
r'^\s+?\<error line=\"(?P<line>\d+)\" '
@@ -28,6 +27,5 @@
r'message=\"(?P<messag... |
4346c52d8ec3497279fa4ce16b4ab2e4e51c82bd | Demo/parser/test_parser.py | Demo/parser/test_parser.py | #! /usr/bin/env python
# (Force the script to use the latest build.)
#
# test_parser.py
import parser, traceback
_numFailed = 0
def testChunk(t, fileName):
global _numFailed
print '----', fileName,
try:
ast = parser.suite(t)
tup = parser.ast2tuple(ast)
# this discards the first ... | #! /usr/bin/env python
# (Force the script to use the latest build.)
#
# test_parser.py
import parser, traceback
_numFailed = 0
def testChunk(t, fileName):
global _numFailed
print '----', fileName,
try:
ast = parser.suite(t)
tup = parser.ast2tuple(ast)
# this discards the first ... | Sort the list of files processed before running the test on each. | Sort the list of files processed before running the test on each.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | ---
+++
@@ -40,11 +40,9 @@
if not args:
import glob
args = glob.glob("*.py")
+ args.sort()
map(testFile, args)
sys.exit(_numFailed != 0)
if __name__ == '__main__':
test()
-
-#
-# end of file |
5f64b609b621626e04516cac1c3313a3f948f19e | main.py | main.py | import logging
import telebot
import timer
import bot
import os
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logging.info("Begin start server.")
tgBot = telebot.TeleBot(os.getenv("BOT_ID", ""))
bot.getTracker(tgBot, logging)()
timer.getT... | import logging
import telebot
import timer
import bot
import os
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logging.info("Begin start server.")
tgBot = telebot.TeleBot(os.getenv("BOT_ID", ""))
bot.getTracker(tgBot, logging)()
timer.getTi... | Change While True Try to none_stop=True | Change While True Try to none_stop=True
| Python | mit | ITelegramBot/PackageTrackerBot | ---
+++
@@ -4,7 +4,7 @@
import bot
import os
-logging.basicConfig(level=logging.DEBUG,
+logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logging.info("Begin start server.")
@@ -15,13 +15,5 @@
timer.getTimer(tgBot, logging)("Timer").sta... |
13d8160aecb8abbd981b62cd3a06d5b2b6c964f8 | kokki/cookbooks/cloudera/recipes/default.py | kokki/cookbooks/cloudera/recipes/default.py |
from kokki import *
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-get update", action="nothing")
Ex... |
from kokki import *
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-get update", action="nothing")
Ex... | Make sure to immediately do apt-get update when adding a repository | Make sure to immediately do apt-get update when adding a repository
| Python | bsd-3-clause | samuel/kokki | ---
+++
@@ -17,4 +17,4 @@
group ="root",
mode = 0644,
content = apt,
- notifies = [("run", env.resources["Execute"]["apt-get update"])])
+ notifies = [("run", env.resources["Execute"]["apt-get update"], True)]) |
c7761a3b8a090e24b68b1318f1451752e34078e9 | alexandria/decorators.py | alexandria/decorators.py | from functools import wraps
from flask import session, redirect, url_for, request, abort
from alexandria import mongo
def not_even_one(f):
@wraps(f)
def decorated_function(*args, **kwargs):
if mongo.Books.find_one() is None:
return redirect(url_for('upload'))
return f(*args, **kwarg... | from functools import wraps
from flask import session, redirect, url_for, request, abort
from alexandria import mongo
def not_even_one(f):
@wraps(f)
def decorated_function(*args, **kwargs):
if mongo.Books.find_one() is None:
return redirect(url_for('upload'))
return f(*args, **kwarg... | Abort with appropriate status codes in the decorator | Abort with appropriate status codes in the decorator
| Python | mit | citruspi/Alexandria,citruspi/Alexandria | ---
+++
@@ -24,8 +24,7 @@
if not (token and user):
- #abort(403)
- pass
+ abort(403)
elif request.method == 'POST':
@@ -34,13 +33,11 @@
if not (token and user):
- #abort(403)
- pass
+ ... |
5dd81b09db46927cb7710b21ab682a6c3ecc182e | esios/__init__.py | esios/__init__.py | try:
VERSION = __import__('pkg_resources') \
.get_distribution(__name__).version
except Exception as e:
VERSION = 'unknown'
from .service import Esios
| from __future__ import absolute_import
try:
VERSION = __import__('pkg_resources') \
.get_distribution(__name__).version
except Exception as e:
VERSION = 'unknown'
from .service import Esios
| Enforce absolute imports through __future__ | Enforce absolute imports through __future__ | Python | mit | gisce/esios | ---
+++
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+
try:
VERSION = __import__('pkg_resources') \
.get_distribution(__name__).version |
d2764161f0f11b07a28d64517cd0315a90aa8856 | moref.py | moref.py | #!/bin/env python2
"""
moref: more for FASTA files
"""
import sys
import os
from Bio import SeqIO
def main():
"""moref main"""
# Check for input file
if len(sys.argv) < 2:
print("No input file specified")
sys.exit()
filepath = os.path.expanduser(sys.argv[1])
if not os.path.is... | #!/bin/env python
"""
moref: more for FASTA files
"""
import sys
import os
from Bio import SeqIO
def main():
"""moref main"""
# Check for input file
if len(sys.argv) < 2:
print("No input file specified")
sys.exit()
filepath = os.path.expanduser(sys.argv[1])
if not os.path.isf... | Remove explicit python2 call -- works with Python 3 | Remove explicit python2 call -- works with Python 3
| Python | bsd-2-clause | khughitt/cats | ---
+++
@@ -1,4 +1,4 @@
-#!/bin/env python2
+#!/bin/env python
"""
moref: more for FASTA files
""" |
da67df77831223692176088373a99cb02fe948ab | examples/basic.py | examples/basic.py | # -*- coding: utf-8 -*-
"""
A basic example of how to use SPDY.
This example is currently incomplete, but should remain current to the state of
the library. This means that it enumerates the full state of everything
SPDYPy can do.
"""
import sys
sys.path.append('.')
import spdypy
conn = spdypy.SPDYConnection('www.goo... | # -*- coding: utf-8 -*-
"""
A basic example of how to use SPDY.
This example is currently incomplete, but should remain current to the state of
the library. This means that it enumerates the full state of everything
SPDYPy can do.
"""
import sys
sys.path.append('.')
import spdypy
conn = spdypy.SPDYConnection('www.goo... | Remove bytes from the example. | Remove bytes from the example.
| Python | mit | Lukasa/spdypy | ---
+++
@@ -11,10 +11,10 @@
import spdypy
conn = spdypy.SPDYConnection('www.google.com')
-conn.putrequest(b'GET', b'/')
-conn.putheader(b'user-agent', b'spdypy')
-conn.putheader(b'accept', b'*/*')
-conn.putheader(b'accept-encoding', b'gzip,deflate')
+conn.putrequest('GET', '/')
+conn.putheader('user-agent', 'spdy... |
5fbcce3feffb63dbd50623f8d6cb0e354bce7add | fedora/release.py | fedora/release.py | '''
Information about this python-fedora release
'''
NAME = 'python-fedora'
VERSION = '0.10.0'
DESCRIPTION = 'Python modules for interacting with Fedora Services'
LONG_DESCRIPTION = '''
The Fedora Project runs many different services. These services help us to
package software, develop new programs, and generally pu... | '''
Information about this python-fedora release
'''
NAME = 'python-fedora'
VERSION = '0.10.0'
DESCRIPTION = 'Python modules for interacting with Fedora Services'
LONG_DESCRIPTION = '''
The Fedora Project runs many different services. These services help us to
package software, develop new programs, and generally pu... | Fix the URL in the metadata of the package | Fix the URL in the metadata of the package
Signed-off-by: Pierre-Yves Chibon <0e23e1aa25183634677db757f9f5e912e5bb8b8c@pingoured.fr>
| Python | lgpl-2.1 | fedora-infra/python-fedora | ---
+++
@@ -14,6 +14,6 @@
AUTHOR = 'Toshio Kuratomi, Luke Macken, Ricky Elrod, Ralph Bean, Patrick Uiterwijk'
EMAIL = 'admin@fedoraproject.org'
COPYRIGHT = '2007-2018 Red Hat, Inc.'
-URL = 'https://fedorahosted.org/python-fedora'
+URL = 'https://github.com/fedora-infra/python-fedora'
DOWNLOAD_URL = 'https://pypi.... |
ddc184cdced8c393822ce4ec14900db7fe16a492 | pucas/management/commands/createcasuser.py | pucas/management/commands/createcasuser.py | from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand
from pucas.ldap import LDAPSearch, LDAPSearchException, \
user_info_from_ldap
class Command(BaseCommand):
help = 'Initialize a new CAS user account'
def add_arguments(self, parser):
parser.add_argu... | from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand
from pucas.ldap import LDAPSearch, LDAPSearchException, \
user_info_from_ldap
class Command(BaseCommand):
help = 'Initialize a new CAS user account'
def add_arguments(self, parser):
parser.add_argu... | Add --admin flag to create superusers from cas | Add --admin flag to create superusers from cas
| Python | apache-2.0 | Princeton-CDH/django-pucas,Princeton-CDH/django-pucas | ---
+++
@@ -10,9 +10,12 @@
def add_arguments(self, parser):
parser.add_argument('netid')
+ parser.add_argument(
+ '--admin',
+ help='Make a superuser from CAS, equivalent to createsuperuser',
+ action='store_true'
+ )
- # TODO: add op... |
36a7588db397954f89032e90e7568605db27d055 | setup.py | setup.py | #!/usr/bin/python3
"""Setup.py for dirbrowser."""
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encoding='u... | #!/usr/bin/env python3
"""Setup.py for dirbrowser."""
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encodin... | Change shebang to /usr/bin/env for better venv support | Change shebang to /usr/bin/env for better venv support
| Python | bsd-3-clause | campenr/dirbrowser | ---
+++
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
"""Setup.py for dirbrowser."""
|
79254ad18a68dc85c84f65a7382e58357833046e | setup.py | setup.py | import sys
from setuptools import find_packages, setup
VERSION = '2.0.dev0'
install_requires = [
'django-local-settings>=1.0a13',
'stashward',
]
if sys.version_info[:2] < (3, 4):
install_requires.append('enum34')
setup(
name='django-arcutils',
version=VERSION,
url='https://github.com/PSU... | import sys
from setuptools import find_packages, setup
VERSION = '2.0a1'
install_requires = [
'django-local-settings>=1.0a13',
'stashward',
]
if sys.version_info[:2] < (3, 4):
install_requires.append('enum34')
setup(
name='django-arcutils',
version=VERSION,
url='https://github.com/PSU-OI... | Prepare first 2.0 alpha release | Prepare first 2.0 alpha release
| Python | mit | wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils | ---
+++
@@ -3,7 +3,7 @@
from setuptools import find_packages, setup
-VERSION = '2.0.dev0'
+VERSION = '2.0a1'
install_requires = [ |
2c0cc47936204cdadf3f4dd5ce3b1535e2fb14b7 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='ghostly',
version='0.7.1',
description='Create simple browser tests',
author='Brenton Cleeland',
url='https://github.com/sesh/ghostly',
install_requires=['click', 'colorama', 'pillow', 'PyYAML', 'selenium'],
py_modules=['ghost... | #!/usr/bin/env python
from setuptools import setup
setup(
name='ghostly',
version='0.7.1',
description='Create simple browser tests',
author='Brenton Cleeland',
url='https://github.com/sesh/ghostly',
install_requires=['click', 'colorama', 'pillow', 'PyYAML', 'selenium'],
py_modules=['ghost... | Add fright script back in, just in case | Add fright script back in, just in case
| Python | isc | sesh/ghostly,sesh/ghostly | ---
+++
@@ -13,6 +13,7 @@
entry_points={
'console_scripts': [
'ghostly=ghostly:run_ghostly',
+ 'fright=fright:run_fright',
]
},
classifiers=( |
d6f4afa82118d8c1ced7ddc8152f7b31b4cb898a | setup.py | setup.py | # coding: utf-8
from distutils.core import setup
# python setup.py sdist --formats=bztar
# python setup.py sdist --formats=bztar upload
description = 'National characters transcription module.'
import trans
long_description = open('documentation.rst', 'rb').read()
version = trans.__version__
setup(
name =... | # coding: utf-8
from distutils.core import setup
# python setup.py sdist --formats=bztar
# python setup.py sdist --formats=bztar upload
description = 'National characters transcription module.'
import trans
long_description = open('documentation.rst', 'rb').read()
version = trans.__version__
setup(
name =... | Change license to BSD. 1.4 | Change license to BSD. 1.4
| Python | bsd-2-clause | zzzsochi/trans | ---
+++
@@ -20,7 +20,7 @@
author = 'Zelenyak Aleksandr aka ZZZ',
author_email = 'ZZZ.Sochi@GMail.com',
url = 'http://www.python.org/pypi/trans/',
- license = 'GPL',
+ license = 'BSD',
platforms = 'any',
classifiers = [ |
827daa59517fcc3712c079c29a4ef6342412668d | setup.py | setup.py | import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
"dateutils"
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url... | import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
"dateutils"
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url... | Add py.test to the tests requirements | Add py.test to the tests requirements
| Python | mit | novafloss/populous | ---
+++
@@ -24,6 +24,9 @@
long_description="TODO",
packages=find_packages(),
install_requires=requirements,
+ extra_require={
+ 'tests': ['py.test'],
+ },
entry_points={
'console_scripts': [
'populous = populous.__main__:cli' |
c0169c5073e4a83120f4d6860258c3085b4c1cf5 | setup.py | setup.py | import subprocess as sp
print('Warning: this setup.py uses flit, not setuptools.')
print('Behavior may not be exactly what you expect. Use at your own risk!')
sp.check_call(['flit', 'install', '--deps', 'production'])
| import subprocess as sp
import sys
import os
print('Warning: this setup.py uses flit, not setuptools.')
print('Behavior may not be exactly what you expect. Use at your own risk!')
flit = os.path.join(os.path.dirname(sys.executable), 'flit')
cmd = [flit, 'install', '--deps', 'production']
print(" ".join(cmd))
sp.check... | Use flit that's been installed in the virtualenv | Use flit that's been installed in the virtualenv
| Python | bsd-3-clause | jupyter/nbgrader,jupyter/nbgrader,ellisonbg/nbgrader,jhamrick/nbgrader,EdwardJKim/nbgrader,EdwardJKim/nbgrader,dementrock/nbgrader,jupyter/nbgrader,MatKallada/nbgrader,MatKallada/nbgrader,jupyter/nbgrader,ellisonbg/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,EdwardJKim/nbgrader,jhamrick/nbgrader,ellisonbg/nbgrader,jup... | ---
+++
@@ -1,6 +1,11 @@
import subprocess as sp
+import sys
+import os
print('Warning: this setup.py uses flit, not setuptools.')
print('Behavior may not be exactly what you expect. Use at your own risk!')
-sp.check_call(['flit', 'install', '--deps', 'production'])
+flit = os.path.join(os.path.dirname(sys.exe... |
f4d894222d596760a62f22d43379f93a827e9ef2 | setup.py | setup.py | try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='porick',
version='0.1',
description='',
author='',
author_email='',
url='',
install_requires=[
... | try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='porick',
version='0.1',
description='',
author='',
author_email='',
url='',
install_requires=[
... | Add dependency for python bcrypt | Add dependency for python bcrypt
| Python | apache-2.0 | kopf/porick,kopf/porick,kopf/porick | ---
+++
@@ -15,6 +15,7 @@
install_requires=[
"Pylons>=1.0.1rc1",
"SQLAlchemy==0.7.7",
+ "py-bcrypt"
],
setup_requires=["PasteScript>=1.6.3"],
packages=find_packages(exclude=['ez_setup']), |
d8ea2e73e3085541256288a4b65c8659918cdf33 | setup.py | setup.py | from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.2',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/python-actioncable-z... | from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.3',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/python-actioncable-z... | Update version number to 0.1.3 | Update version number to 0.1.3
| Python | mit | tobiasfeistmantl/python-actioncable-zwei | ---
+++
@@ -3,7 +3,7 @@
setup(
name='ActionCableZwei',
- version='0.1.2',
+ version='0.1.3',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl', |
f15ff23d706b035e045fd8fc653ca9996565526b | setup.py | setup.py | #!/usr/bin/env python
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup
from pudb import VERSION
try:
readme = open("README.rst")
long_description = str(readme.read())
finally:
readme.close()
setup(name='pudb',
version=VERSION,
description='A full-scr... | #!/usr/bin/env python
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup
from pudb import VERSION
try:
readme = open("README.rst")
long_description = str(readme.read())
finally:
readme.close()
setup(name='pudb',
version=VERSION,
description='A full-scr... | Tag for Python 3 support. | Tag for Python 3 support.
| Python | mit | albfan/pudb,albfan/pudb,amigrave/pudb,amigrave/pudb | ---
+++
@@ -35,6 +35,7 @@
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 3",
"Topic :: Software Development",
"Topic :: Software Development :: Debuggers",
... |
d27d90b71378eaac1f9be6bdf683ddb7a800759d | setup.py | setup.py | import sys
from setuptools import setup, find_packages
setup(
name = "python-dispatch",
version = "v0.1.31",
author = "Matthew Reid",
author_email = "matt@nomadic-recording.com",
description = "Lightweight Event Handling",
url='https://github.com/nocarryr/python-dispatch',
license='MIT',
... | import sys
from setuptools import setup, find_packages
setup(
name = "python-dispatch",
version = "v0.1.31",
author = "Matthew Reid",
author_email = "matt@nomadic-recording.com",
description = "Lightweight Event Handling",
url='https://github.com/nocarryr/python-dispatch',
license='MIT',
... | Update project metadata with supported Python versions | Update project metadata with supported Python versions
| Python | mit | nocarryr/python-dispatch | ---
+++
@@ -13,6 +13,7 @@
include_package_data=True,
keywords='event properties dispatch',
platforms=['any'],
+ python_requires='>=3.6',
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
@@ -20,13 +21,9 @@
'Operating System :: OS In... |
bda09e9dbf00dc164cb1d6b108da3d5982ad668a | setup.py | setup.py | #!/usr/bin/env python
"""
properties: Fancy properties for Python.
"""
from distutils.core import setup
from setuptools import find_packages
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Programming Language :: Python',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Ma... | #!/usr/bin/env python
"""
properties: Fancy properties for Python.
"""
from distutils.core import setup
from setuptools import find_packages
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Programming Language :: Python',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Ma... | Remove future, bump vectormath dependencies | Remove future, bump vectormath dependencies
| Python | mit | 3ptscience/properties,aranzgeo/properties | ---
+++
@@ -27,10 +27,9 @@
version="0.2.3",
packages=find_packages(exclude=('tests',)),
install_requires=[
- 'future',
'numpy>=1.7',
'six',
- 'vectormath>=0.1.0',
+ 'vectormath>=0.1.1',
],
author="3point Science",
author_email="info@3ptscience.com", |
1fc8690d0d8929f9ede38aca01ad928ce64589cb | setup.py | setup.py | from setuptools import setup
setup(name='eventum',
version='0.2.6',
description='A content management system for event-driven Flask apps',
url='http://github.com/danrschlosser/eventum',
author='Dan Schlosser',
author_email='dan@schlosser.io',
license='MIT',
packages=['eventum'... | from setuptools import setup
setup(name='eventum',
version='0.2.6',
description='A content management system for event-driven Flask apps',
url='http://github.com/danrschlosser/eventum',
author='Dan Schlosser',
author_email='dan@schlosser.io',
license='MIT',
packages=['eventum'... | Update requirements to things that work | Update requirements to things that work
| Python | mit | danrschlosser/eventum,danrschlosser/eventum,danrschlosser/eventum,danrschlosser/eventum | ---
+++
@@ -17,8 +17,9 @@
'Markdown>=2.4',
'WTForms>=1.0.5',
'argparse>=1.2.1',
- 'blinker==1.3',
- 'flask-mongoengine>=0.7.0',
+ 'blinker>=1.3',
+ 'cssmin>=0.2.0',
+ 'flask-mongoengine>=0.7.0,<0.8.0',
'gaenv>=0.1.7',
... |
7f41bffe2f1d838331c3d4340f4b46e816e779b7 | setup.py | setup.py | from distutils.core import setup
setup(
name='shampoo',
packages=['shampoo'],
package_data={'shampoo': ['schemas/*.json']},
version='0.1.0b7',
description='Shampoo is a asyncio websocket protocol implementation for Autobahn',
author='Daan Porru (Wend)',
author_email='daan@wend.nl',
lic... | from distutils.core import setup
setup(
name='shampoo',
packages=['shampoo'],
package_data={'shampoo': ['schemas/*.json']},
version='0.1.0b7',
description='Shampoo is a asyncio websocket protocol implementation for Autobahn',
author='Daan Porru (Wend)',
author_email='daan@wend.nl',
lic... | Update schemavalidator version to 0.1.0b5 | Update schemavalidator version to 0.1.0b5
| Python | mit | wendbv/shampoo,wendbv/shampoo | ---
+++
@@ -16,7 +16,7 @@
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 3.5',
],
- install_requires=['schemavalidator', 'autobahn==0.13.0'],
+ install_requires=['schemavalidator==0.1.0b5', 'autobahn==0.13.0'],
extras_require={
'test': ['pytest', 'pytes... |
ae3fd153350c9ef8faef73d257fffee4d3abdf0f | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'sanic',
'aiohttp'
]
test_requirements = [
# TODO: put package ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'sanic',
'aiohttp'
]
test_requirements = [
# TODO: put package ... | Add Python 3.6 tag to package | Add Python 3.6 tag to package
| Python | mit | kdelwat/boomerang | ---
+++
@@ -41,13 +41,8 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
- "Programming Language :: Python :: 2",
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
- ... |
e3479ec893cf525642bdd94f0a6dd32d897465a4 | setup.py | setup.py | #! /usr/bin/env python3
from setuptools import setup
from hsluv import __version__
setup(
name='hsluv',
version=__version__,
description='Human-friendly HSL',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
license="MIT",
author_email="alexei@boron... | #! /usr/bin/env python3
from setuptools import setup
from hsluv import __version__
setup(
name='hsluv',
version=__version__,
description='Human-friendly HSL',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
license="MIT",
author_email="alexei@boron... | Drop support for end-of-life Python 3.6 | Drop support for end-of-life Python 3.6
| Python | mit | husl-colors/husl.py,hsluv/hsluv-python | ---
+++
@@ -20,13 +20,12 @@
"Operating System :: OS Independent",
"Topic :: Software Development",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
... |
e6c4d40f0eaa6c93cac88582d862aa8393a3cc10 | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(
name='screenplain',
version='0.7.0',
description='Convert text file to viewable screenplay.',
author='Martin Vilcans',
author_email='screenplain@librador.com',
url='http://www.screenplain.com/',
extras_require={
'PDF': '... | #!/usr/bin/env python
from distutils.core import setup
setup(
name='screenplain',
version='0.7.0',
description='Convert text file to viewable screenplay.',
author='Martin Vilcans',
author_email='screenplain@librador.com',
url='http://www.screenplain.com/',
install_requires=[
'six',... | Add install_requires six for universal Python support | Add install_requires six for universal Python support
| Python | mit | vilcans/screenplain,vilcans/screenplain,vilcans/screenplain | ---
+++
@@ -9,6 +9,9 @@
author='Martin Vilcans',
author_email='screenplain@librador.com',
url='http://www.screenplain.com/',
+ install_requires=[
+ 'six',
+ ],
extras_require={
'PDF': 'reportlab'
}, |
56519d58cc98ddce4f9a887d1fc4646e7614b712 | setup.py | setup.py | import setuptools
setuptools.setup(
name='ChatExchange6',
version='0.0.1',
url='https://github.com/ByteCommander/ChatExchange6',
packages=[
'chatexchange6'
],
install_requires=[
'beautifulsoup4>=4.3.2',
'requests>=2.2.1',
'websocket-client>=0.13.0',
# onl... | import setuptools
setuptools.setup(
name='ChatExchange6',
version='0.0.1',
url='https://github.com/ByteCommander/ChatExchange6',
packages=[
'chatexchange6'
],
install_requires=[
'beautifulsoup4>=4.3.2',
'requests>=2.2.1',
'websocket-client>=0.13.0',
# onl... | Set up Travis tests with pytest for all versions | Set up Travis tests with pytest for all versions
| Python | apache-2.0 | ByteCommander/ChatExchange6,ByteCommander/ChatExchange6,Charcoal-SE/ChatExchange,Charcoal-SE/ChatExchange | ---
+++
@@ -17,6 +17,7 @@
'httmock>=1.2.2',
'pytest-capturelog>=0.7',
'pytest-timeout>=0.3',
- 'pytest>=2.7.3'
+ 'pytest>=2.7.3',
+ 'py>=1.4.29'
]
) |
dc6ea10b3da3f84280d8f8b41cf665440d60b12e | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
console_scripts = [
'makiki = makiki.cli:main_parser',
]
requires = [
'blinker>=1.4',
'gevent==1.1.2',
'gunicorn>=19.0',
'Jinja2>=2.8.1',
'psycogreen>=1.0.0',
'psycopg2>=2.6.2',
'hug>=2.1.2',
]
setup(
name='makik... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
console_scripts = [
'makiki = makiki.cli:main_parser',
]
requires = [
'blinker>=1.4',
'gevent>=1.2',
'gunicorn>=19.0',
'Jinja2>=2.8.1',
'psycogreen>=1.0.0',
'psycopg2>=2.6.2',
'hug>=2.1.2',
]
setup(
name='makiki'... | Upgrade gevent to 1.2 and bump version to 0.1.20 | Upgrade gevent to 1.2 and bump version to 0.1.20
| Python | mit | faith0811/makiki,faith0811/makiki | ---
+++
@@ -8,7 +8,7 @@
requires = [
'blinker>=1.4',
- 'gevent==1.1.2',
+ 'gevent>=1.2',
'gunicorn>=19.0',
'Jinja2>=2.8.1',
'psycogreen>=1.0.0',
@@ -18,7 +18,7 @@
setup(
name='makiki',
- version='0.1.19',
+ version='0.1.20',
description='Web service utils and generator.... |
b64d1a7948759eb22d6c5ddbfb2521ad07962c08 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(name='igtdetect',
version='1.1.0',
description='Line-level classifier for IGT instances, part of RiPLEs pipeline.',
author='Ryan Georgi',
author_email='rgeorgi@uw.edu',
url='https://github.com/xigt/igtdetect',
scripts=['detect... | #!/usr/bin/env python
from setuptools import setup
setup(name='igtdetect',
version='1.1.1',
description='Line-level classifier for IGT instances, part of RiPLEs pipeline.',
author='Ryan Georgi',
author_email='rgeorgi@uw.edu',
url='https://github.com/xigt/igtdetect',
scripts=['detect... | Fix for dependencies using pip | Fix for dependencies using pip
| Python | mit | xigt/igtdetect | ---
+++
@@ -2,7 +2,7 @@
from setuptools import setup
setup(name='igtdetect',
- version='1.1.0',
+ version='1.1.1',
description='Line-level classifier for IGT instances, part of RiPLEs pipeline.',
author='Ryan Georgi',
author_email='rgeorgi@uw.edu',
@@ -10,14 +10,12 @@
scripts... |
6f4f0b636844c6e6b555e73c69f846507cb49608 | setup.py | setup.py | """Setup script for `kozai`."""
from setuptools import setup
def readme():
with open('README.md') as f:
return f.read()
setup(
author='Joseph O\'Brien Antognini',
author_email='joe.antognini@gmail.com',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Sc... | """Setup script for `kozai`."""
from setuptools import setup
def readme():
with open('README.md') as f:
return f.read()
setup(
author='Joseph O\'Brien Antognini',
author_email='joe.antognini@gmail.com',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Sc... | Set a correct version number. | Set a correct version number.
| Python | bsd-2-clause | joe-antognini/kozai | ---
+++
@@ -34,6 +34,6 @@
],
tests_require=['pytest>=5.4.2'],
url='https://github.com/joe-antognini/kozai',
- version='1.0.0',
+ version='0.3.0',
zip_safe=False,
) |
7bdf12d0b54b0b6c628acfee1a2fadda2ba542af | setup.py | setup.py | #!/usr/bin/env python
'''FiscalHr Setup'''
from distutils.core import setup
import fiscalhr
setup(
name=fiscalhr.__title__,
version=fiscalhr.__version__,
author=fiscalhr.__author__,
author_email=fiscalhr.__author_email__,
url=fiscalhr.__url__,
license=fiscalhr.__license__,
description=fi... | #!/usr/bin/env python
'''FiscalHr Setup'''
from distutils.core import setup
import fiscalhr
setup(
name=fiscalhr.__title__,
version=fiscalhr.__version__,
author=fiscalhr.__author__,
author_email=fiscalhr.__author_email__,
url=fiscalhr.__url__,
license=fiscalhr.__license__,
description=fi... | Change dependency to libxml2-python-2.7.8 (github). | Change dependency to libxml2-python-2.7.8 (github).
| Python | mit | vingd/fiscal-hr-python | ---
+++
@@ -23,7 +23,7 @@
'fiskalizacija_service/schema/*.xsd',
],
},
- dependency_links=['ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.21.tar.gz'],
+ dependency_links=['https://github.com/vingd/libxml2-python/archive/libxml2-python-2.7.8.zip'],
install_requires=[i.strip()... |
335033e9542f0d69ef6612a5b37d0b41f68b99b7 | 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='1.0.0',
description="Enable 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 = [
'sure',
]
test_requirements = [
]
setup(
name='adb_android',
version='1.0.0',
description="Enable android adb in your python script",
long_description='This pytho... | Add 'sure' to package reqs | Add 'sure' to package reqs
Change-Id: Ie08d1a8b23e4fc8f4f18d53403fff8145022af32
| Python | bsd-3-clause | vmalyi/adb_android | ---
+++
@@ -5,7 +5,9 @@
from distutils.core import setup
requirements = [
+ 'sure',
]
+
test_requirements = [
] |
f0bd3c9ffffa69f5b8851cecdb1375d94e51a965 | setup.py | setup.py | #!/usr/bin/env python
from __future__ import with_statement
from setuptools import setup, find_packages
import re
version = "0.0.1.dev.0"
with open("tdclient/version.py") as fp:
m = re.search(r"^__version__ *= *\"([^\"]*)\" *$", fp.read(), re.MULTILINE)
if m is not None:
version = m.group(1)
setup(
... | #!/usr/bin/env python
from __future__ import with_statement
from setuptools import setup, find_packages
import re
version = "0.0.1.dev.0"
with open("tdclient/version.py") as fp:
m = re.search(r"^__version__ *= *\"([^\"]*)\" *$", fp.read(), re.MULTILINE)
if m is not None:
version = m.group(1)
setup(
... | Add `pytest-cov` to collect test coverages | Add `pytest-cov` to collect test coverages
| Python | apache-2.0 | treasure-data/td-client-python | ---
+++
@@ -19,8 +19,9 @@
url="http://treasuredata.com/",
install_requires=[
"msgpack-python>=0.4,<0.5",
- "pytest>=2.6,<2.7.0",
- "tox>=1.8,<1.9.0",
+ "pytest>=2.6,<2.7",
+ "pytest-cov>=1.8,<1.9",
+ "tox>=1.8,<1.9",
],
packages=find_packages(),
tes... |
d544510736b132d81f774f60fe3729a128ed2e26 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 KenTyde
# All rights reserved.
#
# This software is licensed as described in the file LICENSE,
# which you should have received as part of this distribution.
from setuptools import setup
import os
desc = open(os.path.join(os.path.dirname(__file__), ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 KenTyde
# All rights reserved.
#
# This software is licensed as described in the file LICENSE,
# which you should have received as part of this distribution.
from setuptools import setup
import os
desc = open(os.path.join(os.path.dirname(__file__), ... | Change package owner and homepage | Change package owner and homepage
| Python | bsd-3-clause | djc/fixlib | ---
+++
@@ -18,9 +18,9 @@
description='Pythonic library for dealing with the FIX protocol',
long_description=desc,
author='Dirkjan Ochtman',
- author_email='djc.ochtman@kentyde.com',
+ author_email='dirkjan@ochtman.nl',
license='BSD',
- url='http://source.kentyde.com/fixlib',
+ url='https://github.com/djc/fix... |
07800eb26817458d2d12afeb3f670a2119533639 | setup.py | setup.py | from __future__ import unicode_literals
import re
from setuptools import find_packages, setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-MusicBox-Webclient',
version=... | from __future__ import unicode_literals
import re
from setuptools import find_packages, setup
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Mopidy-MusicBox-Webclient',
version=... | Update URL to github repository. | Update URL to github repository.
| Python | apache-2.0 | pimusicbox/mopidy-musicbox-webclient,woutervanwijk/Mopidy-MusicBox-Webclient,woutervanwijk/Mopidy-MusicBox-Webclient,pimusicbox/mopidy-musicbox-webclient,woutervanwijk/Mopidy-MusicBox-Webclient,pimusicbox/mopidy-musicbox-webclient | ---
+++
@@ -14,7 +14,7 @@
setup(
name='Mopidy-MusicBox-Webclient',
version=get_version('mopidy_musicbox_webclient/__init__.py'),
- url='https://github.com/woutervanwijk/mopidy-musicbox-webclient',
+ url='https://github.com/pimusicbox/mopidy-musicbox-webclient',
license='Apache License, Version 2... |
1dfcf90a70faaf8e202674fd82f59b603a9c2400 | setup.py | setup.py | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
setup(
author="Pinax Team",
author_email="team@pinaxproject.com",
des... | import codecs
from os import path
from setuptools import find_packages, setup
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding="utf-8") as fp:
return fp.read()
setup(
author="Pinax Team",
author_email="team@pinaxproject.com",
des... | Update DUA requirement to support Django 1.9 | Update DUA requirement to support Django 1.9
| Python | unknown | pinax/pinax-invitations,jacobwegner/pinax-invitations,eldarion/kaleo | ---
+++
@@ -26,7 +26,7 @@
test_suite="runtests.runtests",
install_requires=[
"django-appconf>=1.0.1",
- "django-user-accounts>=1.2"
+ "django-user-accounts>=1.3"
],
tests_require=[
], |
3085dc4992cf31c061d9cee5a9b6ff5abbf85e42 | bernard/browser.py | bernard/browser.py | import logging
class Browser:
def __init__(self, actors, subreddit, db, cursor):
self.actors = actors
self.subreddit = subreddit
self.db = db
self.cursor = cursor
def check_command(self, command, mod, post):
for actor in self.actors:
actor.parse(command, mo... | import logging
class Browser:
def __init__(self, actors, subreddit, db, cursor):
self.actors = actors
self.subreddit = subreddit
self.db = db
self.cursor = cursor
def check_command(self, command, mod, post):
for actor in self.actors:
actor.parse(command, mo... | Fix crash on empty report by converting to string | Fix crash on empty report by converting to string
| Python | mit | leviroth/bernard | ---
+++
@@ -16,7 +16,7 @@
try:
for post in self.subreddit.mod.reports(limit=None):
for mod_report in post.mod_reports:
- yield (mod_report[0], mod_report[1], post)
+ yield (str(mod_report[0]), mod_report[1], post)
except Exception a... |
6ba8e942edaf424c7b20983a5e829736c38b8110 | froide/foiidea/tasks.py | froide/foiidea/tasks.py | import sys
from celery.task import task
from django.conf import settings
from django.utils import translation
from django.db import transaction
from .crawler import crawl_source_by_id
from .models import Article
@task
def fetch_articles(source_id):
translation.activate(settings.LANGUAGE_CODE)
def run(sour... | from celery.task import task
from django.conf import settings
from django.utils import translation
from .crawler import crawl_source_by_id
from .models import Article
@task
def fetch_articles(source_id):
translation.activate(settings.LANGUAGE_CODE)
crawl_source_by_id(int(source_id))
@task
def recalculate_... | Remove complex exception mechanism for celery task | Remove complex exception mechanism for celery task | Python | mit | ryankanno/froide,stefanw/froide,ryankanno/froide,CodeforHawaii/froide,LilithWittmann/froide,ryankanno/froide,CodeforHawaii/froide,stefanw/froide,LilithWittmann/froide,fin/froide,LilithWittmann/froide,catcosmo/froide,catcosmo/froide,stefanw/froide,CodeforHawaii/froide,ryankanno/froide,fin/froide,stefanw/froide,catcosmo/... | ---
+++
@@ -1,10 +1,7 @@
-import sys
-
from celery.task import task
from django.conf import settings
from django.utils import translation
-from django.db import transaction
from .crawler import crawl_source_by_id
from .models import Article
@@ -13,21 +10,7 @@
@task
def fetch_articles(source_id):
trans... |
f0f8652f67f0b09a1133f477b27b6d399621790f | pywxsb.py | pywxsb.py | import PyWXSB.XMLSchema as xs
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/XMLSchema.xsd' ]
for file in files:
wxs = xs.schema()
try:
wxs.processDocument(minidom.parse(file))
except Exception, e:
... | import PyWXSB.XMLSchema as xs
import sys
import traceback
from xml.dom import minidom
from xml.dom import Node
files = sys.argv[1:]
if 0 == len(files):
files = [ 'schemas/XMLSchema.xsd' ]
for file in files:
wxs = xs.schema()
try:
wxs.processDocument(minidom.parse(file))
except Exception, e:
... | Put whole message out to stderr, not just part of it | Put whole message out to stderr, not just part of it
| Python | apache-2.0 | jonfoster/pyxb2,CantemoInternal/pyxb,jonfoster/pyxb-upstream-mirror,balanced/PyXB,jonfoster/pyxb2,CantemoInternal/pyxb,pabigot/pyxb,balanced/PyXB,CantemoInternal/pyxb,jonfoster/pyxb1,balanced/PyXB,jonfoster/pyxb-upstream-mirror,jonfoster/pyxb1,pabigot/pyxb,jonfoster/pyxb-upstream-mirror,jonfoster/pyxb2 | ---
+++
@@ -14,6 +14,6 @@
try:
wxs.processDocument(minidom.parse(file))
except Exception, e:
- print '%s processing %s:' % (e.__class__, file)
+ sys.stderr.write("%s processing %s:\n" % (e.__class__, file))
traceback.print_exception(*sys.exc_info())
|
9f0618d39dad2438a29964e706d916953a96a5fb | shivyc.py | shivyc.py | #!/usr/bin/env python3
"""Main executable for ShivyC compiler
"""
import argparse
def get_arguments():
"""Set up the argument parser and return an object storing the
argument values.
return - An object storing argument values, as returned by
argparse.parse_args()
"""
parser = argparse.Arg... | #!/usr/bin/env python3
"""Main executable for ShivyC compiler
For usage, run "./shivyc.py --help".
"""
import argparse
def get_arguments():
"""Set up the argument parser and return an object storing the
argument values.
return - An object storing argument values, as returned by
argparse.parse_args... | Add usage info to comment | Add usage info to comment
| Python | mit | ShivamSarodia/ShivyC,ShivamSarodia/ShivyC,ShivamSarodia/ShivyC | ---
+++
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
"""Main executable for ShivyC compiler
+
+For usage, run "./shivyc.py --help".
"""
|
c544afed5c8d961db0d34b7f73313699ce3bf656 | test/ocookie_test.py | test/ocookie_test.py | import unittest, time
import ocookie
class OcookieTest(unittest.TestCase):
def test_foo(self):
pass
class CookieParserTest(unittest.TestCase):
def test_parsing(self):
text = 'foo=bar'
cookie = ocookie.CookieParser.parse_set_cookie_value(text)
self.assertEquals('foo', cookie.na... | import unittest, time
import ocookie
class CookieTest(unittest.TestCase):
def test_construction(self):
cookie = ocookie.Cookie('foo', 'bar', httponly=True)
self.assertEquals('foo', cookie.name)
self.assertEquals('bar', cookie.value)
self.assertTrue(cookie.httponly)
self.ass... | Add a cookie class test | Add a cookie class test
| Python | bsd-2-clause | p/ocookie | ---
+++
@@ -2,9 +2,13 @@
import ocookie
-class OcookieTest(unittest.TestCase):
- def test_foo(self):
- pass
+class CookieTest(unittest.TestCase):
+ def test_construction(self):
+ cookie = ocookie.Cookie('foo', 'bar', httponly=True)
+ self.assertEquals('foo', cookie.name)
+ self.... |
edd4783d5f277e8bc456f662e66ac65eb62419b7 | base/components/views.py | base/components/views.py | from django.views.generic import View
from django.views.generic.base import TemplateView
from braces.views import AjaxResponseMixin, JSONResponseMixin
from haystack.query import SearchQuerySet
class SiteView(TemplateView):
template_name = 'landings/home_site.html'
class AutocompleteView(JSONResponseMixin, View... | from django.views.generic import View
from django.views.generic.base import TemplateView
from braces.views import AjaxResponseMixin, JSONResponseMixin
from haystack.query import SearchQuerySet
from haystack.inputs import AutoQuery, Exact, Clean
class SiteView(TemplateView):
template_name = 'landings/home_site.ht... | Throw more data into the autocomplete view. | Throw more data into the autocomplete view.
| Python | apache-2.0 | hello-base/web,hello-base/web,hello-base/web,hello-base/web | ---
+++
@@ -3,15 +3,27 @@
from braces.views import AjaxResponseMixin, JSONResponseMixin
from haystack.query import SearchQuerySet
+from haystack.inputs import AutoQuery, Exact, Clean
class SiteView(TemplateView):
template_name = 'landings/home_site.html'
-class AutocompleteView(JSONResponseMixin, Vi... |
c89e9cee709790d99013d77889bac208a8bdeb12 | tests/test_arpreq.py | tests/test_arpreq.py | import sys
from socket import htonl, inet_ntoa
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(htonl(int(value, base=16)).to_bytes(4, 'big'))
def decode_flags(value):
return int(value, base=16... | import sys
from socket import htonl, inet_ntoa
from struct import pack
import pytest
from arpreq import arpreq
def test_localhost():
assert arpreq('127.0.0.1') == '00:00:00:00:00:00'
def decode_address(value):
return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flags(value):
return i... | Use struct.pack instead of int.to_bytes | Use struct.pack instead of int.to_bytes
int.to_bytes is not available on Python 2
| Python | mit | sebschrader/python-arpreq,sebschrader/python-arpreq,sebschrader/python-arpreq,sebschrader/python-arpreq | ---
+++
@@ -1,5 +1,6 @@
import sys
from socket import htonl, inet_ntoa
+from struct import pack
import pytest
@@ -11,7 +12,7 @@
def decode_address(value):
- return inet_ntoa(htonl(int(value, base=16)).to_bytes(4, 'big'))
+ return inet_ntoa(pack(">I", htonl(int(value, base=16))))
def decode_flag... |
179bd5a7df7858eda2674b7913b6e446ab12d9bb | grammpy/Rules/InstantiableRule.py | grammpy/Rules/InstantiableRule.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 31.08.2017 11:18
:Licence GNUv3
Part of grammpy
"""
from weakreflist import WeakList
from .IsMethodsRuleExtension import IsMethodsRuleExtension
class InstantiableRule(IsMethodsRuleExtension):
def __init__(self):
self._from_nonterms = WeakList()
... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 31.08.2017 11:18
:Licence GNUv3
Part of grammpy
"""
from ..WeakList import WeakList
from .IsMethodsRuleExtension import IsMethodsRuleExtension
class InstantiableRule(IsMethodsRuleExtension):
def __init__(self):
self._from_nonterms = WeakList()
... | Switch from weakreflist library to own implementation | Switch from weakreflist library to own implementation
| Python | mit | PatrikValkovic/grammpy | ---
+++
@@ -7,7 +7,7 @@
"""
-from weakreflist import WeakList
+from ..WeakList import WeakList
from .IsMethodsRuleExtension import IsMethodsRuleExtension
|
67f3d3db568921f8deca0f68447498b84077e13c | tests/test_runner.py | tests/test_runner.py | from pytest import mark, raises
from oshino.run import main
from mock import patch
@mark.integration
@patch("oshino.core.heart.forever", lambda: False)
def test_startup():
with raises(SystemExit):
main(("--config", "tests/data/test_config.yml", ))
| import asyncio
from pytest import mark, raises
from oshino.run import main
from mock import patch
def create_loop():
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
return loop
@mark.integration
@patch("oshino.core.heart.forever", lambda: False)
@patch("oshino.core.heart.create_loop", crea... | Make event loop work for runner | Make event loop work for runner
| Python | mit | CodersOfTheNight/oshino | ---
+++
@@ -1,10 +1,19 @@
+import asyncio
+
from pytest import mark, raises
from oshino.run import main
from mock import patch
+def create_loop():
+ loop = asyncio.new_event_loop()
+ asyncio.set_event_loop(loop)
+ return loop
+
+
@mark.integration
@patch("oshino.core.heart.forever", lambda: False)
+... |
4c20c2137eb1cee69511ecd8a83a499147b42373 | tests/thread-test.py | tests/thread-test.py | #!/usr/bin/python2
import pstack
import json
threads, text = pstack.JSON(["tests/thread"])
result = json.loads(text)
# we have 10 threads + main
assert len(threads) == 11
entryThreads = 0
for thread in threads:
assert thread["ti_lid"] in result["lwps"], "LWP %d not in %s" % (thread["ti_lid"], result["lwps"])
... | #!/usr/bin/python2
import pstack
import json
pstack, text = pstack.JSON(["tests/thread"])
result = json.loads(text)
threads = result["threads"]
lwps = result["lwps"]
assert_at = result["assert_at"]
# we have 10 threads + main
assert len(threads) == 11
for thread in pstack:
# this will throw an error if the threa... | Clean up changes to thread test | Clean up changes to thread test
| Python | bsd-2-clause | peadar/pstack,peadar/pstack,peadar/pstack,peadar/pstack | ---
+++
@@ -3,17 +3,22 @@
import pstack
import json
-threads, text = pstack.JSON(["tests/thread"])
+pstack, text = pstack.JSON(["tests/thread"])
result = json.loads(text)
+threads = result["threads"]
+lwps = result["lwps"]
+assert_at = result["assert_at"]
+
# we have 10 threads + main
assert len(threads) == 11... |
20b1505a316fc47049470f998741f00569df818f | rail-fence-cipher/rail_fence_cipher.py | rail-fence-cipher/rail_fence_cipher.py | # File: rail_fence_cipher.py
# Purpose: Implement encoding and decoding for the rail fence cipher.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Friday 30 September 2016, 08:35 PM
| # File: rail_fence_cipher.py
# Purpose: Implement encoding and decoding for the rail fence cipher.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Friday 30 September 2016, 08:35 PM
class Rail():
"""Implementation of Rail Fence Cipher."""
def __init__(self, text, rail_count):
... | Add imaginary fence list comprehension | Add imaginary fence list comprehension
| Python | mit | amalshehu/exercism-python | ---
+++
@@ -3,3 +3,17 @@
# Programmer: Amal Shehu
# Course: Exercism
# Date: Friday 30 September 2016, 08:35 PM
+
+
+class Rail():
+ """Implementation of Rail Fence Cipher."""
+ def __init__(self, text, rail_count):
+ self.text = text
+ self.rail_count = rail_count
+
+ def imagi... |
9d2d41f8450f6f3735b8ff9a0041f9bf5d80e5ec | config/template.py | config/template.py | DB_USER = ''
DB_HOST = ''
DB_PASSWORD = ''
DB_NAME = ''
| DB_USER = ''
DB_HOST = ''
DB_PASSWORD = ''
DB_NAME = ''
TWILIO_NUMBERS = ['']
| Allow for representative view display with sample configuration | Allow for representative view display with sample configuration
| Python | mit | PeterTheOne/ueberwachungspaket.at,PeterTheOne/ueberwachungspaket.at,PeterTheOne/ueberwachungspaket.at | ---
+++
@@ -2,3 +2,5 @@
DB_HOST = ''
DB_PASSWORD = ''
DB_NAME = ''
+
+TWILIO_NUMBERS = [''] |
2ee2ab8cc0b9b0fd9776571c1f4b7715d11c2ad6 | src/WhiteLibrary/keywords/items/textbox.py | src/WhiteLibrary/keywords/items/textbox.py | from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input_value):
"""Writes text to a textbox.
... | from TestStack.White.UIItems import TextBox
from WhiteLibrary.keywords.librarycomponent import LibraryComponent
from WhiteLibrary.keywords.robotlibcore import keyword
class TextBoxKeywords(LibraryComponent):
@keyword
def input_text_to_textbox(self, locator, input_value):
"""Writes text to a textbox.
... | Use BulkText instead of Text in input keyword | Use BulkText instead of Text in input keyword
Fixes #164
| Python | apache-2.0 | Omenia/robotframework-whitelibrary,Omenia/robotframework-whitelibrary | ---
+++
@@ -14,7 +14,7 @@
``input_value`` is the text to write.
"""
text_box = self.state._get_typed_item_by_locator(TextBox, locator)
- text_box.Text = input_value
+ text_box.BulkText = input_value
@keyword
def verify_text_in_textbox(self, locator, expected): |
cb461f4422e43058cf12c2605a8a1312ffd79c04 | app/__init__.py | app/__init__.py | import mongoengine
# Open a connection to the MongoDB database, to be shared throughout the
# application.
db = mongoengine.connect('lazy', host='127.0.0.1', port=27017)
| Add shared db connection to the package | Add shared db connection to the package
| Python | mit | Zillolo/lazy-todo | ---
+++
@@ -0,0 +1,5 @@
+import mongoengine
+
+# Open a connection to the MongoDB database, to be shared throughout the
+# application.
+db = mongoengine.connect('lazy', host='127.0.0.1', port=27017) | |
426521115d62c664dc9139956f092a92705f7795 | events.py | events.py | class ListenerRegister(object):
def __init__(self):
self._register = {}
def add_listener(self, event, listener):
event = event.upper()
listeners = self._register.get(event, set())
listeners.add(listener)
self._register[event] = listeners
def remove_listener(self, ev... | class ListenerRegister(object):
def __init__(self):
self._register = {}
def add_listener(self, event, listener):
event = event.upper()
listeners = self._register.get(event, set())
listeners.add(listener)
self._register[event] = listeners
def remove_listener(self, ev... | Add an example for event usage | Add an example for event usage
| Python | mit | kashifrazzaqui/again | ---
+++
@@ -32,3 +32,26 @@
each(*args, **kwargs)
+class TestClass(EventSource):
+ def __init__(self):
+ super(TestClass, self).__init__()
+ print("ready")
+
+ def event_occurs(self):
+ # parameters for fire are 'event name' followed by anything you want to pass to the liste... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.