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
4af5e3c9e48ff997084d5316f384b3c6411edaa3
test/dump.py
test/dump.py
import subprocess from tempfile import NamedTemporaryFile def dump_table(table): def handle_record(record, fields): def handle_field(column, field): return '%d:%d:%d %s' % (record, column, len(field), field) return '\n'.join(handle_field(column, field) for (column, field) in ...
import subprocess import tempfile def dump_table(table): def handle_record(record, fields): def handle_field(column, field): return '%d:%d:%d %s' % (record, column, len(field), field) return '\n'.join(handle_field(column, field) for (column, field) in enumerate(fields)) ...
Use 'import' for 'tempfile' module
Use 'import' for 'tempfile' module
Python
mit
jvirtanen/fields,jvirtanen/fields
--- +++ @@ -1,6 +1,5 @@ import subprocess - -from tempfile import NamedTemporaryFile +import tempfile def dump_table(table): @@ -14,7 +13,7 @@ return '\n'.join(filter(lambda s: s != '', dump.splitlines())) def dump_text(text, b=False, d=None, e=None, q=None): - with NamedTemporaryFile() as outfile: +...
5b10184e132004e2b9bd6424fc56cf7f4fc24716
imagersite/imager_profile/models.py
imagersite/imager_profile/models.py
"""Models.""" from django.db import models # Create your models here. class ImagerProfile(models.Model): """Imager Profile Model.""" camera_model = models.CharField(max_length=200) photography_type = models.TextField() friends = models.ManyToManyField('self') region = models.CharField(max_lengt...
"""Models.""" from django.db import models from django.contrib.auth.models import User # Create your models here. class ImagerProfile(models.Model): """Imager Profile Model.""" camera_model = models.CharField(max_length=200) photography_type = models.TextField() # friends = models.ManyToManyField('...
Add model manager, still needs work
Add model manager, still needs work
Python
mit
DZwell/django-imager
--- +++ @@ -1,5 +1,6 @@ """Models.""" from django.db import models +from django.contrib.auth.models import User # Create your models here. @@ -10,8 +11,24 @@ camera_model = models.CharField(max_length=200) photography_type = models.TextField() - friends = models.ManyToManyField('self') + # fr...
27d7ab7ecca0d2e6307dbcb1317b486fe77a97d7
cyder/core/system/models.py
cyder/core/system/models.py
from django.db import models from cyder.base.mixins import ObjectUrlMixin from cyder.base.models import BaseModel from cyder.cydhcp.keyvalue.models import KeyValue class System(BaseModel, ObjectUrlMixin): name = models.CharField(max_length=255, unique=False) search_fields = ('name',) display_fields = ('...
from django.db import models from cyder.base.mixins import ObjectUrlMixin from cyder.base.models import BaseModel from cyder.base.helpers import get_display from cyder.cydhcp.keyvalue.models import KeyValue class System(BaseModel, ObjectUrlMixin): name = models.CharField(max_length=255, unique=False) search...
Revert system names to normal
Revert system names to normal
Python
bsd-3-clause
drkitty/cyder,OSU-Net/cyder,drkitty/cyder,murrown/cyder,zeeman/cyder,OSU-Net/cyder,zeeman/cyder,murrown/cyder,akeym/cyder,akeym/cyder,akeym/cyder,zeeman/cyder,drkitty/cyder,OSU-Net/cyder,zeeman/cyder,murrown/cyder,akeym/cyder,murrown/cyder,drkitty/cyder,OSU-Net/cyder
--- +++ @@ -2,6 +2,7 @@ from cyder.base.mixins import ObjectUrlMixin from cyder.base.models import BaseModel +from cyder.base.helpers import get_display from cyder.cydhcp.keyvalue.models import KeyValue @@ -9,11 +10,10 @@ name = models.CharField(max_length=255, unique=False) search_fields = ('nam...
78f6bda69c7cdcb52057971edc0853b0045aa31a
gitfs/views/history.py
gitfs/views/history.py
from datetime import datetime from errno import ENOENT from stat import S_IFDIR from pygit2 import GIT_SORT_TIME from gitfs import FuseOSError from log import log from .view import View class HistoryView(View): def getattr(self, path, fh=None): ''' Returns a dictionary with keys identical to th...
import os from stat import S_IFDIR from pygit2 import GIT_FILEMODE_TREE from log import log from .view import View class HistoryView(View): def getattr(self, path, fh=None): ''' Returns a dictionary with keys identical to the stat C structure of stat(2). st_atime, st_mtime and st...
Add the possibility of browsing the tree of a particular commit.
Add the possibility of browsing the tree of a particular commit.
Python
apache-2.0
PressLabs/gitfs,rowhit/gitfs,bussiere/gitfs,ksmaheshkumar/gitfs,PressLabs/gitfs
--- +++ @@ -1,9 +1,7 @@ -from datetime import datetime -from errno import ENOENT +import os from stat import S_IFDIR -from pygit2 import GIT_SORT_TIME +from pygit2 import GIT_FILEMODE_TREE -from gitfs import FuseOSError from log import log from .view import View @@ -34,6 +32,22 @@ log.info('%s %s', ...
84bada1b92e18dad8499964ddf8a4f8120a9cc9e
vsut/case.py
vsut/case.py
class TestCase: def assertEqual(value, expected): if value != expected: raise CaseFailed("{0} != {1}") def assertTrue(value): assertEqual(value, True) def assertFalse(value): assertEqual(value, False) class CaseFailed(Exception): def __init__(self, message): ...
class TestCase: def assertEqual(self, value, expected): if value != expected: raise CaseFailed("{0} != {1}".format(value, expected)) def assertTrue(self, value): assertEqual(value, True) def assertFalse(self, value): assertEqual(value, False) class CaseFailed(Exceptio...
Fix missing self in class methods and wrong formatting
Fix missing self in class methods and wrong formatting
Python
mit
zillolo/vsut-python
--- +++ @@ -1,13 +1,13 @@ class TestCase: - def assertEqual(value, expected): + def assertEqual(self, value, expected): if value != expected: - raise CaseFailed("{0} != {1}") + raise CaseFailed("{0} != {1}".format(value, expected)) - def assertTrue(value): + def assertT...
16767206ba1a40dbe217ec9e16b052c848f84b10
converter.py
converter.py
from pydub import AudioSegment from io import BytesIO def convert_to_ogg(f): bio = BytesIO() AudioSegment.from_file(f).export(bio, format='ogg') bio.seek(0) return bio
from pydub import AudioSegment from io import BytesIO def convert_to_ogg(f): bio = BytesIO() AudioSegment.from_file(f).export(bio, format='ogg', codec='libopus') bio.seek(0) return bio
Use libopus codec while converting to Voice
Use libopus codec while converting to Voice
Python
mit
MelomanCool/telegram-audiomemes
--- +++ @@ -5,7 +5,7 @@ def convert_to_ogg(f): bio = BytesIO() - AudioSegment.from_file(f).export(bio, format='ogg') + AudioSegment.from_file(f).export(bio, format='ogg', codec='libopus') bio.seek(0) return bio
2d8d540e10f2bdcd4f8b3cbb5d6e378b8c2c6b44
speedtest-charts.py
speedtest-charts.py
#!/usr/bin/env python3 import os import subprocess import re import datetime import pygsheets import speedtest # Set constants DATE = datetime.datetime.now().strftime("%d-%m-%y %H:%M:%S") def get_credentials(): """Function to check for valid OAuth access tokens.""" gc = pygsheets.authorize(outh_file="credent...
#!/usr/bin/env python3 import os import subprocess import re import datetime import pygsheets import speedtest # Set constants DATE = datetime.datetime.now().strftime("%d-%m-%y %H:%M:%S") def get_credentials(): """Function to check for valid OAuth access tokens.""" gc = pygsheets.authorize(outh_file="credent...
Fix division for bits (not bytes)
Fix division for bits (not bytes)
Python
mit
frdmn/google-speedtest-chart
--- +++ @@ -36,8 +36,8 @@ spdtest = speedtest.Speedtest() spdtest.get_best_server() - download = round(spdtest.download() / 1024 / 1024, 2) - upload = round(spdtest.upload() / 1024 / 1024, 2) + download = round(spdtest.download() / 1000 / 1000, 2) + upload = round(spdtest.upload() / 1000 /...
85be5c1e0510d928f8b5a9a3de77ce674bf38dc4
datafilters/extra_lookup.py
datafilters/extra_lookup.py
class Extra(object): def __init__(self, where=None, tables=None): self.where = where if where is not None else [] self.tables = tables if tables is not None else [] def is_empty(self): return self.where or self.tables def add(self, extra): self.where.extend(extra.where) ...
class Extra(object): def __init__(self, where=None, tables=None): self.where = where if where is not None else [] self.tables = tables if tables is not None else [] def is_empty(self): return self.where or self.tables def add(self, extra): self.where.extend(extra.where) ...
Add a magic member __nonzero__ to Extra
Add a magic member __nonzero__ to Extra
Python
mit
zorainc/django-datafilters,freevoid/django-datafilters,zorainc/django-datafilters
--- +++ @@ -1,4 +1,3 @@ - class Extra(object): def __init__(self, where=None, tables=None): @@ -21,4 +20,4 @@ # little magic __iadd__ = add - __bool__ = is_empty + __bool__ = __nonzero__ = is_empty
f359aa0eef680a3cc11cacaac4b20ade29594bcd
slave/skia_slave_scripts/flavor_utils/xsan_build_step_utils.py
slave/skia_slave_scripts/flavor_utils/xsan_build_step_utils.py
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from utils import she...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Utilities for ASAN,TSAN,etc. build steps. """ from default_build_step_utils import DefaultBuildStepUtils from utils import she...
Update xsan flavor now that they're running on GCE bots.
Update xsan flavor now that they're running on GCE bots. - Don't add ~/llvm-3.4 to PATH: we've installed Clang 3.4 systemwide. - Don't `which clang` or `clang --version`: tools/xsan_build does it anyway. - Explicitly disable LSAN. Clang 3.5 seems to enable this by default. Going to submit this before review fo...
Python
bsd-3-clause
Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbo...
--- +++ @@ -10,14 +10,9 @@ import os -LLVM_PATH = '/home/chrome-bot/llvm-3.4/Release+Asserts/bin/' - class XsanBuildStepUtils(DefaultBuildStepUtils): def Compile(self, target): # Run the xsan_build script. - os.environ['PATH'] = LLVM_PATH + ':' + os.environ['PATH'] - shell_utils.run(['which', 'cla...
4e7c71304710178dbd668073ecfca59e8da459df
tacker/db/models_v1.py
tacker/db/models_v1.py
# Copyright (c) 2012 OpenStack Foundation. # 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...
# Copyright (c) 2012 OpenStack Foundation. # 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...
Remove unused model class from db layer
Remove unused model class from db layer Change-Id: I42cf91dc3132d0d0f2f509b5350958b7499c68f9
Python
apache-2.0
zeinsteinz/tacker,openstack/tacker,priya-pp/Tacker,trozet/tacker,stackforge/tacker,openstack/tacker,trozet/tacker,priya-pp/Tacker,openstack/tacker,stackforge/tacker,zeinsteinz/tacker
--- +++ @@ -31,10 +31,3 @@ id = sa.Column(sa.String(36), primary_key=True, default=uuidutils.generate_uuid) - - -class HasStatusDescription(object): - """Status with description mixin.""" - - status = sa.Column(sa.String(16), nullable=False) - status_description =...
89bc764364137d18d825d316f5433e25cf9c4ceb
jungle/cli.py
jungle/cli.py
# -*- coding: utf-8 -*- import click class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb'] def get_command(self, ctx, name): """get command""" mod = __import__('jungle.' + name,...
# -*- coding: utf-8 -*- import click from jungle import __version__ class JungleCLI(click.MultiCommand): """Jangle CLI main class""" def list_commands(self, ctx): """return available modules""" return ['ec2', 'elb'] def get_command(self, ctx, name): """get command""" mo...
Add version number to help text
Add version number to help text
Python
mit
achiku/jungle
--- +++ @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- import click + +from jungle import __version__ class JungleCLI(click.MultiCommand): @@ -16,7 +18,7 @@ return mod.cli -cli = JungleCLI(help='aws operation cli') +cli = JungleCLI(help="aws operation cli (v{})".format(__version__)) if __name__ == '...
9cafbdb268435eafffdbf15ce0d63af37ee1b0f0
erudite/components/commands/find_owner.py
erudite/components/commands/find_owner.py
""" Command that will allow for a user to inject triples into a database. """ from rhobot.components.commands.base_command import BaseCommand from rdflib.namespace import FOAF, RDF from rhobot.namespace import RHO from rhobot.components.storage import ResultPayload, ResultCollectionPayload import logging logger = logg...
""" Command that will allow for a user to inject triples into a database. """ from rhobot.components.commands.base_command import BaseCommand from rdflib.namespace import FOAF, RDF from rhobot.namespace import RHO from rhobot.components.storage import ResultPayload, ResultCollectionPayload import logging logger = logg...
Update to new storage payload api
Update to new storage payload api
Python
bsd-3-clause
rerobins/rho_erudite
--- +++ @@ -31,7 +31,7 @@ results = self.xmpp['rho_bot_storage_client'].find_nodes(storage) - initial_session['payload'] = results._populate_payload() + initial_session['payload'] = results.populate_payload() initial_session['next'] = None initial_session['has_next'] = Fal...
d4f5471a7975df526751ffa5c0653e6fe058227f
trex/urls.py
trex/urls.py
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAPIView) urlpat...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views.project import ( ProjectListCreateAPIView, ProjectDetailAPIView, EntryDet...
Add url mapping for EntryDetailAPIView
Add url mapping for EntryDetailAPIView
Python
mit
bjoernricks/trex,bjoernricks/trex
--- +++ @@ -9,7 +9,7 @@ from django.contrib import admin from trex.views.project import ( - ProjectListCreateAPIView, ProjectDetailAPIView) + ProjectListCreateAPIView, ProjectDetailAPIView, EntryDetailAPIView) urlpatterns = patterns( @@ -19,4 +19,6 @@ name="project-list"), url(r"^projects...
921977589a6837575ab7aadaa6238b20d0771ae2
mesonbuild/dependencies/platform.py
mesonbuild/dependencies/platform.py
# Copyright 2013-2017 The Meson development team # 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 agree...
# Copyright 2013-2017 The Meson development team # 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 agree...
Set is_found in AppleFrameworks constructor
Set is_found in AppleFrameworks constructor Set is_found in AppleFrameworks constructor, rather than overriding the found() method, as other superclass methods may access is_found.
Python
apache-2.0
QuLogic/meson,pexip/meson,QuLogic/meson,pexip/meson,QuLogic/meson,pexip/meson,becm/meson,jeandet/meson,pexip/meson,becm/meson,pexip/meson,becm/meson,jpakkane/meson,pexip/meson,jeandet/meson,mesonbuild/meson,jeandet/meson,MathieuDuponchelle/meson,mesonbuild/meson,QuLogic/meson,jeandet/meson,mesonbuild/meson,jeandet/meso...
--- +++ @@ -33,8 +33,7 @@ for f in self.frameworks: self.link_args += ['-framework', f] - def found(self): - return mesonlib.is_osx() + self.is_found = mesonlib.is_osx() def get_version(self): return 'unknown'
c13fb7a0decf8b5beb0399523f4e9b9b7b71b361
opps/core/tags/views.py
opps/core/tags/views.py
# -*- encoding: utf-8 -*- from django.utils import timezone from django.contrib.sites.models import get_current_site from opps.views.generic.list import ListView from opps.containers.models import Container class TagList(ListView): model = Container template_name_suffix = '_tags' def get_context_data(se...
# -*- encoding: utf-8 -*- from django.utils import timezone from django.contrib.sites.models import get_current_site from django.core.cache import cache from django.conf import settings from opps.views.generic.list import ListView from opps.containers.models import Container from .models import Tag class TagList(Li...
Add new approach on taglist get_queryset
Add new approach on taglist get_queryset
Python
mit
jeanmask/opps,YACOWS/opps,opps/opps,opps/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,williamroot/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps,YACOWS/opps,opps/opps,YACOWS/opps
--- +++ @@ -1,9 +1,13 @@ # -*- encoding: utf-8 -*- from django.utils import timezone from django.contrib.sites.models import get_current_site +from django.core.cache import cache +from django.conf import settings from opps.views.generic.list import ListView from opps.containers.models import Container + +from ...
29eeb2ca5988e9a4f6d8ec2493701b278ee2b554
backend/mcapiserver.py
backend/mcapiserver.py
#!/usr/bin/env python from mcapi.mcapp import app, mcdb_connect from mcapi import utils, access from mcapi import objects, cache from mcapi.user import account, usergroups, projects from mcapi.globus import globus_service from os import environ import optparse import signal from mcapi import apikeydb _HOST = environ....
#!/usr/bin/env python from mcapi.mcapp import app, mcdb_connect from mcapi import utils, access from mcapi import objects, cache from mcapi.user import account, usergroups, projects from os import environ import optparse import signal from mcapi import apikeydb _HOST = environ.get('MC_SERVICE_HOST') or 'localhost' ...
Remove globus interface from mcapi - now in its own server
Remove globus interface from mcapi - now in its own server
Python
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
--- +++ @@ -4,7 +4,6 @@ from mcapi import utils, access from mcapi import objects, cache from mcapi.user import account, usergroups, projects -from mcapi.globus import globus_service from os import environ import optparse import signal
1c3eadcbc378ae528f3a4cbf82d41675343ac104
badgus/base/helpers.py
badgus/base/helpers.py
from jingo import register import jinja2 # TODO: Allow configurable whitelists ALLOWED_TAGS = [ 'a', 'abbr', 'br', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', 'ol', 'p', 'strong', 'ul' ] @register.filter def bleach_markup(val): """Template filter to linkify and clean content expected to allow...
from jingo import register import jinja2 # TODO: Allow configurable whitelists ALLOWED_TAGS = [ 'a', 'abbr', 'br', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'img', 'li', 'ol', 'p', 'strong', 'ul' ] ALLOWED_ATTRIBUTES = { "img": ["src"] } @register.filter def bleach_markup(val): """Template fi...
Allow images in limited markup for descriptions
Allow images in limited markup for descriptions
Python
bsd-3-clause
lmorchard/badg.us,lmorchard/badg.us,deepankverma/badges.mozilla.org,mozilla/badges.mozilla.org,lmorchard/badg.us,mozilla/badg.us,mozilla/badg.us,deepankverma/badges.mozilla.org,deepankverma/badges.mozilla.org,mozilla/badg.us,mozilla/badges.mozilla.org,mozilla/badges.mozilla.org,mozilla/badges.mozilla.org,lmorchard/badg...
--- +++ @@ -4,10 +4,13 @@ # TODO: Allow configurable whitelists ALLOWED_TAGS = [ - 'a', 'abbr', 'br', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'li', + 'a', 'abbr', 'br', 'acronym', 'b', 'blockquote', 'code', 'em', 'i', 'img', 'li', 'ol', 'p', 'strong', 'ul' ] +ALLOWED_ATTRIBUTES = { + "im...
e7ccf47114bbae254f40029b9188eacc6d1c5465
IPython/html/widgets/__init__.py
IPython/html/widgets/__init__.py
from .widget import Widget, DOMWidget, CallbackDispatcher, register from .widget_bool import Checkbox, ToggleButton from .widget_button import Button from .widget_box import Box, Popup, FlexBox, HBox, VBox from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlider from .widget_...
from .widget import Widget, DOMWidget, CallbackDispatcher, register from .widget_bool import Checkbox, ToggleButton from .widget_button import Button from .widget_box import Box, Popup, FlexBox, HBox, VBox from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress, FloatRangeSlider from .widget_...
Add warning to widget namespace import.
Add warning to widget namespace import.
Python
bsd-3-clause
ipython/ipython,ipython/ipython
--- +++ @@ -22,3 +22,8 @@ from .widget_selection import RadioButtonsWidget, ToggleButtonsWidget, DropdownWidget, SelectWidget from .widget_selectioncontainer import TabWidget, AccordionWidget from .widget_string import HTMLWidget, LatexWidget, TextWidget, TextareaWidget + +# Warn on import +from IPython.utils.warn...
8e051959bc69305cb4987a913a2b0bd845a9fa70
plugins/ball8.py
plugins/ball8.py
import random from plugin import CommandPlugin, PluginException class Ball8(CommandPlugin): """ 8ball command (by javipepe :)) """ def __init__(self, bot): CommandPlugin.__init__(self, bot) self.triggers = ['8ball'] self.short_help = 'Ask me a question' self.help = 'As...
import random from plugin import CommandPlugin, PluginException class Ball8(CommandPlugin): """ 8ball command (by javipepe :)) """ def __init__(self, bot): CommandPlugin.__init__(self, bot) self.triggers = ['8ball'] self.short_help = 'Ask me a question' self.help = 'As...
Fix typo in 8ball response
Fix typo in 8ball response
Python
mit
Brottweiler/nimbus,itsmartin/nimbus,bcbwilla/nimbus,Plastix/nimbus
--- +++ @@ -20,7 +20,7 @@ if not args or not args[-1:].__contains__('?'): raise PluginException('Invalid argument! Ask me a question!') else: - possible_answers = ['It is certain', 'It is decidedly so', 'Without a doubt', 'Yes, definitely', 'You may rely on it', 'As I see it,...
e90e4fe8ad2679ff978d4d8b69ea2b9402029ccd
pinax/apps/account/context_processors.py
pinax/apps/account/context_processors.py
from account.models import Account, AnonymousAccount def openid(request): return {'openid': request.openid} def account(request): if request.user.is_authenticated(): try: account = Account._default_manager.get(user=request.user) except Account.DoesNotExist: account = A...
from account.models import Account, AnonymousAccount def openid(request): if hasattr(request, "openid"): openid = request.openid else: openid = None return { "openid": openid, } def account(request): if request.user.is_authenticated(): try: account = A...
Handle no openid attribute on request in openid context processor
Handle no openid attribute on request in openid context processor
Python
mit
amarandon/pinax,alex/pinax,amarandon/pinax,amarandon/pinax,alex/pinax,amarandon/pinax,alex/pinax
--- +++ @@ -2,7 +2,14 @@ from account.models import Account, AnonymousAccount def openid(request): - return {'openid': request.openid} + if hasattr(request, "openid"): + openid = request.openid + else: + openid = None + return { + "openid": openid, + } + def account(request)...
207c3fc8467c7f216e06b88f87433dc4eb46e13c
tests/name_injection_test.py
tests/name_injection_test.py
"""Test for the name inject utility.""" from drudge import Drudge def test_drudge_injects_names(): """Test the name injection method of drudge.""" dr = Drudge(None) # Dummy drudge. string_name = 'string_name' dr.set_name(string_name) dr.set_name(1, 'one') dr.inject_names(suffix='_') a...
"""Test for the name inject utility.""" import types from drudge import Drudge def test_drudge_injects_names(): """Test the name injection method of drudge.""" # Dummy drudge. dr = Drudge(types.SimpleNamespace(defaultParallelism=1)) string_name = 'string_name' dr.set_name(string_name) dr.s...
Fix name injection test for the new Drudge update
Fix name injection test for the new Drudge update
Python
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
--- +++ @@ -1,4 +1,6 @@ """Test for the name inject utility.""" + +import types from drudge import Drudge @@ -6,7 +8,9 @@ def test_drudge_injects_names(): """Test the name injection method of drudge.""" - dr = Drudge(None) # Dummy drudge. + # Dummy drudge. + dr = Drudge(types.SimpleNamespace(d...
27ab5b022dec68f18d07988b97d65ec8fd8db83e
zenaida/contrib/hints/views.py
zenaida/contrib/hints/views.py
from zenaida.contrib.hints.models import Dismissed from zenaida.contrib.hints.forms import DismissHintForm from django.http import (HttpResponse, HttpResponseNotAllowed, HttpResponseBadRequest, HttpResponseRedirect) def dismiss(request): if not request.POST: return HttpResponseNotA...
from zenaida.contrib.hints.models import Dismissed from zenaida.contrib.hints.forms import DismissHintForm from django.core.exceptions import SuspiciousOperation from django.http import (HttpResponse, HttpResponseNotAllowed, HttpResponseBadRequest, HttpResponseRedirect) from django.utils.http i...
Check url safety before redirecting. Safety first!
[hints] Check url safety before redirecting. Safety first!
Python
bsd-3-clause
littleweaver/django-zenaida,littleweaver/django-zenaida,littleweaver/django-zenaida,littleweaver/django-zenaida
--- +++ @@ -1,8 +1,11 @@ from zenaida.contrib.hints.models import Dismissed from zenaida.contrib.hints.forms import DismissHintForm +from django.core.exceptions import SuspiciousOperation from django.http import (HttpResponse, HttpResponseNotAllowed, HttpResponseBadRequest, HttpResponseR...
d73654fd4d11a2bf5730c6fbf4bc2167593f7cc4
queue_timings.py
queue_timings.py
# queue_timings.py # Analysis script for bodyfetcher queue timings. Call from the command line using Python 3. import os.path import platform if int(platform.python_version_tuple()[0]) == 2: import cPickle as pickle elif int(platform.python_version_tuple()[0]) == 3: import pickle else: raise EnvironmentErr...
# queue_timings.py # Analysis script for bodyfetcher queue timings. Call from the command line using Python 3. import os.path import cPickle as pickle def main(): if os.path.isfile("bodyfetcherQueueTimings.p"): try: with open("bodyfetcherQueueTimings.p", "rb") as f: queue_data...
Revert "Python2/3 Reverse Compat functionality, also 'return' if EOFError"
Revert "Python2/3 Reverse Compat functionality, also 'return' if EOFError" This reverts commit f604590ca7a704ef941db5342bae3cef5c60cf2e.
Python
apache-2.0
Charcoal-SE/SmokeDetector,Charcoal-SE/SmokeDetector
--- +++ @@ -2,13 +2,7 @@ # Analysis script for bodyfetcher queue timings. Call from the command line using Python 3. import os.path -import platform -if int(platform.python_version_tuple()[0]) == 2: - import cPickle as pickle -elif int(platform.python_version_tuple()[0]) == 3: - import pickle -else: - ra...
2faf9d30ae7eb935ace3ff9012844de1d4149f45
capstone/rl/learner.py
capstone/rl/learner.py
import abc import six @six.add_metaclass(abc.ABCMeta) class Learner(object): def __init__(self, env, n_episodes=1000, verbose=True): self.env = env self.n_episodes = n_episodes self.verbose = verbose self.cur_episode = 1 def learn(self): for _ in range(self.n_episodes...
import abc import six @six.add_metaclass(abc.ABCMeta) class Learner(object): def __init__(self, env, n_episodes=1000, verbose=True): self.env = env self.n_episodes = n_episodes self.verbose = verbose self.cur_episode = 1 def learn(self): for _ in range(self.n_episodes...
Fix episode count increment bug
Fix episode count increment bug
Python
mit
davidrobles/mlnd-capstone-code
--- +++ @@ -17,7 +17,7 @@ print('Episode {self.cur_episode} / {self.n_episodes}'.format(self=self)) self.env.reset() self.episode() - self.cur_episode += 1 + self.cur_episode += 1 def reset(self): self.cur_episode = 1
8a40d0df910cf9e17db99155ba148c69737809dc
ConnorBrozic-CymonScriptA2P2.py
ConnorBrozic-CymonScriptA2P2.py
#!/usr/bin/python #SRT411 Assignment 2 - Part 2 #Cymon API Interaction #Written by: Connor Brozic #Malware Domains retrieved from https://malwaredomains.usu.edu/ #Implements Cymon API Calls #Import time for sleep function. #Import Cymon to allow for Cymon API calls import time from cymon import Cymon #Personal Key Re...
#!/usr/bin/python #SRT411 Assignment 2 - Part 2 #Cymon API Interaction #Written by: Connor Brozic #Malware Domains retrieved from https://malwaredomains.usu.edu/ #Implements Cymon API Calls #Import time for sleep function. #Import Cymon to allow for Cymon API calls import time from cymon import Cymon #Personal Key Re...
Update to Script, Fixed malware domain file name
Update to Script, Fixed malware domain file name Fixed malware domains file name to accurately represent the file opened. (Better than text.txt)
Python
mit
ConnorBrozic/SRT411-Assignment2
--- +++ @@ -17,7 +17,7 @@ #http://stackoverflow.com/questions/6277107/parsing-text-file-in-python #Open malware domain file. -f = open('text.txt','r') +f = open('TestedMalwareDomains.txt','r') #Open output file to write to cymondata = open('cymondata.txt','w') while True:
f2012869d3e16f0a610e18021e6ec8967eddf635
tests/sqltypes_test.py
tests/sqltypes_test.py
import enum from sqlalchemy.schema import Column from sqlalchemy.types import Integer from cliche.sqltypes import EnumType from cliche.orm import Base class Color(enum.Enum): red = 1 green = 2 blue = 3 class ColorTable(Base): __tablename__ = 'color_table' id = Column(Integer, primary_key=Tr...
import enum from sqlalchemy.schema import Column from sqlalchemy.types import Integer from cliche.sqltypes import EnumType from cliche.orm import Base class Color(enum.Enum): red = 1 green = 2 blue = 3 class ColorTable(Base): __tablename__ = 'color_table' id = Column(Integer, primary_key=Tr...
Add name to EnumType in test since pgsql needs it.
Add name to EnumType in test since pgsql needs it.
Python
mit
item4/cliche,clicheio/cliche,item4/cliche,clicheio/cliche,clicheio/cliche
--- +++ @@ -19,18 +19,18 @@ __tablename__ = 'color_table' id = Column(Integer, primary_key=True) - test_col = Column(EnumType(Color)) + color = Column(EnumType(Color, name='color')) def test_enum_type(fx_session): - red_obj = ColorTable(test_col=Color.red) - green_obj = ColorTable(test_co...
3471024a63f2bf55763563693f439a704291fc7d
examples/apt.py
examples/apt.py
from pyinfra import host from pyinfra.modules import apt SUDO = True code_name = host.fact.linux_distribution['release_meta'].get('DISTRIB_CODENAME') print(host.fact.linux_name, code_name) if host.fact.linux_name in ['Debian', 'Ubuntu']: apt.packages( {'Install some packages'}, ['vim-addon-manag...
from pyinfra import host from pyinfra.modules import apt SUDO = True code_name = host.fact.linux_distribution['release_meta'].get('DISTRIB_CODENAME') print(host.fact.linux_name, code_name) if host.fact.linux_name in ['Debian', 'Ubuntu']: apt.packages( {'Install some packages'}, ['vim-addon-manag...
Comment out the bitcoin PPA code.
Comment out the bitcoin PPA code. The bitcoin PPA is no longer maintained/supported.
Python
mit
Fizzadar/pyinfra,Fizzadar/pyinfra
--- +++ @@ -14,21 +14,17 @@ update=True, ) - apt.ppa( - {'Add the Bitcoin ppa'}, - 'ppa:bitcoin/bitcoin', - ) - - # typically after adding a ppk, you want to update - apt.update() - - # but you could just include the update in the apt install step - # like this: - ap...
d20039737d1e25f4462c4865347fa22411045677
budgetsupervisor/users/models.py
budgetsupervisor/users/models.py
from django.db import models from django.contrib.auth.models import AbstractUser from django.conf import settings from django.db.models.signals import post_save from saltedge.factory import get_saltedge_app class User(AbstractUser): pass class ProfileManager(models.Manager): def create_in_saltedge(self, pro...
from django.db import models from django.contrib.auth.models import AbstractUser from django.conf import settings from django.db.models.signals import post_save from saltedge.factory import get_saltedge_app class User(AbstractUser): pass class ProfileManager(models.Manager): def create_in_saltedge(self, pro...
Add placeholder for removing customer from saltedge
Add placeholder for removing customer from saltedge
Python
mit
ltowarek/budget-supervisor
--- +++ @@ -20,6 +20,9 @@ profile.external_id = data["data"]["id"] profile.save() + def remove_from_saltedge(self, profile): + pass + class Profile(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
45c7b58dde546711c07969b6b59be9983d45e27e
simple/parsers/utils/laws_parser_utils.py
simple/parsers/utils/laws_parser_utils.py
# -*- coding: utf-8 -* import re def normalize_correction_title_dashes(raw_title): """returns s with normalized spaces before and after the dash""" if not raw_title: return None m = re.match(r'(תיקון)( ?)(-)( ?)(.*)'.decode('utf8'), raw_title) if not m: return raw_title return ' '....
# -*- coding: utf-8 -* import re def normalize_correction_title_dashes(raw_title): """returns s with normalized spaces before and after the dash""" if not raw_title: return None m = re.match(r'(תיקון)( ?)(-)( ?)(.*)'.decode('utf8'), raw_title) if not m: return raw_title return ' '....
Fix title parser to fix certain missing laws
Fix title parser to fix certain missing laws
Python
bsd-3-clause
alonisser/Open-Knesset,OriHoch/Open-Knesset,daonb/Open-Knesset,alonisser/Open-Knesset,OriHoch/Open-Knesset,OriHoch/Open-Knesset,daonb/Open-Knesset,OriHoch/Open-Knesset,daonb/Open-Knesset,alonisser/Open-Knesset,daonb/Open-Knesset,alonisser/Open-Knesset
--- +++ @@ -13,7 +13,7 @@ def parse_title(unparsed_title): - return re.match(u'הצעת ([^\(,]*)(.*?\((.*?)\))?(.*?\((.*?)\))?(.*?,(.*))?', unparsed_title) + return re.match(u'הצע[תה] ([^\(,]*)(.*?\((.*?)\))?(.*?\((.*?)\))?(.*?,(.*))?', unparsed_title) def clean_line(a_line_str):
08f80959be067178d4e58138309f7d1b402339e5
http_ping.py
http_ping.py
from locust import HttpLocust, TaskSet, task class HttpPingTasks(TaskSet): @task def ping(self): self.client.get("/") class SayHelloLocust(HttpLocust): task_set = HttpPingTasks min_wait = 100 max_wait = 500
from locust import HttpLocust, TaskSet, task class HttpPingTasks(TaskSet): @task def ping(self): self.client.get("/") class HttpPingLocust(HttpLocust): task_set = HttpPingTasks min_wait = 100 max_wait = 500
Rename locust to be consistent with other entities
Rename locust to be consistent with other entities
Python
apache-2.0
drednout/locust_on_meetup
--- +++ @@ -5,7 +5,7 @@ def ping(self): self.client.get("/") -class SayHelloLocust(HttpLocust): +class HttpPingLocust(HttpLocust): task_set = HttpPingTasks min_wait = 100 max_wait = 500
72d65a50d31fc32fadccc907c91c8e66ad192beb
source/forms/search_form.py
source/forms/search_form.py
import django_countries from django import forms from django_countries.fields import LazyTypedChoiceField class SearchForm(forms.Form): title = forms.CharField(label='', widget=forms.TextInput(attrs={'placeholder': 'Movie Title'}), max_length=150) country = LazyTypedChoiceField(choices=django_countries.count...
import django_countries from django import forms from django_countries.fields import LazyTypedChoiceField class SearchForm(forms.Form): title = forms.CharField(label='', widget=forms.TextInput(attrs={'placeholder': 'Movie Title', 'onfocus': 'this.placeholder = ""', 'onblur': 'this.placeholder = "Movie Title"'}),...
Hide text input placeholder when onfocus
Hide text input placeholder when onfocus
Python
mit
jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu
--- +++ @@ -5,5 +5,5 @@ class SearchForm(forms.Form): - title = forms.CharField(label='', widget=forms.TextInput(attrs={'placeholder': 'Movie Title'}), max_length=150) + title = forms.CharField(label='', widget=forms.TextInput(attrs={'placeholder': 'Movie Title', 'onfocus': 'this.placeholder = ""', 'onblur...
2ac69facc6da342c38c9d851f1ec53a3be0b820a
spacy/tests/regression/test_issue2800.py
spacy/tests/regression/test_issue2800.py
'''Test issue that arises when too many labels are added to NER model.''' import random from ...lang.en import English def train_model(train_data, entity_types): nlp = English(pipeline=[]) ner = nlp.create_pipe("ner") nlp.add_pipe(ner) for entity_type in list(entity_types): ner.add_label(enti...
'''Test issue that arises when too many labels are added to NER model.''' from __future__ import unicode_literals import random from ...lang.en import English def train_model(train_data, entity_types): nlp = English(pipeline=[]) ner = nlp.create_pipe("ner") nlp.add_pipe(ner) for entity_type in list(...
Fix Python 2 test failure
Fix Python 2 test failure
Python
mit
aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,recognai/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,spacy-io/spaCy,aikramer2/spaCy,honnibal/s...
--- +++ @@ -1,4 +1,6 @@ '''Test issue that arises when too many labels are added to NER model.''' +from __future__ import unicode_literals + import random from ...lang.en import English
f52465918a1243fc17a8cc5de0b05d68c3ca9218
src/tempel/urls.py
src/tempel/urls.py
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.urls)), url(r...
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^\+media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^admin/', include(admin.site.urls)), url(r...
Change url pattern from /e/ to /entry/
Change url pattern from /e/ to /entry/
Python
agpl-3.0
fajran/tempel
--- +++ @@ -11,8 +11,10 @@ url(r'^(?P<id>\d+)$', 'tempel.views.view', {'mode': 'html'}, name='tempel_view'), url(r'^(?P<id>\d+).html$', 'tempel.views.view', {'mode': 'html'}, name='tempel_html'), url(r'^(?P<id>\d+).txt$', 'tempel.views.view', {'mode': 'txt'}, name='tempel_raw'), - url(r'^e/(?P<id>\d...
96199b0d6dfea835d6bb23bc87060e5732ef4094
server/lib/python/cartodb_services/cartodb_services/mapzen/matrix_client.py
server/lib/python/cartodb_services/cartodb_services/mapzen/matrix_client.py
import requests import json class MatrixClient: ONE_TO_MANY_URL = 'https://matrix.mapzen.com/one_to_many' def __init__(self, matrix_key): self._matrix_key = matrix_key """Get distances and times to a set of locations. See https://mapzen.com/documentation/matrix/api-reference/ Args: ...
import requests import json class MatrixClient: """ A minimal client for Mapzen Time-Distance Matrix Service Example: client = MatrixClient('your_api_key') locations = [{"lat":40.744014,"lon":-73.990508},{"lat":40.739735,"lon":-73.979713},{"lat":40.752522,"lon":-73.985015},{"lat":40.750117,"lon"...
Add example to code doc
Add example to code doc
Python
bsd-3-clause
CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/dataservices-api
--- +++ @@ -2,6 +2,18 @@ import json class MatrixClient: + + """ + A minimal client for Mapzen Time-Distance Matrix Service + + Example: + + client = MatrixClient('your_api_key') + locations = [{"lat":40.744014,"lon":-73.990508},{"lat":40.739735,"lon":-73.979713},{"lat":40.752522,"lon":-73.985015},...
0c0f56dba4b9f08f4cb443f2668cdee51fe80c32
chapter02/fahrenheitToCelsius.py
chapter02/fahrenheitToCelsius.py
#!/usr/bin/env python F = input("Gimme Fahrenheit: ") print (F-32) * 5 / 9 print (F-32) / 1.8000
#!/usr/bin/env python fahrenheit = input("Gimme Fahrenheit: ") print (fahrenheit-32) * 5 / 9 print (fahrenheit-32) / 1.8000
Change variable name to fahrenheit
Change variable name to fahrenheit
Python
apache-2.0
MindCookin/python-exercises
--- +++ @@ -1,6 +1,6 @@ #!/usr/bin/env python -F = input("Gimme Fahrenheit: ") +fahrenheit = input("Gimme Fahrenheit: ") -print (F-32) * 5 / 9 -print (F-32) / 1.8000 +print (fahrenheit-32) * 5 / 9 +print (fahrenheit-32) / 1.8000
2664e9124af6b0d8f6b2eacd50f4d7e93b91e931
examples/GoBot/gobot.py
examples/GoBot/gobot.py
from minibot.bot import Bot from minibot.hardware.rpi.gpio import PWM from minibot.interface.servo import Servo import math import time L_MOTOR_PIN = 12 R_MOTOR_PIN = 18 class GoBot(Bot): def __init__(self): Bot.__init__(self, "GoBot") self.l_motor = Servo(PWM(L_MOTOR_PIN, 2, 15)) self.r...
""" GoBot Example """ from minibot.bot import Bot from minibot.hardware.rpi.gpio import PWM from minibot.interface.servo import Servo L_MOTOR_PIN = 12 R_MOTOR_PIN = 18 class GoBot(Bot): """ GoBot """ def __init__(self): Bot.__init__(self, "GoBot") self.l_motor = Servo(PWM(L_MOTOR_PIN...
Fix linting errors in GoBot
Fix linting errors in GoBot
Python
apache-2.0
cornell-cup/cs-minibot,cornell-cup/cs-minibot,cornell-cup/cs-minibot,cornell-cup/cs-minibot,cornell-cup/cs-minibot
--- +++ @@ -1,14 +1,18 @@ +""" +GoBot Example +""" + from minibot.bot import Bot from minibot.hardware.rpi.gpio import PWM from minibot.interface.servo import Servo - -import math -import time L_MOTOR_PIN = 12 R_MOTOR_PIN = 18 class GoBot(Bot): + """ + GoBot + """ def __init__(self): ...
c8376eddddd7bb61d4ae608e2fe0a0f333b0be84
backend/zotero.py
backend/zotero.py
# -*- encoding: utf-8 -*- from django.conf import settings from papers.errors import MetadataSourceException from papers.utils import sanitize_html import requests ##### Zotero interface ##### def fetch_zotero_by_DOI(doi): """ Fetch Zotero metadata for a given DOI. Works only with the doi_cache proxy. ...
# -*- encoding: utf-8 -*- from django.conf import settings from papers.errors import MetadataSourceException from papers.utils import sanitize_html import requests ##### Zotero interface ##### def fetch_zotero_by_DOI(doi): """ Fetch Zotero metadata for a given DOI. Works only with the doi_cache proxy. ...
Use HTTPS instead of HTTP since cache does redirect anyways
Use HTTPS instead of HTTP since cache does redirect anyways
Python
agpl-3.0
wetneb/dissemin,dissemin/dissemin,dissemin/dissemin,wetneb/dissemin,dissemin/dissemin,wetneb/dissemin,wetneb/dissemin,dissemin/dissemin,dissemin/dissemin
--- +++ @@ -14,7 +14,7 @@ Works only with the doi_cache proxy. """ try: - request = requests.get('http://'+settings.DOI_PROXY_DOMAIN+'/zotero/'+doi) + request = requests.get('https://'+settings.DOI_PROXY_DOMAIN+'/zotero/'+doi) return request.json() except ValueError as e: ...
525fdd26dac942d90352276f00f06460d1f950ee
setup.py
setup.py
from distutils.core import setup setup(name="zutil", version='0.1.2', description="Utilities used for generating zCFD control dictionaries", author="Zenotech", author_email="support@zenotech.com", url="https://zcfd.zenotech.com/", packages=["zutil", "zutil.post", "zutil.analysis", "...
from distutils.core import setup setup(name="zutil", version='0.1.2', description="Utilities used for generating zCFD control dictionaries", author="Zenotech", author_email="support@zenotech.com", url="https://zcfd.zenotech.com/", packages=["zutil", "zutil.post", "zutil.analysis", "...
Set max version of iPython required
Set max version of iPython required
Python
mit
zCFD/zutil
--- +++ @@ -9,7 +9,7 @@ packages=["zutil", "zutil.post", "zutil.analysis", "zutil.plot"], install_requires=[ 'mpi4py', - 'ipython', + 'ipython<6.0', 'Fabric', 'ipywidgets', 'matplotlib',
84ecbb0200c4d0cc170593835a5ae7ca5a6a09fc
setup.py
setup.py
#!/usr/bin/env python import os from setuptools import setup, find_packages def get_readme(): return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() setup( name='rest_framework_ember', version='1.0.3', description="Make EmberJS and Django Rest Framework play nice together.", lon...
#!/usr/bin/env python import os from setuptools import setup, find_packages def get_readme(): return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() setup( name='rest_framework_ember', version='1.0.3', description="Make EmberJS and Django Rest Framework play nice together.", lon...
Set a minimum DRF version for the next release
Set a minimum DRF version for the next release
Python
bsd-2-clause
coUrbanize/rest_framework_ember,grapo/django-rest-framework-json-api,pombredanne/django-rest-framework-json-api,leo-naeka/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api,schtibe/django-rest-framework-json-api,leifurhauks/django-rest-framework-json-api,abdulhaq-e/django-rest-framework-json-...
--- +++ @@ -16,7 +16,7 @@ license='BSD', keywords="EmberJS Django REST", packages=find_packages(), - install_requires=['django', 'djangorestframework', 'inflection' ], + install_requires=['django', 'djangorestframework >= 3.0.0', 'inflection' ], platforms=['any'], classifiers=[ ...
672a5daeec78d5ac6a35dfe82cd48ef3e45a648c
setup.py
setup.py
import sys from setuptools import find_packages, setup tests_require = [ 'coverage>=4.0', 'pytest-isort', 'pytest-cache>=1.0', 'flake8<3.0.0', 'pytest-flake8>=0.5', 'pytest>=2.8.0', 'pytest-wholenodeid', ] needs_pytest = set(['pytest', 'test', 'ptr']).intersection(sys.argv) pytest_runner =...
import sys from setuptools import find_packages, setup tests_require = [ 'coverage>=4.0', 'pytest-isort', 'pytest-cache>=1.0', 'flake8<3.0.0', 'pytest-flake8>=0.5', 'pytest>=2.8.0', 'pytest-wholenodeid', ] needs_pytest = set(['pytest', 'test', 'ptr']).intersection(sys.argv) pytest_runner =...
Update author and email in package metadata
Update author and email in package metadata
Python
mpl-2.0
mozilla/jupyter-notebook-gist,mreid-moz/jupyter-notebook-gist,mozilla/jupyter-notebook-gist,mreid-moz/jupyter-notebook-gist
--- +++ @@ -19,8 +19,8 @@ name='jupyter-notebook-gist', version='0.4a1', description='Create a gist from the Jupyter Notebook UI', - author='Mozilla Telemetry', - author_email='telemetry@lists.mozilla.org', + author='Mozilla Firefox Data Platform', + author_email='fx-data-platform@mozilla.c...
d57088b4beeae269786970041b7837f69f0e9daf
setup.py
setup.py
#! /usr/bin/env python import os from setuptools import setup, find_packages # with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: # README = readme.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( n...
#! /usr/bin/env python import os from setuptools import setup, find_packages # with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: # README = readme.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( n...
Fix the keywords, url, and description.
Fix the keywords, url, and description.
Python
bsd-3-clause
unt-libraries/django-name,damonkelley/django-name,unt-libraries/django-name,unt-libraries/django-name,damonkelley/django-name,damonkelley/django-name
--- +++ @@ -12,17 +12,17 @@ setup( name="django-name", - version="1.0.0", + version="pre-release", packages=find_packages(), include_package_data=True, license="BSD", - description="A Django application for inviting users to a site.", + description="Name Authority App for Django."...
fb00316ac62014564e299c94b8130b9316ee3d31
setup.py
setup.py
from setuptools import setup, find_packages import os version = '0.6.3' here = os.path.abspath(os.path.dirname(__file__)) try: README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'docs/HISTORY.txt')).read() except IOError: README = CHANGES = '' setup(name='tgext.admin'...
from setuptools import setup, find_packages import os version = '0.6.3' here = os.path.abspath(os.path.dirname(__file__)) try: README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'docs/HISTORY.txt')).read() except IOError: README = CHANGES = '' setup(name='tgext.admin'...
Set zip_safe=False to make TW2 happy
Set zip_safe=False to make TW2 happy
Python
mit
TurboGears/tgext.admin,TurboGears/tgext.admin
--- +++ @@ -27,7 +27,7 @@ packages=find_packages(exclude=['ez_setup']), namespace_packages=['tgext'], include_package_data=True, - zip_safe=True, + zip_safe=False, install_requires=[ 'setuptools', 'tgext.crud>=0.7.1',
fe60f4b290403ccdf17f78502f9033e70dbff52a
setup.py
setup.py
# -*- coding: utf-8 -*- import sys from setuptools import setup with open('README.rst', 'rb') as f: long_desc = f.read().decode('utf-8') # We have to be able to install on Linux to build the docs, even though # dmgbuild presently won't work there because there's no SetFile requires=['ds_store >= 1.1.0', ...
# -*- coding: utf-8 -*- import sys from setuptools import setup with open('README.rst', 'rb') as f: long_desc = f.read().decode('utf-8') # We have to be able to install on Linux to build the docs, even though # dmgbuild presently won't work there because there's no SetFile requires=['ds_store >= 1.1.0', ...
Remove pyobjc-framework-Quartz dependency as it seems to be unnecessary
Remove pyobjc-framework-Quartz dependency as it seems to be unnecessary closes #11
Python
mit
al45tair/dmgbuild
--- +++ @@ -9,9 +9,6 @@ # dmgbuild presently won't work there because there's no SetFile requires=['ds_store >= 1.1.0', 'mac_alias >= 2.0.1'] - -if sys.platform.startswith('darwin'): - requires.append('pyobjc-framework-Quartz >= 3.0.4') setup(name='dmgbuild', version='1.3.0',
3121d42bdca353d459ae61a6a93bdb854fcabe13
pymacaroons/__init__.py
pymacaroons/__init__.py
__author__ = 'Evan Cordell' __version__ = "0.5.1" __version_info__ = tuple(__version__.split('.')) __short_version__ = __version__ from .macaroon import Macaroon from .caveat import Caveat from .verifier import Verifier
__author__ = 'Evan Cordell' __version__ = "0.5.1" __version_info__ = tuple(__version__.split('.')) __short_version__ = __version__ from .macaroon import Macaroon from .caveat import Caveat from .verifier import Verifier __all__ = [ 'Macaroon', 'Caveat', 'Verifier', ]
Add __all__ to main module
Add __all__ to main module
Python
mit
illicitonion/pymacaroons,ecordell/pymacaroons,matrix-org/pymacaroons,matrix-org/pymacaroons
--- +++ @@ -7,3 +7,9 @@ from .macaroon import Macaroon from .caveat import Caveat from .verifier import Verifier + +__all__ = [ + 'Macaroon', + 'Caveat', + 'Verifier', +]
53d1a66498f05d89b9644d2013104bb7ec739a31
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages try: long_description = open("README.md").read() except IOError: long_description = "" setup( name="vania", version="0.1.0", description="A module to fairly distribute tasks considering people preferences.", license="MIT", ...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages try: long_description = open("README.md").read() except IOError: long_description = "" setup( name="vania", version="0.1.0", description="A module to fairly distribute tasks considering people preferences.", license="MIT", ...
Add Python 3 as dependency
Add Python 3 as dependency
Python
mit
Hackathonners/vania
--- +++ @@ -20,7 +20,7 @@ long_description=long_description, classifiers=[ "Programming Language :: Python", - "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", ], test_suite='nose.collector', tests_require=['nose'],
6531a8c9da651f57a64036b777ff7fa4f430b517
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup from fandjango import __version__ setup( name = 'fandjango', version = __version__, description = "Fandjango makes it stupidly easy to create Facebook applications with Django.", long_description = open('README.rst').read(), author = "Johannes Go...
#!/usr/bin/env python from setuptools import setup from fandjango import __version__ setup( name = 'fandjango', version = __version__, description = "Fandjango makes it stupidly easy to create Facebook applications with Django.", long_description = open('README.rst').read(), author = "Johannes Go...
Add migrations to package data
Add migrations to package data
Python
mit
jgorset/fandjango,jgorset/fandjango
--- +++ @@ -18,7 +18,11 @@ 'fandjango.templatetags' ], package_data = { - 'fandjango': ['templates/*', 'locale/*'] + 'fandjango': [ + 'templates/*', + 'locale/*' + 'migrations/*' + ] }, install_requires = [ 'facepy==0.5.1',
5dcfeb2a13f3ab9fe8b20e2620cbc15593cd56dc
pytest_watch/spooler.py
pytest_watch/spooler.py
# -*- coding: utf-8 from multiprocessing import Queue, Process, Event class Timer(Process): def __init__(self, interval, function, args=[], kwargs={}): super(Timer, self).__init__() self.interval = interval self.function = function self.args = args self.kwargs = kwargs ...
from threading import Thread, Event try: from queue import Queue except ImportError: from Queue import Queue class Timer(Thread): def __init__(self, interval, function, args=[], kwargs={}): super(Timer, self).__init__() self.interval = interval self.function = function sel...
Use threading instead of multiprocessing.
Use threading instead of multiprocessing.
Python
mit
blueyed/pytest-watch,rakjin/pytest-watch,ColtonProvias/pytest-watch,joeyespo/pytest-watch
--- +++ @@ -1,9 +1,12 @@ -# -*- coding: utf-8 +from threading import Thread, Event -from multiprocessing import Queue, Process, Event +try: + from queue import Queue +except ImportError: + from Queue import Queue -class Timer(Process): +class Timer(Thread): def __init__(self, interval, function, args...
e4badca1d01e25efec8cf2b45f1e2731f4dc2d5a
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import find_packages, setup with open("README.md") as readme_file: readme = readme_file.read() requirements = ["Pillow>=5.3.0", "numpy>=1.15.4", "Click>=7.0"] setup( author="Ryan Gibson", author_email="ryanalexandergibson@gmail.com", name...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import find_packages, setup with open("README.md") as readme_file: readme = readme_file.read() requirements = ["Pillow>=5.3.0", "numpy>=1.15.4", "Click>=7.0"] setup( author="Ryan Gibson", author_email="ryanalexandergibson@gmail.com", name...
Increase version number for Python 3.9 support
Increase version number for Python 3.9 support
Python
mit
ragibson/Steganography
--- +++ @@ -12,7 +12,7 @@ author="Ryan Gibson", author_email="ryanalexandergibson@gmail.com", name="stego_lsb", - version="1.3", + version="1.3.1", description="stego lsb", keywords="stego lsb", license="MIT",
af63afb5d5a010406557e325e759cdd310214c71
setup.py
setup.py
#!/Applications/anaconda/envs/Python3/bin def main(): x = input("Enter a number: ") print("Your number is {}".format(x)) if __name__ == '__main__': main()
#!/Applications/anaconda/envs/Python3/bin def main(): # Get input from user and display it feels = input("On a scale of 1-10, how do you feel? ") print("You selected: {}".format(feels)) # Python Data Types integer = 42 floater = 3.14 stringer = 'Hello, World!' tupler = (1, 2, 3) li...
Add PY quick start examples
Add PY quick start examples
Python
mit
HKuz/Test_Code
--- +++ @@ -1,8 +1,71 @@ #!/Applications/anaconda/envs/Python3/bin def main(): - x = input("Enter a number: ") - print("Your number is {}".format(x)) + # Get input from user and display it + feels = input("On a scale of 1-10, how do you feel? ") + print("You selected: {}".format(feels)) + + # Py...
8f5341324be97e7c6c7f0e93bd23762f3ad0b4a1
setup.py
setup.py
from distutils.core import setup from setuptools import find_packages import os import sys def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_packages_in(where, **kwargs): return [where] + ['%s.%s' % (where, package) for package in find_packages(where=where, **kwargs)...
from distutils.core import setup from setuptools import find_packages import os import sys def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_packages_in(where, **kwargs): return [where] + ['%s.%s' % (where, package) for package in find_packages(where=where, **kwargs)...
Add Django < 1.4 requirements
Add Django < 1.4 requirements
Python
bsd-3-clause
allanlei/django-multitenant
--- +++ @@ -20,6 +20,9 @@ url = 'https://github.com/allanlei/django-multitenant', packages=find_packages_in('tenant'), long_description=read('README.md'), + install_requires=[ + 'Django<1.4', + ], classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Appro...
f58e8e3b4a00069186a3a7f7075a76aa6d95cc60
setup.py
setup.py
from setuptools import setup, find_packages setup( name='panoptes_client', url='https://github.com/zooniverse/panoptes-python-client', author='Adam McMaster', author_email='adam@zooniverse.org', version='1.1.1', packages=find_packages(), include_package_data=True, install_requires=[ ...
from setuptools import setup, find_packages setup( name='panoptes_client', url='https://github.com/zooniverse/panoptes-python-client', author='Adam McMaster', author_email='adam@zooniverse.org', version='1.1.1', packages=find_packages(), include_package_data=True, install_requires=[ ...
Update mock requirement from <2.1,>=2.0 to >=2.0,<3.1
Update mock requirement from <2.1,>=2.0 to >=2.0,<3.1 Updates the requirements on [mock](https://github.com/testing-cabal/mock) to permit the latest version. - [Release notes](https://github.com/testing-cabal/mock/releases) - [Changelog](https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst) - [Commits](http...
Python
apache-2.0
zooniverse/panoptes-python-client
--- +++ @@ -17,7 +17,7 @@ ], extras_require={ 'testing': [ - 'mock>=2.0,<2.1', + 'mock>=2.0,<3.1', ], 'docs': [ 'sphinx',
6457af6c631ca92c3c55df225c25cf8130c0aa3b
setup.py
setup.py
# Copyright 2019 The resource-policy-evaluation-library Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
# Copyright 2019 The resource-policy-evaluation-library Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
Read in README.md as long description
Read in README.md as long description
Python
apache-2.0
forseti-security/resource-policy-evaluation-library
--- +++ @@ -20,6 +20,7 @@ setup( name="rpe-lib", description="A resource policy evaluation library", + long_description=open('README.md').read(), author="Joe Ceresini", url="https://github.com/forseti-security/resource-policy-evaluation-library", use_scm_version=True,
4c629e16c6dcd5ea78ddccca75c0a5cee602cfa6
setup.py
setup.py
############################################################################### # Copyright 2015-2016 University of Florida. All rights reserved. # This file is part of UF CTS-IT's NACCulator project. # Use of this source code is governed by the license found in the LICENSE file. #######################################...
############################################################################### # Copyright 2015-2019 University of Florida. All rights reserved. # This file is part of UF CTS-IT's NACCulator project. # Use of this source code is governed by the license found in the LICENSE file. #######################################...
Add cappy to dependency list
Add cappy to dependency list
Python
bsd-2-clause
ctsit/nacculator,ctsit/nacculator,ctsit/nacculator
--- +++ @@ -1,5 +1,5 @@ ############################################################################### -# Copyright 2015-2016 University of Florida. All rights reserved. +# Copyright 2015-2019 University of Florida. All rights reserved. # This file is part of UF CTS-IT's NACCulator project. # Use of this source c...
36456b313a24ffb5502a9020217e5172bc73bc15
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup import os # Utility function to read README file def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='iss', version='2.7', description="Ideally Single Source app for MemberSuite data.", author='AASHE',...
#!/usr/bin/env python from setuptools import setup import os # Utility function to read README file def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='iss', version='2.7', description="Ideally Single Source app for MemberSuite data.", author='AASHE',...
Downgrade to v0.4.4 of membersuite-api-client
Downgrade to v0.4.4 of membersuite-api-client
Python
mit
AASHE/iss
--- +++ @@ -31,7 +31,7 @@ ], install_requires=[ "beatbox==32.1", - "membersuite_api_client==1.0", + "membersuite_api_client==0.4.4", "pycountry", "pyYAML==3.12", ]
1fc72a38e1e62bde62650356cddf4e22bab21d73
setup.py
setup.py
import os from setuptools import setup base = os.path.dirname(__file__) mdata = {} with open(os.path.join(base, 'uniplot', '__about__.py')) as f: exec(f.read(), mdata) setup( name=mdata['__title__'], version=mdata['__version__'], author=mdata['__author__'], author_email=mdata['__email__'], de...
import os from setuptools import setup base = os.path.dirname(__file__) mdata = {} with open(os.path.join(base, 'uniplot', '__about__.py')) as f: exec(f.read(), mdata) setup( name=mdata['__title__'], version=mdata['__version__'], author=mdata['__author__'], author_email=mdata['__email__'], de...
Improve dependencies and add entry_points.
Improve dependencies and add entry_points.
Python
mit
Sean1708/uniplot
--- +++ @@ -17,5 +17,11 @@ url=mdata['__homepage__'], download_url=mdata['__download__'], license=mdata['__license__'], + install_requires=['hippy', 'matplotlib'], + extras_require={ + 'YAML': ['PyYAML'], + 'TOML': ['PyTOML'], + }, + entry_points={'console_scripts': ['uniplo...
9b2d464a2562ecf915f22c4664f00af3d66b34ce
setup.py
setup.py
from setuptools import setup, find_packages import os scriptnames = ['runElegant.sh', 'sddsprintdata.sh', 'renametolower.sh', 'file2lower.sh', 'lte2json', 'json2lte', 'latticeviewer', 'lv'] def readme(): with ...
from setuptools import setup, find_packages import os scriptnames = ['runElegant.sh', 'sddsprintdata.sh', 'renametolower.sh', 'file2lower.sh', 'lte2json', 'json2lte', 'latticeviewer', 'lv'] def readme(): with ...
Delete `requires` and `wxPython` dependency
Delete `requires` and `wxPython` dependency `wxPython` is not easily installable via pip on all Linux distributions without explicitly providing the path to the wheel, yet. `requires` is obsolete, because of the use of `install_requires`
Python
mit
Archman/beamline
--- +++ @@ -14,7 +14,7 @@ with open('README.rst') as f: return f.read() -requiredpackages = ['pyrpn', 'h5py', 'numpy', 'matplotlib', 'pyepics', 'wxPython'] +requiredpackages = ['pyrpn', 'h5py', 'numpy', 'matplotlib', 'pyepics'] setup( name = "beamline", @@ -28,7 +28,6 @@ packa...
dde21c684965c76144adf2654ff04c89ad2c86c8
setup.py
setup.py
from setuptools import setup setup( name="ticket_auth", version="0.1.0", packages=['ticket_auth'], author='Gnarly Chicken', author_email='gnarlychicken@gmx.com', test_suite='tests', license='MIT')
from setuptools import setup setup( name="ticket_auth", version="0.1.1", packages=['ticket_auth'], author='Gnarly Chicken', author_email='gnarlychicken@gmx.com', test_suite='tests', license='MIT')
Update of version information in preparation for release
Update of version information in preparation for release
Python
mit
gnarlychicken/ticket_auth
--- +++ @@ -3,7 +3,7 @@ setup( name="ticket_auth", - version="0.1.0", + version="0.1.1", packages=['ticket_auth'], author='Gnarly Chicken', author_email='gnarlychicken@gmx.com',
8e3e72b26e490f35c7e9c4a33ac5314d3be07077
setup.py
setup.py
#! /usr/bin/env python from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import os import sys os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'saleor.settings') class PyTest(TestCommand): user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')] ...
#! /usr/bin/env python from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import os import sys os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'saleor.settings') class PyTest(TestCommand): user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')] ...
Read requirements from the .txt file
Read requirements from the .txt file
Python
bsd-3-clause
laosunhust/saleor,tfroehlich82/saleor,tfroehlich82/saleor,spartonia/saleor,laosunhust/saleor,maferelo/saleor,maferelo/saleor,mociepka/saleor,rodrigozn/CW-Shop,UITools/saleor,rodrigozn/CW-Shop,car3oon/saleor,itbabu/saleor,itbabu/saleor,rchav/vinerack,jreigel/saleor,car3oon/saleor,jreigel/saleor,HyperManTT/ECommerceSaleo...
--- +++ @@ -27,7 +27,7 @@ sys.exit(errno) -with open('requirements.in', 'r') as req_file: +with open('requirements.txt', 'r') as req_file: requirements = req_file.readlines()
05a0b448b647a7a0d968bfd0019a1520b3496bd1
setup.py
setup.py
from setuptools import setup, find_packages setup( name='panoptes_client', url='https://github.com/zooniverse/panoptes-python-client', author='Adam McMaster', author_email='adam@zooniverse.org', version='1.1.1', packages=find_packages(), include_package_data=True, install_requires=[ ...
from setuptools import setup, find_packages setup( name='panoptes_client', url='https://github.com/zooniverse/panoptes-python-client', author='Adam McMaster', author_email='adam@zooniverse.org', version='1.1.1', packages=find_packages(), include_package_data=True, install_requires=[ ...
Update requests requirement from <2.22,>=2.4.2 to >=2.4.2,<2.23
Update requests requirement from <2.22,>=2.4.2 to >=2.4.2,<2.23 Updates the requirements on [requests](https://github.com/requests/requests) to permit the latest version. - [Release notes](https://github.com/requests/requests/releases) - [Changelog](https://github.com/kennethreitz/requests/blob/master/HISTORY.md) - [C...
Python
apache-2.0
zooniverse/panoptes-python-client
--- +++ @@ -9,7 +9,7 @@ packages=find_packages(), include_package_data=True, install_requires=[ - 'requests>=2.4.2,<2.22', + 'requests>=2.4.2,<2.23', 'future>=0.16,<0.18', 'python-magic>=0.4,<0.5', 'redo>=1.7',
961f8ab2b664dd24886b5dcf350c437a17fefe1a
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='orges', version='0.0.1', description='OrgES Package - Organic Computing for Evolution Strategies', long_description=open('README.rst').read(), author='Renke Grunwald, Bengt Lüers, Jendrik Poloczek', author_email='...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages, Extension import os setup( name='orges', version='0.0.1', description='OrgES Package - Organic Computing for Evolution Strategies', long_description=open('README.rst').read(), author='Renke Grunwald, Bengt Lüers, Jendrik Poloczek', autho...
Use relative path in for LICENSE
Use relative path in for LICENSE
Python
bsd-3-clause
cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt
--- +++ @@ -1,16 +1,16 @@ # -*- coding: utf-8 -*- -from setuptools import setup, find_packages +from setuptools import setup, find_packages, Extension +import os setup( - name='orges', - version='0.0.1', - description='OrgES Package - Organic Computing for Evolution Strategies', - long_description=o...
af328240631dd31b405e90c09052c1872490713d
setup.py
setup.py
from distutils.core import setup setup( name='gapi', version='0.5.0', author='Scott Hendrickson, Josh Montague', author_email='scott@drskippy.net', packages=[], scripts=['search_api.py', 'paged_search_api.py'], url='https://github.com/DrSkippy27/Gnip-Python-Search-API-Utilities', downlo...
from distutils.core import setup setup( name='gapi', version='0.5.2', author='Scott Hendrickson, Josh Montague', author_email='scott@drskippy.net', packages=[], scripts=['search_api.py', 'paged_search_api.py'], url='https://github.com/DrSkippy27/Gnip-Python-Search-API-Utilities', downlo...
Update pip package. Added proper requests dependency
Update pip package. Added proper requests dependency
Python
bsd-2-clause
DrSkippy/Gnip-Python-Search-API-Utilities,blehman/Gnip-Python-Search-API-Utilities,DrSkippy/Gnip-Python-Search-API-Utilities,blehman/Gnip-Python-Search-API-Utilities
--- +++ @@ -2,7 +2,7 @@ setup( name='gapi', - version='0.5.0', + version='0.5.2', author='Scott Hendrickson, Josh Montague', author_email='scott@drskippy.net', packages=[], @@ -13,6 +13,7 @@ description='Simple utilties to to explore the Gnip search API', install_requires=[ ...
ca29731fd9b8f207a927c8c96c9d9fbb3c98e930
setup.py
setup.py
from setuptools import setup, find_packages setup( name = 'ckanext-archiver', version = '0.1', packages = find_packages(), install_requires = [ 'celery>=2.3.3', 'kombu-sqlalchemy>=1.1.0', 'SQLAlchemy>=0.6.6' ], # metadata for upload to PyPI author = 'Open Knowledge F...
from setuptools import setup, find_packages setup( name = 'ckanext-archiver', version = '0.1', packages = find_packages(), install_requires = [ 'celery>=2.3.3', 'kombu-sqlalchemy>=1.1.0', 'SQLAlchemy>=0.6.6', 'requests==0.6.1' ], # metadata for upload to PyPI ...
Add requests module to installation requirements
Add requests module to installation requirements
Python
mit
ckan/ckanext-archiver,datagovuk/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver,datagovuk/ckanext-archiver,ckan/ckanext-archiver,ckan/ckanext-archiver,datagovuk/ckanext-archiver,DanePubliczneGovPl/ckanext-archiver
--- +++ @@ -7,7 +7,8 @@ install_requires = [ 'celery>=2.3.3', 'kombu-sqlalchemy>=1.1.0', - 'SQLAlchemy>=0.6.6' + 'SQLAlchemy>=0.6.6', + 'requests==0.6.1' ], # metadata for upload to PyPI author = 'Open Knowledge Foundation',
13a29de045e1386dde2be6185f5f05095f3d4c2d
setup.py
setup.py
from os import path, pardir, chdir from setuptools import setup, find_packages README = open(path.join(path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path chdir(path.normpath(path.join(path.abspath(__file__), pardir))) setup( name='django-perimeter', version='0.9', pack...
from os import path, pardir, chdir from setuptools import setup, find_packages README = open(path.join(path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path chdir(path.normpath(path.join(path.abspath(__file__), pardir))) setup( name='django-perimeter', version='0.9', pack...
Update license classifier to MIT
Update license classifier to MIT
Python
mit
yunojuno/django-perimeter,yunojuno/django-perimeter
--- +++ @@ -24,7 +24,7 @@ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT', + 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :...
f87c291ce7ee7a54a987f3d8bd1a43e1cee2b6a0
setup.py
setup.py
from setuptools import setup setup( name = 'diabric', version = '0.1', license = 'MIT', description = 'Diabolically atomic Python Fabric fabfile tasks and utilities.', long_description = open('README.md').read(), keywords = 'fabric fabfile boto ec2 virtualenv python wsgi webapp deployment', ...
import os from setuptools import setup, find_packages setup( name = 'diabric', version = '0.1.1', license = 'MIT', description = 'Diabolically atomic Python Fabric fabfile tasks and utilities.', long_description = open(os.path.join(os.path.dirname(__file__), 'README.md')).read(), keywords = 'f...
Fix pip installation failure involving README.md
Fix pip installation failure involving README.md Two bugs with "easy" fixes: - README.md was not being included in the source distribution. I'm not sure what I did to fix it, since the distutils/setuptools/distribute docs are quite incomplete and convoluted on something so straight-forward. The fix: I removed...
Python
mit
todddeluca/diabric
--- +++ @@ -1,12 +1,13 @@ -from setuptools import setup +import os +from setuptools import setup, find_packages setup( name = 'diabric', - version = '0.1', + version = '0.1.1', license = 'MIT', description = 'Diabolically atomic Python Fabric fabfile tasks and utilities.', - long_descript...
e0bbd05c252438d157de6f9b85079848920f574e
setup.py
setup.py
from setuptools import setup, find_packages def listify(filename): return filter(None, open(filename, 'r').readlines()) setup( name="python-smpp", version="0.1.6a", url='http://github.com/praekelt/python-smpp', license='BSD', description="Python SMPP Library", long_description=open('READM...
import os from setuptools import setup, find_packages def listify(filename): return filter(None, open(filename, 'r').readlines()) def read_file(filename): filepath = os.path.join(os.path.dirname(__file__), filename) return open(filepath, 'r').read() setup( name="python-smpp", version="0.1.6a", ...
Use absolute path for reading description from file (thanks @hodgestar)
Use absolute path for reading description from file (thanks @hodgestar)
Python
bsd-3-clause
praekelt/python-smpp,praekelt/python-smpp
--- +++ @@ -1,8 +1,14 @@ +import os from setuptools import setup, find_packages def listify(filename): return filter(None, open(filename, 'r').readlines()) + + +def read_file(filename): + filepath = os.path.join(os.path.dirname(__file__), filename) + return open(filepath, 'r').read() setup( n...
c015a16ef24ae8e6b07c1fc74a613ded75a6084a
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='organizations-edx-platform-extensions', version='1.2.3', description='Organization management extension for edX platform', long_description=open('README.rst').read(), author='edX', url='https://github.com/edx-soluti...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='organizations-edx-platform-extensions', version='1.2.6', description='Organization management extension for edX platform', long_description=open('README.rst').read(), author='edX', url='https://github.com/edx-soluti...
Delete organization field API issues
Delete organization field API issues Changed the database field to unlimited sized field which is TextField in the case of django=1.8. fixed the delete api checks and randomized the key for attributes. [YONK-1151]
Python
agpl-3.0
edx-solutions/organizations-edx-platform-extensions
--- +++ @@ -4,7 +4,7 @@ setup( name='organizations-edx-platform-extensions', - version='1.2.3', + version='1.2.6', description='Organization management extension for edX platform', long_description=open('README.rst').read(), author='edX',
96871ab62c6635c396325591c84bed243745fd16
setup.py
setup.py
from setuptools import setup setup( name='icapservice', version='0.1.1', description='ICAP service library for Python', author='Giles Brown', author_email='giles_brown@hotmail.com', url='https://github.com/gilesbrown/icapservice', license='MIT', packages=['icapservice'], zip_safe=F...
from setuptools import setup setup( name='icapservice', version='0.2.0', description='ICAP service library for Python', author='Giles Brown', author_email='giles_brown@hotmail.com', url='https://github.com/gilesbrown/icapservice', license='MIT', packages=['icapservice'], zip_safe=F...
Add support for brotli content encoding and alias for none
Add support for brotli content encoding and alias for none
Python
mit
gilesbrown/python-icapservice,gilesbrown/python-icapservice
--- +++ @@ -3,7 +3,7 @@ setup( name='icapservice', - version='0.1.1', + version='0.2.0', description='ICAP service library for Python', author='Giles Brown', author_email='giles_brown@hotmail.com',
7b9f9fe1816233d59d32fc41c737250f15fd1b7c
setup.py
setup.py
import os from setuptools import setup setup( name='algorithmia', version='0.9.2', description='Algorithmia Python Client', long_description='Algorithmia Python Client is a client library for accessing Algorithmia from python code. This library also gets bundled with any Python algorithms in Algorithm...
import os from setuptools import setup setup( name='algorithmia', version='0.9.0', description='Algorithmia Python Client', long_description='Algorithmia Python Client is a client library for accessing Algorithmia from python code. This library also gets bundled with any Python algorithms in Algorithm...
Move back to 0.9.0 for prod PyPi upload
Move back to 0.9.0 for prod PyPi upload
Python
mit
algorithmiaio/algorithmia-python
--- +++ @@ -4,7 +4,7 @@ setup( name='algorithmia', - version='0.9.2', + version='0.9.0', description='Algorithmia Python Client', long_description='Algorithmia Python Client is a client library for accessing Algorithmia from python code. This library also gets bundled with any Python algorithm...
5d4baf4d9b2c4967276f188a496d04062041c26c
setup.py
setup.py
from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize setup( name='cygroonga', version='0.1.0', ext_modules=cythonize([ Extension("cygroonga", ["cygroonga.pyx"], libraries=["groonga"]) ]), install_requires=[ 'Cython...
from distutils.core import setup from distutils.extension import Extension from Cython.Build import cythonize setup( name='cygroonga', version='0.1.0', ext_modules=cythonize([ Extension("cygroonga", ["cygroonga.pyx"], libraries=["groonga"]) ]), install_requires=[ 'Cython...
Add cython version to install_requires
Add cython version to install_requires
Python
apache-2.0
hnakamur/cygroonga
--- +++ @@ -10,6 +10,6 @@ libraries=["groonga"]) ]), install_requires=[ - 'Cython', + 'Cython==0.22.1', ], )
65e72e330bfaf1c8e2dd03cb809ad697a5f9af35
setup.py
setup.py
from setuptools import setup, find_packages import board setup( name='django-board', version=board.__version__, description='A Django app for managing an organisation\'s board members page.', long_description=open('README.md').read(), author='Dominic Rodger', author_email='internet@dominicrodg...
from setuptools import setup, find_packages import board setup( name='django-board', version=board.__version__, description='A Django app for managing an organisation\'s board members page.', long_description=open('README.md').read(), author='Dominic Rodger', author_email='internet@dominicrodg...
Use actual version numbers for dependencies
Use actual version numbers for dependencies
Python
mit
dominicrodger/django-board,dominicrodger/django-board
--- +++ @@ -15,5 +15,9 @@ include_package_data=True, package_data={'': ['README.md']}, zip_safe=False, - install_requires=['Django', 'South', 'sorl-thumbnail',] + install_requires=[ + 'Django==1.4.3', + 'South==0.76', + 'sorl-thumbnail==11.12', + ] )
d7df3f73b521327a6a7879d47ced1cc8c7a47a2d
tensorbayes/layers/sample.py
tensorbayes/layers/sample.py
import tensorflow as tf def GaussianSample(mean, var, scope): with tf.name_scope(scope): return tf.random_normal(tf.shape(mean), mean, tf.sqrt(var))
import tensorflow as tf def GaussianSample(mean, var, scope): with tf.name_scope(scope): return tf.random_normal(tf.shape(mean), mean, tf.sqrt(var)) def Duplicate(x, n_iw=1, n_mc=1, scope=None): """ Duplication function adds samples according to n_iw and n_mc. This function is specifically for im...
Add importance weighting and monte carlo feature
Add importance weighting and monte carlo feature
Python
mit
RuiShu/tensorbayes
--- +++ @@ -3,3 +3,16 @@ def GaussianSample(mean, var, scope): with tf.name_scope(scope): return tf.random_normal(tf.shape(mean), mean, tf.sqrt(var)) + +def Duplicate(x, n_iw=1, n_mc=1, scope=None): + """ Duplication function adds samples according to n_iw and n_mc. + + This function is specifica...
c9d992cd69fd1ec5c0b8655b379862527b452fb6
geotrek/settings/dev.py
geotrek/settings/dev.py
from .default import * # NOQA # # Django Development # .......................... DEBUG = True TEMPLATE_DEBUG = True SOUTH_TESTS_MIGRATE = False # Tested at settings.tests # # Developper Toolbar # .......................... INSTALLED_APPS = ( # 'debug_toolbar', 'django_extensions', ) + INSTALLED_APPS # ...
from .default import * # NOQA # # Django Development # .......................... DEBUG = True TEMPLATE_DEBUG = True SOUTH_TESTS_MIGRATE = False # Tested at settings.tests # # Developper Toolbar # .......................... INSTALLED_APPS = ( # 'debug_toolbar', 'django_extensions', ) + INSTALLED_APPS # ...
Set up console email backend in debug mode
Set up console email backend in debug mode
Python
bsd-2-clause
makinacorpus/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin,johan--/Geotrek,johan--/Geotrek,johan--/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,Anaethelion/Geotrek,Anaethelion/Geotrek,johan--/Geot...
--- +++ @@ -34,3 +34,5 @@ LOGGING['loggers']['geotrek']['level'] = 'DEBUG' LOGGING['loggers']['']['level'] = 'DEBUG' + +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
4ca8b6140ea68ee3a4824220590ecd7150cf90a4
tor.py
tor.py
import socks import socket class Tor(object): """Tor class for socks proxy and controller""" def __init__(self, socks_port=9050): self.socks_port = socks_port self.default_socket = socket.socket
import socks import socket class Tor(object): """Tor class for socks proxy and controller""" def __init__(self, socks_port=9050): self.socks_port = socks_port self.default_socket = socket.socket def connect(self): """connect to Tor socks proxy""" socks.set_default_proxy(so...
Add connect and disconnect methods
Add connect and disconnect methods
Python
mit
MA3STR0/simpletor
--- +++ @@ -7,3 +7,12 @@ def __init__(self, socks_port=9050): self.socks_port = socks_port self.default_socket = socket.socket + + def connect(self): + """connect to Tor socks proxy""" + socks.set_default_proxy(socks.SOCKS5, "127.0.0.1", self.socks_port) + socket.socket ...
0af1b0bc4448a289c0e21b32face5545ce5d13c7
test_quick_sort.py
test_quick_sort.py
from random import shuffle import pytest from quick_sort import quick_srt def test_quick_srt(): expected = range(20) actual = expected[:] shuffle(actual) quick_srt(actual) assert expected == actual def test_quick_srt_with_duplicates(): expected = [1, 3, 3, 6, 7, 8, 8, 8] actual = expect...
Add basic tests for quick sort
Add basic tests for quick sort
Python
mit
jonathanstallings/data-structures
--- +++ @@ -0,0 +1,26 @@ +from random import shuffle +import pytest + +from quick_sort import quick_srt + + +def test_quick_srt(): + expected = range(20) + actual = expected[:] + shuffle(actual) + quick_srt(actual) + assert expected == actual + + +def test_quick_srt_with_duplicates(): + expected = [...
abebc8a1153a9529a0f805207492cf2f5edece62
cbor2/__init__.py
cbor2/__init__.py
from .decoder import load, loads, CBORDecoder, CBORDecodeError # noqa from .encoder import dump, dumps, CBOREncoder, CBOREncodeError, shareable_encoder # noqa from .types import CBORTag, CBORSimpleValue, undefined # noqa
from .decoder import load, loads, CBORDecoder # noqa from .encoder import dump, dumps, CBOREncoder, shareable_encoder # noqa from .types import ( # noqa CBORError, CBOREncodeError, CBORDecodeError, CBORTag, CBORSimpleValue, undefined ) try: from _cbor2 import * # noqa except ImportError...
Make the package import both variants
Make the package import both variants Favouring the C variant where it successfully imports. This commit also handles generating the encoding dictionaries for the C variant from those defined for the Python variant (this is much simpler than doing this in C).
Python
mit
agronholm/cbor2,agronholm/cbor2,agronholm/cbor2
--- +++ @@ -1,3 +1,47 @@ -from .decoder import load, loads, CBORDecoder, CBORDecodeError # noqa -from .encoder import dump, dumps, CBOREncoder, CBOREncodeError, shareable_encoder # noqa -from .types import CBORTag, CBORSimpleValue, undefined # noqa +from .decoder import load, loads, CBORDecoder # noqa +from .enco...
27f6f1a352ddb72e48550e7d656a3882126d6de6
pythonic_rules.example/upload/__init__.py
pythonic_rules.example/upload/__init__.py
#!/usr/bin/python from config import INTERFACES from built_in_classes import RootHTBClass from .upload import Interactive, TCPACK, SSH, HTTP, Default def apply_qos(): public_if = INTERFACES["public_if"] root_class = RootHTBClass( interface=public_if["name"], rate=public_if["speed"], b...
#!/usr/bin/python from config import INTERFACES from built_in_classes import RootHTBClass from .upload import Interactive, TCPACK, SSH, HTTP, Default def apply_qos(): public_if = INTERFACES["public_if"] root_class = RootHTBClass( interface=public_if["name"], rate=public_if["speed"], b...
Enable all rules in pythonic_rules
Enable all rules in pythonic_rules Has been disabled to avoid errors until the new design was nos finished.
Python
bsd-2-clause
Anthony25/python_tc_qos
--- +++ @@ -14,10 +14,10 @@ qdisc_prefix_id="1:", default=1500 ) - # root_class.add_child(Interactive()) - # root_class.add_child(TCPACK()) - # root_class.add_child(SSH()) - # root_class.add_child(HTTP()) + root_class.add_child(Interactive()) + root_class.add_child(TCPACK()) +...
ed279b7f2cfcfd4abdf1da36d8406a3f63603529
dss/mobile/__init__.py
dss/mobile/__init__.py
""" TCP Server for mobile streaming """ try: import SocketServer as socketserver except ImportError: import socketserver from dss.tools import thread, show from dss.config import config from .handler import MediaHandler class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer): daemo...
""" TCP Server for mobile streaming """ try: import SocketServer as socketserver except ImportError: import socketserver from dss.tools import thread, show from dss.config import config from dss.storage import db from .handler import MediaHandler # If some streams are active, the program did no close prope...
Mark all mobile streams as inactive when the program starts.
Mark all mobile streams as inactive when the program starts.
Python
bsd-3-clause
terabit-software/dynamic-stream-server,hmoraes/dynamic-stream-server,terabit-software/dynamic-stream-server,hmoraes/dynamic-stream-server,terabit-software/dynamic-stream-server,terabit-software/dynamic-stream-server,hmoraes/dynamic-stream-server,hmoraes/dynamic-stream-server
--- +++ @@ -9,7 +9,12 @@ from dss.tools import thread, show from dss.config import config +from dss.storage import db from .handler import MediaHandler + + +# If some streams are active, the program did no close properly. +db.mobile.update({'active': True}, {'active': False}) class ThreadedTCPServer(sockets...
1e1c8a80199eacb64783a3fa69673059aa04da90
boardinghouse/tests/test_template_tag.py
boardinghouse/tests/test_template_tag.py
from django.test import TestCase from .models import AwareModel, NaiveModel from ..templatetags.boardinghouse import * class TestTemplateTags(TestCase): def test_is_schema_aware_filter(self): self.assertTrue(is_schema_aware(AwareModel())) self.assertFalse(is_schema_aware(NaiveModel())) de...
from django.test import TestCase from .models import AwareModel, NaiveModel from ..templatetags.boardinghouse import schema_name, is_schema_aware, is_shared_model from ..models import Schema class TestTemplateTags(TestCase): def test_is_schema_aware_filter(self): self.assertTrue(is_schema_aware(AwareModel...
Fix tests since we changed imports.
Fix tests since we changed imports.
Python
bsd-3-clause
luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse
--- +++ @@ -1,7 +1,8 @@ from django.test import TestCase from .models import AwareModel, NaiveModel -from ..templatetags.boardinghouse import * +from ..templatetags.boardinghouse import schema_name, is_schema_aware, is_shared_model +from ..models import Schema class TestTemplateTags(TestCase): def test_is...
0e69718b24fe24e898c605b1823db1939bcadcd4
examples/pipes-repl.py
examples/pipes-repl.py
import sys import code from diesel import Application, Pipe, until DEFAULT_PROMPT = '>>> ' def readcb(): print 'Diesel Console' cmd = '' prompt = DEFAULT_PROMPT while 1: sys.stdout.write(prompt) sys.stdout.flush() input = yield until("\n") cmd += input if input...
import sys import code from diesel import Application, Pipe, until DEFAULT_PROMPT = '>>> ' def readcb(): from diesel.app import current_app print 'Diesel Console' cmd = '' prompt = DEFAULT_PROMPT interp = code.InteractiveInterpreter(locals={'app':current_app}) while 1: sys.stdout.writ...
Switch to using InteractiveInterpreter object instead of eval
Switch to using InteractiveInterpreter object instead of eval
Python
bsd-3-clause
dieseldev/diesel
--- +++ @@ -6,9 +6,11 @@ DEFAULT_PROMPT = '>>> ' def readcb(): + from diesel.app import current_app print 'Diesel Console' cmd = '' prompt = DEFAULT_PROMPT + interp = code.InteractiveInterpreter(locals={'app':current_app}) while 1: sys.stdout.write(prompt) sys.stdout.fl...
0da65e9051ec6bf0c72f8dcc856a76547a1a125d
drf_multiple_model/views.py
drf_multiple_model/views.py
from drf_multiple_model.mixins import FlatMultipleModelMixin, ObjectMultipleModelMixin from rest_framework.generics import GenericAPIView class FlatMultipleModelAPIView(FlatMultipleModelMixin, GenericAPIView): def get(self, request, *args, **kwargs): return self.list(request, *args, **kwargs) def in...
from drf_multiple_model.mixins import FlatMultipleModelMixin, ObjectMultipleModelMixin from rest_framework.generics import GenericAPIView class FlatMultipleModelAPIView(FlatMultipleModelMixin, GenericAPIView): def get(self, request, *args, **kwargs): return self.list(request, *args, **kwargs) def in...
Fix initialization ofr sorting parameters
Fix initialization ofr sorting parameters
Python
mit
Axiologue/DjangoRestMultipleModels
--- +++ @@ -8,9 +8,13 @@ return self.list(request, *args, **kwargs) def initial(self, request, *args, **kwargs): - super().initial(request, *args, **kwargs) + super(GenericAPIView, self).initial(request, *args, **kwargs) if self.sorting_parameter_name in request.query_params: + ...
359c563e200431e7da13766cf106f14f36b29bd4
shuup_workbench/urls.py
shuup_workbench/urls.py
# This file is part of Shuup. # # Copyright (c) 2012-2018, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings from django.conf.urls import include, url from django.con...
# This file is part of Shuup. # # Copyright (c) 2012-2018, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf import settings from django.conf.urls import include, url from django.con...
Hide Django admin URLs from the workbench
Hide Django admin URLs from the workbench Django admin shouldn't be used by default with Shuup. Enabling this would require some attention towards Django filer in multi shop situations.
Python
agpl-3.0
shoopio/shoop,shoopio/shoop,shoopio/shoop
--- +++ @@ -7,10 +7,8 @@ from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static -from django.contrib import admin urlpatterns = [ - url(r'^admin/', include(admin.site.urls)), url(r'^sa/', include('shuup.admin.urls', namespace="shuup_admin", ...
40c5f5ec789cd820666596244d3e748fa9539732
currencies/context_processors.py
currencies/context_processors.py
from currencies.models import Currency def currencies(request): currencies = Currency.objects.all() if not request.session.get('currency'): #request.session['currency'] = Currency.objects.get(code__exact='EUR') request.session['currency'] = Currency.objects.get(is_default__exact=True) re...
from currencies.models import Currency def currencies(request): currencies = Currency.objects.all() if not request.session.get('currency'): request.session['currency'] = Currency.objects.get(is_default__exact=True) return { 'CURRENCIES': currencies, 'currency': request.session['c...
Remove an old debug comment
Remove an old debug comment
Python
bsd-3-clause
panosl/django-currencies,bashu/django-simple-currencies,barseghyanartur/django-currencies,mysociety/django-currencies,marcosalcazar/django-currencies,pathakamit88/django-currencies,bashu/django-simple-currencies,jmp0xf/django-currencies,pathakamit88/django-currencies,ydaniv/django-currencies,ydaniv/django-currencies,my...
--- +++ @@ -5,7 +5,6 @@ currencies = Currency.objects.all() if not request.session.get('currency'): - #request.session['currency'] = Currency.objects.get(code__exact='EUR') request.session['currency'] = Currency.objects.get(is_default__exact=True) return {
762147b8660a507ac5db8d0408162e8463b2fe8e
daiquiri/registry/serializers.py
daiquiri/registry/serializers.py
from rest_framework import serializers from daiquiri.core.serializers import JSONListField, JSONDictField class DublincoreSerializer(serializers.Serializer): identifier = serializers.ReadOnlyField() title = serializers.ReadOnlyField() description = serializers.SerializerMethodField() publisher = ser...
from rest_framework import serializers from daiquiri.core.serializers import JSONDictField, JSONListField class DublincoreSerializer(serializers.Serializer): identifier = serializers.ReadOnlyField() title = serializers.ReadOnlyField() description = serializers.SerializerMethodField() publisher = ser...
Fix status field in OAI-PMH
Fix status field in OAI-PMH
Python
apache-2.0
aipescience/django-daiquiri,aipescience/django-daiquiri,aipescience/django-daiquiri
--- +++ @@ -1,6 +1,6 @@ from rest_framework import serializers -from daiquiri.core.serializers import JSONListField, JSONDictField +from daiquiri.core.serializers import JSONDictField, JSONListField class DublincoreSerializer(serializers.Serializer): @@ -24,7 +24,8 @@ title = serializers.ReadOnlyField() ...
b1deec08fe23eb89dd51471c6f11e2e3da69a563
aospy/__init__.py
aospy/__init__.py
"""aospy: management, analysis, and plotting of gridded climate data.""" from .__config__ import (user_path, LAT_STR, LON_STR, PFULL_STR, PHALF_STR, PLEVEL_STR, TIME_STR) from . import constants from .constants import Constant from . import numerics from .numerics import FiniteDiff from . impor...
"""aospy: management, analysis, and plotting of gridded climate data.""" from .__config__ import (user_path, LAT_STR, LON_STR, PFULL_STR, PHALF_STR, PLEVEL_STR, TIME_STR, TIME_STR_IDEALIZED) from . import constants from .constants import Constant from . import numerics from .numerics import Fin...
Add TIME_STR_IDEALIZED to string labels
Add TIME_STR_IDEALIZED to string labels
Python
apache-2.0
spencerkclark/aospy,spencerahill/aospy
--- +++ @@ -1,6 +1,6 @@ """aospy: management, analysis, and plotting of gridded climate data.""" from .__config__ import (user_path, LAT_STR, LON_STR, PFULL_STR, PHALF_STR, - PLEVEL_STR, TIME_STR) + PLEVEL_STR, TIME_STR, TIME_STR_IDEALIZED) from . import constants f...
e1cfdb6a95e11261755064e52720a38c99f18ddf
SatNOGS/base/api/serializers.py
SatNOGS/base/api/serializers.py
from rest_framework import serializers from base.models import (Antenna, Data, Observation, Satellite, Station, Transponder) class AntennaSerializer(serializers.ModelSerializer): class Meta: model = Antenna fields = ('frequency', 'band', 'antenna_type') class StationSer...
from django.conf import settings from django.contrib.sites.models import Site from rest_framework import serializers from base.models import (Antenna, Data, Observation, Satellite, Station, Transponder) class AntennaSerializer(serializers.ModelSerializer): class Meta: model = Ant...
Add full image url to Station serializer
Add full image url to Station serializer
Python
agpl-3.0
cshields/satnogs-network,cshields/satnogs-network,cshields/satnogs-network,cshields/satnogs-network
--- +++ @@ -1,3 +1,5 @@ +from django.conf import settings +from django.contrib.sites.models import Site from rest_framework import serializers from base.models import (Antenna, Data, Observation, Satellite, Station, @@ -15,6 +17,12 @@ model = Station fields = ('owner', 'name', 'image', 'alt', 'l...
e45f23bbdce002cfbf644f2c91f319127f64b90c
mesa/urls.py
mesa/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', url(r'^', include('statuses.urls')), url(r'^admin/', include(admin.site.urls)), )
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^', include('statuses.urls')), url(r'^admin/', include(admin.site.urls)), ]
Change pattern tuple to list
Change pattern tuple to list
Python
mit
matthewlane/mesa,matthewlane/mesa,matthewlane/mesa,matthewlane/mesa
--- +++ @@ -1,7 +1,7 @@ -from django.conf.urls import patterns, include, url +from django.conf.urls import include, url from django.contrib import admin -urlpatterns = patterns('', +urlpatterns = [ url(r'^', include('statuses.urls')), url(r'^admin/', include(admin.site.urls)), -) +]
a43d461bf2d5c40b8d828873f9fa0b5e2048a0df
SnsManager/google/GoogleBase.py
SnsManager/google/GoogleBase.py
import httplib2 from apiclient.discovery import build from oauth2client.client import AccessTokenCredentials, AccessTokenCredentialsError from SnsManager.SnsBase import SnsBase from SnsManager import ErrorCode class GoogleBase(SnsBase): def __init__(self, *args, **kwargs): super(self.__class__, self).__ini...
import httplib2 from apiclient.discovery import build from oauth2client.client import AccessTokenCredentials, AccessTokenCredentialsError from SnsManager.SnsBase import SnsBase from SnsManager import ErrorCode class GoogleBase(SnsBase): def __init__(self, *args, **kwargs): super(GoogleBase, self).__init__(...
Move http object as based object
Move http object as based object
Python
bsd-3-clause
waveface/SnsManager
--- +++ @@ -6,16 +6,17 @@ class GoogleBase(SnsBase): def __init__(self, *args, **kwargs): - super(self.__class__, self).__init__(*args, **kwargs) + super(GoogleBase, self).__init__(*args, **kwargs) self.myId = self.getMyId() self._userAgent = 'Waveface AOStream/1.0' + ...
a99d07e02f69961be5096ce8575007cec7ec213d
photoshell/__main__.py
photoshell/__main__.py
import os from gi.repository import GObject from photoshell.config import Config from photoshell.library import Library from photoshell.views.slideshow import Slideshow from photoshell.views.window import Window c = Config({ 'library': os.path.join(os.environ['HOME'], 'Pictures/Photoshell'), 'dark_theme': Tr...
import os import signal from photoshell.config import Config from photoshell.library import Library from photoshell.views.slideshow import Slideshow from photoshell.views.window import Window c = Config({ 'library': os.path.join(os.environ['HOME'], 'Pictures/Photoshell'), 'dark_theme': True, 'import_path'...
Add a signal handler to handle SIGINTs
Add a signal handler to handle SIGINTs Fixes #135
Python
mit
photoshell/photoshell,SamWhited/photoshell,campaul/photoshell
--- +++ @@ -1,6 +1,5 @@ import os - -from gi.repository import GObject +import signal from photoshell.config import Config from photoshell.library import Library @@ -15,6 +14,9 @@ # Open photo viewer library = Library(c) + +signal.signal(signal.SIGINT, signal.SIG_DFL) Window(c, library, Slideshow()) + if c...
691bee381bda822a059c5d9fa790feabc7e00a8d
dnsimple2/tests/services/base.py
dnsimple2/tests/services/base.py
import os from unittest import TestCase from dnsimple2.client import DNSimple from dnsimple2.resources import ( AccountResource, DomainResource ) from dnsimple2.tests.utils import get_test_domain_name class BaseServiceTestCase(TestCase): @classmethod def setUpClass(cls): access_token = os.get...
import os from unittest import TestCase from dnsimple2.client import DNSimple from dnsimple2.resources import ( AccountResource, DomainResource ) from dnsimple2.tests.utils import get_test_domain_name class BaseServiceTestCase(TestCase): @classmethod def setUpClass(cls): access_token = os.get...
Use env variable for account id in tests.
Use env variable for account id in tests.
Python
mit
indradhanush/dnsimple2-python
--- +++ @@ -14,7 +14,9 @@ def setUpClass(cls): access_token = os.getenv('DNSIMPLE_V2_ACCESS_TOKEN') cls.client = DNSimple(access_token) - cls.account = AccountResource(id=424) + + account_id = os.getenv('DNSIMPLE_ACCOUNT_ID') + cls.account = AccountResource(id=account_id) ...
1bda8188458b81866c5938529ba85b3913caedc0
project/api/indexes.py
project/api/indexes.py
from algoliasearch_django import AlgoliaIndex class ChartIndex(AlgoliaIndex): fields = [ 'title', 'arrangers' ] settings = { 'searchableAttributes': [ 'title', 'arrangers', ] } class GroupIndex(AlgoliaIndex): should_index = 'is_active' ...
from algoliasearch_django import AlgoliaIndex class ChartIndex(AlgoliaIndex): fields = [ 'title', 'arrangers' ] settings = { 'searchableAttributes': [ 'title', 'arrangers', ] } class GroupIndex(AlgoliaIndex): should_index = 'is_active' ...
Add faceting test to Group index
Add faceting test to Group index
Python
bsd-2-clause
barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api
--- +++ @@ -30,6 +30,9 @@ 'code', 'bhs_id', 'get_kind_display', + ], + 'attributesForFaceting': [ + 'get_kind_display', ] }
59c698e5db5c7fb2d537398cdad93215714b21f0
SimpleLoop.py
SimpleLoop.py
# Copyright 2011 Seppo Yli-Olli # # 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 writ...
# Copyright 2011 Seppo Yli-Olli # # 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 writ...
Add a way to have the loop quit after current invocation has been processed.
Add a way to have the loop quit after current invocation has been processed.
Python
apache-2.0
nanonyme/SimpleLoop,nanonyme/SimpleLoop
--- +++ @@ -17,7 +17,7 @@ def __init__ (self): self._queue = [] - self._defaultinvocation = None + self._running = False def queueInvocation(self, function, args): self._queue.append((function, args)) @@ -25,8 +25,14 @@ def defaultInvocation(self, function, args): ...
6b5461955e196ee4a12b708fb6f9bef750d468ad
testcontainers/oracle.py
testcontainers/oracle.py
from testcontainers.core.generic import DbContainer class OracleDbContainer(DbContainer): """ Oracle database container. Example ------- :: with OracleDbContainer(): e = sqlalchemy.create_engine(oracle.get_connection_url()) result = e.execute("select 1 from dual")...
from testcontainers.core.generic import DbContainer class OracleDbContainer(DbContainer): """ Oracle database container. Example ------- :: with OracleDbContainer() as oracle: e = sqlalchemy.create_engine(oracle.get_connection_url()) result = e.execute("select 1 f...
Add missing _configure to OracleDbContainer
Add missing _configure to OracleDbContainer Additionally, fix Oracle example.
Python
apache-2.0
SergeyPirogov/testcontainers-python
--- +++ @@ -9,7 +9,7 @@ ------- :: - with OracleDbContainer(): + with OracleDbContainer() as oracle: e = sqlalchemy.create_engine(oracle.get_connection_url()) result = e.execute("select 1 from dual") """ @@ -24,3 +24,6 @@ dialect="oracle", username...
9b83a9dbfe1cc3dc4e8da3df71b6c414e304f53f
testing/runtests.py
testing/runtests.py
# -*- coding: utf-8 -*- import os, sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import call_command if __name__ == "__main__": args = sys.argv[1:] call_command("test", *args, verbosity=2)
# -*- coding: utf-8 -*- import os, sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") if __name__ == "__main__": from django.core.management import execute_from_command_line args = sys.argv args.insert(1, "test") args.insert(2, "pg_uuid_fields") execute_from_command_line(args)
Fix tests to run with django 1.7
Fix tests to run with django 1.7
Python
bsd-3-clause
niwinz/djorm-ext-pguuid
--- +++ @@ -3,8 +3,11 @@ import os, sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") -from django.core.management import call_command +if __name__ == "__main__": + from django.core.management import execute_from_command_line -if __name__ == "__main__": - args = sys.argv[1:] - call_comman...
f68139ce9114f260487048716d7430fcb1b3173b
froide/helper/tasks.py
froide/helper/tasks.py
from django.conf import settings from django.utils import translation from celery.task import task from haystack import site @task def delayed_update(instance_pk, model): """ Only index stuff that is known to be public """ translation.activate(settings.LANGUAGE_CODE) try: instance = model.publishe...
import logging from django.conf import settings from django.utils import translation from celery.task import task from celery.signals import task_failure from haystack import site from sentry.client.handlers import SentryHandler # Hook up sentry to celery's logging # Based on http://www.colinhowe.co.uk/2011/02/08/c...
Add celery task failure sentry tracking
Add celery task failure sentry tracking
Python
mit
catcosmo/froide,okfse/froide,ryankanno/froide,LilithWittmann/froide,CodeforHawaii/froide,ryankanno/froide,LilithWittmann/froide,LilithWittmann/froide,catcosmo/froide,ryankanno/froide,CodeforHawaii/froide,catcosmo/froide,stefanw/froide,LilithWittmann/froide,CodeforHawaii/froide,CodeforHawaii/froide,ryankanno/froide,okfs...
--- +++ @@ -1,8 +1,35 @@ +import logging + from django.conf import settings from django.utils import translation from celery.task import task +from celery.signals import task_failure from haystack import site +from sentry.client.handlers import SentryHandler + + +# Hook up sentry to celery's logging +# Based on...
b9a16863a1baca989ccec66a88b4218aad676160
utils.py
utils.py
commands = {} def add_cmd(name, alias=None, owner=False, admin=False): def real_command(func): commands[name] = func if alias: commands[alias] = func return real_command def call_command(bot, event, irc): command = ' '.join(event.arguments).split(' ') args = command[1] ...
commands = {} def add_cmd(name, alias=None, owner=False, admin=False): def real_command(func): commands[name] = func if alias: commands[alias] = func return real_command def call_command(bot, event, irc): command = ' '.join(event.arguments).split(' ') args = command[1:] i...
Fix a bug and log to the console
Fix a bug and log to the console Fix a bug where a command is called without any arguments, so no indices will be out-of-range Log to the console whenever someone calls a command
Python
mit
wolfy1339/Python-IRC-Bot
--- +++ @@ -11,7 +11,7 @@ def call_command(bot, event, irc): command = ' '.join(event.arguments).split(' ') - args = command[1] + args = command[1:] if len(command) > 1 else None name = command[0][1:] try: commands[name](bot, event, irc, args) @@ -19,4 +19,8 @@ irc.reply(even...
c65ed9ec976c440b46dedc514daf883bba940282
myElsClient.py
myElsClient.py
import requests class myElsClient: """A class that implements a Python interface to api.elsevier.com""" # local variables __base_url = "http://api.elsevier.com/" def __init__(self, apiKey): """Instantiates a client with a given API Key.""" self.apiKey = apiKey def getBaseURL...
import requests class myElsClient: """A class that implements a Python interface to api.elsevier.com""" # local variables __base_url = "http://api.elsevier.com/" # constructors def __init__(self, apiKey): """Instantiates a client with a given API Key.""" self.apiKey = apiKey ...
Add ability to set insttoken
Add ability to set insttoken
Python
bsd-3-clause
ElsevierDev/elsapy
--- +++ @@ -6,10 +6,18 @@ # local variables __base_url = "http://api.elsevier.com/" - + + # constructors def __init__(self, apiKey): """Instantiates a client with a given API Key.""" self.apiKey = apiKey + # configuration functions + """Sets an institutional token for...
2565724364eac8a548be2f59173e2f0630fa2f5d
music/api.py
music/api.py
from django.conf.urls.defaults import url from tastypie.resources import ModelResource from tastypie.constants import ALL from jmbo.api import ModelBaseResource from music.models import Track class TrackResource(ModelBaseResource): class Meta: queryset = Track.permitted.all() resource_name = 't...
from django.conf.urls.defaults import url from tastypie.resources import ModelResource from tastypie.constants import ALL from tastypie import fields from jmbo.api import ModelBaseResource from music.models import Track, TrackContributor class TrackContributorResource(ModelBaseResource): class Meta: qu...
Include contributor in track feed
Include contributor in track feed
Python
bsd-3-clause
praekelt/jmbo-music,praekelt/jmbo-music
--- +++ @@ -2,12 +2,26 @@ from tastypie.resources import ModelResource from tastypie.constants import ALL +from tastypie import fields from jmbo.api import ModelBaseResource -from music.models import Track +from music.models import Track, TrackContributor + + +class TrackContributorResource(ModelBaseResource):...
2047d488a451759ebdf2bef508e1dd738d3165da
nazs/common.py
nazs/common.py
from .util import import_module import logging def init(): """ Initialize nazs environment, setup logging, processes and all needed stuff for running nazs """ from django.core import management # Sync volatile db, TODO set correct permissions management.call_command('syncdb', database='vo...
from .util import import_module import logging def init(): """ Initialize nazs environment, setup logging, processes and all needed stuff for running nazs """ from django.core import management # Sync volatile db, TODO set correct permissions management.call_command('syncdb', ...
Disable annoying syncdb info for volatile db
Disable annoying syncdb info for volatile db
Python
agpl-3.0
exekias/droplet,exekias/droplet,exekias/droplet
--- +++ @@ -10,7 +10,10 @@ """ from django.core import management # Sync volatile db, TODO set correct permissions - management.call_command('syncdb', database='volatile', interactive=False) + management.call_command('syncdb', + database='volatile', + ...
c45c3fa8670ed7030010a255aee0233c8a3c434f
test/assets/test_task_types_for_asset.py
test/assets/test_task_types_for_asset.py
from test.base import ApiDBTestCase class AssetTaskTypesTestCase(ApiDBTestCase): def setUp(self): super(AssetTaskTypesTestCase, self).setUp() self.generate_fixture_project_status() self.generate_fixture_project() self.generate_fixture_entity_type() self.generate_fixture_se...
from test.base import ApiDBTestCase class AssetTaskTypesTestCase(ApiDBTestCase): def setUp(self): super(AssetTaskTypesTestCase, self).setUp() self.generate_fixture_project_status() self.generate_fixture_project() self.generate_fixture_entity_type() self.generate_fixture_se...
Add tests for task types for assets routes
Add tests for task types for assets routes Add a test to ensure that a 404 is returned when the give id is wrong.
Python
agpl-3.0
cgwire/zou
--- +++ @@ -27,3 +27,6 @@ task_types[0], self.task_type_dict ) + + def test_get_task_types_for_asset_not_found(self): + self.get("data/assets/no-asset/task-types", 404)
ffb93d2a33d847d5aade8f69db87991b17698613
tests/main_test.py
tests/main_test.py
import EmpireAPIWrapper api = EmpireAPIWrapper.empireAPI('10.15.20.157', uname='empireadmin', passwd='Password123!') # api = EmpireAPIWrapper.empireAPI('10.15.20.157', token='2zqb4bgvoq1jhe9essncl3qa6h9rvbj1jq2p740k') # api = EmpireAPIWrapper.empireAPI('10.15.20.157', token='yv42s1wlo90ikrzc7pwebgrbpqnzkigqlxbb4cp2') ...
Test harness for all working end points
Test harness for all working end points
Python
apache-2.0
radioboyQ/EmpireAPIWrapper
--- +++ @@ -0,0 +1,12 @@ +import EmpireAPIWrapper + +api = EmpireAPIWrapper.empireAPI('10.15.20.157', uname='empireadmin', passwd='Password123!') +# api = EmpireAPIWrapper.empireAPI('10.15.20.157', token='2zqb4bgvoq1jhe9essncl3qa6h9rvbj1jq2p740k') +# api = EmpireAPIWrapper.empireAPI('10.15.20.157', token='yv42s1wlo90...