commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
49c73b00b5528706fbb340e53b37e59c8303d70d
oneflow/settings/snippets/common_production.py
oneflow/settings/snippets/common_production.py
# # Put production machines hostnames here. # # MANAGERS += (('Matthieu Chaignot', 'mc@1flow.io'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ]
# # Put production machines hostnames here. # MANAGERS += (('Matthieu Chaignot', 'mchaignot@gmail.com'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ]
Add Matthieu to MANAGERS, for him to receive the warn-closed-feed mail.
Add Matthieu to MANAGERS, for him to receive the warn-closed-feed mail.
Python
agpl-3.0
1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow
e1138ebffbdfe31d4a4acdb4e164bdd767c6e8ea
saylua/wrappers.py
saylua/wrappers.py
from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_function(*args, **kwar...
from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_function(*args, **kwar...
Fix for no role in admin access wrapper
Fix for no role in admin access wrapper
Python
agpl-3.0
LikeMyBread/Saylua,saylua/SayluaV2,LikeMyBread/Saylua,saylua/SayluaV2,saylua/SayluaV2,LikeMyBread/Saylua,LikeMyBread/Saylua
bb578d4237ccaf16fe5c38842cc100cdbefc0119
senlin/tests/functional/drivers/openstack/__init__.py
senlin/tests/functional/drivers/openstack/__init__.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
Add keystone driver plugin for functional test
Add keystone driver plugin for functional test This patch adds keystone driver plugin for functional test. Change-Id: Iefa9c1b8956854ae75f672627aa3d2f9f7d22c0e
Python
apache-2.0
openstack/senlin,stackforge/senlin,tengqm/senlin-container,stackforge/senlin,openstack/senlin,tengqm/senlin-container,Alzon/senlin,Alzon/senlin,openstack/senlin
50c21151b54759d297fdbef222aaa45c17f70027
horizon/conf/__init__.py
horizon/conf/__init__.py
import copy from django.utils.functional import LazyObject, empty from .default import HORIZON_CONFIG as DEFAULT_CONFIG class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.update(settings....
import copy from django.utils.functional import LazyObject, empty class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings from .default import HORIZON_CONFIG as DEFAULT_CONFIG HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.update(se...
Fix circular dependencies in dashboard settings
Fix circular dependencies in dashboard settings Importing horizon.utils from dashboard local_settings.py to generate SECRET_KEY results in a sequence of imports, and horizon.conf.default module gets imported at some point. During initialization of default HORIZON_CONFIG this module uses settings.LOGIN_REDIRECT_URL and...
Python
apache-2.0
dan1/horizon-x509,rickerc/horizon_audit,Tesora/tesora-horizon,tuskar/tuskar-ui,maestro-hybrid-cloud/horizon,orbitfp7/horizon,VaneCloud/horizon,CiscoSystems/horizon,nvoron23/avos,openstack-ja/horizon,tqtran7/horizon,JioCloud/horizon,promptworks/horizon,Mirantis/mos-horizon,FNST-OpenStack/horizon,Tesora/tesora-horizon,Fr...
6f75300037254f51f1512a271bf7850a4bc0a8f8
djangospam/cookie/urls.py
djangospam/cookie/urls.py
# -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ from django.conf.urls.defaults impo...
# -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ try: from django.conf.urls impo...
Add support for Django 1.4 and up
Add support for Django 1.4 and up * Module django.conf.urls.defaults has been moved to django.conf.urls in version 1.4. Commit references issue #3.
Python
bsd-2-clause
leandroarndt/djangospam,leandroarndt/djangospam
7b48044f19a50e4b84810a5e98d93cd537bea5c9
ichnaea/gunicorn_config.py
ichnaea/gunicorn_config.py
# This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum number of simultaneo...
# This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum number of simultaneo...
Increase gunicorn max_requests to avoid process churn at high request rates.
Increase gunicorn max_requests to avoid process churn at high request rates.
Python
apache-2.0
mozilla/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea
a9c53bc97c0e62a959c1115ec61d0a28d71aac68
devtools/ci/update-versions.py
devtools/ci/update-versions.py
from __future__ import print_function import os import boto from boto.s3.key import Key import msmbuilder.version if msmbuilder.version.release: # The secret key is available as a secure environment variable # on travis-ci to push the build documentation to Amazon S3. AWS_ACCESS_KEY_ID = os.environ['AWS_AC...
from __future__ import print_function import os import pip import json from tempfile import NamedTemporaryFile import subprocess from msmbuilder import version from six.moves.urllib.request import urlopen if not any(d.project_name == 's3cmd' for d in pip.get_installed_distributions()): raise ImportError('The s3cmd ...
Fix script for updating version dropdown
Fix script for updating version dropdown
Python
lgpl-2.1
mpharrigan/mixtape,brookehus/msmbuilder,peastman/msmbuilder,peastman/msmbuilder,rafwiewiora/msmbuilder,dr-nate/msmbuilder,dr-nate/msmbuilder,msmbuilder/msmbuilder,peastman/msmbuilder,Eigenstate/msmbuilder,Eigenstate/msmbuilder,msultan/msmbuilder,msultan/msmbuilder,rmcgibbo/msmbuilder,msmbuilder/msmbuilder,msultan/msmbu...
da547f5533f338cc0c65877b44ca40adf31754f7
support/appveyor-build.py
support/appveyor-build.py
#!/usr/bin/env python # Build the project on AppVeyor. import os from subprocess import check_call build = os.environ['BUILD'] config = os.environ['CONFIG'] cmake_command = ['cmake', '-DFMT_EXTRA_TESTS=ON', '-DCMAKE_BUILD_TYPE=' + config] if build == 'mingw': cmake_command.append('-GMinGW Makefiles') build_comman...
#!/usr/bin/env python # Build the project on AppVeyor. import os from subprocess import check_call build = os.environ['BUILD'] config = os.environ['CONFIG'] cmake_command = ['cmake', '-DFMT_EXTRA_TESTS=ON', '-DCMAKE_BUILD_TYPE=' + config] if build == 'mingw': cmake_command.append('-GMinGW Makefiles') build_comman...
Fix mingw build, take 2
Fix mingw build, take 2
Python
bsd-2-clause
cppformat/cppformat,mojoBrendan/fmt,mojoBrendan/fmt,alabuzhev/fmt,nelson4722/cppformat,seungrye/cppformat,lightslife/cppformat,blaquee/cppformat,mojoBrendan/fmt,Jopie64/cppformat,lightslife/cppformat,Jopie64/cppformat,alabuzhev/fmt,wangshijin/cppformat,dean0x7d/cppformat,seungrye/cppformat,cppformat/cppformat,nelson472...
4f793a31f238adce95fd8e2830a7d5b85724bdd2
elections/st_paul_municipal_2015/settings.py
elections/st_paul_municipal_2015/settings.py
# -*- coding: utf-8 -*- from datetime import date MAPIT_BASE_URL = 'http://international.mapit.mysociety.org/' ELECTION_RE = '(?P<election>council-member-2015|school-board-2015)' # OCD_BOUNDARIES_URL = 'http://127.0.0.1:8001' OCD_BOUNDARIES_URL = 'http://ocd.datamade.us' SITE_OWNER = 'Burkina Open Data Initiative (B...
# -*- coding: utf-8 -*- from datetime import date MAPIT_BASE_URL = 'http://international.mapit.mysociety.org/' ELECTION_RE = '(?P<election>council-member-2015|school-board-2015)' # OCD_BOUNDARIES_URL = 'http://127.0.0.1:8001' OCD_BOUNDARIES_URL = 'http://ocd.datamade.us' SITE_OWNER = 'DataMade' COPYRIGHT_HOLDER = 'D...
Make the SITE_OWNER and COPYRIGHT_HOLDER for St Paul (more) correct
Make the SITE_OWNER and COPYRIGHT_HOLDER for St Paul (more) correct
Python
agpl-3.0
mysociety/yournextrepresentative,DemocracyClub/yournextrepresentative,datamade/yournextmp-popit,mysociety/yournextrepresentative,datamade/yournextmp-popit,mysociety/yournextrepresentative,mysociety/yournextmp-popit,mysociety/yournextmp-popit,datamade/yournextmp-popit,mysociety/yournextmp-popit,datamade/yournextmp-popit...
aedde845b3af828053e56337719579b7808d13aa
onetime/views.py
onetime/views.py
from datetime import datetime from django.http import HttpResponse, HttpResponseRedirect, HttpResponseGone from django.contrib import auth from django.conf import settings from onetime import utils from onetime.models import Key def cleanup(request): utils.cleanup() return HttpResponse('ok', content_type='te...
from datetime import datetime from django.http import HttpResponse, HttpResponseRedirect, HttpResponseGone from django.contrib import auth from django.conf import settings from onetime import utils from onetime.models import Key def cleanup(request): utils.cleanup() return HttpResponse('ok', content_type='te...
Remove redirect_invalid_to option and use settings.LOGIN_URL instead. When redirect the user, also forward the next parameter.
Remove redirect_invalid_to option and use settings.LOGIN_URL instead. When redirect the user, also forward the next parameter.
Python
agpl-3.0
ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,fajran/django-loginurl,vanschelven/cmsplugin-journal,ISIFoundation/influenzanet-website,uploadcare/django-loginurl,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-website,ISIFoundation/influenzanet-web...
883f1b1c28e76ade6632f762391cbb4a97918e12
direct/src/extensions_native/HTTPChannel_extensions.py
direct/src/extensions_native/HTTPChannel_extensions.py
#################################################################### #Dtool_funcToMethod(func, class) #del func ##################################################################### from panda3d.core import HTTPChannel from .extension_native_helpers import Dtool_funcToMethod """ HTTPChannel-extensions module:...
#################################################################### #Dtool_funcToMethod(func, class) #del func ##################################################################### from panda3d import core from .extension_native_helpers import Dtool_funcToMethod """ HTTPChannel-extensions module: contains me...
Fix import error when compiling without OpenSSL support
Fix import error when compiling without OpenSSL support
Python
bsd-3-clause
brakhane/panda3d,grimfang/panda3d,chandler14362/panda3d,grimfang/panda3d,brakhane/panda3d,mgracer48/panda3d,grimfang/panda3d,brakhane/panda3d,mgracer48/panda3d,chandler14362/panda3d,chandler14362/panda3d,tobspr/panda3d,tobspr/panda3d,brakhane/panda3d,grimfang/panda3d,tobspr/panda3d,chandler14362/panda3d,brakhane/panda3...
44fb076a04388b57e8d517eb4835fe7b4b6720d5
aiopg/sa/__init__.py
aiopg/sa/__init__.py
"""Optional support for sqlalchemy.sql dynamic query generation.""" from .engine import create_engine, dialect from .connection import SAConnection from .exc import (Error, ArgumentError, InvalidRequestError, NoSuchColumnError, ResourceClosedError) __all__ = ('dialect', 'create_engine', 'SAConnecti...
"""Optional support for sqlalchemy.sql dynamic query generation.""" from .engine import create_engine, dialect, Engine from .connection import SAConnection from .exc import (Error, ArgumentError, InvalidRequestError, NoSuchColumnError, ResourceClosedError) __all__ = ('dialect', 'create_engine', 'SA...
Make Engine public importable name
Make Engine public importable name
Python
bsd-2-clause
luhn/aiopg,nerandell/aiopg,eirnym/aiopg,graingert/aiopg,aio-libs/aiopg,hyzhak/aiopg
fa6c2c43289eeee1c0efab45101149b49be1b5cb
scrapi/processing/osf/__init__.py
scrapi/processing/osf/__init__.py
from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): if crud.is_event(normalized): crud.dump_metdata(normalized...
from scrapi.processing.osf import crud from scrapi.processing.osf import collision from scrapi.processing.base import BaseProcessor class OSFProcessor(BaseProcessor): NAME = 'osf' def process_normalized(self, raw_doc, normalized): found, _hash = collision.already_processed(raw_doc) if found:...
Update dumping to osf logic
Update dumping to osf logic
Python
apache-2.0
ostwald/scrapi,mehanig/scrapi,felliott/scrapi,alexgarciac/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,icereval/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,jeffreyliu3230/scrapi,fabianvf/scrapi,erinspace/scrapi,mehanig/scrapi
d4aab57bf6173334fa2dbd82eef74b786473ef3d
djangosaml2/templatetags/idplist.py
djangosaml2/templatetags/idplist.py
# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # 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 applic...
# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # 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 applic...
Load the config as late as possible to avoid crashing when the configuration is not ready yet. Also this code is more reentrant
Load the config as late as possible to avoid crashing when the configuration is not ready yet. Also this code is more reentrant
Python
apache-2.0
WebSpider/djangosaml2,writepython/djangosaml2,BetterWorks/djangosaml2,damienmarie-alation/djangosaml2,BetterWorks/djangosaml2,MiguelSR/djangosaml2,bernii/djangosaml2,damienmarie-alation/djangosaml2,knaperek/djangosaml2,WebSpider/djangosaml2,writepython/djangosaml2,MiguelSR/djangosaml2,knaperek/djangosaml2,azavea/django...
c3c5128726e86436a7c7413c60c578410750d2c1
oscar/apps/customer/auth_backends.py
oscar/apps/customer/auth_backends.py
from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
Fix bug with updated auth backend
Fix bug with updated auth backend Now it checks to see if an email is being submitted.
Python
bsd-3-clause
Jannes123/django-oscar,amirrpp/django-oscar,Bogh/django-oscar,michaelkuty/django-oscar,jinnykoo/christmas,pasqualguerrero/django-oscar,rocopartners/django-oscar,pdonadeo/django-oscar,eddiep1101/django-oscar,adamend/django-oscar,jinnykoo/wuyisj,jmt4/django-oscar,jlmadurga/django-oscar,itbabu/django-oscar,jinnykoo/wuyisj...
1bae1bc94fea8fd9b8fe25d832ebfce07ad08a1c
utilities/build/update_xform_translate_path.py
utilities/build/update_xform_translate_path.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that the path to xform_translate.jar is updated dynamically. It does this by identifying the jar_path_placeholder in the file identi...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that xform_translate_path gets updated to point to the folder {project.dir}/lib """ JAR_PATH_SETTING = 'xform_translate_path' impo...
Fix up local.ini updater code to look specifically for 'xform_translate_path'
Fix up local.ini updater code to look specifically for 'xform_translate_path'
Python
bsd-3-clause
puttarajubr/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,gmimano/commcaretest,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,gmimano/commcaretest,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttaraju...
b077a5dba84cbc7b3fd37e276be1635301c79d99
website/core/settings/loc.py
website/core/settings/loc.py
"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets sys.path.append( abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) ) try: from secrets import * except ImportError, e: print 'WARNING: Could not import project secrets (%s). You wil...
"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets (no project-specific secrets) #sys.path.append( # abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) #) #try: # from secrets import * #except ImportError, e: # print 'WARNING: Could not i...
Comment out project-specific secrets import warning (not needed)
Comment out project-specific secrets import warning (not needed)
Python
mpl-2.0
cr3ative/StoryMapJS,wangjun/StoryMapJS,BenHeubl/StoryMapJS,BenHeubl/StoryMapJS,wangjun/StoryMapJS,cr3ative/StoryMapJS,miguelpaz/StoryMapJS,jorol/StoryMapJS,miguelpaz/StoryMapJS,jorol/StoryMapJS,1modm/StoryMapJS,cr3ative/StoryMapJS,makinacorpus/StoryMapJS,wangjun/StoryMapJS,miguelpaz/StoryMapJS,1modm/StoryMapJS,cr3ative...
086351fb56e2c777bcd6b332c1550acb46fc6fa6
src/ggrc_basic_permissions/roles/Auditor.py
src/ggrc_basic_permissions/roles/Auditor.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
Allow auditors to CR comments in context
Allow auditors to CR comments in context
Python
apache-2.0
edofic/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc-core,andrei-karalionak/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,edofic/ggrc-core,josthkko/ggrc-core,prasannav7/ggrc-core,AleksNeStu/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,edofic/...
5babccca12e1cbef655957b038594eadb1fe63bc
nose2/tests/unit/test_prof_plugin.py
nose2/tests/unit/test_prof_plugin.py
import unittest2 from ..plugins import prof from ._common import Stub, FakeStartTestRunEvent class TestProfPlugin(unittest2.TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hotshot = Stub() ...
from nose2.plugins import prof from nose2.events import StartTestRunEvent from nose2.tests._common import Stub, TestCase class TestProfPlugin(TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hots...
Use real events and proper TestCase
Use real events and proper TestCase
Python
bsd-2-clause
ojengwa/nose2,ezigman/nose2,leth/nose2,ptthiem/nose2,leth/nose2,little-dude/nose2,ptthiem/nose2,ezigman/nose2,little-dude/nose2,ojengwa/nose2
21c60fdd99e37436228cfe8e59f1b8788ea2b58b
platformio/builder/tools/pioar.py
platformio/builder/tools/pioar.py
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: pass d...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: # pylint: disab...
Hide PyLint warning with undefined WindowsError exception
Hide PyLint warning with undefined WindowsError exception
Python
apache-2.0
dkuku/platformio,mseroczynski/platformio,jrobeson/platformio,bkudria/platformio,awong1900/platformio,TimJay/platformio,TimJay/platformio,jrobeson/platformio,awong1900/platformio,awong1900/platformio,mcanthony/platformio,TimJay/platformio,ZachMassia/platformio,platformio/platformio-core,TimJay/platformio,platformio/plat...
3b684eeadb0c8b39593b14c15233a314bbab0895
troposphere/sns.py
troposphere/sns.py
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), ...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), ...
Update SNS per 2019-11-21 changes
Update SNS per 2019-11-21 changes
Python
bsd-2-clause
cloudtools/troposphere,ikben/troposphere,ikben/troposphere,cloudtools/troposphere
e7ec8deb9fda8be9f85f1f26452646b6ddfe5367
fuel_test/test_openstack.py
fuel_test/test_openstack.py
from openstack_site_pp_base import OpenStackSitePPBaseTestCase import unittest class OpenStackCase(OpenStackSitePPBaseTestCase): def test_deploy_open_stack(self): self.validate( [self.controller1,self.controller2,self.compute1,self.compute2], 'puppet agent --test') if __name__ == ...
from openstack_site_pp_base import OpenStackSitePPBaseTestCase import unittest class OpenStackCase(OpenStackSitePPBaseTestCase): def test_deploy_open_stack(self): self.validate( [self.controller1,self.controller2,self.compute1,self.compute2], 'puppet agent --test') for node...
Create snapshot after deploy openstack
Create snapshot after deploy openstack
Python
apache-2.0
slystopad/fuel-lib,Metaswitch/fuel-library,zhaochao/fuel-library,eayunstack/fuel-library,huntxu/fuel-library,SmartInfrastructures/fuel-library-dev,SmartInfrastructures/fuel-library-dev,ddepaoli3/fuel-library-dev,zhaochao/fuel-library,eayunstack/fuel-library,Metaswitch/fuel-library,zhaochao/fuel-library,zhaochao/fuel-li...
a93ad6ce9a264a82717a37230e48ff00d9c642fc
pywikibot/families/wikidata_family.py
pywikibot/families/wikidata_family.py
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The wikidata family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikidata' self.langs = { 'wikidata': 'www.wikidata.org', 'repo':...
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The wikidata family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikidata' self.langs = { 'wikidata': 'www.wikidata.org', 'repo':...
Add moon (Q405) to the list of globes
Add moon (Q405) to the list of globes Change-Id: I2dd9f87fcb1d748bff94328575f8439dc36035e3
Python
mit
magul/pywikibot-core,wikimedia/pywikibot-core,happy5214/pywikibot-core,jayvdb/pywikibot-core,Darkdadaah/pywikibot-core,trishnaguha/pywikibot-core,VcamX/pywikibot-core,hasteur/g13bot_tools_new,h4ck3rm1k3/pywikibot-core,hasteur/g13bot_tools_new,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,PersianWikipedia/pywikibot-...
d79607f320579b2b9d98f219c35d7c878173f10e
acoustics/doppler.py
acoustics/doppler.py
""" Doppler ======= Doppler shift module. """ from __future__ import division def velocity_from_doppler_shift(c, f1, f2): """ Calculate velocity based on measured frequency shifts due to Doppler shift. The assumption is made that the velocity is constant between the observation times. .. math:: ...
""" Doppler ======= Doppler shift module. """ from __future__ import division SOUNDSPEED = 343.0 """Speed of sound """ def velocity_from_doppler_shift(f1, f2, c=SOUNDSPEED): """Calculate velocity based on measured frequency shifts due to Doppler shift. :param c: Speed of sound :math:`c`. :param f1: ...
Add simple equation to calculate Doppler shift
Add simple equation to calculate Doppler shift
Python
bsd-3-clause
felipeacsi/python-acoustics,FRidh/python-acoustics,antiface/python-acoustics,python-acoustics/python-acoustics,giumas/python-acoustics
2e9c58f00db55e12f3a9df1a71fe33fbe440d7ce
corehq/apps/domain/management/commands/migrate_domain_countries.py
corehq/apps/domain/management/commands/migrate_domain_countries.py
from django.core.management.base import LabelCommand from django_countries.countries import COUNTRIES from corehq.apps.domain.models import Domain class Command(LabelCommand): help = "Migrates old django domain countries from string to list. Sept 2014." args = "" label = "" def handle(self, *args, **o...
from django.core.management.base import LabelCommand from django_countries.countries import COUNTRIES from corehq.apps.domain.models import Domain class Command(LabelCommand): help = "Migrates old django domain countries from string to list. Sept 2014." args = "" label = "" def handle(self, *args, **o...
Add migration for deployment country to countries
Add migration for deployment country to countries
Python
bsd-3-clause
qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq
654d21100ff2908af6c44e2d2d71ba92b1e96722
script/lib/config.py
script/lib/config.py
#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'win32': '32bit', ...
#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = 'e375124044f9044ac88076eba0cd17361ee0997c' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'win32': '32bit', ...
Upgrade libchromiumcontent to remove dom storage quota
Upgrade libchromiumcontent to remove dom storage quota Closes #897.
Python
mit
beni55/electron,vHanda/electron,leftstick/electron,mubassirhayat/electron,simongregory/electron,voidbridge/electron,tomashanacek/electron,nicobot/electron,MaxWhere/electron,pandoraui/electron,farmisen/electron,shennushi/electron,thomsonreuters/electron,minggo/electron,LadyNaggaga/electron,MaxGraey/electron,lrlna/electr...
6ee284adcc30213bc07153a16be475ec3e067d7e
rbtools/api/decode.py
rbtools/api/decode.py
import json from rbtools.api.utils import parse_mimetype DECODER_MAP = {} def DefaultDecoder(payload): """Default decoder for API payloads. The default decoder is used when a decoder is not found in the DECODER_MAP. This is a last resort which should only be used when something has gone wrong. ...
import json from rbtools.api.utils import parse_mimetype DECODER_MAP = {} def DefaultDecoder(payload): """Default decoder for API payloads. The default decoder is used when a decoder is not found in the DECODER_MAP. This is a last resort which should only be used when something has gone wrong. ...
Fix decoding of empty responses.
Fix decoding of empty responses. When an empty response was given by the web server, we were decoding to '{}', which is problematic when you are expecting an empty response for things like empty text/plain files. This fixes the problematic assumption we were making. Reviewed at http://reviews.reviewboard.org/r/3680/
Python
mit
davidt/rbtools,datjwu/rbtools,halvorlu/rbtools,beol/rbtools,reviewboard/rbtools,datjwu/rbtools,reviewboard/rbtools,halvorlu/rbtools,davidt/rbtools,datjwu/rbtools,davidt/rbtools,1tush/rbtools,beol/rbtools,haosdent/rbtools,beol/rbtools,haosdent/rbtools,reviewboard/rbtools,haosdent/rbtools,halvorlu/rbtools
a3eb4602aa5ec87e6f78477c4789ed2fbde1cf93
stevedore/__init__.py
stevedore/__init__.py
# flake8: noqa from .extension import ExtensionManager from .enabled import EnabledExtensionManager from .named import NamedExtensionManager from .hook import HookManager from .driver import DriverManager import logging # Configure a NullHandler for our log messages in case # the app we're used from does not set up ...
# flake8: noqa __all__ = [ 'ExtensionManager', 'EnabledExtensionManager', 'NamedExtensionManager', 'HookManager', 'DriverManager', ] from .extension import ExtensionManager from .enabled import EnabledExtensionManager from .named import NamedExtensionManager from .hook import HookManager from .dri...
Update null log handling for py26
Update null log handling for py26 Python 2.6 does not have a NullHandler in the logging module, so introduce a little class that does the same work. Also add __all__ to the package init so extra names are not exported. Resolves issue #2 Change-Id: Id59d394cd02372e2c31de336894f06653cb1e22d
Python
apache-2.0
mandeepdhami/stevedore,nelsnelson/stevedore,nelsnelson/stevedore,openstack/stevedore,varunarya10/stevedore,JioCloud/stevedore,JioCloud/stevedore,citrix-openstack-build/stevedore,mandeepdhami/stevedore,citrix-openstack-build/stevedore,varunarya10/stevedore
0c6930f1930dbba66ba928dab4ed195e6b6bf2cc
addons/crm/__terp__.py
addons/crm/__terp__.py
{ "name" : "Customer & Supplier Relationship Management", "version" : "1.0", "author" : "Tiny", "website" : "http://tinyerp.com/module_crm.html", "category" : "Generic Modules/CRM & SRM", "description": """The Tiny ERP case and request tracker enables a group of people to intelligently and efficiently manage task...
{ "name" : "Customer & Supplier Relationship Management", "version" : "1.0", "author" : "Tiny", "website" : "http://tinyerp.com/module_crm.html", "category" : "Generic Modules/CRM & SRM", "description": """The Tiny ERP case and request tracker enables a group of people to intelligently and efficiently manage task...
Add crm_security.xml file entry in update_xml section
Add crm_security.xml file entry in update_xml section bzr revid: mga@tinyerp.com-80638551c5a66adf0a49181f6ff6ae283ced3709
Python
agpl-3.0
rahuldhote/odoo,CopeX/odoo,CopeX/odoo,JonathanStein/odoo,colinnewell/odoo,Codefans-fan/odoo,mustafat/odoo-1,shivam1111/odoo,CubicERP/odoo,andreparames/odoo,gdgellatly/OCB1,PongPi/isl-odoo,Nick-OpusVL/odoo,damdam-s/OpenUpgrade,ecosoft-odoo/odoo,andreparames/odoo,grap/OCB,NL66278/OCB,Daniel-CA/odoo,OpusVL/odoo,luistorres...
5582556d735da829fe629cc36f9664047997a5bb
src/ggrc_basic_permissions/roles/Auditor.py
src/ggrc_basic_permissions/roles/Auditor.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
Allow auditor to create relationship in context
Allow auditor to create relationship in context This allows the auditor to map objects to the audit but not to unmap them while not giving him edit permissions on the audit.
Python
apache-2.0
kr41/ggrc-core,j0gurt/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak...
e07e436b461015365b2cbbdb96daa8bfc3ae31a4
{{cookiecutter.repo_name}}/config/urls.py
{{cookiecutter.repo_name}}/config/urls.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.views.generic import TemplateView # Comment the next two lines to disable the admin: from django.contrib import ad...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, patterns, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView urlpatterns = patterns('', # noqa url(r'^$...
Remove admin.autodiscover() call, it's called automatically in 1.7+
Remove admin.autodiscover() call, it's called automatically in 1.7+
Python
bsd-3-clause
interaktiviti/cookiecutter-django,asyncee/cookiecutter-django,kappataumu/cookiecutter-django,Sushantgakhar/cookiecutter-django,hairychris/cookiecutter-django,Sushantgakhar/cookiecutter-django,thornomad/cookiecutter-django,stepmr/cookiecutter-django,javipalanca/cookiecutter-django,wldcordeiro/cookiecutter-django-essenti...
cd5678640e17cca0517c14f7d172b2ca1f10a560
rarecommends.py
rarecommends.py
#!/usr/bin/python # Gets stuff from Resident Advisor's awesome 'RA Recommends' section # Note: this is just regexing the HTML... so may stop working if page structure changes # This is not written by, or affiliated with Resident Advisor at all # 2013 oldhill // MIT license import urllib2 import re def getResidentD...
#!/usr/bin/python # Gets stuff from Resident Advisor's awesome 'RA Recommends' section # Note: this is just regexing the HTML... so may stop working if page structure changes # This is not written by, or affiliated with Resident Advisor at all # 2013 oldhill // MIT license import urllib2 import re def getResidentD...
Fix Resident Advisor regex to match new page design
Fix Resident Advisor regex to match new page design
Python
mit
oldhill/ra-recommends
5a0ec237878512c408dd392c20b440033aed402b
tests/mock_config.py
tests/mock_config.py
from scoring_engine.config_loader import ConfigLoader class MockConfig(object): def __init__(self, location): self.file_location = location @property def config(self): return ConfigLoader(self.file_location) @property def checks_location(self): return 'scoring_engine/chec...
from scoring_engine.config_loader import ConfigLoader class MockConfig(object): def __init__(self, location): self.file_location = location @property def config(self): return ConfigLoader(self.file_location)
Remove unnecessary config mock property
Remove unnecessary config mock property
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
20f1dfd80dc6090c2b82ec0847315585d2ecf26b
udiskie/automount.py
udiskie/automount.py
""" Udiskie automounter daemon. """ __all__ = ['AutoMounter'] class AutoMounter(object): """ Automatically mount newly added media. """ def __init__(self, mounter): self.mounter = mounter def device_added(self, udevice): self.mounter.add_device(udevice) def media_added(self, u...
""" Udiskie automounter daemon. """ __all__ = ['AutoMounter'] class AutoMounter(object): """ Automatically mount newly added media. """ def __init__(self, mounter): self.mounter = mounter def device_added(self, udevice): self.mounter.add_device(udevice) def media_added(self, u...
Revert "Automount LUKS devices when they have been unlocked"
Revert "Automount LUKS devices when they have been unlocked" This reverts commit d67f8c7284e8d3bff2e7c81711a9fece952aea46.
Python
mit
khardix/udiskie,coldfix/udiskie,mathstuf/udiskie,coldfix/udiskie,pstray/udiskie,pstray/udiskie
0ebf0ecf1b4591960cd8b56a68eabf71fe85329d
tasks.py
tasks.py
from invocations.docs import docs, www, sites, watch_docs from invocations.testing import test, coverage, integration, watch_tests from invocations.packaging import vendorize, release from invoke import Collection from invoke.util import LOG_FORMAT ns = Collection( test, coverage, integration, vendorize, release...
from invocations.docs import docs, www, sites, watch_docs from invocations.testing import test, coverage, integration, watch_tests from invocations.packaging import vendorize, release from invoke import Collection from invoke.util import LOG_FORMAT ns = Collection( test, coverage, integration, vendorize, release...
Make sure test watcher picks up source code file changes
Make sure test watcher picks up source code file changes
Python
bsd-2-clause
mkusz/invoke,mkusz/invoke,pyinvoke/invoke,pyinvoke/invoke
cb12e5da17a115ea751df604158992af7c0d6573
rbtools/utils/console.py
rbtools/utils/console.py
import os import subprocess from distutils.util import strtobool from rbtools.utils.filesystem import make_tempfile def confirm(question): """Interactively prompt for a Yes/No answer. Accepted values (case-insensitive) depend on distutils.util.strtobool(): 'Yes' values: y, yes, t, true, on, 1 'No' v...
import os import subprocess from distutils.util import strtobool from rbtools.utils.filesystem import make_tempfile def confirm(question): """Interactively prompt for a Yes/No answer. Accepted values (case-insensitive) depend on distutils.util.strtobool(): 'Yes' values: y, yes, t, true, on, 1 'No' v...
Clean handling of lack of $EDITOR
Clean handling of lack of $EDITOR Problem: If EDITOR is not set, and vim is not installed, rbt post exits with just "CRITICAL: [Errno 2] No such file or directory" as an error message, which does not indicate where the problem lies nor how to solve it. vim is not installed by default on many distributions, or is inst...
Python
mit
davidt/rbtools,haosdent/rbtools,halvorlu/rbtools,davidt/rbtools,halvorlu/rbtools,reviewboard/rbtools,datjwu/rbtools,beol/rbtools,reviewboard/rbtools,haosdent/rbtools,datjwu/rbtools,reviewboard/rbtools,beol/rbtools,haosdent/rbtools,datjwu/rbtools,beol/rbtools,halvorlu/rbtools,davidt/rbtools
a4cd1c644d7b0636e0debc3a44df9d81a6fa7ce7
app/main/views/register.py
app/main/views/register.py
from datetime import datetime from flask import render_template, redirect, jsonify from app.main import main from app.main.dao import users_dao from app.main.forms import RegisterUserForm from app.models import User @main.route("/register", methods=['GET']) def render_register(): return render_template('registe...
from datetime import datetime from flask import render_template, redirect, jsonify from app.main import main from app.main.dao import users_dao from app.main.forms import RegisterUserForm from app.models import User @main.route("/register", methods=['GET']) def render_register(): return render_template('registe...
Change to a generic message for database errors.
108536374: Change to a generic message for database errors. Need a story to handle db exceptions in the dao layer
Python
mit
alphagov/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin
06906b820f312bbc0a59eea7518470856df478ac
pytoon/tests/test_brick_connection.py
pytoon/tests/test_brick_connection.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_pytoon ---------------------------------- Tests for `pytoon` module. """ import unittest from mock import patch, Mock from pytoon.connection import BrickConnection @patch('pytoon.connection.IPConnection') class TestConnection(unittest.TestCase): def test_m...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_pytoon ---------------------------------- Tests for `pytoon` module. """ import unittest from mock import patch, Mock from tinkerforge.ip_connection import IPConnection from tinkerforge.bricklet_hall_effect import HallEffect from tinkerforge.bricklet_ambient_lig...
Add tests for connecting to three different sensors
Add tests for connecting to three different sensors
Python
bsd-3-clause
marcofinalist/pytoon,marcoplaisier/pytoon,marcoplaisier/pytoon,marcofinalist/pytoon
0b9771c782394af2850161fab1e4947fc3c40cca
qregexeditor/api/match_highlighter.py
qregexeditor/api/match_highlighter.py
import re from pyqode.core.qt import QtGui class MatchHighlighter(QtGui.QSyntaxHighlighter): def __init__(self, document): super().__init__(document) self.prog = None self._format = QtGui.QTextCharFormat() self._format.setBackground(QtGui.QBrush(QtGui.QColor('#bbfcbb'))) def h...
import re from pyqode.core.qt import QtGui class MatchHighlighter(QtGui.QSyntaxHighlighter): def __init__(self, document): super().__init__(document) self.prog = None self._format = QtGui.QTextCharFormat() self._format.setBackground(QtGui.QBrush(QtGui.QColor('#bbfcbb'))) def h...
Fix infinite loop in highlighter
Fix infinite loop in highlighter
Python
mit
ColinDuquesnoy/QRegexEditor
c73b8a7503f21e16171ea1b0b40180bd1624f4d3
social/apps/flask_app/routes.py
social/apps/flask_app/routes.py
from flask import g, Blueprint from flask.ext.login import login_required, login_user from social.actions import do_auth, do_complete, do_disconnect from social.apps.flask_app.utils import strategy social_auth = Blueprint('social', __name__) @social_auth.route('/login/<string:backend>/', methods=('GET', 'POST')) @...
from flask import g, Blueprint, request from flask.ext.login import login_required, login_user from social.actions import do_auth, do_complete, do_disconnect from social.apps.flask_app.utils import strategy social_auth = Blueprint('social', __name__) @social_auth.route('/login/<string:backend>/', methods=('GET', '...
Support remember flag when calling login on flask app
Support remember flag when calling login on flask app
Python
bsd-3-clause
lamby/python-social-auth,lneoe/python-social-auth,henocdz/python-social-auth,ononeor12/python-social-auth,cjltsod/python-social-auth,JJediny/python-social-auth,henocdz/python-social-auth,henocdz/python-social-auth,ariestiyansyah/python-social-auth,mathspace/python-social-auth,rsteca/python-social-auth,jneves/python-soc...
0aef588b92adc6ccc175a6b6d34784ff4d7e290d
coprocess/bindings/python/sample_server.py
coprocess/bindings/python/sample_server.py
import coprocess_object_pb2 import grpc, time _ONE_DAY_IN_SECONDS = 60 * 60 * 24 from concurrent import futures def MyPreMiddleware(coprocess_object): coprocess_object.request.set_headers["myheader"] = "myvalue" return coprocess_object def MyPostMiddleware(coprocess_object): coprocess_object.request.set_head...
import coprocess_object_pb2 import grpc, time, json _ONE_DAY_IN_SECONDS = 60 * 60 * 24 from concurrent import futures def MyPreMiddleware(coprocess_object): coprocess_object.request.set_headers["myheader"] = "myvalue" return coprocess_object def MyPostMiddleware(coprocess_object): coprocess_object.request.se...
Adjust gRPC/Python sample to handle events.
Adjust gRPC/Python sample to handle events.
Python
mpl-2.0
mvdan/tyk,nebolsin/tyk,mvdan/tyk,nebolsin/tyk,nebolsin/tyk,mvdan/tyk,nebolsin/tyk,nebolsin/tyk,mvdan/tyk,lonelycode/tyk,lonelycode/tyk,nebolsin/tyk,nebolsin/tyk,lonelycode/tyk,mvdan/tyk,mvdan/tyk,nebolsin/tyk,mvdan/tyk,mvdan/tyk
3e45602583a7760a5fb7b5beb47405b4dddd0f63
run_tests.py
run_tests.py
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def main(sdk_path,...
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def main(sdk_path,...
Exit with code 1 if tests fail.
Exit with code 1 if tests fail. Fixes #621 and Travis.
Python
mit
josephbisch/the-blue-alliance,1fish2/the-blue-alliance,nwalters512/the-blue-alliance,verycumbersome/the-blue-alliance,phil-lopreiato/the-blue-alliance,fangeugene/the-blue-alliance,the-blue-alliance/the-blue-alliance,1fish2/the-blue-alliance,bdaroz/the-blue-alliance,1fish2/the-blue-alliance,jaredhasenklein/the-blue-alli...
358cdd4b89221cbb02e7b04fc83cebb06570b03a
mezzanine/twitter/defaults.py
mezzanine/twitter/defaults.py
""" Default settings for the ``mezzanine.twitter`` app. Each of these can be overridden in your project's settings module, just like regular Django settings. The ``editable`` argument for each controls whether the setting is editable via Django's admin. Thought should be given to how a setting is actually used before ...
""" Default settings for the ``mezzanine.twitter`` app. Each of these can be overridden in your project's settings module, just like regular Django settings. The ``editable`` argument for each controls whether the setting is editable via Django's admin. Thought should be given to how a setting is actually used before ...
Update the default twitter query since it's been flooded by movie tweets.
Update the default twitter query since it's been flooded by movie tweets.
Python
bsd-2-clause
readevalprint/mezzanine,theclanks/mezzanine,dovydas/mezzanine,scarcry/snm-mezzanine,industrydive/mezzanine,ryneeverett/mezzanine,mush42/mezzanine,AlexHill/mezzanine,industrydive/mezzanine,spookylukey/mezzanine,eino-makitalo/mezzanine,Cajoline/mezzanine,Cajoline/mezzanine,webounty/mezzanine,gradel/mezzanine,dekomote/mez...
4725a80e6a02a08ef6081eac9261cb420bdc1fee
django_countries/templatetags/countries.py
django_countries/templatetags/countries.py
import django from django import template from django_countries.fields import Country, countries register = template.Library() if django.VERSION < (1, 9): # Support older versions without implicit assignment support in simple_tag. simple_tag = register.assignment_tag else: simple_tag = register.simple_ta...
import django from django import template from django_countries.fields import Country, countries register = template.Library() @register.simple_tag def get_country(code): return Country(code=code) @register.simple_tag def get_countries(): return list(countries)
Remove Django 1.9 simple_tag reference
Remove Django 1.9 simple_tag reference
Python
mit
SmileyChris/django-countries
02b57a47f3ee117b6b32e248c698366469be1a5b
runtests.py
runtests.py
#!/usr/bin/env python import sys from os.path import dirname, abspath from django.conf import settings if not settings.configured: settings.configure( DATABASE_ENGINE = 'sqlite3', INSTALLED_APPS = [ 'django.contrib.contenttypes', 'genericm2m', 'genericm2m.generi...
#!/usr/bin/env python import sys from os.path import dirname, abspath from django.conf import settings if len(sys.argv) > 1 and 'postgres' in sys.argv: sys.argv.remove('postgres') db_engine = 'postgresql_psycopg2' db_name = 'test_main' else: db_engine = 'sqlite3' db_name = '' if not settings.con...
Allow running tests with postgres
Allow running tests with postgres
Python
mit
jayfk/django-generic-m2m,coleifer/django-generic-m2m,coleifer/django-generic-m2m,coleifer/django-generic-m2m,jayfk/django-generic-m2m
56d444a1233b027718e0f7bfdf2c7d27b4de45d4
into/backends/spark.py
into/backends/spark.py
class Dummy(object): sum = max = min = count = distinct = mean = variance = stdev = None try: from pyspark import SparkContext import pyspark from pyspark.rdd import RDD RDD.min except (AttributeError, ImportError): SparkContext = Dummy pyspark = Dummy() pyspark.rdd = Dummy() RDD = ...
class Dummy(object): pass try: from pyspark import SparkContext import pyspark from pyspark import RDD from pyspark.rdd import PipelinedRDD from pyspark.sql import SchemaRDD RDD.min except (AttributeError, ImportError): SparkContext = Dummy pyspark = Dummy() RDD = Dummy from c...
Add convert for the various RDDs
Add convert for the various RDDs
Python
bsd-3-clause
cpcloud/odo,blaze/odo,ContinuumIO/odo,ContinuumIO/odo,blaze/odo,quantopian/odo,alexmojaki/odo,ywang007/odo,cpcloud/odo,ywang007/odo,cowlicks/odo,Dannnno/odo,alexmojaki/odo,Dannnno/odo,quantopian/odo,cowlicks/odo
3620bafe1ce573d08fca7db357f4df40d6949cfb
flowz/channels/__init__.py
flowz/channels/__init__.py
from __future__ import absolute_import from .core import (ChannelDone, Channel, ReadChannel, MapChannel, FlatMapChannel, FilterChannel, FutureChannel, ReadyFutureChannel, TeeChannel, ProducerChannel, IterChannel, ZipChannel, CoGroupChannel, WindowChannel, GroupC...
from __future__ import absolute_import from .core import ( Channel, ChannelDone, CoGroupChannel, FilterChannel, FlatMapChannel, FutureChannel, GroupChannel, IterChannel, MapChannel, ProducerChannel, ReadChannel, ReadyFuture...
Change to one package per line for channel import
Change to one package per line for channel import Resolves #19. While this doesn't switch to the ideal standard of one import, one line, it makes the import from `flowz.channels.core` into `flowz.channels` easier to read and less likely to invite conflicts. Didn't go to "from .core import" per line primarily due to ...
Python
mit
ethanrowe/flowz,PatrickDRusk/flowz
bcda46423bd28b60aac8a9befd3e06670a9675c8
sync_scheduler.py
sync_scheduler.py
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queuein...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queuein...
Include queued date in MQ messages
Include queued date in MQ messages
Python
apache-2.0
abs0/tapiriik,mduggan/tapiriik,marxin/tapiriik,niosus/tapiriik,marxin/tapiriik,gavioto/tapiriik,dmschreiber/tapiriik,dlenski/tapiriik,campbellr/tapiriik,abhijit86k/tapiriik,gavioto/tapiriik,dlenski/tapiriik,abhijit86k/tapiriik,marxin/tapiriik,dmschreiber/tapiriik,dmschreiber/tapiriik,olamy/tapiriik,campbellr/tapiriik,c...
83a2a04ec5b416e68588142ececb055d646a5449
nose2/tests/functional/__init__.py
nose2/tests/functional/__init__.py
import os SUPPORT = os.path.abspath(os.path.join(os.path.dirname(__file__), 'support')) def support_file(*path_parts): return os.path.join(SUPPORT, *path_parts)
import os import subprocess SUPPORT = os.path.abspath(os.path.join(os.path.dirname(__file__), 'support')) def support_file(*path_parts): return os.path.join(SUPPORT, *path_parts) def run_nose2(*nose2_args, **popen_args): if 'cwd' in popen_args: cwd = popen_args.pop('cwd') if not os.path.isa...
Add utility function for executing test runs
Add utility function for executing test runs
Python
bsd-2-clause
ezigman/nose2,ojengwa/nose2,leth/nose2,leth/nose2,little-dude/nose2,little-dude/nose2,ptthiem/nose2,ojengwa/nose2,ptthiem/nose2,ezigman/nose2
6fc0c3884c38448956273d99a57e0c758ecbc658
crmapp/marketing/views.py
crmapp/marketing/views.py
from django.shortcuts import render # Create your views here.
from django.views.generic.base import TemplateView class HomePage(TemplateView): """ Because our needs are so simple, all we have to do is assign one value; template_name. The home.html file will be created in the next lesson. """ template_name = 'marketing/home.html'
Create the Home Page > Create the Home Page View
Create the Home Page > Create the Home Page View
Python
mit
tabdon/crmeasyapp,tabdon/crmeasyapp,deenaariff/Django
61be745b641689addc9f009311d28a5775d5a18b
ctconfig.py
ctconfig.py
import logging import json from tornado.options import define, options _CONFIG_FILENAME = "cutthroat.conf" def define_options(): """Define defaults for most custom options""" # Log file and config file paths options.log_file_prefix = "/var/log/cutthroat/cutthroat.log" define( "conf_file_path...
import logging import json from tornado.options import define, options _CONFIG_FILENAME = "cutthroat.conf" def define_options(): """Define defaults for most custom options""" # Log file and config file paths options.log_file_prefix = "/var/log/cutthroat/cutthroat.log" define( "conf_file_path...
Set `output_routes` to True by default
Set `output_routes` to True by default
Python
agpl-3.0
hfaran/LivesPool,hfaran/LivesPool,hfaran/LivesPool,hfaran/LivesPool
cc14698280f5982c472c51185d57d5f5292ce518
byceps/blueprints/ticketing/views.py
byceps/blueprints/ticketing/views.py
""" byceps.blueprints.ticketing.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from flask import abort, g from ...services.ticketing import ticket_service from ...util.framework.blueprint import create_blueprint from ...util.ite...
""" byceps.blueprints.ticketing.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from flask import abort, g from ...services.ticketing import ticket_service from ...util.framework.blueprint import create_blueprint from ...util.ite...
Rename variable, prefix private function
Rename variable, prefix private function
Python
bsd-3-clause
homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps
dceae6725d10a5d1af6287e1b684c651683d1750
runtests.py
runtests.py
#!/usr/bin/env python import sys from os.path import dirname, abspath from django.conf import settings if len(sys.argv) > 1 and 'postgres' in sys.argv: sys.argv.remove('postgres') db_engine = 'postgresql_psycopg2' db_name = 'test_main' else: db_engine = 'sqlite3' db_name = '' if not settings.con...
#!/usr/bin/env python import sys from os.path import dirname, abspath import django from django.conf import settings if len(sys.argv) > 1 and 'postgres' in sys.argv: sys.argv.remove('postgres') db_engine = 'django.db.backends.postgresql_psycopg2' db_name = 'test_main' else: db_engine = 'django.db.bac...
Allow tests to be run on 1.4
Allow tests to be run on 1.4
Python
mit
jayfk/django-generic-m2m,jayfk/django-generic-m2m,coleifer/django-generic-m2m,coleifer/django-generic-m2m,coleifer/django-generic-m2m
040a86941e20db4976850c3cfb046c58ff48d559
examples/pywapi-example.py
examples/pywapi-example.py
#!/usr/bin/env python import pywapi weather_com_result = pywapi.get_weather_from_weather_com('10001') yahoo_result = pywapi.get_weather_from_yahoo('10001') noaa_result = pywapi.get_weather_from_noaa('KJFK') print "Weather.com says: It is " + string.lower(weather_com_result['current_conditions']['text']) + " and " + ...
#!/usr/bin/env python import pywapi weather_com_result = pywapi.get_weather_from_weather_com('10001') yahoo_result = pywapi.get_weather_from_yahoo('10001') noaa_result = pywapi.get_weather_from_noaa('KJFK') print "Weather.com says: It is " + weather_com_result['current_conditions']['text'].lower() + " and " + weathe...
Fix error in example script
Fix error in example script
Python
mit
nmbryant/python-weather-api,bethany1/python-weather-api,lorenzosaino/python-weather-api,littleboss/python-weather-api,tmw25/python-weather-api,ExtraordinaryBen/python-weather-api,n0012/python-weather-api,tectronics/python-weather-api,dubwoc/python-weather-api,prasadsidda107/python-weather-api,hdiwan/python-weather-api
afc5b02f2520382fc0ebb3370538ca2baeb04dd4
planetstack/core/models/__init__.py
planetstack/core/models/__init__.py
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
Add credentials module to core list
Add credentials module to core list
Python
apache-2.0
cboling/xos,zdw/xos,open-cloud/xos,open-cloud/xos,open-cloud/xos,zdw/xos,cboling/xos,opencord/xos,opencord/xos,cboling/xos,zdw/xos,cboling/xos,zdw/xos,cboling/xos,opencord/xos
3b146038ca6aebfdc11920cc688903124ccc2b3a
src/ggrc/converters/handlers/document.py
src/ggrc/converters/handlers/document.py
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Handlers for special object mappings.""" from flask import current_app from ggrc import models from ggrc.login import get_current_user_id from ggrc.converters import errors from ggrc.converters import g...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Handlers for special object mappings.""" from flask import current_app from ggrc import models from ggrc.login import get_current_user_id from ggrc.converters import errors from ggrc.converters import g...
Add import parser for url and evidence
Add import parser for url and evidence
Python
apache-2.0
selahssea/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,andrei-karalionak/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,sela...
a590e100a23a0c225467b34b7c4481ece45905ad
tests/test_shells/postproc.py
tests/test_shells/postproc.py
#!/usr/bin/env python from __future__ import unicode_literals import os import socket import sys import codecs fname = sys.argv[1] new_fname = fname + '.new' pid_fname = 'tests/shell/3rd/pid' with open(pid_fname, 'r') as P: pid = P.read().strip() hostname = socket.gethostname() user = os.environ['USER'] with cod...
#!/usr/bin/env python from __future__ import unicode_literals import os import socket import sys import codecs fname = sys.argv[1] new_fname = fname + '.new' pid_fname = 'tests/shell/3rd/pid' with open(pid_fname, 'r') as P: pid = P.read().strip() hostname = socket.gethostname() user = os.environ['USER'] with cod...
Fix functional shell tests in travis
Fix functional shell tests in travis Hostname in travis contains random numbers meaning that it occasionally may contain a PID as well. Thus it must be replaced first.
Python
mit
Liangjianghao/powerline,bartvm/powerline,lukw00/powerline,kenrachynski/powerline,Luffin/powerline,DoctorJellyface/powerline,Luffin/powerline,areteix/powerline,cyrixhero/powerline,seanfisk/powerline,EricSB/powerline,dragon788/powerline,blindFS/powerline,magus424/powerline,wfscheper/powerline,dragon788/powerline,wfschepe...
34f8c0a4a0a9f78c124cd07b121ce5b2fbf00136
onadata/libs/utils/csv_import.py
onadata/libs/utils/csv_import.py
import unicodecsv as ucsv from cStringIO import StringIO from ondata.apps.api.viewsets.xform_submission_api import dict_lists2strings from onadata.libs.utils.logger_tools import dict2xform, safe_create_instance def submit_csv(username, request, csv_data): if isinstance(csv_data, (str, unicode)): csv_data...
import unicodecsv as ucsv from cStringIO import StringIO from ondata.apps.api.viewsets.xform_submission_api import dict_lists2strings from onadata.libs.utils.logger_tools import dict2xform, safe_create_instance from django.db import transaction class CSVImportException(Exception): pass def submit_csv(username, ...
Implement atomicity for CSV imports
JZ: Implement atomicity for CSV imports CSV imports should happen for all rows or nothing at all! Use `django.transactions` for rollbacks on submission on errors Also remove metadata from CSV rows before submitting
Python
bsd-2-clause
awemulya/fieldsight-kobocat,mainakibui/kobocat,qlands/onadata,smn/onadata,sounay/flaminggo-test,piqoni/onadata,qlands/onadata,jomolinare/kobocat,sounay/flaminggo-test,mainakibui/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat,smn/onadata,piqoni/onadata,hnjamba/onaclone,awemulya/fieldsight-kobocat,smn/onadata,jomolinare...
40f57a73adadf08e497464990a34860d03e04d39
mezzanine/core/urls.py
mezzanine/core/urls.py
from django.conf.urls.defaults import patterns, url from mezzanine.conf import settings urlpatterns = [] if "django.contrib.admin" in settings.INSTALLED_APPS: urlpatterns += patterns("django.contrib.auth.views", url("^password_reset/$", "password_reset", name="password_reset"), ("^password_rese...
from django.conf.urls.defaults import patterns, url from mezzanine.conf import settings urlpatterns = [] if "django.contrib.admin" in settings.INSTALLED_APPS: urlpatterns += patterns("django.contrib.auth.views", url("^password_reset/$", "password_reset", name="password_reset"), ("^password_rese...
Allow static proxy URL to be configured.
Allow static proxy URL to be configured.
Python
bsd-2-clause
scarcry/snm-mezzanine,vladir/mezzanine,fusionbox/mezzanine,jerivas/mezzanine,molokov/mezzanine,frankchin/mezzanine,adrian-the-git/mezzanine,fusionbox/mezzanine,mush42/mezzanine,damnfine/mezzanine,molokov/mezzanine,Kniyl/mezzanine,cccs-web/mezzanine,orlenko/sfpirg,sjdines/mezzanine,adrian-the-git/mezzanine,scarcry/snm-m...
2207dd266887e812cae9da67ca00bef80c9985fd
thefuck/shells/__init__.py
thefuck/shells/__init__.py
"""Package with shell specific actions, each shell class should implement `from_shell`, `to_shell`, `app_alias`, `put_to_history` and `get_aliases` methods. """ import os from psutil import Process from .bash import Bash from .fish import Fish from .generic import Generic from .tcsh import Tcsh from .zsh import Zsh sh...
"""Package with shell specific actions, each shell class should implement `from_shell`, `to_shell`, `app_alias`, `put_to_history` and `get_aliases` methods. """ import os from psutil import Process from .bash import Bash from .fish import Fish from .generic import Generic from .tcsh import Tcsh from .zsh import Zsh sh...
Update _get_shell to work with Windows
Update _get_shell to work with Windows - _get_shell assumed the parent process would always be the shell process, in Powershell the parent process is Python, with the grandparent being the shell - Switched to walking the process tree so the same code path can be used in both places
Python
mit
mlk/thefuck,SimenB/thefuck,SimenB/thefuck,mlk/thefuck,nvbn/thefuck,Clpsplug/thefuck,scorphus/thefuck,Clpsplug/thefuck,scorphus/thefuck,nvbn/thefuck
01163ce7fc43b4ab2e5b9ab1c5f94556d0509004
examples/tornado/auth_demo.py
examples/tornado/auth_demo.py
from mongrel2.config import * main = Server( uuid="f400bf85-4538-4f7a-8908-67e313d515c2", access_log="/logs/access.log", error_log="/logs/error.log", chroot="./", default_host="localhost", name="test", pid_file="/run/mongrel2.pid", port=6767, hosts = [ Host(name="localhost"...
from mongrel2.config import * main = Server( uuid="f400bf85-4538-4f7a-8908-67e313d515c2", access_log="/logs/access.log", error_log="/logs/error.log", chroot="./", default_host="localhost", name="test", pid_file="/run/mongrel2.pid", port=6767, hosts = [ Host(name="localhost"...
Add the settings to the authdemo.
Add the settings to the authdemo.
Python
bsd-3-clause
niedbalski/mongrel2,jdesgats/mongrel2,winks/mongrel2,griffordson/mongrel2,cpick/mongrel2,duaneg/mongrel2,jagguli/mongrel2,mongrel2/mongrel2,issuu/mongrel2,metadave/mongrel2,steamraven/mongrel2,cpick/mongrel2,niedbalski/mongrel2,AustinWise/mongrel2,nmandery/mongrel2,markokr/mongrel2,reshefm/mongrel2,sshirokov/mongrel2,f...
2c73a41ab78b41da7b6f2ccbd16140fa701d74f2
gunicorn/app/wsgiapp.py
gunicorn/app/wsgiapp.py
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, opts, args): ...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, opts, args): ...
Load wsgi apps after reading the configuration.
Load wsgi apps after reading the configuration.
Python
mit
WSDC-NITWarangal/gunicorn,wong2/gunicorn,ccl0326/gunicorn,ephes/gunicorn,tempbottle/gunicorn,zhoucen/gunicorn,prezi/gunicorn,urbaniak/gunicorn,wong2/gunicorn,jamesblunt/gunicorn,gtrdotmcs/gunicorn,alex/gunicorn,keakon/gunicorn,jamesblunt/gunicorn,jamesblunt/gunicorn,gtrdotmcs/gunicorn,1stvamp/gunicorn,elelianghh/gunico...
8d6c7623539a7109893c10aca0e116bf41b51634
web/migrations/versions/ad456cec28f4_add_user_name_column.py
web/migrations/versions/ad456cec28f4_add_user_name_column.py
"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Ale...
"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Ale...
Add column default for User.name column
Add column default for User.name column
Python
mit
usgo/online-ratings,usgo/online-ratings,usgo/online-ratings,Kashomon/online-ratings,Kashomon/online-ratings,Kashomon/online-ratings
3bf027eaf2c62ec6fcb3192cfddc5a2aa8b73895
oneflow/settings/chani.py
oneflow/settings/chani.py
# -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', 'common', ...
# -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', 'common', ...
Make mail working on my dev machine.
Make mail working on my dev machine.
Python
agpl-3.0
1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow
a5c723b589699fdf80c42a4186c2fdc0c8d84bb4
tests/sentry/app/tests.py
tests/sentry/app/tests.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer) class GetBuffer...
# -*- coding: utf-8 -*- from __future__ import absolute_import from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer)
Remove test that is probably more trouble than it's worth.
Remove test that is probably more trouble than it's worth.
Python
bsd-3-clause
JackDanger/sentry,mvaled/sentry,BuildingLink/sentry,alexm92/sentry,alexm92/sentry,mvaled/sentry,gencer/sentry,JamesMura/sentry,ifduyue/sentry,zenefits/sentry,jean/sentry,fotinakis/sentry,gencer/sentry,zenefits/sentry,gencer/sentry,JamesMura/sentry,zenefits/sentry,mvaled/sentry,mvaled/sentry,BuildingLink/sentry,gencer/s...
0c3c3921897816f0c7c1c74ad0b52a25cef5b742
tests/compat.py
tests/compat.py
import sys if sys.version_info.major < 3: import unittest2 as unittest else: import unittest
from evelink.thirdparty.six import PY2 if PY2: import unittest2 as unittest else: import unittest
Use six for easy version info.
[PY3] Use six for easy version info.
Python
mit
Morloth1274/EVE-Online-POCO-manager,FashtimeDotCom/evelink,ayust/evelink,zigdon/evelink,bastianh/evelink
f0d3cf2bfcaa569f47eb888d5553659c5c57f07d
ajaximage/urls.py
ajaximage/urls.py
from django.conf.urls.defaults import url, patterns from ajaximage.views import ajaximage from ajaximage.forms import FileForm urlpatterns = patterns('', url('^upload/(?P<upload_to>.*)/(?P<max_width>\d+)/(?P<max_height>\d+)/(?P<crop>\d+)', ajaximage, { 'form_class': FileForm, 'response': lambda n...
try:# pre 1.6 from django.conf.urls.defaults import url, patterns except ImportError: from django.conf.urls import url, patterns from ajaximage.views import ajaximage from ajaximage.forms import FileForm urlpatterns = patterns('', url('^upload/(?P<upload_to>.*)/(?P<max_width>\d+)/(?P<max_height>\d+)/(?P<...
Fix import for 1.6 version.
Fix import for 1.6 version.
Python
mit
bradleyg/django-ajaximage,bradleyg/django-ajaximage,subhaoi/kioskuser,subhaoi/kioskuser,subhaoi/kioskuser,bradleyg/django-ajaximage
57b4d39749021305a2d5850e642537224d30611f
requests/hooks.py
requests/hooks.py
# -*- coding: utf-8 -*- """ requests.hooks ~~~~~~~~~~~~~~ This module provides the capabilities for the Requests hooks system. Available hooks: ``args``: A dictionary of the arguments being sent to Request(). ``pre_request``: The Request object, directly after being created. ``pre_send``: The Request ...
# -*- coding: utf-8 -*- """ requests.hooks ~~~~~~~~~~~~~~ This module provides the capabilities for the Requests hooks system. Available hooks: ``args``: A dictionary of the arguments being sent to Request(). ``pre_request``: The Request object, directly after being created. ``pre_send``: The Request ...
Remove exception eating from dispatch_hook.
Remove exception eating from dispatch_hook.
Python
isc
Bluehorn/requests,revolunet/requests,revolunet/requests,psf/requests
1a534acf6038b35c8bba125c277d349ec967d5bd
lc0246_strobogrammatic_number.py
lc0246_strobogrammatic_number.py
"""Leetcode 246. Strobogrammatic Number Easy URL: https://leetcode.com/problems/strobogrammatic-number/A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number is strobogrammatic. The number is represented as a string. Exampl...
"""Leetcode 246. Strobogrammatic Number Easy URL: https://leetcode.com/problems/strobogrammatic-number/A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number is strobogrammatic. The number is represented as a string. Exampl...
Complete map dict sol w/ time/space complexity
Complete map dict sol w/ time/space complexity
Python
bsd-2-clause
bowen0701/algorithms_data_structures
da16bec07e245e440acea629ad953e4a56085f7e
scripts/util.py
scripts/util.py
import time import logging from cassandra.cqlengine.query import Token from scrapi.database import _manager from scrapi.processing.cassandra import DocumentModel _manager.setup() logger = logging.getLogger(__name__) def documents(*sources): q = DocumentModel.objects.timeout(500).allow_filtering().all().limit(1...
import time import logging from cassandra.cqlengine.query import Token from scrapi.database import _manager from scrapi.processing.cassandra import DocumentModel, DocumentModelV2 _manager.setup() logger = logging.getLogger(__name__) def ModelIteratorFactory(model, next_page): def model_iterator(*sources): ...
Add ability to iterate over old document model and new document model for migrations
Add ability to iterate over old document model and new document model for migrations
Python
apache-2.0
CenterForOpenScience/scrapi,ostwald/scrapi,fabianvf/scrapi,mehanig/scrapi,alexgarciac/scrapi,felliott/scrapi,icereval/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi,erinspace/scrapi,felliott/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi
09311a99d37c8623a644acb30daf8523a5e7a196
django_auth_policy/validators.py
django_auth_policy/validators.py
from django.core.exceptions import ValidationError from django_auth_policy import settings as dap_settings def password_min_length(value): if dap_settings.PASSWORD_MIN_LENGTH_TEXT is None: return if len(value) < dap_settings.PASSWORD_MIN_LENGTH: msg = dap_settings.PASSWORD_MIN_LENGTH_TEXT.fo...
from django.core.exceptions import ValidationError from django.utils.translation import ugettext as _ from django_auth_policy import settings as dap_settings def password_min_length(value): if dap_settings.PASSWORD_MIN_LENGTH_TEXT is None: return if len(value) < dap_settings.PASSWORD_MIN_LENGTH: ...
Fix translatability of validation messages when defined in custom settings
Fix translatability of validation messages when defined in custom settings
Python
bsd-3-clause
mcella/django-auth-policy,mcella/django-auth-policy,Dreamsolution/django-auth-policy,Dreamsolution/django-auth-policy
11ec7ed43fbd5d6dae786f8320d1540080a55d57
tools/secret_key_generator.py
tools/secret_key_generator.py
#!/usr/bin/env python # encoding: utf-8 from hashlib import md5, sha1 from base64 import urlsafe_b64encode as b64encode import random random.seed() def random_string(): """ Generate a random string (currently a random number as a string) """ return str(random.randint(0,100000)) def generate_key(max_l...
#!/usr/bin/env python # encoding: utf-8 import sys from hashlib import md5, sha1 from base64 import urlsafe_b64encode as b64encode import random random.seed() def random_string(): """ Generate a random string (currently a random number as a string) """ return str(random.randint(0,100000)) def generat...
Update script for init seahub_settings.py in Windows
Update script for init seahub_settings.py in Windows
Python
apache-2.0
madflow/seahub,madflow/seahub,miurahr/seahub,cloudcopy/seahub,miurahr/seahub,miurahr/seahub,Chilledheart/seahub,Chilledheart/seahub,miurahr/seahub,madflow/seahub,Chilledheart/seahub,cloudcopy/seahub,Chilledheart/seahub,madflow/seahub,cloudcopy/seahub,cloudcopy/seahub,Chilledheart/seahub,madflow/seahub
75fcb95c04bc56729a1521177ac0e2cb4462bbba
packs/st2/actions/chatops_format_list_result.py
packs/st2/actions/chatops_format_list_result.py
from st2actions.runners.pythonrunner import Action from prettytable import PrettyTable __all__ = [ 'St2ChatOpsFormatListResult' ] class St2ChatOpsFormatListResult(Action): def run(self, result, attributes): table = PrettyTable() if not result: return 'No results.' # Add...
from st2actions.runners.pythonrunner import Action from prettytable import PrettyTable __all__ = [ 'St2ChatOpsFormatListResult' ] class St2ChatOpsFormatListResult(Action): def run(self, result, attributes): table = PrettyTable() if not result: return 'No results.' # Add...
Add support for nested attribute lookup and formatting.
Add support for nested attribute lookup and formatting.
Python
apache-2.0
dennybaa/st2contrib,pearsontechnology/st2contrib,lmEshoo/st2contrib,meirwah/st2contrib,meirwah/st2contrib,tonybaloney/st2contrib,armab/st2contrib,armab/st2contrib,pidah/st2contrib,dennybaa/st2contrib,psychopenguin/st2contrib,digideskio/st2contrib,StackStorm/st2contrib,digideskio/st2contrib,lmEshoo/st2contrib,tonybalone...
43b46f1e3ded3972dede7226cf0255b904d028bd
django/notejam/pads/tests.py
django/notejam/pads/tests.py
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase class PadTest(TestCase): def setUp(self): user_data = { 'email': 'user@example.com', 'password': 'secure_password' } user = User.objects.create(...
Test improvementes. Empty Pad test class added.
Django: Test improvementes. Empty Pad test class added.
Python
mit
hstaugaard/notejam,nadavge/notejam,lefloh/notejam,lefloh/notejam,williamn/notejam,hstaugaard/notejam,nadavge/notejam,williamn/notejam,hstaugaard/notejam,hstaugaard/notejam,lefloh/notejam,lefloh/notejam,williamn/notejam,nadavge/notejam,lefloh/notejam,hstaugaard/notejam,williamn/notejam,shikhardb/notejam,williamn/notejam...
ebb0916a7c63c1aaf383c696c203199ca79f70ac
nereid/backend.py
nereid/backend.py
# -*- coding: UTF-8 -*- ''' nereid.backend Backed - Tryton specific features :copyright: (c) 2010-2012 by Openlabs Technologies & Consulting (P) Ltd. :license: GPLv3, see LICENSE for more details ''' class TransactionManager(object): def __init__(self, database_name, user, context=None): ...
# -*- coding: UTF-8 -*- ''' nereid.backend Backed - Tryton specific features :copyright: (c) 2010-2012 by Openlabs Technologies & Consulting (P) Ltd. :license: GPLv3, see LICENSE for more details ''' class TransactionManager(object): def __init__(self, database_name, user, context=None): ...
Change the way transaction is initiated as readonly support was introduced in version 2.4
Change the way transaction is initiated as readonly support was introduced in version 2.4
Python
bsd-3-clause
riteshshrv/nereid,usudaysingh/nereid,usudaysingh/nereid,riteshshrv/nereid,fulfilio/nereid,fulfilio/nereid,prakashpp/nereid,prakashpp/nereid
282d6ae5911e4fcf4625a7e82e7024c5dc0722d8
tests/test_simple_persistence.py
tests/test_simple_persistence.py
from __future__ import unicode_literals, division, absolute_import from tests import FlexGetBase class TestSimplePersistence(FlexGetBase): __yaml__ = """ tasks: test: mock: - {title: 'irrelevant'} """ def test_setdefault(self): self.execute_task('test'...
from __future__ import unicode_literals, division, absolute_import from flexget.manager import Session from flexget.utils.simple_persistence import SimplePersistence from tests import FlexGetBase class TestSimplePersistence(FlexGetBase): __yaml__ = """ tasks: test: mock: ...
Add some more tests for simple_persistence
Add some more tests for simple_persistence
Python
mit
cvium/Flexget,OmgOhnoes/Flexget,jawilson/Flexget,patsissons/Flexget,ZefQ/Flexget,tarzasai/Flexget,X-dark/Flexget,qk4l/Flexget,tsnoam/Flexget,Danfocus/Flexget,spencerjanssen/Flexget,crawln45/Flexget,oxc/Flexget,tvcsantos/Flexget,Flexget/Flexget,tarzasai/Flexget,tobinjt/Flexget,qvazzler/Flexget,Pretagonist/Flexget,Lynxys...
ff36ab7972220940a8e4d5396b591cd02c045380
south/signals.py
south/signals.py
""" South-specific signals """ from django.dispatch import Signal from django.conf import settings # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a par...
""" South-specific signals """ from django.dispatch import Signal from django.conf import settings # Sent at the start of the migration of an app pre_migrate = Signal(providing_args=["app"]) # Sent after each successful migration of an app post_migrate = Signal(providing_args=["app"]) # Sent after each run of a par...
Remove the auth contenttypes thing for now, needs improvement
Remove the auth contenttypes thing for now, needs improvement
Python
apache-2.0
RaD/django-south,philipn/django-south,philipn/django-south,RaD/django-south,nimnull/django-south,RaD/django-south,nimnull/django-south
7fb3df28b9fc9222e44ae48d8b2fd3c2a6b9fbfa
powerline/ext/vim/__init__.py
powerline/ext/vim/__init__.py
# -*- coding: utf-8 -*- def source_plugin(): import os import vim vim.command('source ' + vim.eval('fnameescape("' + os.path.join(os.path.abspath(os.path.dirname(__file__)), 'powerline.vim') + '")'))
# -*- coding: utf-8 -*- def source_plugin(): import os import vim from bindings import vim_get_func fnameescape = vim_get_func('fnameescape') vim.command('source ' + fnameescape(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'powerline.vim')))
Change code to use vim_get_func('fnameescape')
Change code to use vim_get_func('fnameescape') Previous version had problems with paths containing backslashes and/or double quotes.
Python
mit
junix/powerline,lukw00/powerline,S0lll0s/powerline,kenrachynski/powerline,EricSB/powerline,bezhermoso/powerline,bezhermoso/powerline,lukw00/powerline,prvnkumar/powerline,EricSB/powerline,blindFS/powerline,EricSB/powerline,xxxhycl2010/powerline,magus424/powerline,xfumihiro/powerline,dragon788/powerline,prvnkumar/powerli...
f2fa55c8d2f94bd186fc6c47b8ce00fb87c22aaf
tensorflow/contrib/autograph/converters/__init__.py
tensorflow/contrib/autograph/converters/__init__.py
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Add a few naming guidelines for the converter library.
Add a few naming guidelines for the converter library. PiperOrigin-RevId: 204199604
Python
apache-2.0
alsrgv/tensorflow,annarev/tensorflow,sarvex/tensorflow,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,jalexvig/tensorflow,ageron/tensorflow,gunan/tensorflow,gautam1858/tensorflow,seanli9jan/tensorflow,girving/tensorflow,jart/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,xzturn/tensorflow,aldian/ten...
f83cc3e33bf8fe3e80502e39768483db2f78a63f
addons/sale/__terp__.py
addons/sale/__terp__.py
{ "name" : "Sales Management", "version" : "1.0", "author" : "Tiny", "website" : "http://tinyerp.com/module_sale.html", "depends" : ["product", "stock", "mrp"], "category" : "Generic Modules/Sales & Purchases", "init_xml" : [], "demo_xml" : ["sale_demo.xml", "sale_unit_test.xml"], "description": """ The base ...
{ "name" : "Sales Management", "version" : "1.0", "author" : "Tiny", "website" : "http://tinyerp.com/module_sale.html", "depends" : ["product", "stock", "mrp"], "category" : "Generic Modules/Sales & Purchases", "init_xml" : [], "demo_xml" : ["sale_demo.xml", "sale_unit_test.xml"], "description": """ The base ...
Add sale_security.xml file entry in update_xml section
Add sale_security.xml file entry in update_xml section bzr revid: mga@tinyerp.com-b44d9932402c4941921f83487b823e7359d324c0
Python
agpl-3.0
naousse/odoo,slevenhagen/odoo,rahuldhote/odoo,Drooids/odoo,gorjuce/odoo,jiachenning/odoo,cpyou/odoo,glovebx/odoo,acshan/odoo,joshuajan/odoo,Maspear/odoo,gsmartway/odoo,OpusVL/odoo,apanju/odoo,kifcaliph/odoo,Codefans-fan/odoo,luiseduardohdbackup/odoo,hbrunn/OpenUpgrade,grap/OCB,abenzbiria/clients_odoo,BT-rmartin/odoo,lu...
577d13a232b426960dae0b28c63ecac7c33b2643
nose2/tests/functional/test_main.py
nose2/tests/functional/test_main.py
from nose2.tests._common import FunctionalTestCase class TestPluggableTestProgram(FunctionalTestCase): def test_run_in_empty_dir_succeeds(self): proc = self.runIn('scenario/no_tests') stdout, stderr = proc.communicate() self.assertEqual(proc.poll(), 0, stderr)
from nose2.tests._common import FunctionalTestCase class TestPluggableTestProgram(FunctionalTestCase): def test_run_in_empty_dir_succeeds(self): proc = self.runIn('scenario/no_tests') stdout, stderr = proc.communicate() self.assertEqual(proc.poll(), 0, stderr) def test_extra_hooks(sel...
Add test for hooks kwarg to PluggableTestProgram
Add test for hooks kwarg to PluggableTestProgram
Python
bsd-2-clause
ojengwa/nose2,ezigman/nose2,leth/nose2,little-dude/nose2,ptthiem/nose2,leth/nose2,ezigman/nose2,ojengwa/nose2,ptthiem/nose2,little-dude/nose2
adf46f5b90d04ce8e26701810b6c23bc230ddc37
nova/conf/consoleauth.py
nova/conf/consoleauth.py
# Copyright (c) 2016 Intel, Inc. # Copyright (c) 2013 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/li...
# Copyright (c) 2016 Intel, Inc. # Copyright (c) 2013 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/li...
Add an additional description for 'token_ttl'
Add an additional description for 'token_ttl' The unit of 'token_ttl' is not clear in the help text in nova/conf/consoleauth.py. So add the unit (in seconds) in the help text. TrivialFix Change-Id: Id6506b7462c303223bac8586e664e187cb52abd6
Python
apache-2.0
openstack/nova,klmitch/nova,klmitch/nova,mahak/nova,phenoxim/nova,gooddata/openstack-nova,mikalstill/nova,gooddata/openstack-nova,mahak/nova,rahulunair/nova,klmitch/nova,klmitch/nova,rahulunair/nova,mikalstill/nova,gooddata/openstack-nova,mikalstill/nova,rahulunair/nova,openstack/nova,phenoxim/nova,openstack/nova,mahak...
edcde8ed3562e19b7bde43632965c2902a8e7f25
troposphere/sns.py
troposphere/sns.py
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), 'Proto...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), ...
Add Tags to SNS::Topic per 2019-11-31 changes
Add Tags to SNS::Topic per 2019-11-31 changes
Python
bsd-2-clause
cloudtools/troposphere,cloudtools/troposphere,ikben/troposphere,ikben/troposphere
6b148c2fb003c46d2cf1eec6b81a4720bc3adcd6
src/web/views/api/v1/cve.py
src/web/views/api/v1/cve.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # Freshermeat - An open source software directory and release tracker. # Copyright (C) 2017-2019 Cédric Bonhomme - https://www.cedricbonhomme.org # # For more information : https://gitlab.com/cedric/Freshermeat # # This program is free software: you can redistribute it a...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Freshermeat - An open source software directory and release tracker. # Copyright (C) 2017-2019 Cédric Bonhomme - https://www.cedricbonhomme.org # # For more information : https://gitlab.com/cedric/Freshermeat # # This program is free software: you can redistribute it a...
Sort CVE by published_at attribute.
[API] Sort CVE by published_at attribute.
Python
agpl-3.0
cedricbonhomme/services,cedricbonhomme/services,cedricbonhomme/services,cedricbonhomme/services
12c4b353f4f4ae4fb52a1c05862057f1ef36314b
addons/membership/wizard/__init__.py
addons/membership/wizard/__init__.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
Remove unpaid inovice import from init file
[FIX] membership: Remove unpaid inovice import from init file bzr revid: mra@mra-laptop-20101006072219-twq77xlem3d69rg7
Python
agpl-3.0
ShineFan/odoo,optima-ict/odoo,Ernesto99/odoo,papouso/odoo,avoinsystems/odoo,BT-ojossen/odoo,joariasl/odoo,Ernesto99/odoo,numerigraphe/odoo,JGarcia-Panach/odoo,fgesora/odoo,bplancher/odoo,tvibliani/odoo,cedk/odoo,OpusVL/odoo,Endika/OpenUpgrade,codekaki/odoo,mszewczy/odoo,OSSESAC/odoopubarquiluz,storm-computers/odoo,Endi...
5f385913ab06fc288c61d22d98f2f9a903194f8f
data_structures/Stack/Python/Stack.py
data_structures/Stack/Python/Stack.py
# Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] # Return and remove the last element of the stack array. def pop(self): # If the stack...
# Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] # Return and remove the last element of the stack array. def pop(self): # If the stack...
Add push method and implementation
Add push method and implementation
Python
cc0-1.0
manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,Cnidarias/al-go-rithms,EUNIX-TRIX/al-go-rithms,Cnidarias/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,manikTharaka/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-rithms,manikTharaka/al-go-rithms,manikTharaka/al-go-rithms,Cnidarias/al-go-ri...
9179e794ac8633ac498d2d0324e2083e8c6ed509
iacli/ia_search.py
iacli/ia_search.py
"""Search the Internet Archive using the Archive.org Advanced Search API <https://archive.org/advancedsearch.php#raw>. usage: ia search [--help] <query>... [options...] options: -h, --help -p, --parameters=<key:value>... Parameters to send with your query. -s, --sort=<field:order>... Sort sear...
"""Search the Internet Archive using the Archive.org Advanced Search API <https://archive.org/advancedsearch.php#raw>. usage: ia search [--help] <query>... [options...] options: -h, --help -p, --parameters=<key:value>... Parameters to send with your query. -s, --sort=<field:order>... Sort sear...
Use `internetarchive.search()` function rather than `internetarchive.Search` class.
Use `internetarchive.search()` function rather than `internetarchive.Search` class.
Python
agpl-3.0
JesseWeinstein/internetarchive,dattasaurabh82/internetarchive,jjjake/internetarchive,wumpus/internetarchive,brycedrennan/internetarchive
14798847730a8746c1a7bad18a2f9e0fda7e0756
wagtail/tests/testapp/migrations/0006_sectionedrichtextpage_sectionedrichtextpagesection.py
wagtail/tests/testapp/migrations/0006_sectionedrichtextpage_sectionedrichtextpagesection.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import modelcluster.fields import wagtail.wagtailcore.fields class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0029_unicode_slugfield_dj19'), ('tests', '0005_customrich...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import modelcluster.fields import wagtail.wagtailcore.fields class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0028_merge'), ('tests', '0005_customrichblockfieldpage_cu...
Fix test migration for Wagtail 1.5
Fix test migration for Wagtail 1.5
Python
bsd-3-clause
nilnvoid/wagtail,kurtrwall/wagtail,gasman/wagtail,zerolab/wagtail,kaedroho/wagtail,kurtrwall/wagtail,torchbox/wagtail,zerolab/wagtail,mikedingjan/wagtail,rsalmaso/wagtail,nilnvoid/wagtail,kaedroho/wagtail,nutztherookie/wagtail,takeflight/wagtail,gasman/wagtail,kaedroho/wagtail,wagtail/wagtail,jnns/wagtail,nimasmi/wagta...
fc51259760c522593218b83b8c10ce4cf3f239db
siphon/__init__.py
siphon/__init__.py
# Version import needs to come first so everyone else can pull on import from ._version import get_versions __version__ = get_versions()['version'] del get_versions from . import cdmr # noqa __all__ = ['catalog', 'cdmr']
# Version import needs to come first so everyone else can pull on import from ._version import get_versions __version__ = get_versions()['version'] del get_versions __all__ = ['catalog', 'testing', 'util']
Remove cdmr main level import.
Remove cdmr main level import.
Python
bsd-3-clause
MoonRaker/siphon,hyoklee/siphon,Unidata/siphon,dopplershift/siphon,dopplershift/siphon
143af64f9435b3964ee618cccb89e7ad211e030a
db/__init__.py
db/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from .common import session_scope def commit_db_item(db_item): with session_scope() as session: session.merge(db_item) session.commit()
#!/usr/bin/env python # -*- coding: utf-8 -*- from .common import session_scope def commit_db_item(db_item): with session_scope() as session: session.merge(db_item) session.commit() def create_or_update_db_item(db_item, new_item): """ Updates an existing or creates a new database item. ...
Add utility function to create or update database items
Add utility function to create or update database items
Python
mit
leaffan/pynhldb
976f1881ad97df2f393bb1a090419531ce11eca7
test/trainer_test.py
test/trainer_test.py
import theanets import util class TestTrainer(util.MNIST): def setUp(self): super(TestTrainer, self).setUp() self.exp = theanets.Experiment( theanets.Autoencoder, layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE)) def assert_progress(self, algo, **kwargs): trainer...
import theanets import util class TestTrainer(util.MNIST): def setUp(self): super(TestTrainer, self).setUp() self.exp = theanets.Experiment( theanets.Autoencoder, layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE)) def assert_progress(self, algo, **kwargs): trainer...
Make HF test take much less time!
Make HF test take much less time!
Python
mit
devdoer/theanets,chrinide/theanets,lmjohns3/theanets
0b44d2f2f99426cd2385b881c721f64979fb3d92
src/collectors/users/test/testusers.py
src/collectors/users/test/testusers.py
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from users import Us...
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from users import Us...
Set the docs no matter if we run the test on this platform or not
Set the docs no matter if we run the test on this platform or not
Python
mit
jumping/Diamond,krbaker/Diamond,sebbrandt87/Diamond,Clever/Diamond,codepython/Diamond,CYBERBUGJR/Diamond,szibis/Diamond,gg7/diamond,zoidbergwill/Diamond,bmhatfield/Diamond,TAKEALOT/Diamond,TinLe/Diamond,Ormod/Diamond,tuenti/Diamond,dcsquared13/Diamond,szibis/Diamond,ceph/Diamond,jaingaurav/Diamond,tusharmakkar08/Diamon...
8d000ebe16657f5cbe7fdf06ddd91322f141fb11
accounting/apps/books/models.py
accounting/apps/books/models.py
from django.conf import settings from django.db import models from django.contrib.auth.models import AbstractUser class User(AbstractUser): pass class Organization(models.Model): display_name = models.CharField(max_length=150, help_text="Name that you communicate") legal_name = models.CharField(...
from django.conf import settings from django.db import models from django.contrib.auth.models import AbstractUser class User(AbstractUser): pass class Organization(models.Model): display_name = models.CharField(max_length=150, help_text="Name that you communicate") legal_name = models.CharField(...
Allow no members for creating an organization
Allow no members for creating an organization
Python
mit
kenjhim/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting
eebb736bf83c572b797931c571e7416223436461
homeassistant/components/light/insteon.py
homeassistant/components/light/insteon.py
""" homeassistant.components.light.insteon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for Insteon Hub lights. """ from homeassistant.components.insteon import (INSTEON, InsteonToggleDevice) def setup_platform(hass, config, add_devices, discovery_info=None): """ Sets up the Insteon Hub light platform. """ d...
""" homeassistant.components.light.insteon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for Insteon Hub lights. """ from homeassistant.components.insteon import (INSTEON, InsteonToggleDevice) def setup_platform(hass, config, add_devices, discovery_info=None): """ Sets up the Insteon Hub light platform. """ d...
Add ability to control dimmable sources
Add ability to control dimmable sources
Python
mit
emilhetty/home-assistant,Duoxilian/home-assistant,rohitranjan1991/home-assistant,toddeye/home-assistant,ct-23/home-assistant,florianholzapfel/home-assistant,kennedyshead/home-assistant,keerts/home-assistant,lukas-hetzenecker/home-assistant,jabesq/home-assistant,JshWright/home-assistant,open-homeautomation/home-assistan...
d49b23365a972931502329f47a3aa65b9170477e
openstack/common/middleware/catch_errors.py
openstack/common/middleware/catch_errors.py
# Copyright (c) 2013 NEC Corporation # 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 requi...
# Copyright (c) 2013 NEC Corporation # 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 requi...
Update oslo log messages with translation domains
Update oslo log messages with translation domains Update the incubator code to use different domains for log messages at different levels. Update the import exceptions setting for hacking to allow multiple functions to be imported from gettextutils on one line. bp log-messages-translation-domain Change-Id: I6ce0f4a...
Python
apache-2.0
varunarya10/oslo.middleware,openstack/oslo.middleware,chungg/oslo.middleware,JioCloud/oslo.middleware
0cbce0ddc139dde1367155398d0c6a186408fab3
hug/test.py
hug/test.py
from falcon.testing import StartResponseMock, create_environ from falcon import HTTP_METHODS from urllib.parse import urlencode import json from hug.run import server from functools import partial def call(method, api_module, url, body='', headers=None, **params): api = server(api_module) response = StartResp...
from falcon.testing import StartResponseMock, create_environ from falcon import HTTP_METHODS from urllib.parse import urlencode import json from hug.run import server from functools import partial def call(method, api_module, url, body='', headers=None, **params): api = server(api_module) response = StartResp...
Update call method to return entire response object, and work with non json data
Update call method to return entire response object, and work with non json data
Python
mit
shaunstanislaus/hug,janusnic/hug,origingod/hug,shaunstanislaus/hug,giserh/hug,yasoob/hug,timothycrosley/hug,timothycrosley/hug,philiptzou/hug,alisaifee/hug,yasoob/hug,jean/hug,MuhammadAlkarouri/hug,gbn972/hug,giserh/hug,gbn972/hug,alisaifee/hug,MuhammadAlkarouri/hug,STANAPO/hug,janusnic/hug,jean/hug,origingod/hug,STANA...
845b4fe3bf708d0434cb64d37a212bc0fd6b5ac6
ci/testsettings.py
ci/testsettings.py
# minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } # SECRET_KEY = ''
# minimal django settings required to run tests DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "test.db", } } INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django_cas_ng', 'pucas', ) # SECRET_KEY = ''
Add installed apps configuration to test settings
Add installed apps configuration to test settings
Python
apache-2.0
Princeton-CDH/django-pucas,Princeton-CDH/django-pucas
2c5fb5a0bcf47e49c9862891730615f6c180462f
crmapp/subscribers/forms.py
crmapp/subscribers/forms.py
from django import forms from django.contrib.auth.forms import UserCreationForm class SubscriberForm(UserCreationForm): email = forms.EmailField( required=True, widget=forms.TextInput(attrs={'class':'form-control'}) ) username = forms.CharField( widget=forms.TextInput(attrs={'class':'form-c...
from django import forms from django.contrib.auth.forms import UserCreationForm from .models import Subscriber class AddressMixin(forms.ModelForm): class Meta: model = Subscriber fields = ('address_one', 'address_two', 'city', 'state',) widgets = { 'address_one': forms.TextInp...
Create the Subscriber Form - Part II > Update the Form
Create the Subscriber Form - Part II > Update the Form
Python
mit
tabdon/crmeasyapp,tabdon/crmeasyapp,deenaariff/Django
1cd21ad4538cd71e93fec3a7efac29646503bde7
white_balance.py
white_balance.py
import cv2 import numpy as np import plantcv as pcv def white_balance(img, roi=None): """Corrects the exposure of an image based on its histogram. Inputs: img - A grayscale image on which to perform the correction roi - A list of 4 points (x, y, width, height) that form the rectangular ROI of the whi...
import cv2 import numpy as np import plantcv as pcv def white_balance(img, roi=None): """Corrects the exposure of an image based on its histogram. Inputs: img - A grayscale image on which to perform the correction roi - A list of 4 points (x, y, width, height) that form the rectangular ROI of the whi...
Fix Bug for Nonetype ROI
Fix Bug for Nonetype ROI
Python
mit
danforthcenter/plantcv-seeds
16a5b7897a76c9a53e60d78baf7fb94fcc59b220
powerline/segments/shell.py
powerline/segments/shell.py
# -*- coding: utf-8 -*- from powerline.theme import requires_segment_info @requires_segment_info def last_status(segment_info): '''Return last exit code.''' return str(segment_info.last_exit_code) if segment_info.last_exit_code else None @requires_segment_info def last_pipe_status(segment_info): '''Return last ...
# -*- coding: utf-8 -*- from powerline.theme import requires_segment_info @requires_segment_info def last_status(segment_info): '''Return last exit code.''' if not segment_info.last_exit_code: return None return [{'contents': str(segment_info.last_exit_code), 'highlight_group': 'exit_fail'}] @requires_segment...
Use exit_fail hl group for last_status segment
Use exit_fail hl group for last_status segment Fixes #270
Python
mit
bezhermoso/powerline,darac/powerline,magus424/powerline,wfscheper/powerline,dragon788/powerline,prvnkumar/powerline,xxxhycl2010/powerline,QuLogic/powerline,magus424/powerline,russellb/powerline,seanfisk/powerline,cyrixhero/powerline,blindFS/powerline,bezhermoso/powerline,kenrachynski/powerline,prvnkumar/powerline,junix...