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
392ee6bec1041730b9859e70b9abe9b28a012d45
libs/__init__.py
libs/__init__.py
# Copyright 2015-2015 ARM Limited # # 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 w...
# Copyright 2015-2015 ARM Limited # # 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 w...
Add automodule sphinx directive for wlgen package
libs: Add automodule sphinx directive for wlgen package
Python
apache-2.0
credp/lisa,credp/lisa,ARM-software/lisa,credp/lisa,credp/lisa,ARM-software/lisa,ARM-software/lisa,ARM-software/lisa
--- +++ @@ -17,6 +17,9 @@ .. automodule:: libs.utils :members: :show-inheritance: +.. automodule:: wlgen + :members: + :show-inheritance: """ import wlgen
36c97aea9d3ea143f6a494c5f436ad7c0392cd6a
jsonsempai.py
jsonsempai.py
import sys class SempaiLoader(object): def __init__(self, *args): print args def find_module(self, fullname, path=None): print 'finding', fullname, path if fullname == 'simple': return self return None sys.path_hooks.append(SempaiLoader) sys.path.insert(0, 'simple'...
import os import sys class SempaiLoader(object): def find_module(self, name, path=None): for d in sys.path: json_path = os.path.join(d, '{}.json'.format(name)) if os.path.isfile(json_path): print json_path return self return None def loa...
Add the import hook to sys.meta_path
Add the import hook to sys.meta_path
Python
mit
kragniz/json-sempai
--- +++ @@ -1,14 +1,17 @@ +import os import sys class SempaiLoader(object): - def __init__(self, *args): - print args - def find_module(self, fullname, path=None): - print 'finding', fullname, path - if fullname == 'simple': - return self + def find_module(self, name, pa...
2c2fef3b8cf52219ee6bb2196fe5d3c9f9ae4443
tacyt_sdk/api_requests/tag_request.py
tacyt_sdk/api_requests/tag_request.py
""" This library offers an API to use Tacyt in a python environment. Copyright (C) 2015-2020 Eleven Paths """ try: import simplejson as json except ImportError: import json class TagRequest(object): LIST_REQUEST = "LIST" CREATE_REQUEST = "CREATE" REMOVE_REQUEST = "REMOVE" REMOVE_ALL_REQUEST = ...
""" This library offers an API to use Tacyt in a python environment. Copyright (C) 2015-2020 Eleven Paths """ try: import simplejson as json except ImportError: import json class TagRequest(object): LIST_REQUEST = "LIST" CREATE_REQUEST = "CREATE" REMOVE_REQUEST = "REMOVE" REMOVE_ALL_REQUEST = ...
Fix normalization of tags in case is None
Fix normalization of tags in case is None
Python
lgpl-2.1
ElevenPaths/tacyt-sdk-python
--- +++ @@ -16,7 +16,7 @@ def __init__(self, request_type=None, tag=None, apps=None): self.request_type = request_type - self.tag = tag.strip().lower() + self.tag = tag.strip().lower() if tag else None self.apps = apps if apps else [] def as_dict(self):
522279e967a8864e4404c8d05536b3d418da521f
cellcounter/urls.py
cellcounter/urls.py
from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_count, view_cou...
from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.contrib.auth.views import login, logout from cellcounter.main.views import new_count, view_cou...
Use 'my_counts' as name for MyCountsListView
Use 'my_counts' as name for MyCountsListView
Python
mit
cellcounter/cellcounter,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcountr,haematologic/cellcounter,haematologic/cellcounter,cellcounter/cellcounter,oghm2/hackdayoxford,haematologic/cellcounter,oghm2/hackdayoxford,haematologic/cellcountr
--- +++ @@ -19,7 +19,7 @@ url(r'^count/(?P<count_id>\d+)/$', view_count, name="view_count"), url(r'^count/(?P<count_id>\d+)/edit/$', edit_count, name="edit_count"), - url(r'^user/$', ListMyCountsView.as_view()), + url(r'^user/$', ListMyCountsView.as_view(), name="my_counts"), url(r'^login/$',...
2e6df2a332217d0e3da225075807360fe230b600
tools/po2js.py
tools/po2js.py
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_strings.%s="%s";""...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_strings.%s="%s";""...
Add the language code to the translated file
Add the language code to the translated file
Python
apache-2.0
runeh/dragonfly-stp-1,runeh/dragonfly-stp-1,runeh/dragonfly-stp-1
--- +++ @@ -13,8 +13,11 @@ strings.append(u"""ui_strings.%s="%s";""" % (po["jsname"], po["msgstr"])) return """/* Generated from %s at %s */ window.ui_strings || ( window.ui_strings = {} ) -window.ui_strings.lang_code = "?"; -%s""" % (unicode(os.path.basename(path)), unicode(time.asctime()), u"\n".jo...
bc20e8d01dc154d45f9dfc8f2b610d415a40f253
broadbean/__init__.py
broadbean/__init__.py
# flake8: noqa (ignore unused imports) # Version 1.0 from . import ripasso from .element import Element from .segment import Segment from .sequence import Sequence from .blueprint import BluePrint from .tools import makeVaryingSequence, repeatAndVarySequence from .broadbean import PulseAtoms
# flake8: noqa (ignore unused imports) # Version 1.0 from . import ripasso from .element import Element from .sequence import Sequence from .blueprint import BluePrint from .tools import makeVaryingSequence, repeatAndVarySequence from .broadbean import PulseAtoms
Remove import of version 1.0 feature
Remove import of version 1.0 feature
Python
mit
WilliamHPNielsen/broadbean
--- +++ @@ -4,7 +4,6 @@ from . import ripasso from .element import Element -from .segment import Segment from .sequence import Sequence from .blueprint import BluePrint from .tools import makeVaryingSequence, repeatAndVarySequence
52d7a26237cb1e594456127b775524596c3fb1ac
tests/test_barebones.py
tests/test_barebones.py
# -*- coding: utf-8 -*- """ Tests for the barebones example project """ import os import py.path from tarbell.app import EXCLUDES, TarbellSite PATH = os.path.realpath('examples/barebones') def test_get_site(): site = TarbellSite(PATH) assert os.path.realpath(site.path) == os.path.realpath(PATH) assert s...
# -*- coding: utf-8 -*- """ Tests for the barebones example project """ import os import py.path from tarbell.app import EXCLUDES, TarbellSite PATH = os.path.realpath('examples/barebones') def test_get_site(): site = TarbellSite(PATH) assert os.path.realpath(site.path) == os.path.realpath(PATH) assert s...
Test exclude equality with sets
Test exclude equality with sets
Python
bsd-3-clause
tarbell-project/tarbell,eyeseast/tarbell,eyeseast/tarbell,tarbell-project/tarbell
--- +++ @@ -20,7 +20,7 @@ "Ensure a basic set of excluded files" site = TarbellSite(PATH) - assert site.project.EXCLUDES == EXCLUDES + assert set(site.project.EXCLUDES) == set(EXCLUDES) def test_generate_site(tmpdir):
0f22d72aeb4fc872dfa1c5e75d40102c27cf2a8c
tabtranslator/model.py
tabtranslator/model.py
class sheet(object): """ sheet: Top level object. Models the entire music sheet """ def __init__(self, name): super(sheet, self).__init__() self.name = name self.bars = list() def add_bar(bar): self.bars.append(bar) class stave(sheet): """ stave: sheet that is displayed in music theory representation...
class sheet(object): """ sheet: Top level object. Models the entire music sheet """ def __init__(self, name): super(sheet, self).__init__() self.name = name self.bars = list() class bar(object): """ bar: Models a measure. Compose the sheet as the temporal layer => Where the notes are displayed on the s...
CLEAN simplify useless dep and methods
CLEAN simplify useless dep and methods
Python
mit
ograndedjogo/tab-translator,ograndedjogo/tab-translator
--- +++ @@ -1,25 +1,10 @@ class sheet(object): - """ sheet: Top level object. + """ sheet: Top level object. Models the entire music sheet """ def __init__(self, name): super(sheet, self).__init__() self.name = name self.bars = list() - - def add_bar(bar): - self.bars.append(bar) - -class stave(she...
ee5bd327bb3070277c87a96f72ca7e019c92f777
publisher/build_paper.py
publisher/build_paper.py
#!/usr/bin/env python import docutils.core as dc from writer import writer import os.path import sys import glob preamble = '\n'.join([r'% PDF Standard Fonts', r'\usepackage{mathptmx}', r'\usepackage[scaled=.80]{helvet}', r'\usepackage{courier}'],) ...
#!/usr/bin/env python import docutils.core as dc from writer import writer import os.path import sys import glob preamble = r''' % These preamble commands are from build_paper.py % PDF Standard Fonts \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} % Make verbatim environment smaller \ma...
Update preamble: no indent on quote, smaller verbatim font size.
Update preamble: no indent on quote, smaller verbatim font size.
Python
bsd-2-clause
dotsdl/scipy_proceedings,sbenthall/scipy_proceedings,juhasch/euroscipy_proceedings,chendaniely/scipy_proceedings,springcoil/euroscipy_proceedings,euroscipy/euroscipy_proceedings,mjklemm/euroscipy_proceedings,mikaem/euroscipy_proceedings,SepidehAlassi/euroscipy_proceedings,sbenthall/scipy_proceedings,katyhuff/scipy_proc...
--- +++ @@ -8,10 +8,21 @@ import sys import glob -preamble = '\n'.join([r'% PDF Standard Fonts', - r'\usepackage{mathptmx}', - r'\usepackage[scaled=.80]{helvet}', - r'\usepackage{courier}'],) +preamble = r''' +% These preamble commands are from build_...
069d6085946a21c5e78621abf13fb60fd7eb4dcf
threadedcomments/migrations/0001_initial.py
threadedcomments/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations, connection import django.db.models.deletion is_index = connection.vendor != 'mysql' class Migration(migrations.Migration): dependencies = [ ('django_comments', '__first__'), ] operations =...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import models, migrations, connection import django.db.models.deletion is_index = connection.vendor != 'mysql' if 'django.contrib.comments' in settings.INSTALLED_APPS: BASE_APP = 'comments' else: B...
Fix Django 1.7 migration support
Fix Django 1.7 migration support
Python
bsd-3-clause
HonzaKral/django-threadedcomments,HonzaKral/django-threadedcomments
--- +++ @@ -1,16 +1,22 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals +from django.conf import settings from django.db import models, migrations, connection import django.db.models.deletion is_index = connection.vendor != 'mysql' +if 'django.contrib.comments' in settings.INSTALLED_APPS:...
6f363525314ed4b4652f48278ab1bab221e40b40
suasimageparser.py
suasimageparser.py
from SUASImageParser import ImageParser from SUASImageParser.utils.color import bcolors from options import parseOptions from options import getOption import cv2 # ------------------------ Creating option parser ------------------------- parseOptions() # ------------------------ Ensuring image provided ----------...
from SUASImageParser import ImageParser from SUASImageParser.utils.color import bcolors from options import parseOptions from options import getOption # ------------------------ Creating option parser ------------------------- parseOptions() # ------------------------ Ensuring image provided ----------------------...
Remove useless import of OpenCV
Remove useless import of OpenCV
Python
mit
FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition
--- +++ @@ -3,8 +3,6 @@ from options import parseOptions from options import getOption - -import cv2 # ------------------------ Creating option parser -------------------------
de3722bdd4e5261ffe2ffd6264134ed51c131075
src/test_dll.py
src/test_dll.py
"""Testing dll.py.""" import pytest @pytest.fixture def new_dll(): """Return empty dll.""" from dll import DoublyLinkedList return DoublyLinkedList() def test_init(new_dll): """Test initialization of empty doubly linked list.""" assert new_dll.head is None and new_dll.tail is None def test_pus...
"""Testing dll.py.""" import pytest @pytest.fixture def new_dll(): """Return empty dll.""" from dll import DoublyLinkedList return DoublyLinkedList() def test_init(new_dll): """Test initialization of empty doubly linked list.""" assert new_dll.head is None and new_dll.tail is None def test_pus...
Test for creating a new node
Test for creating a new node
Python
mit
fordf/data-structures
--- +++ @@ -18,3 +18,10 @@ """Test push to empty dll.""" new_dll.push(21) assert new_dll.head.val == 21 and new_dll.tail is None + + +def test_new_node(new_dll): + """Test if new node is created.""" + from dll import DoubleNode + node = DoubleNode(27) + assert node.previous is None and node...
f1afd87c3a13fe47321c242d3586b1fa670125df
stationspinner/accounting/models.py
stationspinner/accounting/models.py
from django.db import models from django.contrib.auth.models import AbstractUser from django_pgjson.fields import JsonField class Capsuler(AbstractUser): settings = JsonField(blank=True, default={}) def __unicode__(self): return self.username def get_active_keys(self): return APIKey.object...
from django.db import models from django.contrib.auth.models import AbstractUser from django_pgjson.fields import JsonField class Capsuler(AbstractUser): settings = JsonField(blank=True, default={}) def __unicode__(self): return self.username def get_active_keys(self): return APIKey.obje...
Make it easier to use corporate keys
Make it easier to use corporate keys
Python
agpl-3.0
kriberg/stationspinner,kriberg/stationspinner
--- +++ @@ -2,8 +2,10 @@ from django.contrib.auth.models import AbstractUser from django_pgjson.fields import JsonField + class Capsuler(AbstractUser): settings = JsonField(blank=True, default={}) + def __unicode__(self): return self.username @@ -25,11 +27,14 @@ type = models.CharField(...
5b7cd2f62bb86658b6fce7503a4fab9238b8faa5
channelguide/init.py
channelguide/init.py
"""Contains code needed to initialize channelguide. This should be run at startup, before any real work starts. """ import locale import logging import logging.handlers import random import os import sys import traceback from django.conf import settings from django.core import signals from django.dispatch import dis...
"""Contains code needed to initialize channelguide. This should be run at startup, before any real work starts. """ import locale import logging import logging.handlers import random import os import sys import traceback from django.conf import settings from django.core import signals from django.dispatch import dis...
Fix for django trying to rollback connections on request exceptions.
Fix for django trying to rollback connections on request exceptions. git-svn-id: 98eea730e22c7fb5f8b38c49248ce5c7e9bb5936@525 be7adf91-e322-0410-8f47-e6edb61c52aa
Python
agpl-3.0
kmshi/miroguide,kmshi/miroguide,kmshi/miroguide
--- +++ @@ -13,6 +13,7 @@ from django.conf import settings from django.core import signals from django.dispatch import dispatcher +import django.db def init_logging(): logger = logging.getLogger() @@ -30,3 +31,9 @@ init_external_libraries() random.seed() locale.setlocale(locale.LC_ALL, '') +...
43c2d1ac03234043aa5536f900fce72d593f3bba
lib/speedway.py
lib/speedway.py
#!/usr/bin/python2.4 # # Copyright 2011 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required b...
#!/usr/bin/python2.4 # # Copyright 2011 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required b...
Append newline after 'COMMIT' in iptables policies. Without newline, the iptables-restore command complains.
Append newline after 'COMMIT' in iptables policies. Without newline, the iptables-restore command complains.
Python
apache-2.0
jayceechou/capirca,pettai/capirca,azet/capirca,google/capirca,jayceechou/capirca,jethrogb/capirca,s3u/capirca,sneakywombat/capirca,s3u/capirca,ryantierney513/capirca,rarcotvmw/capirca,google/capirca,rarcotvmw/capirca,sneakywombat/capirca,ryantierney513/capirca,google/capirca,pettai/capirca,dagmartin/capirca,ryantierney...
--- +++ @@ -39,7 +39,7 @@ _SUFFIX = '.ipt' _RENDER_PREFIX = '*filter' - _RENDER_SUFFIX = 'COMMIT' + _RENDER_SUFFIX = 'COMMIT\n' _DEFAULTACTION_FORMAT = ':%s %s' _TERM = Term
721f6f7916d698f22c9d96ce52cce3773fa514cc
uwsgiplugin.py
uwsgiplugin.py
import os import os.path import inspect base_path = os.path.dirname(inspect.getframeinfo(inspect.currentframe())[0]) NAME = 'rust' GCC_LIST = ['rust', '%s/plugin.a' % base_path] CFLAGS = [] if os.uname()[0] == 'Darwin': CFLAGS.append('-mmacosx-version-min=10.7') if os.system("rustc -o %s/plugin.a --crate-type...
import os import os.path import inspect base_path = os.path.dirname(inspect.getframeinfo(inspect.currentframe())[0]) NAME = 'rust' GCC_LIST = ['rust', '%s/target/release/libuwsgi_rust.a' % base_path] CFLAGS = [] if os.uname()[0] == 'Darwin': CFLAGS.append('-mmacosx-version-min=10.7') if os.system("cargo build ...
Update script to build rust code via cargo
Update script to build rust code via cargo Signed-off-by: Luca Bruno <d11e81b0438fe9a6fbb85b72e5bb4c36a65f49c7@debian.org>
Python
mit
unbit/uwsgi-rust,unbit/uwsgi-rust,unbit/uwsgi-rust
--- +++ @@ -5,13 +5,15 @@ base_path = os.path.dirname(inspect.getframeinfo(inspect.currentframe())[0]) NAME = 'rust' -GCC_LIST = ['rust', '%s/plugin.a' % base_path] +GCC_LIST = ['rust', '%s/target/release/libuwsgi_rust.a' % base_path] CFLAGS = [] if os.uname()[0] == 'Darwin': CFLAGS.append('-mmacosx-ve...
692141042bd21bfd7d72567bdabf080304a48474
planner/admin.py
planner/admin.py
from django.contrib import admin from planner.models import Route, Waypoint, RoadTrip, TripDetail class WaypointInline(admin.StackedInline): model = Waypoint extra = 1 class RouteAdmin(admin.ModelAdmin): model = Route inlines = [WaypointInline] class RoadTripAdmin(admin.ModelAdmin): model = R...
from django.contrib import admin from planner.models import Route, Waypoint, RoadTrip, TripDetail class WaypointInline(admin.StackedInline): model = Waypoint extra = 1 class RouteAdmin(admin.ModelAdmin): model = Route inlines = [WaypointInline] class RoadTripAdmin(admin.ModelAdmin): def route...
Add route waypoints to list display in Admin interface
Add route waypoints to list display in Admin interface
Python
apache-2.0
jwarren116/RoadTrip,jwarren116/RoadTrip,jwarren116/RoadTrip
--- +++ @@ -14,8 +14,11 @@ class RoadTripAdmin(admin.ModelAdmin): + def route__waypoints(self, obj): + return obj.route.waypoints.all() + model = RoadTrip - list_display = ('route', 'start_date', 'end_date',) + list_display = ('route', 'start_date', 'end_date', 'route__waypoints') class...
8351b73693019360c3f0ea3c60531ac13bef1c24
structure/models.py
structure/models.py
from django.db import models from django.contrib.auth.models import AbstractUser from django.utils.translation import ugettext_lazy as _ class Organization(models.Model): name = models.CharField(_('Name'), max_length=80) slug = models.SlugField() def __unicode__(self): return self.name class Team(...
from django.db import models from django.contrib.auth.models import AbstractUser from django.utils.translation import ugettext_lazy as _ class Organization(models.Model): name = models.CharField(_('Name'), max_length=80) slug = models.SlugField() def __unicode__(self): return self.name class Team(...
Add name to User model.
Add name to User model.
Python
bsd-3-clause
RocknRoot/LIIT
--- +++ @@ -15,9 +15,10 @@ return self.name class User(AbstractUser): + name = models.CharField(_('Name'), max_length=40) teams = models.ManyToManyField(Team, blank=True, related_name='users') def __unicode__(self): - return self.username + return self.name class Contract(mod...
38aed64e1c20d25a6bda750a096a513b7d414c45
websod/views.py
websod/views.py
from werkzeug import redirect from werkzeug.exceptions import NotFound from websod.utils import session, expose, url_for, serve_template from websod.models import Integration from datetime import timedelta, datetime @expose('/') def home(request): # show results from last 3 days integrations_from = datetime....
from werkzeug import redirect from werkzeug.exceptions import NotFound from websod.utils import session, expose, url_for, serve_template from websod.models import Integration from datetime import timedelta, datetime def home(request): # show results from last 3 days integrations_from = datetime.now() + timed...
Set integrations for the index page now
Set integrations for the index page now
Python
mit
schettino72/serveronduty
--- +++ @@ -6,7 +6,6 @@ from datetime import timedelta, datetime -@expose('/') def home(request): # show results from last 3 days integrations_from = datetime.now() + timedelta(days=-3) @@ -23,6 +22,7 @@ return serve_template('integration.html', integration=integration) +@expose('/') @expose...
ccb4c2780c0c9acc36d73acc32f8867f0bd2b944
pywikibot/families/wikivoyage_family.py
pywikibot/families/wikivoyage_family.py
# -*- coding: utf-8 -*- """Family module for Wikivoyage.""" # # (C) Pywikibot team, 2012-2018 # # Distributed under the terms of the MIT license. # # The new wikivoyage family that is hosted at wikimedia from __future__ import absolute_import, unicode_literals from pywikibot import family class Family(family.Subdoma...
# -*- coding: utf-8 -*- """Family module for Wikivoyage.""" # # (C) Pywikibot team, 2012-2018 # # Distributed under the terms of the MIT license. # # The new wikivoyage family that is hosted at wikimedia from __future__ import absolute_import, unicode_literals from pywikibot import family class Family(family.Subdoma...
Add Wikivoyage Bengali to pywikibot
Add Wikivoyage Bengali to pywikibot Bug: T196363 Change-Id: Ifc49b3b3734eaac20ef4f909c83d68b11bc8d91d
Python
mit
wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core,wikimedia/pywikibot-core
--- +++ @@ -19,7 +19,7 @@ languages_by_size = [ 'en', 'de', 'fa', 'it', 'fr', 'pl', 'ru', 'nl', 'pt', 'zh', 'es', - 'he', 'fi', 'vi', 'sv', 'el', 'ro', 'uk', 'hi', + 'he', 'fi', 'vi', 'sv', 'el', 'ro', 'uk', 'hi', 'bn', ] category_redirect_templates = {
988d66f748adc781f81929007e8971eadf3aafb5
tests/models.py
tests/models.py
from django.db import models class Office(models.Model): location = models.CharField(max_length=50) class Title(models.Model): name = models.CharField(max_length=50) salary = models.IntegerField(null=True) boss = models.NullBooleanField(default=False) class Employee(models.Model): first_name = ...
import logging from django.db import models class MockHandler(logging.Handler): def __init__(self, *args, **kwargs): self.reset() logging.Handler.__init__(self, *args, **kwargs) def emit(self, record): self.messages[record.levelname.lower()].append(record.getMessage()) def reset(s...
Add MockHandler for future testing of logging
Add MockHandler for future testing of logging
Python
bsd-2-clause
chop-dbhi/serrano,rv816/serrano_night,rv816/serrano_night,chop-dbhi/serrano
--- +++ @@ -1,4 +1,23 @@ +import logging from django.db import models + +class MockHandler(logging.Handler): + def __init__(self, *args, **kwargs): + self.reset() + logging.Handler.__init__(self, *args, **kwargs) + + def emit(self, record): + self.messages[record.levelname.lower()].append(...
291d6c51d545cb46117ff25a5a01da8e08e78127
ynr/apps/sopn_parsing/management/commands/sopn_parsing_extract_tables.py
ynr/apps/sopn_parsing/management/commands/sopn_parsing_extract_tables.py
from sopn_parsing.helpers.command_helpers import BaseSOPNParsingCommand from sopn_parsing.helpers.extract_tables import extract_ballot_table from sopn_parsing.helpers.text_helpers import NoTextInDocumentError class Command(BaseSOPNParsingCommand): help = """ Parse tables out of PDFs in to ParsedSOPN models fo...
from django.db.models import OuterRef, Subquery from official_documents.models import OfficialDocument from sopn_parsing.helpers.command_helpers import BaseSOPNParsingCommand from sopn_parsing.helpers.extract_tables import extract_ballot_table from sopn_parsing.helpers.text_helpers import NoTextInDocumentError class...
Fix query to exclude objects without relevant pages
Fix query to exclude objects without relevant pages
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
--- +++ @@ -1,3 +1,6 @@ +from django.db.models import OuterRef, Subquery +from official_documents.models import OfficialDocument + from sopn_parsing.helpers.command_helpers import BaseSOPNParsingCommand from sopn_parsing.helpers.extract_tables import extract_ballot_table from sopn_parsing.helpers.text_helpers impo...
f812fa8f0df0f3b8c8bb56f446dd01f64cff5cae
wapps/migrations/0016_auto_20161024_0925.py
wapps/migrations/0016_auto_20161024_0925.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-24 09:25 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wapps', '0015_identitysettings_amp_logo'), ] opera...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-24 09:25 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from wapps.utils import get_image_model class Migration(migrations.Migration): dependencies = [ ('wapps', '0015_iden...
Fix image model in migration
Fix image model in migration
Python
mit
apihackers/wapps,apihackers/wapps,apihackers/wapps,apihackers/wapps
--- +++ @@ -4,6 +4,8 @@ from django.db import migrations, models import django.db.models.deletion + +from wapps.utils import get_image_model class Migration(migrations.Migration): @@ -16,6 +18,6 @@ migrations.AlterField( model_name='identitysettings', name='amp_logo', - ...
7d2d94d69797586860f7bb8c21a0b0e217fbc394
components/mgmtworker/scripts/start.py
components/mgmtworker/scripts/start.py
#!/usr/bin/env python from os.path import join, dirname from cloudify import ctx ctx.download_resource( join('components', 'utils.py'), join(dirname(__file__), 'utils.py')) import utils # NOQA MGMT_WORKER_SERVICE_NAME = 'mgmtworker' CELERY_PATH = '/opt/mgmtworker/env/bin/celery' # also hardcoded in create...
#!/usr/bin/env python from os.path import join, dirname from cloudify import ctx ctx.download_resource( join('components', 'utils.py'), join(dirname(__file__), 'utils.py')) import utils # NOQA MGMT_WORKER_SERVICE_NAME = 'mgmtworker' CELERY_PATH = '/opt/mgmtworker/env/bin/celery' # also hardcoded in create...
Use the stored broker_config instead of working it out ourselves
Use the stored broker_config instead of working it out ourselves Fixes SSL Means we're verifying the config is written properly too
Python
apache-2.0
isaac-s/cloudify-manager-blueprints,Cloudify-PS/cloudify-manager-blueprints,cloudify-cosmo/cloudify-manager-blueprints,cloudify-cosmo/cloudify-manager-blueprints,isaac-s/cloudify-manager-blueprints,Cloudify-PS/cloudify-manager-blueprints
--- +++ @@ -14,12 +14,12 @@ @utils.retry(ValueError) -def check_worker_running(amqp_url): +def check_worker_running(): """Use `celery status` to check if the worker is running.""" result = utils.sudo([ + 'CELERY_WORK_DIR=/opt/mgmtworker/work', CELERY_PATH, - '-b', celery_amqp_url...
31bea815589e018c9a6250f1a8efcdf8cecfef7d
tests/test_settings.py
tests/test_settings.py
DEBUG = True TEMPLATE_DEBUG = DEBUG SECRET_KEY = 'fake_secret' ROOT_URLCONF = 'tests.test_urls' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'irrelevant.db' } } INSTALLED_APPS = ( 'djproxy', ) STATIC_ROOT = '' STATIC_URL = '/'
DEBUG = True TEMPLATE_DEBUG = DEBUG SECRET_KEY = 'fake_secret' ROOT_URLCONF = 'tests.test_urls' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'irrelevant.db' } } INSTALLED_APPS = ( 'djproxy', ) STATIC_ROOT = '' STATIC_URL = '/' APPEND_SLASH = False
Disable append_slash in test config
Disable append_slash in test config This interferes with the ability to test proxying downstream redirects
Python
mit
thomasw/djproxy
--- +++ @@ -18,3 +18,5 @@ STATIC_ROOT = '' STATIC_URL = '/' + +APPEND_SLASH = False
d6fcedb2b479da20cbe061bcba52758a18a6ed0b
noweats/__init__.py
noweats/__init__.py
""" The NowEats application scrapes Twitter for what people are eating now. """
""" The NowEats application scrapes Twitter for what people are eating now. """ import analysis import collection import extraction
Add module imports to noweats init.
Add module imports to noweats init.
Python
mit
blr246/noweats,blr246/noweats
--- +++ @@ -1,3 +1,6 @@ """ The NowEats application scrapes Twitter for what people are eating now. """ +import analysis +import collection +import extraction
ed97a1f811f04693203f6d1c0e9b64649a3da152
coney/exceptions.py
coney/exceptions.py
class ConeyException(Exception): def __repr__(self): return 'An unspecified error has occurred' class CallTimeoutException(ConeyException): def __repr__(self): return 'An RPC call did not return before the time out period' class MalformedRequestException(ConeyException): def __init__(s...
class ConeyException(Exception): def __repr__(self): return 'An unspecified error has occurred' class CallTimeoutException(ConeyException): def __repr__(self): return 'An RPC call did not return before the time out period' class MalformedRequestException(ConeyException): def __init__(s...
Add a new exception to handle a non-callable handler.
Add a new exception to handle a non-callable handler.
Python
mit
cbigler/jackrabbit
--- +++ @@ -50,3 +50,8 @@ def __repr__(self): return 'Error {} occurred during message dispatch'.format(self.code) + + +class HandlerNotCallableException(ConeyException): + def __repr__(self): + return 'Handler provided a non-callable object'
80ea1fd6dc5ad47a3689f64ebe6e639f037f7d20
ln/backend/reduction.py
ln/backend/reduction.py
'''Functions that perform the different reduction strategies.''' import numpy as np def closest(times, values, center_time): abs_delta = np.abs(np.array([(t - center_time).total_seconds() for t in times])) closest_index = np.argmin(abs_delta) return values[closest_index] def sum(times, values, c...
'''Functions that perform the different reduction strategies.''' # Needed for get_total_seconds() implementation from __future__ import division import numpy as np # Implementation for python 2.6 def get_total_sections(td): return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6 def clos...
Fix for Python 2.6 that lacks timedelta.total_seconds()
Fix for Python 2.6 that lacks timedelta.total_seconds()
Python
bsd-2-clause
seibert/ln
--- +++ @@ -1,9 +1,18 @@ '''Functions that perform the different reduction strategies.''' + +# Needed for get_total_seconds() implementation +from __future__ import division + import numpy as np +# Implementation for python 2.6 +def get_total_sections(td): + return (td.microseconds + (td.seconds + td.days * ...
113fc2bb39e872ae8e1fa4870d8b94f9375cec9e
daemon/__init__.py
daemon/__init__.py
# -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Fo...
# -*- coding: utf-8 -*- # Copyright © 2009 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2006 Robert Niederreiter # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Fo...
Prepare development of new version.
Prepare development of new version.
Python
apache-2.0
wting/python-daemon,eaufavor/python-daemon
--- +++ @@ -34,4 +34,4 @@ -version = "1.4.2" +version = "1.4.3"
52b6dac7528232dfd41841f4697c7a78e2a2e675
www/src/Lib/_weakref.py
www/src/Lib/_weakref.py
class ProxyType: def __init__(self,obj): self.obj = obj CallableProxyType = ProxyType ProxyTypes = [ProxyType,CallableProxyType] class ReferenceType: def __init__(self,obj,callback): self.obj = obj self.callback = callback class ref: def __init__(self,obj,callback=None): ...
class ProxyType: def __init__(self,obj): self.obj = obj CallableProxyType = ProxyType ProxyTypes = [ProxyType,CallableProxyType] class ReferenceType: def __init__(self,obj,callback): self.obj = obj self.callback = callback class ref: def __init__(self,obj,callback=None): ...
Add method __call__ to _weaksetref.WeakSet
Add method __call__ to _weaksetref.WeakSet
Python
bsd-3-clause
olemis/brython,Lh4cKg/brython,molebot/brython,kikocorreoso/brython,Isendir/brython,Mozhuowen/brython,Isendir/brython,amrdraz/brython,Hasimir/brython,olemis/brython,firmlyjin/brython,JohnDenker/brython,olemis/brython,firmlyjin/brython,Mozhuowen/brython,jonathanverner/brython,molebot/brython,jonathanverner/brython,kevinm...
--- +++ @@ -18,6 +18,9 @@ self.obj = ReferenceType(obj,callback) self.callback=callback + def __call__(self): + return self.obj.obj + def getweakrefcount(obj): return 1
3948128a194a27171ec14ca664a77c125ec73fae
data/adjustIndex.py
data/adjustIndex.py
import csv start = 900 newcsv = [] with open('50_percent_cheaters.csv', 'rb') as csvfile: experiment50 = csv.DictReader(csvfile) for row in experiment50: row['Run'] = int(row['Run']) - start newcsv.append(row) with open('changed.csv', 'wb') as newfile: fieldnames = ["Run","Time","Status...
import csv start = 690 newcsv = [] with open('70_percent_cheaters2.csv', 'rb') as csvfile: experiment50 = csv.DictReader(csvfile) for row in experiment50: row['Run'] = int(row['Run']) + start newcsv.append(row) with open('changed.csv', 'wb') as newfile: fieldnames = ["Run","Time","Statu...
Change dirty little helper script
Change dirty little helper script
Python
mit
nud3l/smart-contract-analysis
--- +++ @@ -1,13 +1,13 @@ import csv -start = 900 +start = 690 newcsv = [] -with open('50_percent_cheaters.csv', 'rb') as csvfile: +with open('70_percent_cheaters2.csv', 'rb') as csvfile: experiment50 = csv.DictReader(csvfile) for row in experiment50: - row['Run'] = int(row['Run']) - start +...
7d3fd06884bc11b9e1c60250052a1abdb6e7d44d
pycassa/__init__.py
pycassa/__init__.py
from pycassa.columnfamily import * from pycassa.columnfamilymap import * from pycassa.types import * from pycassa.index import * from pycassa.pool import * from pycassa.connection import * from pycassa.system_manager import * from pycassa.cassandra.ttypes import ConsistencyLevel,\ InvalidRequestException, NotFound...
from pycassa.columnfamily import * from pycassa.columnfamilymap import * from pycassa.types import * from pycassa.index import * from pycassa.pool import * from pycassa.system_manager import * from pycassa.cassandra.ttypes import ConsistencyLevel,\ InvalidRequestException, NotFoundException, UnavailableException,\...
Remove connection from pycassa package import
Remove connection from pycassa package import
Python
mit
pycassa/pycassa,pycassa/pycassa
--- +++ @@ -3,7 +3,6 @@ from pycassa.types import * from pycassa.index import * from pycassa.pool import * -from pycassa.connection import * from pycassa.system_manager import * from pycassa.cassandra.ttypes import ConsistencyLevel,\
3da2c4a83de97407c69b9144475441e9bb0a3073
backdrop/write/config/development_tokens.py
backdrop/write/config/development_tokens.py
TOKENS = { '_foo_bucket': '_foo_bucket-bearer-token', 'bucket': 'bucket-bearer-token', 'foo': 'foo-bearer-token', 'foo_bucket': 'foo_bucket-bearer-token', 'licensing': 'licensing-bearer-token' }
TOKENS = { '_foo_bucket': '_foo_bucket-bearer-token', 'bucket': 'bucket-bearer-token', 'foo': 'foo-bearer-token', 'foo_bucket': 'foo_bucket-bearer-token', 'licensing': 'licensing-bearer-token', 'licensing_journey': 'licensing_journey-bearer-token' }
Add dev token for licensing_journey bucket
Add dev token for licensing_journey bucket
Python
mit
alphagov/backdrop,alphagov/backdrop,alphagov/backdrop
--- +++ @@ -3,5 +3,6 @@ 'bucket': 'bucket-bearer-token', 'foo': 'foo-bearer-token', 'foo_bucket': 'foo_bucket-bearer-token', - 'licensing': 'licensing-bearer-token' + 'licensing': 'licensing-bearer-token', + 'licensing_journey': 'licensing_journey-bearer-token' }
966c8e549e1cb78c64ad2f359162bc5a2171a732
fabfile.py
fabfile.py
from fabric.api import cd, env, local, lcd, run PUPPET_MASTER_IP = '192.168.33.10' def puppet(): env.hosts = [ 'vagrant@' + PUPPET_MASTER_IP + ':22', ] env.passwords = { 'vagrant@' + PUPPET_MASTER_IP + ':22': 'vagrant' } def test(): with lcd('puppet/modules'): with lcd(...
from fabric.api import cd, env, local, lcd, run PUPPET_MASTER_IP = '192.168.33.10' def puppet(): env.hosts = [ 'vagrant@' + PUPPET_MASTER_IP + ':22', ] env.passwords = { 'vagrant@' + PUPPET_MASTER_IP + ':22': 'vagrant' } def test(): with lcd('puppet/modules'): with lcd(...
Add push task (but not use it yet)
Add push task (but not use it yet)
Python
mit
zkan/puppet-untitled-2016,zkan/puppet-untitled-2016
--- +++ @@ -19,6 +19,12 @@ local('rspec') +def push(): + with lcd('puppet'): + local('git add .') + local('git push origin master') + + def deploy(): puppet() test()
23540359422501ebd8a1b833c426cdfb1a3dfe00
fabfile.py
fabfile.py
# -*- coding: UTF-8 -*- from fabric.api import * def move_sampledocs_to_fixture(): local("cp fs_doc/fixtures/foreskrift/*.pdf uploads/foreskrift/") local("cp fs_doc/fixtures/bilaga/*.pdf uploads/bilaga/") local("cp fs_doc/fixtures/allmanna_rad/*.pdf uploads/allmanna_rad/") def clean_db(): local("r...
# -*- coding: UTF-8 -*- from fabric.api import * def move_sampledocs_to_fixture(): local("mkdir -p uploads/foreskrift") local("rm -f uploads/foreskrift/*.pdf") local("cp fs_doc/fixtures/foreskrift/*.pdf uploads/foreskrift/") local("mkdir -p uploads/bilaga") local("rm -f uploads/bilaga/*.pdf") ...
Add new fixture to fabric script
Add new fixture to fabric script
Python
bsd-3-clause
kamidev/autobuild_fst,kamidev/autobuild_fst,rinfo/fst,rinfo/fst,kamidev/autobuild_fst,rinfo/fst,kamidev/autobuild_fst,rinfo/fst
--- +++ @@ -2,9 +2,21 @@ from fabric.api import * def move_sampledocs_to_fixture(): + local("mkdir -p uploads/foreskrift") + local("rm -f uploads/foreskrift/*.pdf") local("cp fs_doc/fixtures/foreskrift/*.pdf uploads/foreskrift/") + + local("mkdir -p uploads/bilaga") + local("rm -f uploads/bil...
612784b82792036ca538aa835f14e7102fd9e570
kpi_dashboard/__manifest__.py
kpi_dashboard/__manifest__.py
# Copyright 2020 Creu Blanca # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Kpi Dashboard", "summary": """ Create Dashboards using kpis""", "version": "12.0.1.2.0", "license": "AGPL-3", "author": "Creu Blanca,Odoo Community Association (OCA)", "website": "htt...
# Copyright 2020 Creu Blanca # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Kpi Dashboard", "summary": """ Create Dashboards using kpis""", "version": "12.0.1.2.0", "license": "AGPL-3", "author": "Creu Blanca,Odoo Community Association (OCA)", "website": "htt...
Fix website URL in kpi_dashboard module
Fix website URL in kpi_dashboard module
Python
agpl-3.0
OCA/reporting-engine,OCA/reporting-engine,OCA/reporting-engine,OCA/reporting-engine
--- +++ @@ -8,7 +8,7 @@ "version": "12.0.1.2.0", "license": "AGPL-3", "author": "Creu Blanca,Odoo Community Association (OCA)", - "website": "https://github.com/reporting-engine", + "website": "https://github.com/OCA/reporting-engine", "depends": ["bus", "board", "base_sparse_field", "web_wi...
b13494292bc8cc42783db1e4500a525a0e457222
dashboard_app/tests/__init__.py
dashboard_app/tests/__init__.py
""" Package with all tests for dashboard_app """ import unittest from testscenarios.scenarios import generate_scenarios TEST_MODULES = [ 'models.attachment', 'models.bundle', 'models.bundle_stream', 'models.hw_device', 'models.named_attribute', 'models.sw_package', 'models.test', 'mod...
""" Package with all tests for dashboard_app """ import unittest from testscenarios.scenarios import generate_scenarios TEST_MODULES = [ 'models.attachment', 'models.bundle', 'models.bundle_stream', 'models.hw_device', 'models.named_attribute', 'models.sw_package', 'models.test', 'mod...
Add reference to csrf tests in tests loader list
Add reference to csrf tests in tests loader list
Python
agpl-3.0
OSSystems/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server
--- +++ @@ -17,6 +17,7 @@ 'models.test_case', 'models.test_result', 'models.test_run', + 'other.csrf', 'other.deserialization', 'other.tests', ]
a6049578c4dd4602aa903af262347dddf05df178
template/module/tests/test_something.py
template/module/tests/test_something.py
# -*- coding: utf-8 -*- # Copyright <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp.tests.common import HttpCase, TransactionCase class SomethingCase(TransactionCase): def setUp(self, *args, **kwargs): super(SomethingCase, self).setUp(*args, **kwargs) ...
# -*- coding: utf-8 -*- # Copyright <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp.tests.common import HttpCase, TransactionCase class SomethingCase(TransactionCase): def setUp(self, *args, **kwargs): super(SomethingCase, self).setUp(*args, **kwargs) ...
Add debug assets to HTTP cases
[IMP] Add debug assets to HTTP cases
Python
agpl-3.0
Yajo/maintainer-tools,acsone/maintainer-tools,acsone/maintainer-tools,OCA/maintainer-tools,Yajo/maintainer-tools,Yajo/maintainer-tools,acsone/maintainers-tools,OCA/maintainer-tools,acsone/maintainers-tools,OCA/maintainer-tools,acsone/maintainer-tools,Yajo/maintainer-tools,OCA/maintainer-tools,acsone/maintainer-tools,ac...
--- +++ @@ -31,12 +31,12 @@ class UICase(HttpCase): def test_ui_web(self): """Test backend tests.""" - self.phantom_js("/web/tests?module=module_name", "", login="admin") + self.phantom_js("/web/tests?debug=assets&module=module_name", "", login="admin") def test_ui_website(self): ...
fa5f9ad96c52d5977913a4e8c41c0ec0bd2214f1
coheoka/utils.py
coheoka/utils.py
# -*- coding: utf-8 -*- ''' Preprocessing utilities ''' from nltk import sent_tokenize from random import shuffle, sample def shuffle_sents(text, times): sents = sent_tokenize(text) res = [] for i in range(times): shuffle(sents) res.append(' '.join(sents)) return res def remove_sents...
# -*- coding: utf-8 -*- ''' Preprocessing utilities ''' from random import shuffle, sample from nltk import sent_tokenize from scipy.stats import kendalltau as tau def shuffle_sents(text, times): sents = sent_tokenize(text) res = [] for i in range(times): shuffle(sents) res.append(' '.jo...
Add util function to score sentences with kendall's tau
Add util function to score sentences with kendall's tau
Python
apache-2.0
kigawas/coheoka
--- +++ @@ -2,8 +2,11 @@ ''' Preprocessing utilities ''' + +from random import shuffle, sample + from nltk import sent_tokenize -from random import shuffle, sample +from scipy.stats import kendalltau as tau def shuffle_sents(text, times): @@ -31,3 +34,14 @@ shuffle(sents) res.append(' '.joi...
c977bef31fd36356f3a131d1f25250640c61f4b7
dojango/__init__.py
dojango/__init__.py
VERSION = (0, 5, 5, 'final', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: if VERSION[3] != 'final': version = '%s %...
VERSION = (0, 5, 6, 'alpha', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: if VERSION[3] != 'final': version = '%s %...
Mark dojango as 0.5.6 alpha
Mark dojango as 0.5.6 alpha
Python
bsd-3-clause
ofirr/dojango,ricard33/dojango,ofirr/dojango,ricard33/dojango,ofirr/dojango,william-gr/dojango,william-gr/dojango,ricard33/dojango,klipstein/dojango,william-gr/dojango,klipstein/dojango
--- +++ @@ -1,4 +1,4 @@ -VERSION = (0, 5, 5, 'final', 0) +VERSION = (0, 5, 6, 'alpha', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1])
7c8a90a6bc0a51788966b0035bc97b24a6680611
populous/cli.py
populous/cli.py
import click from .loader import load_yaml from .blueprint import Blueprint from .exceptions import ValidationError, YAMLError def get_blueprint(*files): try: return Blueprint.from_description(load_yaml(*files)) except (YAMLError, ValidationError) as e: raise click.ClickException(e.message) ...
import click from .loader import load_yaml from .blueprint import Blueprint from .exceptions import ValidationError, YAMLError, BackendError def get_blueprint(*files): try: return Blueprint.from_description(load_yaml(*files)) except (YAMLError, ValidationError) as e: raise click.ClickExceptio...
Add a CLI command for Postgres backend
Add a CLI command for Postgres backend
Python
mit
novafloss/populous
--- +++ @@ -2,7 +2,7 @@ from .loader import load_yaml from .blueprint import Blueprint -from .exceptions import ValidationError, YAMLError +from .exceptions import ValidationError, YAMLError, BackendError def get_blueprint(*files): @@ -21,6 +21,36 @@ pass +@cli.group() +def run(): + pass + + +@ru...
c25e735216dd1969ed09d24fcca9eaafe1dc8405
Lib/__init__.py
Lib/__init__.py
"""\ SciPy --- A scientific computing package for Python =================================================== You can support the development of SciPy by purchasing documentation at http://www.trelgol.com It is being distributed for a fee for a limited time to try and raise money for development. Documentation is ...
"""\ SciPy --- A scientific computing package for Python =================================================== You can support the development of SciPy by purchasing documentation at http://www.trelgol.com It is being distributed for a fee for a limited time to try and raise money for development. Documentation is ...
Put numpy namespace in scipy for backward compatibility...
Put numpy namespace in scipy for backward compatibility...
Python
bsd-3-clause
Newman101/scipy,kleskjr/scipy,mikebenfield/scipy,njwilson23/scipy,giorgiop/scipy,mikebenfield/scipy,Stefan-Endres/scipy,trankmichael/scipy,argriffing/scipy,ilayn/scipy,anntzer/scipy,rmcgibbo/scipy,ortylp/scipy,zerothi/scipy,raoulbq/scipy,mtrbean/scipy,sargas/scipy,newemailjdm/scipy,felipebetancur/scipy,ales-erjavec/sci...
--- +++ @@ -43,4 +43,9 @@ test = ScipyTest('scipy').test __all__.append('test') +import numpy as _num +from numpy import * +__all__ += _num.__all__ +del _num + __doc__ += pkgload.get_pkgdocs()
e827c54c7e3727c2554d5b0c74a085fec7348d0c
tests/test_utils.py
tests/test_utils.py
""" Test utilities. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * import json from unittest import TestCase def parent_module(module_name): # type: (AnyStr) -> AnyStr """Return the parent module name for a module. :...
""" Test utilities. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * import json from unittest import TestCase def parent_module(module_name): # type: (AnyStr) -> AnyStr """Return the parent module name for a module. :...
FIX deprecation warning for using assertEquals
FIX deprecation warning for using assertEquals
Python
mit
AtteqCom/zsl,AtteqCom/zsl
--- +++ @@ -44,4 +44,4 @@ """ if hasattr(status, 'value'): # py2/3 status = status.value - self.assertEquals(status, test_value, msg) + self.assertEqual(status, test_value, msg)
53b8c8efcef4c419c06197365448cc271a5f6aef
Lib/test/test_pep3120.py
Lib/test/test_pep3120.py
# This file is marked as binary in the CVS, to prevent MacCVS from recoding it. import unittest from test import support class PEP3120Test(unittest.TestCase): def test_pep3120(self): self.assertEqual( "Питон".encode("utf-8"), b'\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd' ) ...
# This file is marked as binary in the CVS, to prevent MacCVS from recoding it. import unittest from test import support class PEP3120Test(unittest.TestCase): def test_pep3120(self): self.assertEqual( "Питон".encode("utf-8"), b'\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd' ) ...
Make the exception message check for malformed UTF-8 source looser so that SyntaxError triggered from UnicodeDecodeError is also acceptable.
Make the exception message check for malformed UTF-8 source looser so that SyntaxError triggered from UnicodeDecodeError is also acceptable.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
--- +++ @@ -19,7 +19,8 @@ try: import test.badsyntax_pep3120 except SyntaxError as msg: - self.assertTrue(str(msg).find("Non-UTF-8 code starting with") >= 0) + msg = str(msg) + self.assertTrue('UTF-8' in msg or 'utf8' in msg) else: ...
6763ebff720c8aa6acbfddccd4a8d3f7aeba2cee
roman.py
roman.py
#!/usr/bin/env python def parser(roman): ''' This function receives a Roman Numeral String and convert it to an Arabic Number. parameters: --------------------------------- roman: Roman Numearl string input''' roman_dic = {'M': 1000, 'C': 100, 'L': 50, 'D': 500, 'X': 10, ...
#!/usr/bin/env python def Parser(roman): ''' This function receives a Roman Numeral String and convert it to an Arabic Number. parameters: --------------------------------- roman: Roman Numearl string input''' roman_dic = {'M': 1000, 'C': 100, 'L': 50, 'D': 500, 'X': 10, ...
Change function name to Camel
Change function name to Camel
Python
cc0-1.0
Elixeus/Snippets,Elixeus/Snippets
--- +++ @@ -1,7 +1,7 @@ #!/usr/bin/env python -def parser(roman): +def Parser(roman): ''' This function receives a Roman Numeral String and convert it to an Arabic Number. @@ -33,7 +33,7 @@ def main(): roman = raw_input('Input the Roman Numeral:\n') print '{roman} is {arabic}.'.format(r...
e3f6be6f2ce00e335ebc4d17ff6b89f230dc34fa
rotor.py
rotor.py
""" Rotor model using mbwind """ from numpy import pi, dot from mbwind import rotations, RigidConnection, RigidBody from mbwind.elements.modal import ModalElementFromFE class Rotor(object): def __init__(self, num_blades, root_length, blade_fe): self.num_blades = num_blades self.root_length = root_...
""" Rotor model using mbwind """ from numpy import pi, dot from mbwind import rotations, RigidConnection, RigidBody, Hinge from mbwind.elements.modal import ModalElementFromFE class Rotor(object): def __init__(self, num_blades, root_length, blade_fe, pitch=False): self.num_blades = num_blades self...
Test step change in pitch in aeroelastic simulation
Test step change in pitch in aeroelastic simulation
Python
mit
ricklupton/py-bem
--- +++ @@ -3,11 +3,11 @@ """ from numpy import pi, dot -from mbwind import rotations, RigidConnection, RigidBody +from mbwind import rotations, RigidConnection, RigidBody, Hinge from mbwind.elements.modal import ModalElementFromFE class Rotor(object): - def __init__(self, num_blades, root_length, blade_fe...
9ddbc2c319993a1084317f9af8796f25211c6d33
sample-client.py
sample-client.py
import zlib import zmq import simplejson import sys def main(): context = zmq.Context() subscriber = context.socket(zmq.SUB) subscriber.connect('tcp://localhost:9500') subscriber.setsockopt(zmq.SUBSCRIBE, "") while True: market_json = zlib.decompress(subscriber.recv()) market_data...
import zlib import zmq import simplejson import sys def main(): context = zmq.Context() subscriber = context.socket(zmq.SUB) subscriber.connect('tcp://firehose.elite-market-data.net:9500') subscriber.setsockopt(zmq.SUBSCRIBE, "") while True: market_json = zlib.decompress(subscriber.recv()...
Use official URL for sample client.
Use official URL for sample client.
Python
bsd-2-clause
andreas23/emdn
--- +++ @@ -7,7 +7,7 @@ context = zmq.Context() subscriber = context.socket(zmq.SUB) - subscriber.connect('tcp://localhost:9500') + subscriber.connect('tcp://firehose.elite-market-data.net:9500') subscriber.setsockopt(zmq.SUBSCRIBE, "") while True:
198f6b0e0a98d0f5ef34d1aec44d5e9704d2cae9
urllib3/__init__.py
urllib3/__init__.py
# urllib3/__init__.py # Copyright 2008-2011 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ urllib3 - Thread-safe connection pooling and re-using. """ __author__ = "Andrey Petrov (a...
# urllib3/__init__.py # Copyright 2008-2011 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ urllib3 - Thread-safe connection pooling and re-using. """ __author__ = "Andrey Petrov (a...
Set default logging level to ERROR, to avoid excessive "No handlers could be found" messages.
Set default logging level to ERROR, to avoid excessive "No handlers could be found" messages.
Python
mit
Lukasa/urllib3,Geoion/urllib3,msabramo/urllib3,mikelambert/urllib3,haikuginger/urllib3,tutumcloud/urllib3,haikuginger/urllib3,luca3m/urllib3,boyxuper/urllib3,Lukasa/urllib3,sornars/urllib3,Geoion/urllib3,mikelambert/urllib3,tutumcloud/urllib3,gardner/urllib3,msabramo/urllib3,matejcik/urllib3,asmeurer/urllib3,urllib3/ur...
--- +++ @@ -30,3 +30,8 @@ from .poolmanager import PoolManager from .response import HTTPResponse from .filepost import encode_multipart_formdata + + +import logging +logging.getLogger(__name__).setLevel(logging.ERROR) +del logging
fd297665f1cb95ba3e8e069a18a9e8af18b449c8
socketio/sdjango.py
socketio/sdjango.py
import logging from socketio import socketio_manage from django.conf.urls import patterns, url, include from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt SOCKETIO_NS = {} class namespace(object): def __init__(self, name=''): self.name = name def __call__(self...
import logging from socketio import socketio_manage from django.conf.urls import patterns, url, include from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt SOCKETIO_NS = {} class namespace(object): def __init__(self, name=''): self.name = name def __call__(sel...
Return namespace class after decorating.
Return namespace class after decorating.
Python
bsd-3-clause
smurfix/gevent-socketio,abourget/gevent-socketio,kazmiruk/gevent-socketio,arnuschky/gevent-socketio,bobvandevijver/gevent-socketio,hzruandd/gevent-socketio,yacneyac/gevent-socketio,Eugeny/gevent-socketio,theskumar-archive/gevent-socketio,arnuschky/gevent-socketio,kazmiruk/gevent-socketio,theskumar-archive/gevent-socket...
--- +++ @@ -8,12 +8,15 @@ SOCKETIO_NS = {} + class namespace(object): def __init__(self, name=''): self.name = name def __call__(self, handler): SOCKETIO_NS[self.name] = handler + return handler + @csrf_exempt def socketio(request):
28341d67a187a2433bd2a363ce262f401cae7e63
setup.py
setup.py
#!/usr/bin/env python import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file: readme = readme_file.read() setup( name = "parse_this", version = "0.2.1", description = "Makes it easy to create a command line interface for any function...
#!/usr/bin/env python import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst'), "r") as readme_file: readme = readme_file.read() setup( name = "parse_this", version = "0.2.1", description = "Makes it easy to create a command line interface for any function...
Include the python module in the package
Include the python module in the package The top level files, parse_this and parse_this_test, were not included. By using the 'py_modules' option these files are now actually included in the parse_this pacakge.
Python
mit
bertrandvidal/parse_this
--- +++ @@ -10,6 +10,7 @@ version = "0.2.1", description = "Makes it easy to create a command line interface for any function, method or classmethod..", long_description = readme, + py_modules = ["parse_this", "parse_this_test"], author = "Bertrand Vidal", author_email = "vidal.bertrand@gm...
320f64f9c5429b4ffc85d518eb8df02b4c28254f
setup.py
setup.py
""" Flask-Testing -------------- Flask unittest integration. Links ````` * `documentation <http://packages.python.org/Flask-Testing>`_ * `development version <http://bitbucket.org/danjac/flask-testing/get/tip.gz#egg=Flask-Testing-dev>`_ """ from setuptools import setup setup( name='Flask-Testing', versio...
""" Flask-Testing -------------- Flask unittest integration. Links ````` * `documentation <http://packages.python.org/Flask-Testing>`_ * `development version <http://bitbucket.org/danjac/flask-testing/get/tip.gz#egg=Flask-Testing-dev>`_ """ import sys from setuptools import setup tests_require = [ 'nose', ...
Add simplejson as test requirements for python 2.5
Add simplejson as test requirements for python 2.5
Python
bsd-3-clause
ecarrara/flask-testing,jmagnusson/flask-testing,jmagnusson/flask-testing,ecarrara/flask-testing
--- +++ @@ -12,7 +12,16 @@ <http://bitbucket.org/danjac/flask-testing/get/tip.gz#egg=Flask-Testing-dev>`_ """ +import sys from setuptools import setup + +tests_require = [ + 'nose', + 'blinker', +] + +if sys.version_info < (2,6): + tests_require.append('simplejson') setup( name='Flask-Testing'...
599f9d56058418ff9d747b0c4f978c3f95d245d4
setup.py
setup.py
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-swiftbrowser', version='0.22', packages=['swiftbrow...
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-swiftbrowser', version='0.22', packages=['swiftbrow...
Add python-keystoneclient to dependencies This is needed for keystone authentication
Add python-keystoneclient to dependencies This is needed for keystone authentication
Python
apache-2.0
honza801/django-swiftbrowser,honza801/django-swiftbrowser,honza801/django-swiftbrowser
--- +++ @@ -17,7 +17,8 @@ url='https://github.com/cschwede/django-swiftbrowser', author='Christian Schwede', author_email='info@cschwede.de', - install_requires=['django>=1.5', 'python-swiftclient'], + install_requires=['django>=1.5', 'python-swiftclient', + 'python-keystonec...
3b6995c5103ba09b21619ac3ae4f4d9733144d89
craft_message.py
craft_message.py
from datetime import date import calendar def get_time_index(update): if "warning" in update: return 7 if "pollution" in update: return 8 elif "today" in update: return 0 elif "this morning" in update: return 1 elif "this lunchtime" in update: ...
from datetime import date import calendar def get_time_index(update): if "warning" in update: return 7 if "pollution" in update: return 8 elif "today" in update: return 0 elif "this morning" in update: return 1 elif "this lunchtime" in update: ...
Change Tweet upper length limit
Change Tweet upper length limit
Python
unlicense
ElizabethSEden/cycling-weather-bot
--- +++ @@ -40,7 +40,7 @@ addToAlert = True i = 1 for update in updates: - if (len(alert) + len(update) < 140): + if (len(alert) + len(update) < 280): alert += update + " " addToAlert = True else:
0a300314c0fae8420db1aa773e4ec8c96fca1cf5
setup.py
setup.py
from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension import numpy as np # To compile and install locally run "python setup.py build_ext --inplace" # To install library to Python site-packages run "python setup.py build_ext install" ext_modules = [ Extension...
from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension import numpy as np import sys # To compile and install locally run "python setup.py build_ext --inplace" # To install library to Python site-packages run "python setup.py build_ext install" extra_compile_args...
Make it compile on windows
Make it compile on windows
Python
mit
matteorr/coco-analyze,matteorr/coco-analyze,matteorr/coco-analyze
--- +++ @@ -2,16 +2,21 @@ from Cython.Build import cythonize from distutils.extension import Extension import numpy as np +import sys # To compile and install locally run "python setup.py build_ext --inplace" # To install library to Python site-packages run "python setup.py build_ext install" + +extra_compile_...
1d9d661dd03c6f66f62b3f32865eadd4b5afe304
setup.py
setup.py
from setuptools import setup, find_packages setup( name="selectivesearch", version="0.1", url="https://github.com/AlpacaDB/selectivesearch", description="Selective Search implementation for Python", author="AlpacaDB, Inc.", license='MIT', classifiers=[ 'Development Status :: 3 - Alp...
from setuptools import setup, find_packages setup( name="selectivesearch", version="0.2", url="https://github.com/AlpacaDB/selectivesearch", description="Selective Search implementation for Python", author="AlpacaDB, Inc.", license='MIT', classifiers=[ 'Development Status :: 3 - Alp...
Bump the version to 0.2
Bump the version to 0.2
Python
mit
AlpacaDB/selectivesearch
--- +++ @@ -2,7 +2,7 @@ setup( name="selectivesearch", - version="0.1", + version="0.2", url="https://github.com/AlpacaDB/selectivesearch", description="Selective Search implementation for Python", author="AlpacaDB, Inc.",
ad64d506a721b27150acdac300570235b4fc1f01
setup.py
setup.py
import sys from setuptools import setup from setuptools.command.test import test as TestCommand import schunk class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = '--doctest-modules --ignore setup.py' self.test_suite = True def run_...
import sys from setuptools import setup from setuptools.command.test import test as TestCommand import schunk class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = '--doctest-modules --ignore setup.py' self.test_suite = True def run_...
Add PySerial to the test requirements
Add PySerial to the test requirements It is needed for the doctests.
Python
mit
spatialaudio/schunk
--- +++ @@ -40,6 +40,6 @@ "Topic :: Scientific/Engineering", ], - tests_require=['pytest'], + tests_require=['pytest', 'pyserial'], cmdclass={'test': PyTest}, )
e060500e4979f918b507a6f7d12f8d25e2be318b
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from wonderful_bing import wonderful_bing try: import pypandoc long_description = pypandoc.convert('README.md','rst') except (IOError, ImportError): with open('README.md') as f: long_description = f.read() setup( name...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup from wonderful_bing import wonderful_bing try: import pypandoc long_description = pypandoc.convert('README.md','rst') except (IOError, ImportError): with open('README.md') as f: long_description = f.read() setup( name...
Change the command: wonderful_bing -> bing.
Change the command: wonderful_bing -> bing. Close #15
Python
mit
lord63/wonderful_bing
--- +++ @@ -35,6 +35,6 @@ include_package_data=True, entry_points={ 'console_scripts': [ - 'wonderful_bing=wonderful_bing.wonderful_bing:main'] + 'bing=wonderful_bing.wonderful_bing:main'] } )
4c0bbbe3072f3ae373cd1357daec7d064ec22dd2
setup.py
setup.py
from setuptools import setup setup(name='tfr', version='0.1', description='Time-frequency reassigned spectrograms', url='http://github.com/bzamecnik/tfr', author='Bohumir Zamecnik', author_email='bohumir.zamecnik@gmail.com', license='MIT', packages=['tfr'], zip_safe=Fals...
from setuptools import setup setup(name='tfr', version='0.2', description='Time-frequency reassigned spectrograms', url='http://github.com/bzamecnik/tfr', author='Bohumir Zamecnik', author_email='bohumir.zamecnik@gmail.com', license='MIT', packages=['tfr'], zip_safe=Fals...
Increment the version to 0.2.
Increment the version to 0.2.
Python
mit
bzamecnik/tfr,bzamecnik/tfr
--- +++ @@ -1,7 +1,7 @@ from setuptools import setup setup(name='tfr', - version='0.1', + version='0.2', description='Time-frequency reassigned spectrograms', url='http://github.com/bzamecnik/tfr', author='Bohumir Zamecnik',
9629f665d11131e045d366a828a356f3e8916492
setup.py
setup.py
from os.path import abspath, dirname, join, normpath from setuptools import setup setup( # Basic package information: name = 'django-heroku-postgresify', version = '0.4', py_modules = ('postgresify',), # Packaging options: zip_safe = False, include_package_data = True, # Package de...
from os.path import abspath, dirname, join, normpath from setuptools import setup setup( # Basic package information: name = 'django-heroku-postgresify', version = '0.4', py_modules = ('postgresify',), # Packaging options: zip_safe = False, include_package_data = True, # Package de...
Fix PyPI README.MD showing problem.
Fix PyPI README.MD showing problem. There is a problem in the project's PyPI page. To fix this I added the following line in the setup.py file: ```python long_description_content_type='text/markdown' ```
Python
unlicense
rdegges/django-heroku-postgresify
--- +++ @@ -25,6 +25,7 @@ keywords = 'django heroku cloud postgresql postgres db database awesome epic', description = 'Automatic Django database configuration on Heroku.', long_description = open(normpath(join(dirname(abspath(__file__)), - 'README.md'))).read() + 'README.md'))).read(), +...
385b280ccad9385d24d2ad3f892718c8302f8718
setup.py
setup.py
#!/usr/bin/env python3 # encoding: utf-8 from setuptools import setup, find_packages setup( name='pyatv', version='0.1.4', license='MIT', url='https://github.com/postlund/pyatv', author='Pierre Ståhl', author_email='pierre.staahl@gmail.com', description='Library for controlling an Apple TV...
#!/usr/bin/env python3 # encoding: utf-8 from setuptools import setup, find_packages setup( name='pyatv', version='0.1.5.dev1', license='MIT', url='https://github.com/postlund/pyatv', author='Pierre Ståhl', author_email='pierre.staahl@gmail.com', description='Library for controlling an App...
Bump to next dev 0.1.5.dev1
Bump to next dev 0.1.5.dev1
Python
mit
postlund/pyatv,postlund/pyatv
--- +++ @@ -5,7 +5,7 @@ setup( name='pyatv', - version='0.1.4', + version='0.1.5.dev1', license='MIT', url='https://github.com/postlund/pyatv', author='Pierre Ståhl',
31cf6e14f42b2703e410426e7f84ffc49457cbbb
setup.py
setup.py
#!/usr/bin/env python3 from setuptools import setup setup( name="Pelops", version="0.1", description="Car re-identification via deep learning", url="https://www.python.org/sigs/distutils-sig/", author="Lab41", author_email="lab41@iqt.org", license="Apache Software License", packages=["p...
#!/usr/bin/env python3 from setuptools import find_package from setuptools import setup setup( name="Pelops", version="0.1.1", description="Car re-identification via deep learning", url="https://www.python.org/sigs/distutils-sig/", author="Lab41", author_email="lab41@iqt.org", license="Apac...
Add automatic search for installable packages
Add automatic search for installable packages
Python
apache-2.0
dave-lab41/pelops,dave-lab41/pelops,Lab41/pelops,Lab41/pelops
--- +++ @@ -1,15 +1,16 @@ #!/usr/bin/env python3 +from setuptools import find_package from setuptools import setup setup( name="Pelops", - version="0.1", + version="0.1.1", description="Car re-identification via deep learning", url="https://www.python.org/sigs/distutils-sig/", author="L...
d81f621552b3cc1bb081faf491728ba59e0d1075
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='ecmcli', version...
#!/usr/bin/env python from setuptools import setup, find_packages README = 'README.md' def long_desc(): try: import pypandoc except ImportError: with open(README) as f: return f.read() else: return pypandoc.convert(README, 'rst') setup( name='ecmcli', version...
Add pip requirement for humanize.
Add pip requirement for humanize.
Python
mit
mayfield/ecmcli
--- +++ @@ -26,6 +26,7 @@ packages=find_packages(), install_requires=[ 'syndicate', + 'humanize' ], entry_points = { 'console_scripts': ['ecm=ecmcli.main:main'],
9051a84130aabe97f9f83176be443d79825f3dda
setup.py
setup.py
# -*- coding: utf-8 -*- # # Warthog - Simple client for A10 load balancers # # Copyright 2014 Smarter Travel # # Available under the MIT license. See LICENSE for details. # import codecs from setuptools import find_packages, setup import warthog AUTHOR = 'Smarter Travel' EMAIL = '' DESCRIPTION = 'Simple client for ...
# -*- coding: utf-8 -*- # # Warthog - Simple client for A10 load balancers # # Copyright 2014 Smarter Travel # # Available under the MIT license. See LICENSE for details. # import codecs from setuptools import find_packages, setup import warthog AUTHOR = 'Smarter Travel' EMAIL = '' DESCRIPTION = 'Simple client for ...
Make github project page the project URL
Make github project page the project URL
Python
mit
smarter-travel-media/warthog
--- +++ @@ -16,7 +16,7 @@ AUTHOR = 'Smarter Travel' EMAIL = '' DESCRIPTION = 'Simple client for A10 load balancers' -URL = 'https://warthog.readthedocs.org/' +URL = 'https://github.com/smarter-travel-media/warthog' LICENSE = 'MIT' CLASSIFIERS = [ "Development Status :: 2 - Pre-Alpha",
089c1a2b8645d7e3db13f2c4a73cfcd3925dc4c2
setup.py
setup.py
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='arbeiter', version=version, description="An unassuming work queue system", long_description="""\ A work queue system built using Kestrel""", classifiers=[], # Get strings from http://pypi.python.org/pypi?%3A...
from setuptools import setup, find_packages import sys, os version = '0.0' setup(name='arbeiter', version=version, description="An unassuming work queue system", long_description="""\ A work queue system built using Kestrel""", classifiers=[], # Get strings from http://pypi.python.org/pypi?%3A...
Set the version to 0.0 to let people know that this is ever changing
Set the version to 0.0 to let people know that this is ever changing
Python
bsd-2-clause
ericmoritz/arbeiter
--- +++ @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import sys, os -version = '0.1' +version = '0.0' setup(name='arbeiter', version=version,
99fae00aca7bb28b0915664698937e2464e92eb4
setup.py
setup.py
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() CHANGES = open(os.path.join(here, 'CHANGES.md')).read() requires = [ 'pycrypto', 'requests>=2.5.1', 'six', ] setup(name='launchkey-python', ...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() CHANGES = open(os.path.join(here, 'CHANGES.md')).read() requires = [ 'pycrypto >= 2.6.1', 'pycrypto < 3.0.0', 'requests >= 2.5.1', 'requests < 3.0.0', ...
Update package restrictions for clarity and testing
Update package restrictions for clarity and testing
Python
mit
LaunchKey/launchkey-python,iovation/launchkey-python
--- +++ @@ -7,9 +7,9 @@ CHANGES = open(os.path.join(here, 'CHANGES.md')).read() requires = [ - 'pycrypto', - 'requests>=2.5.1', - 'six', + 'pycrypto >= 2.6.1', 'pycrypto < 3.0.0', + 'requests >= 2.5.1', 'requests < 3.0.0', + 'six >= 1.10.0', 'six < 2.0.0', ] setup(name='launchkey-python'...
a3053c843a5709d3fd0fe1dc6c93f369dc101d8b
setup.py
setup.py
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='ckan-service-provider', version=version, description="A server that can server jobs at services.", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_cla...
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='ckanserviceprovider', version=version, description="A server that can server jobs at services.", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_class...
Rename the package so that it does not contain -
Rename the package so that it does not contain -
Python
agpl-3.0
ESRC-CDRC/ckan-service-provider,datawagovau/ckan-service-provider,deniszgonjanin/ckan-service-provider,ckan/ckan-service-provider
--- +++ @@ -3,7 +3,7 @@ version = '0.1' -setup(name='ckan-service-provider', +setup(name='ckanserviceprovider', version=version, description="A server that can server jobs at services.", long_description="""\
203fd6173cdc27d32c57db7c0a0bdd7335cfa885
setup.py
setup.py
from distutils.core import setup import skyfield # safe, because __init__.py contains no import statements setup( name='skyfield', version=skyfield.__version__, description=skyfield.__doc__.split('\n', 1)[0], long_description=open('README.rst').read(), license='MIT', author='Brandon Rhodes', ...
from distutils.core import setup import skyfield # safe, because __init__.py contains no import statements setup( name='skyfield', version=skyfield.__version__, description=skyfield.__doc__.split('\n', 1)[0], long_description=open('README.rst').read(), license='MIT', author='Brandon Rhodes', ...
Update trove to remove Python 3.2, add Python 3.5
Update trove to remove Python 3.2, add Python 3.5
Python
mit
ozialien/python-skyfield,skyfielders/python-skyfield,ozialien/python-skyfield,skyfielders/python-skyfield
--- +++ @@ -18,9 +18,9 @@ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python ...
32eccc0c3d8ec0ba19e507d538c1f5cc5f6baaf5
setup.py
setup.py
import sys import setuptools with open("README.md", "r") as fh: long_description = fh.read() packages = setuptools.find_namespace_packages(include=['simple_parsing*']) print("PACKAGES FOUND:", packages) print(sys.version_info) setuptools.setup( name="simple_parsing", version="0.0.12.post5", author="Fa...
import sys import setuptools with open("README.md", "r") as fh: long_description = fh.read() packages = setuptools.find_namespace_packages(include=['simple_parsing*']) print("PACKAGES FOUND:", packages) print(sys.version_info) setuptools.setup( name="simple_parsing", version="0.0.12.post6", author="Fa...
Upgrade version to 0.0.12.post6 (choice_dict)
Upgrade version to 0.0.12.post6 (choice_dict) Signed-off-by: Fabrice Normandin <ee438dab901b32439200d6bb23a0e635234ed3f0@gmail.com>
Python
mit
lebrice/SimpleParsing
--- +++ @@ -9,7 +9,7 @@ setuptools.setup( name="simple_parsing", - version="0.0.12.post5", + version="0.0.12.post6", author="Fabrice Normandin", author_email="fabrice.normandin@gmail.com", description="A small utility for simplifying and cleaning up argument parsing scripts.",
f8359081afadf6a653b5df3d28d4a6676c9c6860
setup.py
setup.py
from distutils.core import setup import skyfield # to learn the version setup( name='skyfield', version=skyfield.__version__, description=skyfield.__doc__, long_description=open('README.rst').read(), license='MIT', author='Brandon Rhodes', author_email='brandon@rhodesmill.org', url='ht...
from distutils.core import setup import skyfield # to learn the version setup( name='skyfield', version=skyfield.__version__, description=skyfield.__doc__, long_description=open('README.rst').read(), license='MIT', author='Brandon Rhodes', author_email='brandon@rhodesmill.org', url='ht...
Add de421 as an install dependency
Add de421 as an install dependency
Python
mit
exoanalytic/python-skyfield,skyfielders/python-skyfield,ozialien/python-skyfield,GuidoBR/python-skyfield,GuidoBR/python-skyfield,skyfielders/python-skyfield,ozialien/python-skyfield,exoanalytic/python-skyfield
--- +++ @@ -17,5 +17,5 @@ 'Topic :: Scientific/Engineering :: Astronomy', ], packages=[ 'skyfield', 'skyfield.tests' ], - install_requires=['jplephem', 'numpy', 'sgp4'], + install_requires=['de421', 'jplephem', 'numpy', 'sgp4'], )
4542499e53a228665caa519585ef8afe584ef388
setup.py
setup.py
from setuptools import setup, find_packages setup( name='cosmo', version='0.0.1', description='Monitors for HST/COS', keywords=['astronomy'], classifiers=[ 'Programming Language :: Python :: 3', 'License :: BSD-3 :: Association of Universities for Research in Astronomy', 'Op...
from setuptools import setup, find_packages setup( name='cosmo', version='0.0.1', description='Monitors for HST/COS', keywords=['astronomy'], classifiers=[ 'Programming Language :: Python :: 3', 'License :: BSD-3 :: Association of Universities for Research in Astronomy', 'Op...
Add entry point for monitor runner.
Add entry point for monitor runner.
Python
bsd-3-clause
justincely/cos_monitoring
--- +++ @@ -27,5 +27,10 @@ 'calcos', 'crds', 'monitorframe @ git+https://github.com/spacetelescope/monitor-framework#egg=monitorframe' - ] + ], + entry_points={ + 'console_scripts': + ['run_monitors=cosmo.run_monitors:runner'] + }, + package_data={'cosmo': [...
c4f2946f67784c24c2364821a2ba93773ac96e88
setup.py
setup.py
try: from setuptools import setup except: from distutils.core import setup import forms setup( name='forms', version=forms.version, description='HTML forms framework for Nevow', author='Matt Goodall', author_email='matt@pollenation.net', packages=['forms', 'forms.test'], )
try: from setuptools import setup except: from distutils.core import setup from distutils.command import install import forms for scheme in install.INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] setup( name='forms', version=forms.version, description='HTML forms framework for Ne...
Include forms.css in the package
Include forms.css in the package
Python
mit
emgee/formal,emgee/formal,emgee/formal
--- +++ @@ -2,8 +2,12 @@ from setuptools import setup except: from distutils.core import setup +from distutils.command import install import forms + +for scheme in install.INSTALL_SCHEMES.values(): + scheme['data'] = scheme['purelib'] setup( name='forms', @@ -12,4 +16,7 @@ author='Matt G...
bd255f89c5958e73fcb715a78950e7065facb7cf
setup.py
setup.py
""" Setup script for PyPI """ import os import sys from setuptools import setup from ConfigParser import SafeConfigParser settings = SafeConfigParser() settings.read(os.path.realpath('dynamic_dynamodb/dynamic-dynamodb.conf')) def return_requires(): install_requires = [ 'boto >= 2.29.1', 'requests...
""" Setup script for PyPI """ import os import sys from setuptools import setup from ConfigParser import SafeConfigParser settings = SafeConfigParser() settings.read(os.path.realpath('dynamic_dynamodb/dynamic-dynamodb.conf')) def return_requires(): install_requires = [ 'boto >= 2.29.1', 'requests...
Fix installation on Python < 2.7
Fix installation on Python < 2.7 When the install_requires array was moved, a erroneous trailing comma was left, turning it into a tuple which cannot be appended to. Removing the comma allows installation on Python 2.6 which is what CloudFormation uses.
Python
apache-2.0
sebdah/dynamic-dynamodb,acquiachrisnagy/dynamic-dynamodb,Lead-iD/dynamic-dynamodb,qqshfox/dynamic-dynamodb,Spokeo/dynamic-dynamodb
--- +++ @@ -14,7 +14,7 @@ 'requests >= 0.14.1', 'logutils >= 0.3.3', 'retrying >= 1.3.3' - ], + ] if sys.version_info < (2, 7): install_requires.append('ordereddict >= 1.1') return install_requires
9802a48572c939d80ba226c9d2c903825938653f
setup.py
setup.py
from setuptools import find_packages, setup version = '6.0.0' install_requires = ( 'djangorestframework>=2.4.4,<3', 'incuna_mail>=2.0.0,<3', ) extras_require = { 'avatar': [ 'django-imagekit>=3.2', ], 'utils': [ 'raven>=5.1.1', ], } setup( name='django-user-management',...
from setuptools import find_packages, setup version = '6.0.0' install_requires = ( 'djangorestframework>=2.4.4,<3', 'incuna_mail>=2.0.0,<=3.0.0', ) extras_require = { 'avatar': [ 'django-imagekit>=3.2', ], 'utils': [ 'raven>=5.1.1', ], } setup( name='django-user-managem...
Add support for incuna_mail 3.0.0
Add support for incuna_mail 3.0.0
Python
bsd-2-clause
incuna/django-user-management,incuna/django-user-management
--- +++ @@ -6,7 +6,7 @@ install_requires = ( 'djangorestframework>=2.4.4,<3', - 'incuna_mail>=2.0.0,<3', + 'incuna_mail>=2.0.0,<=3.0.0', ) extras_require = {
8a3aedad773a0899ceb85377faab658bc0dfdcb4
setup.py
setup.py
from setuptools import setup, find_packages VERSION = '1.1.4' setup( name="puresnmp", version=VERSION, description="Pure Python SNMP implementation", long_description=open("README.rst").read(), author="Michel Albert", author_email="michel@albert.lu", provides=['puresnmp'], license="MIT...
from setuptools import setup, find_packages from os.path import dirname, abspath HERE = abspath(dirname(__file__)) VERSION = open(HERE + '/puresnmp/version.txt').read().strip() setup( name="puresnmp", version=VERSION, description="Pure Python SNMP implementation", long_description=open(HERE + "/README...
Revert "Another attempt to fix the RTD build."
Revert "Another attempt to fix the RTD build." This reverts commit 43807c085493962ca0f79105b64b3be8ddc6fc39.
Python
mit
exhuma/puresnmp,exhuma/puresnmp
--- +++ @@ -1,12 +1,14 @@ from setuptools import setup, find_packages +from os.path import dirname, abspath -VERSION = '1.1.4' +HERE = abspath(dirname(__file__)) +VERSION = open(HERE + '/puresnmp/version.txt').read().strip() setup( name="puresnmp", version=VERSION, description="Pure Python SNMP i...
26c3f786064923f0ac099de645289ff75014b354
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup this_dir = os.path.abspath(os.path.dirname(__file__)) VERSIONFILE = os.path.join(this_dir, "textx", "__init__.py") VERSION = None for line in open(VERSIONFILE, "r").readlines(): if line.startswith('__version__'): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup this_dir = os.path.abspath(os.path.dirname(__file__)) VERSIONFILE = os.path.join(this_dir, "textx", "__init__.py") VERSION = None for line in open(VERSIONFILE, "r").readlines(): if line.startswith('__version__'): ...
Revert note to tag the version after publish
Revert note to tag the version after publish
Python
mit
igordejanovic/textX,igordejanovic/textX,igordejanovic/textX
--- +++ @@ -27,6 +27,9 @@ os.system("twine upload -r test dist/*") else: os.system("twine upload dist/*") + print("You probably want to also tag the version now:") + print(" git tag -a {0} -m 'version {0}'".format(VERSION)) + print(" git push --tags") sys.exit() s...
6f965f0014922560de20f725c76ca4060856cb77
setup.py
setup.py
#!/usr/bin/env python import sys import os try: from setuptools import setup except ImportError: from distutils.core import setup import bottle setup(name='Bottle-Async', version=bottle.__version__, description='A fork of Bottle to add support for asyncio.', long_description=bottle.__doc__...
#!/usr/bin/env python import sys import os try: from setuptools import setup except ImportError: from distutils.core import setup setup(name='Bottle-Async', version="0.13-dev", description='A fork of Bottle to add support for asyncio.', long_description="", author="Marcel Hellkamp, Do...
Fix bottle import that won't work with deps
Fix bottle import that won't work with deps
Python
mit
mrdon/bottle,mrdon/bottle
--- +++ @@ -8,13 +8,11 @@ from distutils.core import setup -import bottle - setup(name='Bottle-Async', - version=bottle.__version__, + version="0.13-dev", description='A fork of Bottle to add support for asyncio.', - long_description=bottle.__doc__, - author=bottle.__author__ + ",...
e9fe645af28bd93a6ee2b38184254c8295b70d3d
sn.py
sn.py
import tables as tb hdf5_filename = 'hdf5/sn_data.h5' class SN(object): """A supernova is the explosion that ends the life of a star The SN needs to be conatained within the HDF5 database before it is used by SNoBoL. Once there, simply create a supernova by calling the constructor with the name of the...
import tables as tb hdf5_filename = 'hdf5/sn_data.h5' class SN(object): """A supernova is the explosion that ends the life of a star The SN needs to be conatained within the HDF5 database before it is used by SNoBoL. Once there, simply create a supernova by calling the constructor with the name of the...
Add method to check for the SN in the HDF5 file
Add method to check for the SN in the HDF5 file
Python
mit
JALusk/SuperBoL,JALusk/SNoBoL,JALusk/SNoBoL
--- +++ @@ -30,8 +30,5 @@ def read_hdf5(self): h5file = tb.open_file(hdf5_filename) - # Check that the desired SN is in the HDF5 file - if self.name in h5file.list_nodes('/sn')._v_name: - print "Yay!" - else: - print "Boo!" + # Get the desired n...
0524a403bb2d4d26f28f535bcadcfc3fdd0a9484
hr_attendance_calendar/__manifest__.py
hr_attendance_calendar/__manifest__.py
# -*- coding: utf-8 -*- # © 2016 Coninckx David (Open Net Sarl) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Attendance - Calendar', 'summary': 'Compute extra hours based on attendances', 'category': 'Human Resources', 'author': "CompassionCH, Open Net Sàrl", 'depends'...
# -*- coding: utf-8 -*- # © 2016 Coninckx David (Open Net Sarl) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Attendance - Calendar', 'summary': 'Compute extra hours based on attendances', 'category': 'Human Resources', 'author': "CompassionCH, Open Net Sàrl", 'depends'...
FIX - remove inconsistent dependence
FIX - remove inconsistent dependence
Python
agpl-3.0
maxime-beck/compassion-modules,ecino/compassion-modules,eicher31/compassion-modules,maxime-beck/compassion-modules,CompassionCH/compassion-modules,eicher31/compassion-modules,maxime-beck/compassion-modules,ecino/compassion-modules,CompassionCH/compassion-modules,eicher31/compassion-modules,eicher31/compassion-modules,C...
--- +++ @@ -9,7 +9,6 @@ 'author': "CompassionCH, Open Net Sàrl", 'depends': [ 'hr', - 'hr_employee', 'hr_attendance', 'hr_holidays', 'hr_public_holidays'
3fbec65f39295eb45211e33f0452b1076541cbc1
etl/csv/__init__.py
etl/csv/__init__.py
import overview import personnel import match import events import statistics CSV_ETL_CLASSES = { 'Overview': { 'Competitions': overview.CompetitionIngest, 'Clubs': overview.ClubIngest, 'Venues': overview.VenueIngest }, 'Personnel': { 'Players': personnel.PlayerIngest, ...
Create dictionary to map ETL data files to ingestion classes
Create dictionary to map ETL data files to ingestion classes
Python
mit
soccermetrics/marcotti
--- +++ @@ -0,0 +1,62 @@ +import overview +import personnel +import match +import events +import statistics + + +CSV_ETL_CLASSES = { + 'Overview': { + 'Competitions': overview.CompetitionIngest, + 'Clubs': overview.ClubIngest, + 'Venues': overview.VenueIngest + }, + 'Personnel': { + ...
a0907ff742c81b676f602d1e17d820152f95d22e
django_docs/urls.py
django_docs/urls.py
from django.conf.urls import patterns, url, include from docs.sitemaps import DocsSitemap from docs.urls import urlpatterns as docs_urlpatterns sitemaps = {'docs': DocsSitemap} urlpatterns = patterns('', url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), ) + docs_urlpatterns...
from django.conf.urls import patterns, url, include from django.http import HttpResponse from docs.sitemaps import DocsSitemap from docs.urls import urlpatterns as docs_urlpatterns sitemaps = {'docs': DocsSitemap} urlpatterns = docs_urlpatterns + patterns('', url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views...
Add validation URL for Google Webmaster Tools.
Add validation URL for Google Webmaster Tools.
Python
bsd-3-clause
hassanabidpk/djangoproject.com,hassanabidpk/djangoproject.com,gnarf/djangoproject.com,rmoorman/djangoproject.com,vxvinh1511/djangoproject.com,rmoorman/djangoproject.com,nanuxbe/django,vxvinh1511/djangoproject.com,relekang/djangoproject.com,alawnchen/djangoproject.com,rmoorman/djangoproject.com,django/djangoproject.com,...
--- +++ @@ -1,10 +1,12 @@ from django.conf.urls import patterns, url, include +from django.http import HttpResponse from docs.sitemaps import DocsSitemap from docs.urls import urlpatterns as docs_urlpatterns sitemaps = {'docs': DocsSitemap} -urlpatterns = patterns('', +urlpatterns = docs_urlpatterns + patte...
d1b7b629218830e4b7c584fc1c0804a3b9ee553a
src/vault.py
src/vault.py
from fabric.api import task, local from buildercore import project import utils import sys import logging LOG = logging.getLogger(__name__) def vault_addr(): defaults, _ = project.raw_project_map() return defaults['aws']['vault']['address'] def vault_policy(): return 'builder-user' @task def login(): ...
from fabric.api import task, local from buildercore import project import utils import sys import logging LOG = logging.getLogger(__name__) def vault_addr(): defaults, _ = project.raw_project_map() return defaults['aws']['vault']['address'] def vault_policy(): return 'builder-user' @task def login(): ...
Add warning about root token necessity
Add warning about root token necessity
Python
mit
elifesciences/builder,elifesciences/builder
--- +++ @@ -29,6 +29,7 @@ @task def token_create(): + print("Warning: you should be authenticated with a root token to effectively create a new token here") token = utils.get_input('token display name: ') if not token or not token.strip(): print("a token display name is required")
7cc3d10b829b51825e6f670fb0f3d29b54a8ead1
trustyuri/rdf/TransformRdf.py
trustyuri/rdf/TransformRdf.py
import sys, logging from rdflib.graph import ConjunctiveGraph from trustyuri.rdf import RdfUtils, RdfTransformer from rdflib.term import URIRef import os def transform(args): filename = args[0] baseuristr = args[1] with open(filename, "r") as f: rdfFormat = RdfUtils.get_format(filename) ...
import sys, logging from rdflib.graph import ConjunctiveGraph from trustyuri.rdf import RdfUtils, RdfTransformer from rdflib.term import URIRef import os def transform(args): filename = args[0] baseuristr = args[1] with open(filename, "r") as f: rdfFormat = RdfUtils.get_format(filename) ...
Add newline to end of file
Add newline to end of file
Python
mit
trustyuri/trustyuri-python,trustyuri/trustyuri-python
a39b7b2b9b0c9179d3aedcc29286cdcebf568d54
tests.py
tests.py
#!/usr/bin/env python ''' Copyright 2009 Slide, Inc. ''' import unittest import pyecc DEFAULT_DATA = 'This message will be signed\n' DEFAULT_SIG = '$HPI?t(I*1vAYsl$|%21WXND=6Br*[>k(OR9B!GOwHqL0s+3Uq' DEFAULT_PUBKEY = '8W;>i^H0qi|J&$coR5MFpR*Vn' DEFAULT_PRIVKEY = 'my private key' class ECC_Verify_Tests(unittest...
#!/usr/bin/env python ''' Copyright 2009 Slide, Inc. ''' import unittest import pyecc DEFAULT_DATA = 'This message will be signed\n' DEFAULT_SIG = '$HPI?t(I*1vAYsl$|%21WXND=6Br*[>k(OR9B!GOwHqL0s+3Uq' DEFAULT_PUBKEY = '8W;>i^H0qi|J&$coR5MFpR*Vn' DEFAULT_PRIVKEY = 'my private key' class ECC_Verify_Tests(unittest...
Implement a bad sig test
Implement a bad sig test
Python
lgpl-2.1
rtyler/PyECC,slideinc/PyECC,rtyler/PyECC,slideinc/PyECC
--- +++ @@ -14,10 +14,16 @@ DEFAULT_PRIVKEY = 'my private key' class ECC_Verify_Tests(unittest.TestCase): + def setUp(self): + super(ECC_Verify_Tests, self).setUp() + self.ecc = pyecc.ECC(public=DEFAULT_PUBKEY, private=DEFAULT_PRIVKEY) + def test_BasicVerification(self): - ecc = pyecc...
109b753c807dae30ee736a6f071a058fa8b68d92
tests/scoring_engine/web/views/test_services.py
tests/scoring_engine/web/views/test_services.py
from tests.scoring_engine.web.web_test import WebTest class TestServices(WebTest): def test_auth_required_services(self): self.verify_auth_required('/services') def test_auth_required_service_id(self): self.verify_auth_required('/service/1')
from tests.scoring_engine.web.web_test import WebTest from tests.scoring_engine.helpers import generate_sample_model_tree class TestServices(WebTest): def set_team_color(self, team, color): team.color = color self.session.add(team) self.session.commit() def set_blue_team(self, team):...
Update tests for services view
Update tests for services view
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
--- +++ @@ -1,10 +1,57 @@ from tests.scoring_engine.web.web_test import WebTest +from tests.scoring_engine.helpers import generate_sample_model_tree class TestServices(WebTest): + + def set_team_color(self, team, color): + team.color = color + self.session.add(team) + self.session.commit...
ccf4ceab6fafb6f32668500f913eb256106bcc34
test/integration/console_scripts_test.py
test/integration/console_scripts_test.py
"""Test the PUDL console scripts from within PyTest.""" import pytest @pytest.mark.parametrize( "script_name", [ "pudl_setup", "pudl_datastore", "ferc1_to_sqlite", "pudl_etl", "datapkg_to_sqlite", "epacems_to_parquet", "pudl_territories", ]) @pytest.mar...
"""Test the PUDL console scripts from within PyTest.""" import pkg_resources import pytest # Obtain a list of all deployed entry point scripts to test: PUDL_SCRIPTS = [ ep.name for ep in pkg_resources.iter_entry_points('console_scripts') if ep.module_name.startswith("pudl") ] @pytest.mark.parametrize("scrip...
Automate generation of list of console scripts to test.
Automate generation of list of console scripts to test.
Python
mit
catalyst-cooperative/pudl,catalyst-cooperative/pudl
--- +++ @@ -1,20 +1,18 @@ """Test the PUDL console scripts from within PyTest.""" +import pkg_resources import pytest +# Obtain a list of all deployed entry point scripts to test: +PUDL_SCRIPTS = [ + ep.name for ep in pkg_resources.iter_entry_points('console_scripts') + if ep.module_name.startswith("pudl"...
ea6a84cee4f452f4503c6ce0fdd04b77d9017bdd
tinyblog/management/commands/import_tinyblog.py
tinyblog/management/commands/import_tinyblog.py
from django.core.management.base import BaseCommand, CommandError from django.core import serializers import requests from tinyblog.models import Post class Command(BaseCommand): args = 'url' help = u'Fetches blog entries from <url>, and loads them into tinyblog.' def handle(self, *args, **options): ...
from django.core.management.base import BaseCommand, CommandError from django.core import serializers import requests from requests import exceptions from tinyblog.models import Post class Command(BaseCommand): args = 'url' help = u'Fetches blog entries from <url>, and loads them into tinyblog.' def hand...
Fix for bad URL schemes
Fix for bad URL schemes
Python
bsd-3-clause
dominicrodger/tinyblog,dominicrodger/tinyblog
--- +++ @@ -1,6 +1,7 @@ from django.core.management.base import BaseCommand, CommandError from django.core import serializers import requests +from requests import exceptions from tinyblog.models import Post @@ -14,7 +15,10 @@ url = args[0] - r = requests.get(url) + try: + ...
09d33da8657ec4c86855032f5ae16566c12fc2a5
l10n_br_coa/models/l10n_br_account_tax_template.py
l10n_br_coa/models/l10n_br_account_tax_template.py
# Copyright 2020 KMEE # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class L10nBrAccountTaxTemplate(models.Model): _name = 'l10n_br_account.tax.template' _inherit = 'account.tax.template' chart_template_id = fields.Many2one(required=False) def create...
# Copyright 2020 KMEE # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class L10nBrAccountTaxTemplate(models.Model): _name = 'l10n_br_account.tax.template' _inherit = 'account.tax.template' chart_template_id = fields.Many2one(required=False) def create...
Create account.tax.template with external ids
[ADD] Create account.tax.template with external ids
Python
agpl-3.0
akretion/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil
--- +++ @@ -12,8 +12,11 @@ def create_account_tax_templates(self, chart_template_id): self.ensure_one() - account_tax_template_data = {'chart_template_id': chart_template_id} - account_tax_template_data.update({ - field: self[field] - for field in self._fields if se...
e745cbd16cd2eef2a5805aa7bd113bcaf147af4e
waterfall_wall/serializers.py
waterfall_wall/serializers.py
from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Image fields = ('path', 'url', 'nude_percent')
from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): url = serializers.SerializerMethodField() def get_url(self, obj): return obj.path.url class Meta: ...
Correct the url format of image API
Correct the url format of image API
Python
mit
carlcarl/rcard,carlcarl/rcard
--- +++ @@ -4,6 +4,11 @@ class ImageSerializer(serializers.HyperlinkedModelSerializer): + url = serializers.SerializerMethodField() + + def get_url(self, obj): + return obj.path.url + class Meta: model = Image - fields = ('path', 'url', 'nude_percent') + fields = ('url', ...
8c52f7d65d460dbe659256ed54eb4b60f702bab3
healthcheck/contrib/django/status_endpoint/views.py
healthcheck/contrib/django/status_endpoint/views.py
import json from django.conf import settings from django.views.decorators.http import require_http_methods from django.http import HttpResponse from healthcheck.healthcheck import ( DjangoDBsHealthCheck, FilesDontExistHealthCheck, HealthChecker) class JsonResponse(HttpResponse): def __init__(self, data, **k...
import json from django.conf import settings from django.views.decorators.http import require_http_methods from django.http import HttpResponse from healthcheck.healthcheck import ( DjangoDBsHealthCheck, FilesDontExistHealthCheck, HealthChecker) class JsonResponse(HttpResponse): def __init__(self, data, **k...
Add empty default for STATUS_CHECK_FILES setting
Add empty default for STATUS_CHECK_FILES setting Given that: * The line caused an attribute error if the setting wasn't defined, * The use of getattr was pointless as written since normal attribute access would have worked fine, * `dict.get` has a default of `None` without having to specify it, and * The line was foll...
Python
mit
yola/healthcheck
--- +++ @@ -26,7 +26,7 @@ if getattr(settings, 'STATUS_CHECK_DBS', True): checks.append(DjangoDBsHealthCheck()) - files_to_check = getattr(settings, 'STATUS_CHECK_FILES') + files_to_check = getattr(settings, 'STATUS_CHECK_FILES', None) if files_to_check: checks.append(FilesDontExis...
35c97d14eede0e48a0daff8e7f04aeba09f02268
get.py
get.py
from requests import get from bs4 import BeautifulSoup as BS from os.path import exists url = "https://www.projecteuler.net/problem=%d" def get_info(i): soup = BS(get(url % i, verify=False).content) problem = soup.find(id="content") title = problem.h2.string content = problem.find(class_="problem_co...
from requests import get from bs4 import BeautifulSoup as BS from os.path import exists from multiprocessing import Pool url = "https://www.projecteuler.net/problem=%d" def get_info(i): soup = BS(get(url % i, verify=False).content) problem = soup.find(id="content") title = problem.h2.string content ...
Use multiprocessing.Pool to speed up
Use multiprocessing.Pool to speed up
Python
mit
zlsun/ProjectEuler
--- +++ @@ -2,6 +2,7 @@ from requests import get from bs4 import BeautifulSoup as BS from os.path import exists +from multiprocessing import Pool url = "https://www.projecteuler.net/problem=%d" @@ -39,10 +40,12 @@ def save_all(i, j): - map(save, range(i, j + 1)) + p = Pool() + p.map(save, range(...
eddd7f856c7dc423c387d496a87cf5fdf941215b
helpers/visited_thread_set.py
helpers/visited_thread_set.py
class VisitedThreadSet(): set = None def __init__(self): pass def load(self): pass def save(self): pass def add_thread(self): pass def check_thread_exists(self): pass
class VisitedThreadSet(): set = None def __init__(self): self.set = set() def load_set(self): pass def save_set(self): pass def add(self, value): self.set.add(str(value)) def contains(self, value): if str(value) in self.set: return True ...
Add value to VisitedThreadSet or check if it exists
New: Add value to VisitedThreadSet or check if it exists
Python
mit
AFFogarty/SEP-Bot,AFFogarty/SEP-Bot
--- +++ @@ -4,16 +4,19 @@ set = None def __init__(self): + self.set = set() + + def load_set(self): pass - def load(self): + def save_set(self): pass - def save(self): - pass + def add(self, value): + self.set.add(str(value)) - def add_thread(...
25bfdfccc89c8150ea8bc4a024415861808d4a6e
fabfile/__init__.py
fabfile/__init__.py
""" Fabric's own fabfile. """ from __future__ import with_statement import nose from fabric.api import * import docs, tag from utils import msg @task(default=True) def test(args=None): """ Run all unit tests and doctests. Specify string argument ``args`` for additional args to ``nosetests``. """ ...
""" Fabric's own fabfile. """ from __future__ import with_statement import nose from fabric.api import * import docs, tag from utils import msg @task(default=True) def test(args=None): """ Run all unit tests and doctests. Specify string argument ``args`` for additional args to ``nosetests``. """ ...
Fix test runner to exit correctly.
Fix test runner to exit correctly. The attempt at catching ImportError-driven exits seemed broken, so nuked it. Bah.
Python
bsd-2-clause
fernandezcuesta/fabric,xLegoz/fabric,tolbkni/fabric,askulkarni2/fabric,hrubi/fabric,StackStorm/fabric,cgvarela/fabric,bitprophet/fabric,mathiasertl/fabric,jaraco/fabric,cmattoon/fabric,rbramwell/fabric,rodrigc/fabric,rane-hs/fabric-py3,MjAbuz/fabric,bitmonk/fabric,kmonsoor/fabric,tekapo/fabric,sdelements/fabric,qinrong...
--- +++ @@ -21,10 +21,7 @@ """ default_args = "-sv --with-doctest --nologcapture --with-color" default_args += (" " + args) if args else "" - try: - nose.core.run(argv=[''] + default_args.split()) - except SystemExit: - abort("Nose encountered an error; you may be missing newly adde...
72870bfe77e7e8669cc4ed46e112e0710dabc609
Koko/views.py
Koko/views.py
#!/usr/bin/python # -*- coding: UTF-8 -*- from flask import render_template from base import app @app.route('/', methods = ['GET']) @app.route('/koko', methods = ['GET']) def start(): ''' Returns a landing page. ''' return render_template('start.html')
#!/usr/bin/python # -*- coding: UTF-8 -*- import requests from hashlib import md5 from flask import request, render_template, Response from base import app, cache @app.route('/', methods = ['GET']) @app.route('/koko', methods = ['GET']) def start(): ''' Returns a landing page. ''' return render_template('start.ht...
Add a wrapper route to LLTK-RESTful
Add a wrapper route to LLTK-RESTful
Python
agpl-3.0
lltk/Koko,lltk/Koko
--- +++ @@ -1,8 +1,11 @@ #!/usr/bin/python # -*- coding: UTF-8 -*- -from flask import render_template -from base import app +import requests +from hashlib import md5 + +from flask import request, render_template, Response +from base import app, cache @app.route('/', methods = ['GET']) @app.route('/koko', meth...
a20fc95d3a4dc194ef4f6d227976ff5bba229aaa
feincms/__init__.py
feincms/__init__.py
VERSION = (1, 4, 2) __version__ = '.'.join(map(str, VERSION)) class LazySettings(object): def _load_settings(self): from feincms import default_settings from django.conf import settings as django_settings for key in dir(default_settings): if not key.startswith(('FEINCMS_', '_H...
VERSION = (1, 4, 2) __version__ = '.'.join(map(str, VERSION)) class LazySettings(object): def _load_settings(self): from feincms import default_settings from django.conf import settings as django_settings for key in dir(default_settings): if not (key.startswith('FEINCMS_') or ...
Fix a Python 2.4 incompatibility that snuck in
Fix a Python 2.4 incompatibility that snuck in Fixes github issue #214
Python
bsd-3-clause
matthiask/django-content-editor,nickburlett/feincms,matthiask/django-content-editor,matthiask/feincms2-content,michaelkuty/feincms,matthiask/feincms2-content,pjdelport/feincms,mjl/feincms,joshuajonah/feincms,matthiask/django-content-editor,feincms/feincms,nickburlett/feincms,nickburlett/feincms,mjl/feincms,joshuajonah/...
--- +++ @@ -8,7 +8,7 @@ from django.conf import settings as django_settings for key in dir(default_settings): - if not key.startswith(('FEINCMS_', '_HACK_')): + if not (key.startswith('FEINCMS_') or key.startswith('_HACK_')): continue setattr(s...
169d5b56ab5936a785ae501a91005fcfe3af6674
ibmcnx/test/test.py
ibmcnx/test/test.py
#import ibmcnx.test.loadFunction import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() def loadFilesService(): global globdict execfile( "filesAdmin.py", globdict ) ibmcnx.test.loadFunction.loadF...
#import ibmcnx.test.loadFunction import sys from java.lang import String from java.util import HashSet from java.util import HashMap import java import lotusConnectionsCommonAdmin globdict = globals() def loadFilesService(): global globdict execfile( "filesAdmin.py", globdict ) loadFilesService() FilesPolic...
Customize scripts to work with menu
Customize scripts to work with menu
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
--- +++ @@ -12,6 +12,6 @@ global globdict execfile( "filesAdmin.py", globdict ) -ibmcnx.test.loadFunction.loadFilesService() +loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 )
d7ca978c696deb13c53fc3fdc9d227d0836b97f8
test/data/testCC.py
test/data/testCC.py
# -*- coding: utf-8 -*- # # Copyright (c) 2017, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Test coupled cluster logfiles""" import os import unittest import numpy __filedir__ = os.path.realpath(os.path.dirna...
# -*- coding: utf-8 -*- # # Copyright (c) 2017, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Test coupled cluster logfiles""" import os import unittest import numpy __filedir__ = os.path.realpath(os.path.dirna...
Test size and shape of ccenergies
Test size and shape of ccenergies
Python
bsd-3-clause
berquist/cclib,berquist/cclib,cclib/cclib,ATenderholt/cclib,ATenderholt/cclib,langner/cclib,cclib/cclib,berquist/cclib,cclib/cclib,langner/cclib,langner/cclib
--- +++ @@ -18,6 +18,11 @@ class GenericCCTest(unittest.TestCase): """Generic coupled cluster unittest""" + def testsizeandshape(self): + """Are the dimensions of ccenergies correct?""" + self.assertEqual(self.data.ccenergies.shape, + (len(self.data.scfenergies),)) + ...
16acf6dba180d17b142e5799f62e59a2771099fa
numscons/checkers/__init__.py
numscons/checkers/__init__.py
from blas_lapack_checkers import CheckCLAPACK, CheckCBLAS, CheckF77BLAS, CheckF77LAPACK from fft_checkers import CheckFFT from simple_check import NumpyCheckLibAndHeader from perflib import * from fortran import * from perflib_info import write_info import blas_lapack_checkers import fft_checkers import perflib imp...
from blas_lapack_checkers import CheckCLAPACK, CheckCBLAS, CheckF77BLAS, CheckF77LAPACK from fft_checkers import CheckFFT from simple_check import NumpyCheckLibAndHeader from perflib import * from fortran import * from perflib_info import write_info import blas_lapack_checkers import fft_checkers import perflib imp...
Add fortran module import to numscons top level namespace.
Add fortran module import to numscons top level namespace.
Python
bsd-3-clause
cournape/numscons,cournape/numscons,cournape/numscons
--- +++ @@ -17,3 +17,4 @@ __all__ += fft_checkers.__all__ __all__ += perflib.__all__ __all__ += perflib_info.__all__ +__all__ += fortran.__all__
80cecb69170adf7235ecbff3eec4e737cf5d9292
impersonate/urls.py
impersonate/urls.py
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url urlpatterns = patterns('impersonate.views', url(r'^stop/$', 'stop_impersonate', name='impersonate-stop'), url(r'^list/$', 'list_users', {'template': 'impersonate/list_users.html'}, name='impersonate-list...
# -*- coding: utf-8 -*- from django.conf.urls import url from .views import stop_impersonate, list_users, search_users, impersonate urlpatterns = [ url(r'^stop/$', stop_impersonate, name='impersonate-stop'), url(r'^list/$', list_users, {'template': 'impersonate/list_users.html...
Replace deprecated string view arguments to url
Replace deprecated string view arguments to url
Python
bsd-3-clause
Top20Talent/django-impersonate,Top20Talent/django-impersonate
--- +++ @@ -1,20 +1,22 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url + +from .views import stop_impersonate, list_users, search_users, impersonate -urlpatterns = patterns('impersonate.views', +urlpatterns = [ url(r'^stop/$', - 'stop_impersona...
c6eaf3b4eaf851612baac9b0a10925654aaecf52
partner_compassion/model/mail_followers.py
partner_compassion/model/mail_followers.py
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __openerp__.p...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __openerp__.p...
Fix typo in follower restrictions
Fix typo in follower restrictions
Python
agpl-3.0
CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland,ecino/compassion-switzerland,ecino/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,ecino/compassion-switzerland
--- +++ @@ -34,7 +34,7 @@ mail_restrict_follower_selection """ model = vals['res_model'] - res_id = vals['res_id'] + res_id = vals['partner_id'] domain = self._mail_restrict_follower_selection_get_domain(model) allowed = self.env['res.partner'].search(eval(do...
1e04152b69f88f6512920db8ccdd9ba2f0201517
geotrek/api/mobile/urls.py
geotrek/api/mobile/urls.py
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers if 'geotrek.flatpages' and 'geotrek.trekking' and 'geotrek.tourism': from geotrek.api.mobile import views as api_mobile router = routers.DefaultRouter() ur...
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers if 'geotrek.flatpages' and 'geotrek.trekking' and 'geotrek.tourism' in settings.INSTALLED_APPS: from geotrek.api.mobile import views as api_mobile router = rou...
Fix api mobile only with geotrek flatpages trekking tourism
Fix api mobile only with geotrek flatpages trekking tourism
Python
bsd-2-clause
GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin
--- +++ @@ -5,16 +5,13 @@ from rest_framework import routers -if 'geotrek.flatpages' and 'geotrek.trekking' and 'geotrek.tourism': +if 'geotrek.flatpages' and 'geotrek.trekking' and 'geotrek.tourism' in settings.INSTALLED_APPS: from geotrek.api.mobile import views as api_mobile router = routers.Default...