commit stringlengths 40 40 | old_file stringlengths 4 118 | new_file stringlengths 4 118 | old_contents stringlengths 0 2.94k | new_contents stringlengths 1 4.43k | subject stringlengths 15 444 | message stringlengths 16 3.45k | lang stringclasses 1
value | license stringclasses 13
values | repos stringlengths 5 43.2k | prompt stringlengths 17 4.58k | response stringlengths 1 4.43k | prompt_tagged stringlengths 58 4.62k | response_tagged stringlengths 1 4.43k | text stringlengths 132 7.29k | text_tagged stringlengths 173 7.33k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ee6c7caabdfcd0bddd9b92d05cddd8b6be7cbe10 | tests/functional/test_pip_runner_script.py | tests/functional/test_pip_runner_script.py | import os
from pathlib import Path
from pip import __version__
from tests.lib import PipTestEnvironment
def test_runner_work_in_environments_with_no_pip(
script: PipTestEnvironment, pip_src: Path
) -> None:
runner = pip_src / "src" / "pip" / "__pip-runner__.py"
# Ensure there's no pip installed in the e... | import os
from pathlib import Path
from pip import __version__
from tests.lib import PipTestEnvironment
def test_runner_work_in_environments_with_no_pip(
script: PipTestEnvironment, pip_src: Path
) -> None:
runner = pip_src / "src" / "pip" / "__pip-runner__.py"
# Ensure there's no pip installed in the e... | Fix test_runner_work_in_environments_with_no_pip to work under --use-zipapp | Fix test_runner_work_in_environments_with_no_pip to work under --use-zipapp
| Python | mit | pradyunsg/pip,pypa/pip,pfmoore/pip,pfmoore/pip,sbidoul/pip,pradyunsg/pip,sbidoul/pip,pypa/pip | import os
from pathlib import Path
from pip import __version__
from tests.lib import PipTestEnvironment
def test_runner_work_in_environments_with_no_pip(
script: PipTestEnvironment, pip_src: Path
) -> None:
runner = pip_src / "src" / "pip" / "__pip-runner__.py"
# Ensure there's no pip installed in the e... | import os
from pathlib import Path
from pip import __version__
from tests.lib import PipTestEnvironment
def test_runner_work_in_environments_with_no_pip(
script: PipTestEnvironment, pip_src: Path
) -> None:
runner = pip_src / "src" / "pip" / "__pip-runner__.py"
# Ensure there's no pip installed in the e... | <commit_before>import os
from pathlib import Path
from pip import __version__
from tests.lib import PipTestEnvironment
def test_runner_work_in_environments_with_no_pip(
script: PipTestEnvironment, pip_src: Path
) -> None:
runner = pip_src / "src" / "pip" / "__pip-runner__.py"
# Ensure there's no pip ins... | import os
from pathlib import Path
from pip import __version__
from tests.lib import PipTestEnvironment
def test_runner_work_in_environments_with_no_pip(
script: PipTestEnvironment, pip_src: Path
) -> None:
runner = pip_src / "src" / "pip" / "__pip-runner__.py"
# Ensure there's no pip installed in the e... | import os
from pathlib import Path
from pip import __version__
from tests.lib import PipTestEnvironment
def test_runner_work_in_environments_with_no_pip(
script: PipTestEnvironment, pip_src: Path
) -> None:
runner = pip_src / "src" / "pip" / "__pip-runner__.py"
# Ensure there's no pip installed in the e... | <commit_before>import os
from pathlib import Path
from pip import __version__
from tests.lib import PipTestEnvironment
def test_runner_work_in_environments_with_no_pip(
script: PipTestEnvironment, pip_src: Path
) -> None:
runner = pip_src / "src" / "pip" / "__pip-runner__.py"
# Ensure there's no pip ins... |
ab00a69ee0d5c556af118d9cf76b5b9a0db25e6d | telemetry/telemetry/page/page_test_results.py | telemetry/telemetry/page/page_test_results.py | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import traceback
import unittest
class PageTestResults(unittest.TestResult):
def __init__(self):
super(PageTestResults, self).__init__()
self.... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import traceback
import unittest
class PageTestResults(unittest.TestResult):
def __init__(self):
super(PageTestResults, self).__init__()
self.... | Add skipped and addSkip() to PageTestResults, for Python < 2.7. | [telemetry] Add skipped and addSkip() to PageTestResults, for Python < 2.7.
Fixing bots after https://chromiumcodereview.appspot.com/15153003/
Also fix typo in addSuccess(). successes is only used by record_wpr, so that mistake had no effect on the bots.
[email protected]
BUG=None.
TEST=None.
Review URL: https:... | Python | bsd-3-clause | benschmaus/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,sahiljain/catapult,benschmaus/catapult,sahiljain/catapult,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-pro... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import traceback
import unittest
class PageTestResults(unittest.TestResult):
def __init__(self):
super(PageTestResults, self).__init__()
self.... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import traceback
import unittest
class PageTestResults(unittest.TestResult):
def __init__(self):
super(PageTestResults, self).__init__()
self.... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import traceback
import unittest
class PageTestResults(unittest.TestResult):
def __init__(self):
super(PageTestResults, self).__ini... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import traceback
import unittest
class PageTestResults(unittest.TestResult):
def __init__(self):
super(PageTestResults, self).__init__()
self.... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import traceback
import unittest
class PageTestResults(unittest.TestResult):
def __init__(self):
super(PageTestResults, self).__init__()
self.... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import traceback
import unittest
class PageTestResults(unittest.TestResult):
def __init__(self):
super(PageTestResults, self).__ini... |
0e835c6381374c5b00b7387057d056d679f635c4 | zproject/legacy_urls.py | zproject/legacy_urls.py | from django.conf.urls import url
import zerver.views
import zerver.views.streams
import zerver.views.auth
import zerver.views.tutorial
import zerver.views.report
# Future endpoints should add to urls.py, which includes these legacy urls
legacy_urls = [
# These are json format views used by the web client. They r... | from django.urls import path
import zerver.views
import zerver.views.streams
import zerver.views.auth
import zerver.views.tutorial
import zerver.views.report
# Future endpoints should add to urls.py, which includes these legacy urls
legacy_urls = [
# These are json format views used by the web client. They requi... | Migrate legacy urls to use modern django pattern. | urls: Migrate legacy urls to use modern django pattern.
| Python | apache-2.0 | shubhamdhama/zulip,punchagan/zulip,kou/zulip,showell/zulip,hackerkid/zulip,timabbott/zulip,eeshangarg/zulip,kou/zulip,andersk/zulip,zulip/zulip,synicalsyntax/zulip,zulip/zulip,andersk/zulip,shubhamdhama/zulip,showell/zulip,kou/zulip,hackerkid/zulip,shubhamdhama/zulip,andersk/zulip,eeshangarg/zulip,brainwane/zulip,shubh... | from django.conf.urls import url
import zerver.views
import zerver.views.streams
import zerver.views.auth
import zerver.views.tutorial
import zerver.views.report
# Future endpoints should add to urls.py, which includes these legacy urls
legacy_urls = [
# These are json format views used by the web client. They r... | from django.urls import path
import zerver.views
import zerver.views.streams
import zerver.views.auth
import zerver.views.tutorial
import zerver.views.report
# Future endpoints should add to urls.py, which includes these legacy urls
legacy_urls = [
# These are json format views used by the web client. They requi... | <commit_before>from django.conf.urls import url
import zerver.views
import zerver.views.streams
import zerver.views.auth
import zerver.views.tutorial
import zerver.views.report
# Future endpoints should add to urls.py, which includes these legacy urls
legacy_urls = [
# These are json format views used by the web ... | from django.urls import path
import zerver.views
import zerver.views.streams
import zerver.views.auth
import zerver.views.tutorial
import zerver.views.report
# Future endpoints should add to urls.py, which includes these legacy urls
legacy_urls = [
# These are json format views used by the web client. They requi... | from django.conf.urls import url
import zerver.views
import zerver.views.streams
import zerver.views.auth
import zerver.views.tutorial
import zerver.views.report
# Future endpoints should add to urls.py, which includes these legacy urls
legacy_urls = [
# These are json format views used by the web client. They r... | <commit_before>from django.conf.urls import url
import zerver.views
import zerver.views.streams
import zerver.views.auth
import zerver.views.tutorial
import zerver.views.report
# Future endpoints should add to urls.py, which includes these legacy urls
legacy_urls = [
# These are json format views used by the web ... |
5b6026bac75ae906d55410c583ebe4a756232dd7 | cla_backend/apps/cla_eventlog/management/commands/find_and_delete_old_cases.py | cla_backend/apps/cla_eventlog/management/commands/find_and_delete_old_cases.py | from django.core.management.base import BaseCommand
from dateutil.relativedelta import relativedelta
from legalaid.models import Case
from cla_butler.tasks import DeleteOldData
class FindAndDeleteCasesUsingCreationTime(DeleteOldData):
def get_eligible_cases(self):
self._setup()
two_years = self.n... | import sys
from django.core.management.base import BaseCommand
from dateutil.relativedelta import relativedelta
from legalaid.models import Case
from cla_butler.tasks import DeleteOldData
class FindAndDeleteCasesUsingCreationTime(DeleteOldData):
def get_eligible_cases(self):
two_years = self.now - relati... | Change functionality depending on where command is called from | Change functionality depending on where command is called from | Python | mit | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | from django.core.management.base import BaseCommand
from dateutil.relativedelta import relativedelta
from legalaid.models import Case
from cla_butler.tasks import DeleteOldData
class FindAndDeleteCasesUsingCreationTime(DeleteOldData):
def get_eligible_cases(self):
self._setup()
two_years = self.n... | import sys
from django.core.management.base import BaseCommand
from dateutil.relativedelta import relativedelta
from legalaid.models import Case
from cla_butler.tasks import DeleteOldData
class FindAndDeleteCasesUsingCreationTime(DeleteOldData):
def get_eligible_cases(self):
two_years = self.now - relati... | <commit_before>from django.core.management.base import BaseCommand
from dateutil.relativedelta import relativedelta
from legalaid.models import Case
from cla_butler.tasks import DeleteOldData
class FindAndDeleteCasesUsingCreationTime(DeleteOldData):
def get_eligible_cases(self):
self._setup()
two... | import sys
from django.core.management.base import BaseCommand
from dateutil.relativedelta import relativedelta
from legalaid.models import Case
from cla_butler.tasks import DeleteOldData
class FindAndDeleteCasesUsingCreationTime(DeleteOldData):
def get_eligible_cases(self):
two_years = self.now - relati... | from django.core.management.base import BaseCommand
from dateutil.relativedelta import relativedelta
from legalaid.models import Case
from cla_butler.tasks import DeleteOldData
class FindAndDeleteCasesUsingCreationTime(DeleteOldData):
def get_eligible_cases(self):
self._setup()
two_years = self.n... | <commit_before>from django.core.management.base import BaseCommand
from dateutil.relativedelta import relativedelta
from legalaid.models import Case
from cla_butler.tasks import DeleteOldData
class FindAndDeleteCasesUsingCreationTime(DeleteOldData):
def get_eligible_cases(self):
self._setup()
two... |
53e89d0e7af03bd9f59a2e6bcbe6cdbfe8e8f50a | corehq/apps/custom_data_fields/management/commands/convert_custom_user_data.py | corehq/apps/custom_data_fields/management/commands/convert_custom_user_data.py | from django.core.management.base import BaseCommand
from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition, CustomDataField
from corehq.apps.users.models import CommCareUser
from corehq.apps.domain.models import Domain
from dimagi.utils.couch.database import iter_docs
class Command(BaseCommand):... | from django.core.management.base import BaseCommand
from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition, CustomDataField
from corehq.apps.users.models import CommCareUser
from corehq.apps.domain.models import Domain
from dimagi.utils.couch.database import iter_docs
class Command(BaseCommand):... | Drop empty field keys in migration | Drop empty field keys in migration
| Python | bsd-3-clause | puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq | from django.core.management.base import BaseCommand
from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition, CustomDataField
from corehq.apps.users.models import CommCareUser
from corehq.apps.domain.models import Domain
from dimagi.utils.couch.database import iter_docs
class Command(BaseCommand):... | from django.core.management.base import BaseCommand
from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition, CustomDataField
from corehq.apps.users.models import CommCareUser
from corehq.apps.domain.models import Domain
from dimagi.utils.couch.database import iter_docs
class Command(BaseCommand):... | <commit_before>from django.core.management.base import BaseCommand
from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition, CustomDataField
from corehq.apps.users.models import CommCareUser
from corehq.apps.domain.models import Domain
from dimagi.utils.couch.database import iter_docs
class Comman... | from django.core.management.base import BaseCommand
from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition, CustomDataField
from corehq.apps.users.models import CommCareUser
from corehq.apps.domain.models import Domain
from dimagi.utils.couch.database import iter_docs
class Command(BaseCommand):... | from django.core.management.base import BaseCommand
from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition, CustomDataField
from corehq.apps.users.models import CommCareUser
from corehq.apps.domain.models import Domain
from dimagi.utils.couch.database import iter_docs
class Command(BaseCommand):... | <commit_before>from django.core.management.base import BaseCommand
from corehq.apps.custom_data_fields.models import CustomDataFieldsDefinition, CustomDataField
from corehq.apps.users.models import CommCareUser
from corehq.apps.domain.models import Domain
from dimagi.utils.couch.database import iter_docs
class Comman... |
fe47651ddd32a5795dab28ca998230b042a70c59 | app/views/comment_view.py | app/views/comment_view.py | from flask_classy import FlaskView
from flask_user import current_user, login_required
from ..models import CommentModel, PostModel
from ..forms import CommentForm
class Comment(FlaskView):
def get(self):
pass
def all(self, post_id):
comment = CommentModel()
comment.query.add_filter(... | from flask import jsonify
from flask_classy import FlaskView
from flask_user import current_user, login_required
from ..models import CommentModel, PostModel
from ..forms import CommentForm
class Comment(FlaskView):
def get(self):
pass
def all(self, post_id):
comment = CommentModel()
... | Comment all view return a json of all comments | Comment all view return a json of all comments
| Python | mit | oldani/nanodegree-blog,oldani/nanodegree-blog,oldani/nanodegree-blog | from flask_classy import FlaskView
from flask_user import current_user, login_required
from ..models import CommentModel, PostModel
from ..forms import CommentForm
class Comment(FlaskView):
def get(self):
pass
def all(self, post_id):
comment = CommentModel()
comment.query.add_filter(... | from flask import jsonify
from flask_classy import FlaskView
from flask_user import current_user, login_required
from ..models import CommentModel, PostModel
from ..forms import CommentForm
class Comment(FlaskView):
def get(self):
pass
def all(self, post_id):
comment = CommentModel()
... | <commit_before>from flask_classy import FlaskView
from flask_user import current_user, login_required
from ..models import CommentModel, PostModel
from ..forms import CommentForm
class Comment(FlaskView):
def get(self):
pass
def all(self, post_id):
comment = CommentModel()
comment.qu... | from flask import jsonify
from flask_classy import FlaskView
from flask_user import current_user, login_required
from ..models import CommentModel, PostModel
from ..forms import CommentForm
class Comment(FlaskView):
def get(self):
pass
def all(self, post_id):
comment = CommentModel()
... | from flask_classy import FlaskView
from flask_user import current_user, login_required
from ..models import CommentModel, PostModel
from ..forms import CommentForm
class Comment(FlaskView):
def get(self):
pass
def all(self, post_id):
comment = CommentModel()
comment.query.add_filter(... | <commit_before>from flask_classy import FlaskView
from flask_user import current_user, login_required
from ..models import CommentModel, PostModel
from ..forms import CommentForm
class Comment(FlaskView):
def get(self):
pass
def all(self, post_id):
comment = CommentModel()
comment.qu... |
5b9f0270aaa53a562ca65fa74769885621da4a8e | website/addons/s3/__init__.py | website/addons/s3/__init__.py | import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings, model.S3GuidFile]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
FULL_NAME = 'Am... | import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings, model.S3GuidFile]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
FULL_NAME = 'Am... | Change S3 full name to Amazon S3 | Change S3 full name to Amazon S3
| Python | apache-2.0 | hmoco/osf.io,jmcarp/osf.io,abought/osf.io,amyshi188/osf.io,brandonPurvis/osf.io,sloria/osf.io,barbour-em/osf.io,lyndsysimon/osf.io,GageGaskins/osf.io,brandonPurvis/osf.io,HarryRybacki/osf.io,pattisdr/osf.io,HalcyonChimera/osf.io,wearpants/osf.io,TomBaxter/osf.io,samanehsan/osf.io,zachjanicki/osf.io,mluo613/osf.io,Zobai... | import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings, model.S3GuidFile]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
FULL_NAME = 'Am... | import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings, model.S3GuidFile]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
FULL_NAME = 'Am... | <commit_before>import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings, model.S3GuidFile]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
... | import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings, model.S3GuidFile]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
FULL_NAME = 'Am... | import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings, model.S3GuidFile]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
FULL_NAME = 'Am... | <commit_before>import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings, model.S3GuidFile]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
... |
3a073bb52224876b2424404a59df3c9e3d3fff89 | lesson2/read_passwd/read_passwd.py | lesson2/read_passwd/read_passwd.py | '''
Created on Sep 27, 2013
@author: dgamez
'''
def run():
t = lee_passwd ()
for l in t:
# print l
e = l.split(":")
user = e[0]
shell = e[-1].rstrip("\n")
print "%s -> %s" % (user, shell)
def lee_passwd ():
f = open('/etc/passwd','r')
t = f.readlines ... | '''
Created on Sep 27, 2013
Testing
@author: dgamez
'''
def run():
t = lee_passwd ()
for l in t:
# print l
e = l.split(":")
user = e[0]
shell = e[-1].rstrip("\n")
print "%s -> %s" % (user, shell)
def lee_passwd ():
f = open('/etc/passwd','r')
t = f.rea... | Verify EGit commits/pushes to Master | Verify EGit commits/pushes to Master | Python | bsd-2-clause | gamezdaniel/mswl-dt-2013,gamezdaniel/mswl-dt-2013 | '''
Created on Sep 27, 2013
@author: dgamez
'''
def run():
t = lee_passwd ()
for l in t:
# print l
e = l.split(":")
user = e[0]
shell = e[-1].rstrip("\n")
print "%s -> %s" % (user, shell)
def lee_passwd ():
f = open('/etc/passwd','r')
t = f.readlines ... | '''
Created on Sep 27, 2013
Testing
@author: dgamez
'''
def run():
t = lee_passwd ()
for l in t:
# print l
e = l.split(":")
user = e[0]
shell = e[-1].rstrip("\n")
print "%s -> %s" % (user, shell)
def lee_passwd ():
f = open('/etc/passwd','r')
t = f.rea... | <commit_before>'''
Created on Sep 27, 2013
@author: dgamez
'''
def run():
t = lee_passwd ()
for l in t:
# print l
e = l.split(":")
user = e[0]
shell = e[-1].rstrip("\n")
print "%s -> %s" % (user, shell)
def lee_passwd ():
f = open('/etc/passwd','r')
t... | '''
Created on Sep 27, 2013
Testing
@author: dgamez
'''
def run():
t = lee_passwd ()
for l in t:
# print l
e = l.split(":")
user = e[0]
shell = e[-1].rstrip("\n")
print "%s -> %s" % (user, shell)
def lee_passwd ():
f = open('/etc/passwd','r')
t = f.rea... | '''
Created on Sep 27, 2013
@author: dgamez
'''
def run():
t = lee_passwd ()
for l in t:
# print l
e = l.split(":")
user = e[0]
shell = e[-1].rstrip("\n")
print "%s -> %s" % (user, shell)
def lee_passwd ():
f = open('/etc/passwd','r')
t = f.readlines ... | <commit_before>'''
Created on Sep 27, 2013
@author: dgamez
'''
def run():
t = lee_passwd ()
for l in t:
# print l
e = l.split(":")
user = e[0]
shell = e[-1].rstrip("\n")
print "%s -> %s" % (user, shell)
def lee_passwd ():
f = open('/etc/passwd','r')
t... |
02e718fb9dd82b252a5726a81eb3a70817d91a88 | test/backend/test_database/__init__.py | test/backend/test_database/__init__.py | # The main Flask application needs to imported before any of the database tests so that linkr.db
# is defined before attempting to access any of the database modules database.*.
# This is the result of a import "race condition" caused by the fact that Flask requires references
# to any libraries to be declared explicit... | Fix import race condition on CI | Fix import race condition on CI
| Python | mit | LINKIWI/linkr,LINKIWI/linkr,LINKIWI/linkr | Fix import race condition on CI | # The main Flask application needs to imported before any of the database tests so that linkr.db
# is defined before attempting to access any of the database modules database.*.
# This is the result of a import "race condition" caused by the fact that Flask requires references
# to any libraries to be declared explicit... | <commit_before><commit_msg>Fix import race condition on CI<commit_after> | # The main Flask application needs to imported before any of the database tests so that linkr.db
# is defined before attempting to access any of the database modules database.*.
# This is the result of a import "race condition" caused by the fact that Flask requires references
# to any libraries to be declared explicit... | Fix import race condition on CI# The main Flask application needs to imported before any of the database tests so that linkr.db
# is defined before attempting to access any of the database modules database.*.
# This is the result of a import "race condition" caused by the fact that Flask requires references
# to any li... | <commit_before><commit_msg>Fix import race condition on CI<commit_after># The main Flask application needs to imported before any of the database tests so that linkr.db
# is defined before attempting to access any of the database modules database.*.
# This is the result of a import "race condition" caused by the fact t... | |
d18ff30bbddde5049ffbe23bce19288c3c47e41b | posts/views.py | posts/views.py | from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Post
class PostListView(ListView):
model = Post
context_object_name = 'posts'
class PostDetailView(DetailView):
model = Post
context_object_name = 'post'
| from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Post
class PostListView(ListView):
model = Post
context_object_name = 'posts'
def get_queryset(self):
"""
Order posts by the day they were added, from newest, to oldest.... | Order posts from newest to oldest | posts: Order posts from newest to oldest
| Python | mit | rtrembecky/roots,tbabej/roots,rtrembecky/roots,tbabej/roots,matus-stehlik/roots,matus-stehlik/roots,matus-stehlik/glowing-batman,matus-stehlik/roots,matus-stehlik/glowing-batman,rtrembecky/roots,tbabej/roots | from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Post
class PostListView(ListView):
model = Post
context_object_name = 'posts'
class PostDetailView(DetailView):
model = Post
context_object_name = 'post'
posts: Order posts from ne... | from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Post
class PostListView(ListView):
model = Post
context_object_name = 'posts'
def get_queryset(self):
"""
Order posts by the day they were added, from newest, to oldest.... | <commit_before>from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Post
class PostListView(ListView):
model = Post
context_object_name = 'posts'
class PostDetailView(DetailView):
model = Post
context_object_name = 'post'
<commit_msg... | from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Post
class PostListView(ListView):
model = Post
context_object_name = 'posts'
def get_queryset(self):
"""
Order posts by the day they were added, from newest, to oldest.... | from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Post
class PostListView(ListView):
model = Post
context_object_name = 'posts'
class PostDetailView(DetailView):
model = Post
context_object_name = 'post'
posts: Order posts from ne... | <commit_before>from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Post
class PostListView(ListView):
model = Post
context_object_name = 'posts'
class PostDetailView(DetailView):
model = Post
context_object_name = 'post'
<commit_msg... |
dae8420456280fdf1f0971301986995c21fd8027 | static_template_view/views.py | static_template_view/views.py | # View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
# security reasons.
from mitxmako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
from django.core.context_processors import csrf
from django.conf import settings
... | # View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
# security reasons.
from mitxmako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
from django.core.context_processors import csrf
from django.conf import settings
... | Support for static pages added | Support for static pages added
| Python | agpl-3.0 | appliedx/edx-platform,SivilTaram/edx-platform,inares/edx-platform,shurihell/testasia,zofuthan/edx-platform,wwj718/edx-platform,abdoosh00/edx-rtl-final,10clouds/edx-platform,unicri/edx-platform,Edraak/edx-platform,praveen-pal/edx-platform,jruiperezv/ANALYSE,fly19890211/edx-platform,Lektorium-LLC/edx-platform,morenopc/ed... | # View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
# security reasons.
from mitxmako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
from django.core.context_processors import csrf
from django.conf import settings
... | # View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
# security reasons.
from mitxmako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
from django.core.context_processors import csrf
from django.conf import settings
... | <commit_before># View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
# security reasons.
from mitxmako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
from django.core.context_processors import csrf
from django.conf i... | # View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
# security reasons.
from mitxmako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
from django.core.context_processors import csrf
from django.conf import settings
... | # View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
# security reasons.
from mitxmako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
from django.core.context_processors import csrf
from django.conf import settings
... | <commit_before># View for semi-static templatized content.
#
# List of valid templates is explicitly managed for (short-term)
# security reasons.
from mitxmako.shortcuts import render_to_response, render_to_string
from django.shortcuts import redirect
from django.core.context_processors import csrf
from django.conf i... |
b583c5fb00d1ebfa0458a6233be85d8b56173abf | python/printbag.py | python/printbag.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Print a rosbag file.
"""
import sys
import logging
import numpy as np
# suppress logging warnings due to rospy
logging.basicConfig(filename='/dev/null')
import rosbag
from antlia.dtype import LIDAR_CONVERTED_DTYPE
def print_bag(bag, topics=None):
if topics is No... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Print a rosbag file.
"""
import sys
import logging
# suppress logging warnings due to rospy
logging.basicConfig(filename='/dev/null')
import rosbag
def print_bag(bag, topics=None):
for message in bag.read_messages(topics=topics):
print(message)
if __name... | Add argument to specify bag topics | Add argument to specify bag topics
| Python | bsd-2-clause | oliverlee/antlia | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Print a rosbag file.
"""
import sys
import logging
import numpy as np
# suppress logging warnings due to rospy
logging.basicConfig(filename='/dev/null')
import rosbag
from antlia.dtype import LIDAR_CONVERTED_DTYPE
def print_bag(bag, topics=None):
if topics is No... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Print a rosbag file.
"""
import sys
import logging
# suppress logging warnings due to rospy
logging.basicConfig(filename='/dev/null')
import rosbag
def print_bag(bag, topics=None):
for message in bag.read_messages(topics=topics):
print(message)
if __name... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Print a rosbag file.
"""
import sys
import logging
import numpy as np
# suppress logging warnings due to rospy
logging.basicConfig(filename='/dev/null')
import rosbag
from antlia.dtype import LIDAR_CONVERTED_DTYPE
def print_bag(bag, topics=None):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Print a rosbag file.
"""
import sys
import logging
# suppress logging warnings due to rospy
logging.basicConfig(filename='/dev/null')
import rosbag
def print_bag(bag, topics=None):
for message in bag.read_messages(topics=topics):
print(message)
if __name... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Print a rosbag file.
"""
import sys
import logging
import numpy as np
# suppress logging warnings due to rospy
logging.basicConfig(filename='/dev/null')
import rosbag
from antlia.dtype import LIDAR_CONVERTED_DTYPE
def print_bag(bag, topics=None):
if topics is No... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Print a rosbag file.
"""
import sys
import logging
import numpy as np
# suppress logging warnings due to rospy
logging.basicConfig(filename='/dev/null')
import rosbag
from antlia.dtype import LIDAR_CONVERTED_DTYPE
def print_bag(bag, topics=None):
... |
ca06bf1d52cd51ccec178c98ad407bfe59f1ada1 | strobe.py | strobe.py | import RPi.GPIO as GPIO
from time import sleep
def onoff(period, pin):
"""Symmetric square wave, equal time on/off"""
half_cycle = period / 2.0
GPIO.output(pin, GPIO.HIGH)
sleep(half_cycle)
GPIO.output(pin, GPIO.LOW)
sleep(half_cycle)
def strobe(freq, dur, pin):
nflashes = freq * dur
s... | # Adapted from code by Rahul Kar
# http://www.rpiblog.com/2012/09/using-gpio-of-raspberry-pi-to-blink-led.html
import RPi.GPIO as GPIO
from time import sleep
def onoff(ontime, offtime, pin):
GPIO.output(pin, GPIO.HIGH)
sleep(ontime)
GPIO.output(pin, GPIO.LOW)
sleep(offtime)
def strobe(freq, dur, pin)... | Make onoff function more versatile | Make onoff function more versatile
| Python | mit | zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie | import RPi.GPIO as GPIO
from time import sleep
def onoff(period, pin):
"""Symmetric square wave, equal time on/off"""
half_cycle = period / 2.0
GPIO.output(pin, GPIO.HIGH)
sleep(half_cycle)
GPIO.output(pin, GPIO.LOW)
sleep(half_cycle)
def strobe(freq, dur, pin):
nflashes = freq * dur
s... | # Adapted from code by Rahul Kar
# http://www.rpiblog.com/2012/09/using-gpio-of-raspberry-pi-to-blink-led.html
import RPi.GPIO as GPIO
from time import sleep
def onoff(ontime, offtime, pin):
GPIO.output(pin, GPIO.HIGH)
sleep(ontime)
GPIO.output(pin, GPIO.LOW)
sleep(offtime)
def strobe(freq, dur, pin)... | <commit_before>import RPi.GPIO as GPIO
from time import sleep
def onoff(period, pin):
"""Symmetric square wave, equal time on/off"""
half_cycle = period / 2.0
GPIO.output(pin, GPIO.HIGH)
sleep(half_cycle)
GPIO.output(pin, GPIO.LOW)
sleep(half_cycle)
def strobe(freq, dur, pin):
nflashes = f... | # Adapted from code by Rahul Kar
# http://www.rpiblog.com/2012/09/using-gpio-of-raspberry-pi-to-blink-led.html
import RPi.GPIO as GPIO
from time import sleep
def onoff(ontime, offtime, pin):
GPIO.output(pin, GPIO.HIGH)
sleep(ontime)
GPIO.output(pin, GPIO.LOW)
sleep(offtime)
def strobe(freq, dur, pin)... | import RPi.GPIO as GPIO
from time import sleep
def onoff(period, pin):
"""Symmetric square wave, equal time on/off"""
half_cycle = period / 2.0
GPIO.output(pin, GPIO.HIGH)
sleep(half_cycle)
GPIO.output(pin, GPIO.LOW)
sleep(half_cycle)
def strobe(freq, dur, pin):
nflashes = freq * dur
s... | <commit_before>import RPi.GPIO as GPIO
from time import sleep
def onoff(period, pin):
"""Symmetric square wave, equal time on/off"""
half_cycle = period / 2.0
GPIO.output(pin, GPIO.HIGH)
sleep(half_cycle)
GPIO.output(pin, GPIO.LOW)
sleep(half_cycle)
def strobe(freq, dur, pin):
nflashes = f... |
aca17ff2fddd35bd50d78d62dc6dab7e47fb8e4e | controllers/default.py | controllers/default.py | import os
def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
def POST(resou... | import os
def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
def POST(resou... | Use the new location of study NexSON | Use the new location of study NexSON
Each study now has a distinct directory. Currently we only plan to store
a single JSON file in each directory, until one becomes larger than 50MB.
Additionally, this allows various metadata/artifacts about a study to live
near the actually study data.
| Python | bsd-2-clause | OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api | import os
def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
def POST(resou... | import os
def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
def POST(resou... | <commit_before>import os
def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
... | import os
def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
def POST(resou... | import os
def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
def POST(resou... | <commit_before>import os
def index():
def GET():
return locals()
@request.restful()
def api():
response.view = 'generic.json'
def GET(resource,resource_id):
if not resource=='study': raise HTTP(400)
# return the correct nexson of study_id
return _get_nexson(resource_id)
... |
c9355e9ae6815b40dce72df9a9a8b1d8f169a8a3 | tests/test_morando_floripa.py | tests/test_morando_floripa.py | # coding: utf-8
from django.test import TestCase
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from rest_framework.test import APIRequestFactory, APIClient
class TestAPIViews(TestCase):
def setUp(self):
self.factory = APIRequestFactory()
self.client ... | # coding: utf-8
from django.test import TestCase
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from rest_framework.test import APIRequestFactory, APIClient
class TestAPIViews(TestCase):
def setUp(self):
self.factory = APIRequestFactory()
self.client ... | Fix na rota dos testes | Fix na rota dos testes
| Python | mit | AlexandreProenca/backend-morandofloripa,AlexandreProenca/backend-morandofloripa,AlexandreProenca/backend-morandofloripa | # coding: utf-8
from django.test import TestCase
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from rest_framework.test import APIRequestFactory, APIClient
class TestAPIViews(TestCase):
def setUp(self):
self.factory = APIRequestFactory()
self.client ... | # coding: utf-8
from django.test import TestCase
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from rest_framework.test import APIRequestFactory, APIClient
class TestAPIViews(TestCase):
def setUp(self):
self.factory = APIRequestFactory()
self.client ... | <commit_before># coding: utf-8
from django.test import TestCase
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from rest_framework.test import APIRequestFactory, APIClient
class TestAPIViews(TestCase):
def setUp(self):
self.factory = APIRequestFactory()
... | # coding: utf-8
from django.test import TestCase
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from rest_framework.test import APIRequestFactory, APIClient
class TestAPIViews(TestCase):
def setUp(self):
self.factory = APIRequestFactory()
self.client ... | # coding: utf-8
from django.test import TestCase
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from rest_framework.test import APIRequestFactory, APIClient
class TestAPIViews(TestCase):
def setUp(self):
self.factory = APIRequestFactory()
self.client ... | <commit_before># coding: utf-8
from django.test import TestCase
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from rest_framework.test import APIRequestFactory, APIClient
class TestAPIViews(TestCase):
def setUp(self):
self.factory = APIRequestFactory()
... |
a08de1d3c7f7dfc72c8b3b8e9019d1b7b5ad004e | mdtraj/tests/test_load.py | mdtraj/tests/test_load.py | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | from mdtraj import load
from mdtraj.testing import get_fn
def test_load_single():
"""
Just check for any raised errors coming from loading a single file.
"""
load(get_fn('frame0.pdb'))
def test_load_single_list():
"""
See if a single-element list of files is successfully loaded.
"""
lo... | Fix test for loading multiple trajectories. | Fix test for loading multiple trajectories.
| Python | lgpl-2.1 | msultan/mdtraj,rmcgibbo/mdtraj,tcmoore3/mdtraj,mdtraj/mdtraj,jchodera/mdtraj,msultan/mdtraj,ctk3b/mdtraj,ctk3b/mdtraj,mdtraj/mdtraj,msultan/mdtraj,mattwthompson/mdtraj,jchodera/mdtraj,jchodera/mdtraj,leeping/mdtraj,gph82/mdtraj,rmcgibbo/mdtraj,gph82/mdtraj,jchodera/mdtraj,mdtraj/mdtraj,leeping/mdtraj,tcmoore3/mdtraj,ct... | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | from mdtraj import load
from mdtraj.testing import get_fn
def test_load_single():
"""
Just check for any raised errors coming from loading a single file.
"""
load(get_fn('frame0.pdb'))
def test_load_single_list():
"""
See if a single-element list of files is successfully loaded.
"""
lo... | <commit_before>##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is f... | from mdtraj import load
from mdtraj.testing import get_fn
def test_load_single():
"""
Just check for any raised errors coming from loading a single file.
"""
load(get_fn('frame0.pdb'))
def test_load_single_list():
"""
See if a single-element list of files is successfully loaded.
"""
lo... | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is free software: y... | <commit_before>##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors:
#
# MDTraj is f... |
4456fbdb36b82608501107c4060825377a75c0bf | ColorHistograms-python/color_histogram_cuda.py | ColorHistograms-python/color_histogram_cuda.py | import pycuda.autoinit
import pycuda.driver as drv
import numpy
from scipy import misc
from color_histogram_cuda_module import histogram_atomics, histogram_accum
def histogram(image_path, num_bins):
image = misc.imread(image_path)
bin_size = 256 / num_bins
# calculate image dimensions
(w, h, c) = ima... | import pycuda.autoinit
import pycuda.driver as drv
import numpy
from scipy import misc
from color_histogram_cuda_module import histogram_atomics, histogram_accum
def histogram(image_path, num_bins):
image = misc.imread(image_path)
bin_size = 256 / num_bins
# calculate image dimensions
(w, h, c) = ima... | Change dimensions of output in python wrapper | Change dimensions of output in python wrapper
| Python | bsd-3-clause | kwadraterry/GPGPU-LUT,kwadraterry/GPGPU-LUT,kwadraterry/GPGPU-LUT,kwadraterry/GPGPU-LUT,kwadraterry/GPGPU-LUT | import pycuda.autoinit
import pycuda.driver as drv
import numpy
from scipy import misc
from color_histogram_cuda_module import histogram_atomics, histogram_accum
def histogram(image_path, num_bins):
image = misc.imread(image_path)
bin_size = 256 / num_bins
# calculate image dimensions
(w, h, c) = ima... | import pycuda.autoinit
import pycuda.driver as drv
import numpy
from scipy import misc
from color_histogram_cuda_module import histogram_atomics, histogram_accum
def histogram(image_path, num_bins):
image = misc.imread(image_path)
bin_size = 256 / num_bins
# calculate image dimensions
(w, h, c) = ima... | <commit_before>import pycuda.autoinit
import pycuda.driver as drv
import numpy
from scipy import misc
from color_histogram_cuda_module import histogram_atomics, histogram_accum
def histogram(image_path, num_bins):
image = misc.imread(image_path)
bin_size = 256 / num_bins
# calculate image dimensions
... | import pycuda.autoinit
import pycuda.driver as drv
import numpy
from scipy import misc
from color_histogram_cuda_module import histogram_atomics, histogram_accum
def histogram(image_path, num_bins):
image = misc.imread(image_path)
bin_size = 256 / num_bins
# calculate image dimensions
(w, h, c) = ima... | import pycuda.autoinit
import pycuda.driver as drv
import numpy
from scipy import misc
from color_histogram_cuda_module import histogram_atomics, histogram_accum
def histogram(image_path, num_bins):
image = misc.imread(image_path)
bin_size = 256 / num_bins
# calculate image dimensions
(w, h, c) = ima... | <commit_before>import pycuda.autoinit
import pycuda.driver as drv
import numpy
from scipy import misc
from color_histogram_cuda_module import histogram_atomics, histogram_accum
def histogram(image_path, num_bins):
image = misc.imread(image_path)
bin_size = 256 / num_bins
# calculate image dimensions
... |
b3400070d47d95bfa2eeac3a9f696b8957d88128 | conjureup/controllers/clouds/tui.py | conjureup/controllers/clouds/tui.py | from conjureup import controllers, events, juju, utils
from conjureup.app_config import app
from conjureup.consts import cloud_types
from .common import BaseCloudController
class CloudsController(BaseCloudController):
def __controller_exists(self, controller):
return juju.get_controller(controller) is no... | from conjureup import controllers, events, juju, utils
from conjureup.app_config import app
from conjureup.consts import cloud_types
from .common import BaseCloudController
class CloudsController(BaseCloudController):
def __controller_exists(self, controller):
return juju.get_controller(controller) is no... | Fix issue where non localhost headless clouds werent calling finish | Fix issue where non localhost headless clouds werent calling finish
Signed-off-by: Adam Stokes <49c255c1d074742f60d19fdba5e2aa5a34add567@users.noreply.github.com>
| Python | mit | conjure-up/conjure-up,Ubuntu-Solutions-Engineering/conjure,ubuntu/conjure-up,Ubuntu-Solutions-Engineering/conjure,conjure-up/conjure-up,ubuntu/conjure-up | from conjureup import controllers, events, juju, utils
from conjureup.app_config import app
from conjureup.consts import cloud_types
from .common import BaseCloudController
class CloudsController(BaseCloudController):
def __controller_exists(self, controller):
return juju.get_controller(controller) is no... | from conjureup import controllers, events, juju, utils
from conjureup.app_config import app
from conjureup.consts import cloud_types
from .common import BaseCloudController
class CloudsController(BaseCloudController):
def __controller_exists(self, controller):
return juju.get_controller(controller) is no... | <commit_before>from conjureup import controllers, events, juju, utils
from conjureup.app_config import app
from conjureup.consts import cloud_types
from .common import BaseCloudController
class CloudsController(BaseCloudController):
def __controller_exists(self, controller):
return juju.get_controller(co... | from conjureup import controllers, events, juju, utils
from conjureup.app_config import app
from conjureup.consts import cloud_types
from .common import BaseCloudController
class CloudsController(BaseCloudController):
def __controller_exists(self, controller):
return juju.get_controller(controller) is no... | from conjureup import controllers, events, juju, utils
from conjureup.app_config import app
from conjureup.consts import cloud_types
from .common import BaseCloudController
class CloudsController(BaseCloudController):
def __controller_exists(self, controller):
return juju.get_controller(controller) is no... | <commit_before>from conjureup import controllers, events, juju, utils
from conjureup.app_config import app
from conjureup.consts import cloud_types
from .common import BaseCloudController
class CloudsController(BaseCloudController):
def __controller_exists(self, controller):
return juju.get_controller(co... |
8ed7983859e2b7031b736b92b875040fa13fb39c | blockbuster/bb_logging.py | blockbuster/bb_logging.py | import config
import logging
import logging.handlers
# ######### Set up logging ##########
# log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG)
logger = logging.getLogger('bb_log')
logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
tfh = logging.handl... | import config
import logging
import logging.handlers
# ######### Set up logging ##########
# log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG)
logger = logging.getLogger('bb_log')
logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
tfh = logging.handl... | Remove square brackets around log level in log ouput | Remove square brackets around log level in log ouput
| Python | mit | mattstibbs/blockbuster-server,mattstibbs/blockbuster-server | import config
import logging
import logging.handlers
# ######### Set up logging ##########
# log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG)
logger = logging.getLogger('bb_log')
logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
tfh = logging.handl... | import config
import logging
import logging.handlers
# ######### Set up logging ##########
# log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG)
logger = logging.getLogger('bb_log')
logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
tfh = logging.handl... | <commit_before>import config
import logging
import logging.handlers
# ######### Set up logging ##########
# log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG)
logger = logging.getLogger('bb_log')
logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
tfh ... | import config
import logging
import logging.handlers
# ######### Set up logging ##########
# log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG)
logger = logging.getLogger('bb_log')
logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
tfh = logging.handl... | import config
import logging
import logging.handlers
# ######### Set up logging ##########
# log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG)
logger = logging.getLogger('bb_log')
logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
tfh = logging.handl... | <commit_before>import config
import logging
import logging.handlers
# ######### Set up logging ##########
# log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG)
logger = logging.getLogger('bb_log')
logger.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
tfh ... |
b123001ea0d4fb475184727c39eafd5b46cc0964 | shopit_app/urls.py | shopit_app/urls.py | from django.conf import settings
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from shopit_app.views import IndexView
from authentication_app.views import AccountViewSet, LoginView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)
urlpattern... | from django.conf import settings
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from shopit_app.views import IndexView
from authentication_app.views import AccountViewSet, LoginView, LogoutView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)... | Add the endpoint for the logout. | Add the endpoint for the logout.
| Python | mit | mvpgomes/shopit-app,mvpgomes/shopit-app,mvpgomes/shopit-app,mvpgomes/shopit-app | from django.conf import settings
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from shopit_app.views import IndexView
from authentication_app.views import AccountViewSet, LoginView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)
urlpattern... | from django.conf import settings
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from shopit_app.views import IndexView
from authentication_app.views import AccountViewSet, LoginView, LogoutView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)... | <commit_before>from django.conf import settings
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from shopit_app.views import IndexView
from authentication_app.views import AccountViewSet, LoginView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewS... | from django.conf import settings
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from shopit_app.views import IndexView
from authentication_app.views import AccountViewSet, LoginView, LogoutView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)... | from django.conf import settings
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from shopit_app.views import IndexView
from authentication_app.views import AccountViewSet, LoginView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewSet)
urlpattern... | <commit_before>from django.conf import settings
from django.conf.urls import include, patterns, url
from rest_framework_nested import routers
from shopit_app.views import IndexView
from authentication_app.views import AccountViewSet, LoginView
router = routers.SimpleRouter()
router.register(r'accounts', AccountViewS... |
0d7921b4dcf5e3b511fdb54fc30ebc0547b14d47 | django_dzenlog/urls.py | django_dzenlog/urls.py | from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import LatestPosts
post_list = {
'queryset': GeneralPost.objects.all(),
}
feeds = {
'all': LatestPosts,
}
urlpatterns = patterns('django.views.generic',
(r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail', post_list, 'd... | from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import latest
post_list = {
'queryset': GeneralPost.objects.all(),
}
feeds = {
'all': latest(GeneralPost, 'dzenlog-post-list'),
}
urlpatterns = patterns('django.views.generic',
(r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.objec... | Use 'latest' to generate feed for GeneralPost. | Use 'latest' to generate feed for GeneralPost.
| Python | bsd-3-clause | svetlyak40wt/django-dzenlog | from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import LatestPosts
post_list = {
'queryset': GeneralPost.objects.all(),
}
feeds = {
'all': LatestPosts,
}
urlpatterns = patterns('django.views.generic',
(r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail', post_list, 'd... | from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import latest
post_list = {
'queryset': GeneralPost.objects.all(),
}
feeds = {
'all': latest(GeneralPost, 'dzenlog-post-list'),
}
urlpatterns = patterns('django.views.generic',
(r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.objec... | <commit_before>from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import LatestPosts
post_list = {
'queryset': GeneralPost.objects.all(),
}
feeds = {
'all': LatestPosts,
}
urlpatterns = patterns('django.views.generic',
(r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail'... | from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import latest
post_list = {
'queryset': GeneralPost.objects.all(),
}
feeds = {
'all': latest(GeneralPost, 'dzenlog-post-list'),
}
urlpatterns = patterns('django.views.generic',
(r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.objec... | from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import LatestPosts
post_list = {
'queryset': GeneralPost.objects.all(),
}
feeds = {
'all': LatestPosts,
}
urlpatterns = patterns('django.views.generic',
(r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail', post_list, 'd... | <commit_before>from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import LatestPosts
post_list = {
'queryset': GeneralPost.objects.all(),
}
feeds = {
'all': LatestPosts,
}
urlpatterns = patterns('django.views.generic',
(r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail'... |
acc6ae5fcdc7cc79b8e6ca76088080c3b73ed4f1 | django_rocket/admin.py | django_rocket/admin.py | from django.contrib import admin
from django_rocket.models import Subscriber
class SubscriberAdmin(admin.ModelAdmin):
list_display = ('email', 'created')
date_hierarchy = ('created',)
admin.site.register(Subscriber, SubscriberAdmin) | from django.contrib import admin
from django_rocket.models import Subscriber
class SubscriberAdmin(admin.ModelAdmin):
list_display = ('email', 'created')
date_hierarchy = 'created'
admin.site.register(Subscriber, SubscriberAdmin) | Correct mention to date hierachy | Correct mention to date hierachy
| Python | mit | mariocesar/django-rocket,mariocesar/django-rocket | from django.contrib import admin
from django_rocket.models import Subscriber
class SubscriberAdmin(admin.ModelAdmin):
list_display = ('email', 'created')
date_hierarchy = ('created',)
admin.site.register(Subscriber, SubscriberAdmin)Correct mention to date hierachy | from django.contrib import admin
from django_rocket.models import Subscriber
class SubscriberAdmin(admin.ModelAdmin):
list_display = ('email', 'created')
date_hierarchy = 'created'
admin.site.register(Subscriber, SubscriberAdmin) | <commit_before>from django.contrib import admin
from django_rocket.models import Subscriber
class SubscriberAdmin(admin.ModelAdmin):
list_display = ('email', 'created')
date_hierarchy = ('created',)
admin.site.register(Subscriber, SubscriberAdmin)<commit_msg>Correct mention to date hierachy<commit_after> | from django.contrib import admin
from django_rocket.models import Subscriber
class SubscriberAdmin(admin.ModelAdmin):
list_display = ('email', 'created')
date_hierarchy = 'created'
admin.site.register(Subscriber, SubscriberAdmin) | from django.contrib import admin
from django_rocket.models import Subscriber
class SubscriberAdmin(admin.ModelAdmin):
list_display = ('email', 'created')
date_hierarchy = ('created',)
admin.site.register(Subscriber, SubscriberAdmin)Correct mention to date hierachyfrom django.contrib import admin
from djan... | <commit_before>from django.contrib import admin
from django_rocket.models import Subscriber
class SubscriberAdmin(admin.ModelAdmin):
list_display = ('email', 'created')
date_hierarchy = ('created',)
admin.site.register(Subscriber, SubscriberAdmin)<commit_msg>Correct mention to date hierachy<commit_after>fr... |
7269322106911fcb1fb71160421fc3e011fbee1d | byceps/config_defaults.py | byceps/config_defaults.py | """
byceps.config_defaults
~~~~~~~~~~~~~~~~~~~~~~
Default configuration values
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import timedelta
from pathlib import Path
# database connection
SQLALCHEMY_ECHO = False
# Avoid connection errors after... | """
byceps.config_defaults
~~~~~~~~~~~~~~~~~~~~~~
Default configuration values
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import timedelta
from pathlib import Path
# database connection
SQLALCHEMY_ECHO = False
# Avoid connection errors after... | Remove superseded config default for `ROOT_REDIRECT_STATUS_CODE` | Remove superseded config default for `ROOT_REDIRECT_STATUS_CODE`
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | """
byceps.config_defaults
~~~~~~~~~~~~~~~~~~~~~~
Default configuration values
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import timedelta
from pathlib import Path
# database connection
SQLALCHEMY_ECHO = False
# Avoid connection errors after... | """
byceps.config_defaults
~~~~~~~~~~~~~~~~~~~~~~
Default configuration values
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import timedelta
from pathlib import Path
# database connection
SQLALCHEMY_ECHO = False
# Avoid connection errors after... | <commit_before>"""
byceps.config_defaults
~~~~~~~~~~~~~~~~~~~~~~
Default configuration values
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import timedelta
from pathlib import Path
# database connection
SQLALCHEMY_ECHO = False
# Avoid connecti... | """
byceps.config_defaults
~~~~~~~~~~~~~~~~~~~~~~
Default configuration values
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import timedelta
from pathlib import Path
# database connection
SQLALCHEMY_ECHO = False
# Avoid connection errors after... | """
byceps.config_defaults
~~~~~~~~~~~~~~~~~~~~~~
Default configuration values
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import timedelta
from pathlib import Path
# database connection
SQLALCHEMY_ECHO = False
# Avoid connection errors after... | <commit_before>"""
byceps.config_defaults
~~~~~~~~~~~~~~~~~~~~~~
Default configuration values
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from datetime import timedelta
from pathlib import Path
# database connection
SQLALCHEMY_ECHO = False
# Avoid connecti... |
cab0f9ea3471cf88dd03da7a243ae55579b44b65 | client.py | client.py | #!/usr/env/bin python
import RPi.GPIO as io
import requests
import sys
class Switch(object):
def __init__(self, **kwargs):
self.pin = kwargs["pin"]
io.setup(self.pin, io.IN)
@property
def is_on(self):
return io.input(self.pin)
PINS = (8, 16, 18)
switches = set()
def has_free():
... | #!/usr/env/bin python
import RPi.GPIO as io
import sys
class Switch(object):
def __init__(self, **kwargs):
self.pin = kwargs["pin"]
io.setup(self.pin, io.IN)
@property
def is_on(self):
return io.input(self.pin)
PINS = (8, 16, 18)
server_url = sys.argv[1]
switches = set()
def has_... | Set server URL with command line argument | Set server URL with command line argument
| Python | mit | madebymany/isthetoiletfree | #!/usr/env/bin python
import RPi.GPIO as io
import requests
import sys
class Switch(object):
def __init__(self, **kwargs):
self.pin = kwargs["pin"]
io.setup(self.pin, io.IN)
@property
def is_on(self):
return io.input(self.pin)
PINS = (8, 16, 18)
switches = set()
def has_free():
... | #!/usr/env/bin python
import RPi.GPIO as io
import sys
class Switch(object):
def __init__(self, **kwargs):
self.pin = kwargs["pin"]
io.setup(self.pin, io.IN)
@property
def is_on(self):
return io.input(self.pin)
PINS = (8, 16, 18)
server_url = sys.argv[1]
switches = set()
def has_... | <commit_before>#!/usr/env/bin python
import RPi.GPIO as io
import requests
import sys
class Switch(object):
def __init__(self, **kwargs):
self.pin = kwargs["pin"]
io.setup(self.pin, io.IN)
@property
def is_on(self):
return io.input(self.pin)
PINS = (8, 16, 18)
switches = set()
de... | #!/usr/env/bin python
import RPi.GPIO as io
import sys
class Switch(object):
def __init__(self, **kwargs):
self.pin = kwargs["pin"]
io.setup(self.pin, io.IN)
@property
def is_on(self):
return io.input(self.pin)
PINS = (8, 16, 18)
server_url = sys.argv[1]
switches = set()
def has_... | #!/usr/env/bin python
import RPi.GPIO as io
import requests
import sys
class Switch(object):
def __init__(self, **kwargs):
self.pin = kwargs["pin"]
io.setup(self.pin, io.IN)
@property
def is_on(self):
return io.input(self.pin)
PINS = (8, 16, 18)
switches = set()
def has_free():
... | <commit_before>#!/usr/env/bin python
import RPi.GPIO as io
import requests
import sys
class Switch(object):
def __init__(self, **kwargs):
self.pin = kwargs["pin"]
io.setup(self.pin, io.IN)
@property
def is_on(self):
return io.input(self.pin)
PINS = (8, 16, 18)
switches = set()
de... |
22ae576872e0cbe2c42e9ec4bddc050a22780531 | bika/lims/upgrade/to1010.py | bika/lims/upgrade/to1010.py | import logging
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
def addBatches(tool):
"""
"""
portal = aq_parent(aq_inner(tool))
portal_catalog = getToolByName(portal, 'portal_catalog')
setup = port... | import logging
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
def addBatches(tool):
"""
"""
portal = aq_parent(aq_inner(tool))
portal_catalog = getToolByName(portal, 'portal_catalog')
setup = port... | Fix 1010 upgrade step (setBatchID -> setBatch) | Fix 1010 upgrade step (setBatchID -> setBatch)
| Python | agpl-3.0 | DeBortoliWines/Bika-LIMS,DeBortoliWines/Bika-LIMS,DeBortoliWines/Bika-LIMS,rockfruit/bika.lims,anneline/Bika-LIMS,rockfruit/bika.lims,anneline/Bika-LIMS,veroc/Bika-LIMS,anneline/Bika-LIMS,labsanmartin/Bika-LIMS,veroc/Bika-LIMS,labsanmartin/Bika-LIMS,veroc/Bika-LIMS,labsanmartin/Bika-LIMS | import logging
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
def addBatches(tool):
"""
"""
portal = aq_parent(aq_inner(tool))
portal_catalog = getToolByName(portal, 'portal_catalog')
setup = port... | import logging
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
def addBatches(tool):
"""
"""
portal = aq_parent(aq_inner(tool))
portal_catalog = getToolByName(portal, 'portal_catalog')
setup = port... | <commit_before>import logging
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
def addBatches(tool):
"""
"""
portal = aq_parent(aq_inner(tool))
portal_catalog = getToolByName(portal, 'portal_catalog')
... | import logging
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
def addBatches(tool):
"""
"""
portal = aq_parent(aq_inner(tool))
portal_catalog = getToolByName(portal, 'portal_catalog')
setup = port... | import logging
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
def addBatches(tool):
"""
"""
portal = aq_parent(aq_inner(tool))
portal_catalog = getToolByName(portal, 'portal_catalog')
setup = port... | <commit_before>import logging
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName
def addBatches(tool):
"""
"""
portal = aq_parent(aq_inner(tool))
portal_catalog = getToolByName(portal, 'portal_catalog')
... |
384beaa77e2eaad642ec7f764acd09c2c3e04350 | res_company.py | res_company.py | from openerp.osv import osv, fields
from openerp.tools.translate import _
class res_company(osv.Model):
_inherit = "res.company"
_columns = {
'remittance_letter_top': fields.text(
_('Remittance Letter - top message'),
help=_('Message to write at the top of Remittance Letter '
... | from openerp.osv import osv, fields
from openerp.tools.translate import _
class res_company(osv.Model):
_inherit = "res.company"
_columns = {
'remittance_letter_top': fields.text(
_('Remittance Letter - top message'),
help=_('Message to write at the top of Remittance Letter '
... | Make Remittance Letter config messages translatable | Make Remittance Letter config messages translatable
| Python | agpl-3.0 | xcgd/account_streamline | from openerp.osv import osv, fields
from openerp.tools.translate import _
class res_company(osv.Model):
_inherit = "res.company"
_columns = {
'remittance_letter_top': fields.text(
_('Remittance Letter - top message'),
help=_('Message to write at the top of Remittance Letter '
... | from openerp.osv import osv, fields
from openerp.tools.translate import _
class res_company(osv.Model):
_inherit = "res.company"
_columns = {
'remittance_letter_top': fields.text(
_('Remittance Letter - top message'),
help=_('Message to write at the top of Remittance Letter '
... | <commit_before>from openerp.osv import osv, fields
from openerp.tools.translate import _
class res_company(osv.Model):
_inherit = "res.company"
_columns = {
'remittance_letter_top': fields.text(
_('Remittance Letter - top message'),
help=_('Message to write at the top of Remit... | from openerp.osv import osv, fields
from openerp.tools.translate import _
class res_company(osv.Model):
_inherit = "res.company"
_columns = {
'remittance_letter_top': fields.text(
_('Remittance Letter - top message'),
help=_('Message to write at the top of Remittance Letter '
... | from openerp.osv import osv, fields
from openerp.tools.translate import _
class res_company(osv.Model):
_inherit = "res.company"
_columns = {
'remittance_letter_top': fields.text(
_('Remittance Letter - top message'),
help=_('Message to write at the top of Remittance Letter '
... | <commit_before>from openerp.osv import osv, fields
from openerp.tools.translate import _
class res_company(osv.Model):
_inherit = "res.company"
_columns = {
'remittance_letter_top': fields.text(
_('Remittance Letter - top message'),
help=_('Message to write at the top of Remit... |
550a3f2b402f841d740cdbd6a25e832aab0fd974 | oneflow/settings/chani.py | oneflow/settings/chani.py | # -*- coding: utf-8 -*-
# Settings for 1flow.net (local development)
MAIN_SERVER = '127.0.0.1'
from sparks.django.settings import include_snippets
include_snippets(
(
# Don't forget to deactivate nobother when we'ge got time to
# fix other's bugs. Just kidding…
'000_nobother',
'00... | # -*- coding: utf-8 -*-
# Settings for 1flow.net (local development)
MAIN_SERVER = '127.0.0.1'
import socket
from sparks.django.settings import include_snippets
include_snippets(
(
# Don't forget to deactivate nobother when we'ge got time to
# fix other's bugs. Just kidding…
'000_nobother... | Make lil&big merged configuration hostname-aware for SITE_DOMAIN, this fixes the bad hostname in JS bookmarklets. | Make lil&big merged configuration hostname-aware for SITE_DOMAIN, this fixes the bad hostname in JS bookmarklets. | Python | agpl-3.0 | 1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow | # -*- coding: utf-8 -*-
# Settings for 1flow.net (local development)
MAIN_SERVER = '127.0.0.1'
from sparks.django.settings import include_snippets
include_snippets(
(
# Don't forget to deactivate nobother when we'ge got time to
# fix other's bugs. Just kidding…
'000_nobother',
'00... | # -*- coding: utf-8 -*-
# Settings for 1flow.net (local development)
MAIN_SERVER = '127.0.0.1'
import socket
from sparks.django.settings import include_snippets
include_snippets(
(
# Don't forget to deactivate nobother when we'ge got time to
# fix other's bugs. Just kidding…
'000_nobother... | <commit_before># -*- coding: utf-8 -*-
# Settings for 1flow.net (local development)
MAIN_SERVER = '127.0.0.1'
from sparks.django.settings import include_snippets
include_snippets(
(
# Don't forget to deactivate nobother when we'ge got time to
# fix other's bugs. Just kidding…
'000_nobothe... | # -*- coding: utf-8 -*-
# Settings for 1flow.net (local development)
MAIN_SERVER = '127.0.0.1'
import socket
from sparks.django.settings import include_snippets
include_snippets(
(
# Don't forget to deactivate nobother when we'ge got time to
# fix other's bugs. Just kidding…
'000_nobother... | # -*- coding: utf-8 -*-
# Settings for 1flow.net (local development)
MAIN_SERVER = '127.0.0.1'
from sparks.django.settings import include_snippets
include_snippets(
(
# Don't forget to deactivate nobother when we'ge got time to
# fix other's bugs. Just kidding…
'000_nobother',
'00... | <commit_before># -*- coding: utf-8 -*-
# Settings for 1flow.net (local development)
MAIN_SERVER = '127.0.0.1'
from sparks.django.settings import include_snippets
include_snippets(
(
# Don't forget to deactivate nobother when we'ge got time to
# fix other's bugs. Just kidding…
'000_nobothe... |
a0c656f89829ca18c383f1884e3186103b9e5fa6 | fabfile.py | fabfile.py | from fabric.api import cd, run, task
try:
import fabfile_local
_pyflakes = fabfile_local
except ImportError:
pass
@task
def update():
with cd("~/vagrant-installers"):
run("git pull")
| from fabric.api import cd, env, run, task
try:
import fabfile_local
_pyflakes = fabfile_local
except ImportError:
pass
@task
def update():
with cd("~/vagrant-installers"):
run("git pull")
@task
def all():
"Run the task against all hosts."
for _, value in env.roledefs.iteritems():
... | Allow the targetting of specific roles with fabric | Allow the targetting of specific roles with fabric
| Python | mit | redhat-developer-tooling/vagrant-installers,mitchellh/vagrant-installers,chrisroberts/vagrant-installers,mitchellh/vagrant-installers,chrisroberts/vagrant-installers,mitchellh/vagrant-installers,mitchellh/vagrant-installers,chrisroberts/vagrant-installers,chrisroberts/vagrant-installers,redhat-developer-tooling/vagrant... | from fabric.api import cd, run, task
try:
import fabfile_local
_pyflakes = fabfile_local
except ImportError:
pass
@task
def update():
with cd("~/vagrant-installers"):
run("git pull")
Allow the targetting of specific roles with fabric | from fabric.api import cd, env, run, task
try:
import fabfile_local
_pyflakes = fabfile_local
except ImportError:
pass
@task
def update():
with cd("~/vagrant-installers"):
run("git pull")
@task
def all():
"Run the task against all hosts."
for _, value in env.roledefs.iteritems():
... | <commit_before>from fabric.api import cd, run, task
try:
import fabfile_local
_pyflakes = fabfile_local
except ImportError:
pass
@task
def update():
with cd("~/vagrant-installers"):
run("git pull")
<commit_msg>Allow the targetting of specific roles with fabric<commit_after> | from fabric.api import cd, env, run, task
try:
import fabfile_local
_pyflakes = fabfile_local
except ImportError:
pass
@task
def update():
with cd("~/vagrant-installers"):
run("git pull")
@task
def all():
"Run the task against all hosts."
for _, value in env.roledefs.iteritems():
... | from fabric.api import cd, run, task
try:
import fabfile_local
_pyflakes = fabfile_local
except ImportError:
pass
@task
def update():
with cd("~/vagrant-installers"):
run("git pull")
Allow the targetting of specific roles with fabricfrom fabric.api import cd, env, run, task
try:
import fa... | <commit_before>from fabric.api import cd, run, task
try:
import fabfile_local
_pyflakes = fabfile_local
except ImportError:
pass
@task
def update():
with cd("~/vagrant-installers"):
run("git pull")
<commit_msg>Allow the targetting of specific roles with fabric<commit_after>from fabric.api impo... |
813dd27a2057d2e32726ff6b43ab8ca1411303c7 | fabfile.py | fabfile.py | from fabric.api import *
from fabric.colors import *
env.colorize_errors = True
env.hosts = ['sanaprotocolbuilder.me']
env.user = 'root'
env.project_root = '/opt/sana.protocol_builder'
def prepare_deploy():
local('python sana_builder/manage.py syncdb')
local('python sana_builder/manage... | from fabric.api import *
from fabric.colors import *
env.colorize_errors = True
env.hosts = ['sanaprotocolbuilder.me']
env.user = 'root'
env.project_root = '/opt/sana.protocol_builder'
def prepare_deploy():
local('python sana_builder/manage.py syncdb')
local('python sana_builder/manage... | Prepare for deploy in deploy script. | Prepare for deploy in deploy script.
| Python | bsd-3-clause | SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder | from fabric.api import *
from fabric.colors import *
env.colorize_errors = True
env.hosts = ['sanaprotocolbuilder.me']
env.user = 'root'
env.project_root = '/opt/sana.protocol_builder'
def prepare_deploy():
local('python sana_builder/manage.py syncdb')
local('python sana_builder/manage... | from fabric.api import *
from fabric.colors import *
env.colorize_errors = True
env.hosts = ['sanaprotocolbuilder.me']
env.user = 'root'
env.project_root = '/opt/sana.protocol_builder'
def prepare_deploy():
local('python sana_builder/manage.py syncdb')
local('python sana_builder/manage... | <commit_before>from fabric.api import *
from fabric.colors import *
env.colorize_errors = True
env.hosts = ['sanaprotocolbuilder.me']
env.user = 'root'
env.project_root = '/opt/sana.protocol_builder'
def prepare_deploy():
local('python sana_builder/manage.py syncdb')
local('python sana... | from fabric.api import *
from fabric.colors import *
env.colorize_errors = True
env.hosts = ['sanaprotocolbuilder.me']
env.user = 'root'
env.project_root = '/opt/sana.protocol_builder'
def prepare_deploy():
local('python sana_builder/manage.py syncdb')
local('python sana_builder/manage... | from fabric.api import *
from fabric.colors import *
env.colorize_errors = True
env.hosts = ['sanaprotocolbuilder.me']
env.user = 'root'
env.project_root = '/opt/sana.protocol_builder'
def prepare_deploy():
local('python sana_builder/manage.py syncdb')
local('python sana_builder/manage... | <commit_before>from fabric.api import *
from fabric.colors import *
env.colorize_errors = True
env.hosts = ['sanaprotocolbuilder.me']
env.user = 'root'
env.project_root = '/opt/sana.protocol_builder'
def prepare_deploy():
local('python sana_builder/manage.py syncdb')
local('python sana... |
e8f8407ee422375af07027af2846a95c9cfaad37 | fabfile.py | fabfile.py | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_code():
rsync... | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_code():
rsync... | Use checksum when pushing code with rsync | Use checksum when pushing code with rsync
| Python | mit | Foxboron/Frank,Foxboron/Frank,mpolden/jarvis2,Foxboron/Frank,martinp/jarvis2,martinp/jarvis2,mpolden/jarvis2,mpolden/jarvis2,martinp/jarvis2 | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_code():
rsync... | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_code():
rsync... | <commit_before>#!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_co... | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_code():
rsync... | #!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_code():
rsync... | <commit_before>#!/usr/bin/env python
from fabric.api import env, run, sudo, task
from fabric.context_managers import cd, prefix
from fabric.contrib.project import rsync_project
env.use_ssh_config = True
home = '~/jarvis2'
@task
def pull_code():
with cd(home):
run('git pull --rebase')
@task
def push_co... |
b374221d8d0e902494066d666570c1a882c962bc | s3img_magic.py | s3img_magic.py | from IPython.display import Image
import boto
def parse_s3_uri(uri):
if uri.startswith('s3://'):
uri = uri[5:]
return uri.split('/', 1)
def get_s3_key(uri):
bucket_name, key_name = parse_s3_uri(uri)
conn = boto.connect_s3()
bucket = conn.get_bucket(bucket_name)
return bucket.get_k... | from StringIO import StringIO
from IPython.core.magic import Magics, magics_class, line_magic
from IPython.display import Image
import boto
def parse_s3_uri(uri):
if uri.startswith('s3://'):
uri = uri[5:]
return uri.split('/', 1)
def get_s3_bucket(bucket_name):
conn = boto.connect_s3()
r... | Add magic to save a Matplotlib figure to S3 | Add magic to save a Matplotlib figure to S3
| Python | mit | AustinRochford/s3img-ipython-magic,AustinRochford/s3img-ipython-magic | from IPython.display import Image
import boto
def parse_s3_uri(uri):
if uri.startswith('s3://'):
uri = uri[5:]
return uri.split('/', 1)
def get_s3_key(uri):
bucket_name, key_name = parse_s3_uri(uri)
conn = boto.connect_s3()
bucket = conn.get_bucket(bucket_name)
return bucket.get_k... | from StringIO import StringIO
from IPython.core.magic import Magics, magics_class, line_magic
from IPython.display import Image
import boto
def parse_s3_uri(uri):
if uri.startswith('s3://'):
uri = uri[5:]
return uri.split('/', 1)
def get_s3_bucket(bucket_name):
conn = boto.connect_s3()
r... | <commit_before>from IPython.display import Image
import boto
def parse_s3_uri(uri):
if uri.startswith('s3://'):
uri = uri[5:]
return uri.split('/', 1)
def get_s3_key(uri):
bucket_name, key_name = parse_s3_uri(uri)
conn = boto.connect_s3()
bucket = conn.get_bucket(bucket_name)
retu... | from StringIO import StringIO
from IPython.core.magic import Magics, magics_class, line_magic
from IPython.display import Image
import boto
def parse_s3_uri(uri):
if uri.startswith('s3://'):
uri = uri[5:]
return uri.split('/', 1)
def get_s3_bucket(bucket_name):
conn = boto.connect_s3()
r... | from IPython.display import Image
import boto
def parse_s3_uri(uri):
if uri.startswith('s3://'):
uri = uri[5:]
return uri.split('/', 1)
def get_s3_key(uri):
bucket_name, key_name = parse_s3_uri(uri)
conn = boto.connect_s3()
bucket = conn.get_bucket(bucket_name)
return bucket.get_k... | <commit_before>from IPython.display import Image
import boto
def parse_s3_uri(uri):
if uri.startswith('s3://'):
uri = uri[5:]
return uri.split('/', 1)
def get_s3_key(uri):
bucket_name, key_name = parse_s3_uri(uri)
conn = boto.connect_s3()
bucket = conn.get_bucket(bucket_name)
retu... |
db06039ecb94100bbecb23b5fdee13e306458809 | atlassian/__init__.py | atlassian/__init__.py | import logging
from urllib.parse import urlsplit, urljoin
from requests import get
l = logging.getLogger(__name__)
#TODO: move this somewhere sensible
#TODO: useful error handling (CLI...)
class HTTPClient:
def __init__(self, base, user=None, password=None):
self.base = base
self.user = user
... | import logging
from urllib.parse import urlsplit, urljoin
from requests import get
#TODO: move this somewhere sensible
#TODO: useful error handling (CLI...)
class HTTPClient:
def __init__(self, base, user=None, password=None):
self.base = base
self.user = user
self.password = password
... | Fix big fuckup from last commit | Fix big fuckup from last commit
| Python | mit | victorhahncastell/atlassian_permissions,victorhahncastell/atlassian_permissions | import logging
from urllib.parse import urlsplit, urljoin
from requests import get
l = logging.getLogger(__name__)
#TODO: move this somewhere sensible
#TODO: useful error handling (CLI...)
class HTTPClient:
def __init__(self, base, user=None, password=None):
self.base = base
self.user = user
... | import logging
from urllib.parse import urlsplit, urljoin
from requests import get
#TODO: move this somewhere sensible
#TODO: useful error handling (CLI...)
class HTTPClient:
def __init__(self, base, user=None, password=None):
self.base = base
self.user = user
self.password = password
... | <commit_before>import logging
from urllib.parse import urlsplit, urljoin
from requests import get
l = logging.getLogger(__name__)
#TODO: move this somewhere sensible
#TODO: useful error handling (CLI...)
class HTTPClient:
def __init__(self, base, user=None, password=None):
self.base = base
self.us... | import logging
from urllib.parse import urlsplit, urljoin
from requests import get
#TODO: move this somewhere sensible
#TODO: useful error handling (CLI...)
class HTTPClient:
def __init__(self, base, user=None, password=None):
self.base = base
self.user = user
self.password = password
... | import logging
from urllib.parse import urlsplit, urljoin
from requests import get
l = logging.getLogger(__name__)
#TODO: move this somewhere sensible
#TODO: useful error handling (CLI...)
class HTTPClient:
def __init__(self, base, user=None, password=None):
self.base = base
self.user = user
... | <commit_before>import logging
from urllib.parse import urlsplit, urljoin
from requests import get
l = logging.getLogger(__name__)
#TODO: move this somewhere sensible
#TODO: useful error handling (CLI...)
class HTTPClient:
def __init__(self, base, user=None, password=None):
self.base = base
self.us... |
c58ac76b2d0e575068a050f87f1cc0eb6ef09014 | autocloud/__init__.py | autocloud/__init__.py | # -*- coding: utf-8 -*-
import ConfigParser
import os
DEBUG = True
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
config = ConfigParser.RawConfigParser()
if DEBUG:
config.read("{PROJECT_ROOT}/config/autocloud.cfg".format(
PROJECT_ROOT=PROJECT_ROOT))
else:
config.read('/etc/autocloud/autocl... | # -*- coding: utf-8 -*-
import ConfigParser
import os
DEBUG = True
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
config = ConfigParser.RawConfigParser()
if DEBUG:
config.read("{PROJECT_ROOT}/config/autocloud.cfg".format(
PROJECT_ROOT=PROJECT_ROOT))
else:
config.read('/etc/autocloud/autocl... | Add redis config path format | Add redis config path format
| Python | agpl-3.0 | maxamillion/autocloud,maxamillion/autocloud,kushaldas/autocloud,maxamillion/autocloud,kushaldas/autocloud,kushaldas/autocloud,maxamillion/autocloud,kushaldas/autocloud | # -*- coding: utf-8 -*-
import ConfigParser
import os
DEBUG = True
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
config = ConfigParser.RawConfigParser()
if DEBUG:
config.read("{PROJECT_ROOT}/config/autocloud.cfg".format(
PROJECT_ROOT=PROJECT_ROOT))
else:
config.read('/etc/autocloud/autocl... | # -*- coding: utf-8 -*-
import ConfigParser
import os
DEBUG = True
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
config = ConfigParser.RawConfigParser()
if DEBUG:
config.read("{PROJECT_ROOT}/config/autocloud.cfg".format(
PROJECT_ROOT=PROJECT_ROOT))
else:
config.read('/etc/autocloud/autocl... | <commit_before># -*- coding: utf-8 -*-
import ConfigParser
import os
DEBUG = True
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
config = ConfigParser.RawConfigParser()
if DEBUG:
config.read("{PROJECT_ROOT}/config/autocloud.cfg".format(
PROJECT_ROOT=PROJECT_ROOT))
else:
config.read('/etc/a... | # -*- coding: utf-8 -*-
import ConfigParser
import os
DEBUG = True
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
config = ConfigParser.RawConfigParser()
if DEBUG:
config.read("{PROJECT_ROOT}/config/autocloud.cfg".format(
PROJECT_ROOT=PROJECT_ROOT))
else:
config.read('/etc/autocloud/autocl... | # -*- coding: utf-8 -*-
import ConfigParser
import os
DEBUG = True
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
config = ConfigParser.RawConfigParser()
if DEBUG:
config.read("{PROJECT_ROOT}/config/autocloud.cfg".format(
PROJECT_ROOT=PROJECT_ROOT))
else:
config.read('/etc/autocloud/autocl... | <commit_before># -*- coding: utf-8 -*-
import ConfigParser
import os
DEBUG = True
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
config = ConfigParser.RawConfigParser()
if DEBUG:
config.read("{PROJECT_ROOT}/config/autocloud.cfg".format(
PROJECT_ROOT=PROJECT_ROOT))
else:
config.read('/etc/a... |
b7aa7e85064430dc95e74a0f676f0484fee12733 | tests/cli/test_pinout.py | tests/cli/test_pinout.py | from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
import pytest
from gpiozero.cli import pinout
def test_args_incorrect():
with pytest.raises(SystemExit) as ex:
pinout.parse_args(['--nonexistentarg'])
def test_args_color():
a... | from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
import pytest
from gpiozero.cli.pinout import main
def test_args_incorrect():
with pytest.raises(SystemExit) as ex:
main(['pinout', '--nonexistentarg'])
def test_args_color():
... | Fix up pinout tests so they work with new structure | Fix up pinout tests so they work with new structure
| Python | bsd-3-clause | MrHarcombe/python-gpiozero,waveform80/gpio-zero,RPi-Distro/python-gpiozero | from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
import pytest
from gpiozero.cli import pinout
def test_args_incorrect():
with pytest.raises(SystemExit) as ex:
pinout.parse_args(['--nonexistentarg'])
def test_args_color():
a... | from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
import pytest
from gpiozero.cli.pinout import main
def test_args_incorrect():
with pytest.raises(SystemExit) as ex:
main(['pinout', '--nonexistentarg'])
def test_args_color():
... | <commit_before>from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
import pytest
from gpiozero.cli import pinout
def test_args_incorrect():
with pytest.raises(SystemExit) as ex:
pinout.parse_args(['--nonexistentarg'])
def test_args... | from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
import pytest
from gpiozero.cli.pinout import main
def test_args_incorrect():
with pytest.raises(SystemExit) as ex:
main(['pinout', '--nonexistentarg'])
def test_args_color():
... | from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
import pytest
from gpiozero.cli import pinout
def test_args_incorrect():
with pytest.raises(SystemExit) as ex:
pinout.parse_args(['--nonexistentarg'])
def test_args_color():
a... | <commit_before>from __future__ import (
unicode_literals,
absolute_import,
print_function,
division,
)
str = type('')
import pytest
from gpiozero.cli import pinout
def test_args_incorrect():
with pytest.raises(SystemExit) as ex:
pinout.parse_args(['--nonexistentarg'])
def test_args... |
0ef346389b680e81ab618d4d782239640c1926f5 | tests/test_collection.py | tests/test_collection.py | import unittest
from indigo.models import Collection
from indigo.models.errors import UniqueException
from nose.tools import raises
class NodeTest(unittest.TestCase):
def test_a_create_root(self):
Collection.create(name="test_root", parent=None, path="/")
coll = Collection.find("test_root")
... | import unittest
from indigo.models import Collection
from indigo.models.errors import UniqueException
from nose.tools import raises
class NodeTest(unittest.TestCase):
def test_a_create_root(self):
Collection.create(name="test_root", parent=None, path="/")
coll = Collection.find("test_root")
... | Remove unnecessary test of collection children | Remove unnecessary test of collection children
| Python | agpl-3.0 | UMD-DRASTIC/drastic | import unittest
from indigo.models import Collection
from indigo.models.errors import UniqueException
from nose.tools import raises
class NodeTest(unittest.TestCase):
def test_a_create_root(self):
Collection.create(name="test_root", parent=None, path="/")
coll = Collection.find("test_root")
... | import unittest
from indigo.models import Collection
from indigo.models.errors import UniqueException
from nose.tools import raises
class NodeTest(unittest.TestCase):
def test_a_create_root(self):
Collection.create(name="test_root", parent=None, path="/")
coll = Collection.find("test_root")
... | <commit_before>import unittest
from indigo.models import Collection
from indigo.models.errors import UniqueException
from nose.tools import raises
class NodeTest(unittest.TestCase):
def test_a_create_root(self):
Collection.create(name="test_root", parent=None, path="/")
coll = Collection.find("t... | import unittest
from indigo.models import Collection
from indigo.models.errors import UniqueException
from nose.tools import raises
class NodeTest(unittest.TestCase):
def test_a_create_root(self):
Collection.create(name="test_root", parent=None, path="/")
coll = Collection.find("test_root")
... | import unittest
from indigo.models import Collection
from indigo.models.errors import UniqueException
from nose.tools import raises
class NodeTest(unittest.TestCase):
def test_a_create_root(self):
Collection.create(name="test_root", parent=None, path="/")
coll = Collection.find("test_root")
... | <commit_before>import unittest
from indigo.models import Collection
from indigo.models.errors import UniqueException
from nose.tools import raises
class NodeTest(unittest.TestCase):
def test_a_create_root(self):
Collection.create(name="test_root", parent=None, path="/")
coll = Collection.find("t... |
afa10a27aa1fe1eaa719d988902c2f3f4d5d0928 | webapp/controllers/contact.py | webapp/controllers/contact.py | # -*- coding: utf-8 -*-
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call(): return service()
### end requires
def index():
return dict()
| # -*- coding: utf-8 -*-
from opentreewebapputil import (get_opentree_services_method_urls,
fetch_current_TNRS_context_names)
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call(): return service()
### end requir... | Fix missing search-context list on Contact page. | Fix missing search-context list on Contact page.
| Python | bsd-2-clause | OpenTreeOfLife/opentree,OpenTreeOfLife/opentree,OpenTreeOfLife/opentree,OpenTreeOfLife/opentree,OpenTreeOfLife/opentree,OpenTreeOfLife/opentree | # -*- coding: utf-8 -*-
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call(): return service()
### end requires
def index():
return dict()
Fix missing search-context list on Contact page. | # -*- coding: utf-8 -*-
from opentreewebapputil import (get_opentree_services_method_urls,
fetch_current_TNRS_context_names)
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call(): return service()
### end requir... | <commit_before># -*- coding: utf-8 -*-
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call(): return service()
### end requires
def index():
return dict()
<commit_msg>Fix missing search-context list on Contact page.<commit_after> | # -*- coding: utf-8 -*-
from opentreewebapputil import (get_opentree_services_method_urls,
fetch_current_TNRS_context_names)
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call(): return service()
### end requir... | # -*- coding: utf-8 -*-
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call(): return service()
### end requires
def index():
return dict()
Fix missing search-context list on Contact page.# -*- coding: utf-8 -*-
from opentreewebapputil im... | <commit_before># -*- coding: utf-8 -*-
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call(): return service()
### end requires
def index():
return dict()
<commit_msg>Fix missing search-context list on Contact page.<commit_after># -*- cod... |
c7dbf93c123d4b055fcd4a73e5d3374e48ee248a | pegasus/service/server.py | pegasus/service/server.py | import os
import logging
from optparse import OptionParser
from pegasus.service import app, em
from pegasus.service.command import Command
class ServerCommand(Command):
usage = "%prog [options]"
description = "Start Pegasus Service"
def __init__(self):
Command.__init__(self)
self.parser.a... | import os
import logging
from optparse import OptionParser
from pegasus.service import app, em
from pegasus.service.command import Command
log = logging.getLogger("server")
class ServerCommand(Command):
usage = "%prog [options]"
description = "Start Pegasus Service"
def __init__(self):
Command._... | Allow service to start without EM if Condor and Pegasus are missing | Allow service to start without EM if Condor and Pegasus are missing
| Python | apache-2.0 | pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus-service,pegasus-isi/pegasus-service,pegasus-isi/pegasus-service,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus | import os
import logging
from optparse import OptionParser
from pegasus.service import app, em
from pegasus.service.command import Command
class ServerCommand(Command):
usage = "%prog [options]"
description = "Start Pegasus Service"
def __init__(self):
Command.__init__(self)
self.parser.a... | import os
import logging
from optparse import OptionParser
from pegasus.service import app, em
from pegasus.service.command import Command
log = logging.getLogger("server")
class ServerCommand(Command):
usage = "%prog [options]"
description = "Start Pegasus Service"
def __init__(self):
Command._... | <commit_before>import os
import logging
from optparse import OptionParser
from pegasus.service import app, em
from pegasus.service.command import Command
class ServerCommand(Command):
usage = "%prog [options]"
description = "Start Pegasus Service"
def __init__(self):
Command.__init__(self)
... | import os
import logging
from optparse import OptionParser
from pegasus.service import app, em
from pegasus.service.command import Command
log = logging.getLogger("server")
class ServerCommand(Command):
usage = "%prog [options]"
description = "Start Pegasus Service"
def __init__(self):
Command._... | import os
import logging
from optparse import OptionParser
from pegasus.service import app, em
from pegasus.service.command import Command
class ServerCommand(Command):
usage = "%prog [options]"
description = "Start Pegasus Service"
def __init__(self):
Command.__init__(self)
self.parser.a... | <commit_before>import os
import logging
from optparse import OptionParser
from pegasus.service import app, em
from pegasus.service.command import Command
class ServerCommand(Command):
usage = "%prog [options]"
description = "Start Pegasus Service"
def __init__(self):
Command.__init__(self)
... |
6858e4a2e2047c906a3b8f69b7cd7b04a0cbf666 | pivoteer/writer/censys.py | pivoteer/writer/censys.py | """
Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record)
"""
from pivoteer.writer.core import CsvWriter
class CensysCsvWriter(CsvWriter):
"""
A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record)
"""
def __init__(se... | """
Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record)
"""
from pivoteer.writer.core import CsvWriter
class CensysCsvWriter(CsvWriter):
"""
A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record)
"""
def __init__(se... | Resolve issues with exporting empty dataset for certificate list | Resolve issues with exporting empty dataset for certificate list
| Python | mit | gdit-cnd/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID | """
Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record)
"""
from pivoteer.writer.core import CsvWriter
class CensysCsvWriter(CsvWriter):
"""
A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record)
"""
def __init__(se... | """
Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record)
"""
from pivoteer.writer.core import CsvWriter
class CensysCsvWriter(CsvWriter):
"""
A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record)
"""
def __init__(se... | <commit_before>"""
Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record)
"""
from pivoteer.writer.core import CsvWriter
class CensysCsvWriter(CsvWriter):
"""
A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record)
"""
... | """
Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record)
"""
from pivoteer.writer.core import CsvWriter
class CensysCsvWriter(CsvWriter):
"""
A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record)
"""
def __init__(se... | """
Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record)
"""
from pivoteer.writer.core import CsvWriter
class CensysCsvWriter(CsvWriter):
"""
A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record)
"""
def __init__(se... | <commit_before>"""
Classes and functions for writing IndicatorRecord objects with a record type of "CE" (Censys Record)
"""
from pivoteer.writer.core import CsvWriter
class CensysCsvWriter(CsvWriter):
"""
A CsvWriter implementation for IndicatorRecords with a record type of "CE" (Censys Record)
"""
... |
4a6a2155878d309e6bc96a948811daafa4a92908 | protocols/no_reconnect.py | protocols/no_reconnect.py | try:
from .. import api, shared as G
from ... import editor
from ..exc_fmt import str_e
from ..protocols import floo_proto
except (ImportError, ValueError):
from floo import editor
from floo.common import api, shared as G
from floo.common.exc_fmt import str_e
from floo.common.protocols i... | try:
from .. import api, shared as G
from ... import editor
from ..exc_fmt import str_e
from ..protocols import floo_proto
except (ImportError, ValueError):
from floo import editor
from floo.common import api, shared as G
from floo.common.exc_fmt import str_e
from floo.common.protocols i... | Call connect instead of reconnect. | Call connect instead of reconnect.
| Python | apache-2.0 | Floobits/plugin-common-python | try:
from .. import api, shared as G
from ... import editor
from ..exc_fmt import str_e
from ..protocols import floo_proto
except (ImportError, ValueError):
from floo import editor
from floo.common import api, shared as G
from floo.common.exc_fmt import str_e
from floo.common.protocols i... | try:
from .. import api, shared as G
from ... import editor
from ..exc_fmt import str_e
from ..protocols import floo_proto
except (ImportError, ValueError):
from floo import editor
from floo.common import api, shared as G
from floo.common.exc_fmt import str_e
from floo.common.protocols i... | <commit_before>try:
from .. import api, shared as G
from ... import editor
from ..exc_fmt import str_e
from ..protocols import floo_proto
except (ImportError, ValueError):
from floo import editor
from floo.common import api, shared as G
from floo.common.exc_fmt import str_e
from floo.com... | try:
from .. import api, shared as G
from ... import editor
from ..exc_fmt import str_e
from ..protocols import floo_proto
except (ImportError, ValueError):
from floo import editor
from floo.common import api, shared as G
from floo.common.exc_fmt import str_e
from floo.common.protocols i... | try:
from .. import api, shared as G
from ... import editor
from ..exc_fmt import str_e
from ..protocols import floo_proto
except (ImportError, ValueError):
from floo import editor
from floo.common import api, shared as G
from floo.common.exc_fmt import str_e
from floo.common.protocols i... | <commit_before>try:
from .. import api, shared as G
from ... import editor
from ..exc_fmt import str_e
from ..protocols import floo_proto
except (ImportError, ValueError):
from floo import editor
from floo.common import api, shared as G
from floo.common.exc_fmt import str_e
from floo.com... |
87d1801fefcd048f60c944c28bfc005101c5704b | dynd/tests/test_nd_groupby.py | dynd/tests/test_nd_groupby.py | import sys
import unittest
from dynd import nd, ndt
class TestGroupBy(unittest.TestCase):
def test_immutable(self):
a = nd.array([
('x', 0),
('y', 1),
('x', 2),
('x', 3),
('y', 4)],
dtype='{A: string; B: int32}'... | import sys
import unittest
from dynd import nd, ndt
class TestGroupBy(unittest.TestCase):
def test_immutable(self):
a = nd.array([
('x', 0),
('y', 1),
('x', 2),
('x', 3),
('y', 4)],
dtype='{A: string; B: int32}'... | Add some more simple nd.groupby tests | Add some more simple nd.groupby tests
| Python | bsd-2-clause | cpcloud/dynd-python,izaid/dynd-python,aterrel/dynd-python,michaelpacer/dynd-python,mwiebe/dynd-python,insertinterestingnamehere/dynd-python,aterrel/dynd-python,cpcloud/dynd-python,cpcloud/dynd-python,izaid/dynd-python,aterrel/dynd-python,mwiebe/dynd-python,michaelpacer/dynd-python,mwiebe/dynd-python,pombredanne/dynd-py... | import sys
import unittest
from dynd import nd, ndt
class TestGroupBy(unittest.TestCase):
def test_immutable(self):
a = nd.array([
('x', 0),
('y', 1),
('x', 2),
('x', 3),
('y', 4)],
dtype='{A: string; B: int32}'... | import sys
import unittest
from dynd import nd, ndt
class TestGroupBy(unittest.TestCase):
def test_immutable(self):
a = nd.array([
('x', 0),
('y', 1),
('x', 2),
('x', 3),
('y', 4)],
dtype='{A: string; B: int32}'... | <commit_before>import sys
import unittest
from dynd import nd, ndt
class TestGroupBy(unittest.TestCase):
def test_immutable(self):
a = nd.array([
('x', 0),
('y', 1),
('x', 2),
('x', 3),
('y', 4)],
dtype='{A: str... | import sys
import unittest
from dynd import nd, ndt
class TestGroupBy(unittest.TestCase):
def test_immutable(self):
a = nd.array([
('x', 0),
('y', 1),
('x', 2),
('x', 3),
('y', 4)],
dtype='{A: string; B: int32}'... | import sys
import unittest
from dynd import nd, ndt
class TestGroupBy(unittest.TestCase):
def test_immutable(self):
a = nd.array([
('x', 0),
('y', 1),
('x', 2),
('x', 3),
('y', 4)],
dtype='{A: string; B: int32}'... | <commit_before>import sys
import unittest
from dynd import nd, ndt
class TestGroupBy(unittest.TestCase):
def test_immutable(self):
a = nd.array([
('x', 0),
('y', 1),
('x', 2),
('x', 3),
('y', 4)],
dtype='{A: str... |
7b935b23e17ef873a060fdfbefbfdf232fe8b8de | git_release/release.py | git_release/release.py | import subprocess
from git_release import errors, git_helpers
def _parse_tag(tag):
major, minor = tag.split('.')
return int(major), int(minor)
def _increment_tag(tag, release_type):
major, minor = _parse_tag(tag)
if release_type == 'major':
new_major = major + 1
new_minor = 0
else... | import subprocess
from git_release import errors, git_helpers
def _parse_tag(tag):
major, minor = tag.split('.')
return int(major), int(minor)
def _increment_tag(tag, release_type):
major, minor = _parse_tag(tag)
if release_type == 'major':
new_major = major + 1
new_minor = 0
else... | Add missing argument to _increment_tag call | Add missing argument to _increment_tag call
| Python | mit | Authentise/git-release | import subprocess
from git_release import errors, git_helpers
def _parse_tag(tag):
major, minor = tag.split('.')
return int(major), int(minor)
def _increment_tag(tag, release_type):
major, minor = _parse_tag(tag)
if release_type == 'major':
new_major = major + 1
new_minor = 0
else... | import subprocess
from git_release import errors, git_helpers
def _parse_tag(tag):
major, minor = tag.split('.')
return int(major), int(minor)
def _increment_tag(tag, release_type):
major, minor = _parse_tag(tag)
if release_type == 'major':
new_major = major + 1
new_minor = 0
else... | <commit_before>import subprocess
from git_release import errors, git_helpers
def _parse_tag(tag):
major, minor = tag.split('.')
return int(major), int(minor)
def _increment_tag(tag, release_type):
major, minor = _parse_tag(tag)
if release_type == 'major':
new_major = major + 1
new_min... | import subprocess
from git_release import errors, git_helpers
def _parse_tag(tag):
major, minor = tag.split('.')
return int(major), int(minor)
def _increment_tag(tag, release_type):
major, minor = _parse_tag(tag)
if release_type == 'major':
new_major = major + 1
new_minor = 0
else... | import subprocess
from git_release import errors, git_helpers
def _parse_tag(tag):
major, minor = tag.split('.')
return int(major), int(minor)
def _increment_tag(tag, release_type):
major, minor = _parse_tag(tag)
if release_type == 'major':
new_major = major + 1
new_minor = 0
else... | <commit_before>import subprocess
from git_release import errors, git_helpers
def _parse_tag(tag):
major, minor = tag.split('.')
return int(major), int(minor)
def _increment_tag(tag, release_type):
major, minor = _parse_tag(tag)
if release_type == 'major':
new_major = major + 1
new_min... |
14f4fe95be0501142f929a9b7bec807fd14e3d6f | eva/layers/residual_block.py | eva/layers/residual_block.py | from keras.layers import Convolution2D, Merge
from keras.layers.advanced_activations import PReLU
from keras.engine.topology import merge
from eva.layers.masked_convolution2d import MaskedConvolution2D
def ResidualBlock(model, filters):
# 2h -> h
block = Convolution2D(filters//2, 1, 1)(model)
block = PReL... | from keras.layers import Convolution2D, Merge
from keras.layers.advanced_activations import PReLU
from eva.layers.masked_convolution2d import MaskedConvolution2D
def ResidualBlock(model, filters):
# 2h -> h
block = PReLU()(model)
block = MaskedConvolution2D(filters//2, 1, 1)(block)
# h 3x3 -> h
b... | Fix residual blocks to be on-par with paper. | Fix residual blocks to be on-par with paper.
| Python | apache-2.0 | israelg99/eva | from keras.layers import Convolution2D, Merge
from keras.layers.advanced_activations import PReLU
from keras.engine.topology import merge
from eva.layers.masked_convolution2d import MaskedConvolution2D
def ResidualBlock(model, filters):
# 2h -> h
block = Convolution2D(filters//2, 1, 1)(model)
block = PReL... | from keras.layers import Convolution2D, Merge
from keras.layers.advanced_activations import PReLU
from eva.layers.masked_convolution2d import MaskedConvolution2D
def ResidualBlock(model, filters):
# 2h -> h
block = PReLU()(model)
block = MaskedConvolution2D(filters//2, 1, 1)(block)
# h 3x3 -> h
b... | <commit_before>from keras.layers import Convolution2D, Merge
from keras.layers.advanced_activations import PReLU
from keras.engine.topology import merge
from eva.layers.masked_convolution2d import MaskedConvolution2D
def ResidualBlock(model, filters):
# 2h -> h
block = Convolution2D(filters//2, 1, 1)(model)
... | from keras.layers import Convolution2D, Merge
from keras.layers.advanced_activations import PReLU
from eva.layers.masked_convolution2d import MaskedConvolution2D
def ResidualBlock(model, filters):
# 2h -> h
block = PReLU()(model)
block = MaskedConvolution2D(filters//2, 1, 1)(block)
# h 3x3 -> h
b... | from keras.layers import Convolution2D, Merge
from keras.layers.advanced_activations import PReLU
from keras.engine.topology import merge
from eva.layers.masked_convolution2d import MaskedConvolution2D
def ResidualBlock(model, filters):
# 2h -> h
block = Convolution2D(filters//2, 1, 1)(model)
block = PReL... | <commit_before>from keras.layers import Convolution2D, Merge
from keras.layers.advanced_activations import PReLU
from keras.engine.topology import merge
from eva.layers.masked_convolution2d import MaskedConvolution2D
def ResidualBlock(model, filters):
# 2h -> h
block = Convolution2D(filters//2, 1, 1)(model)
... |
7f5d6e4386e3a80db5cfcbf961c7603b0c78cc52 | openxc/sources/serial.py | openxc/sources/serial.py | """A virtual serial port data source."""
from __future__ import absolute_import
import logging
try:
import serial
except ImportError:
LOG.debug("serial library not installed, can't use serial interface")
from .base import BytestreamDataSource, DataSourceError
LOG = logging.getLogger(__name__)
class Serial... | """A virtual serial port data source."""
from __future__ import absolute_import
import logging
from .base import BytestreamDataSource, DataSourceError
LOG = logging.getLogger(__name__)
try:
import serial
except ImportError:
LOG.debug("serial library not installed, can't use serial interface")
class Serial... | Make sure LOG is defined before using it. | Make sure LOG is defined before using it.
| Python | bsd-3-clause | openxc/openxc-python,openxc/openxc-python,openxc/openxc-python | """A virtual serial port data source."""
from __future__ import absolute_import
import logging
try:
import serial
except ImportError:
LOG.debug("serial library not installed, can't use serial interface")
from .base import BytestreamDataSource, DataSourceError
LOG = logging.getLogger(__name__)
class Serial... | """A virtual serial port data source."""
from __future__ import absolute_import
import logging
from .base import BytestreamDataSource, DataSourceError
LOG = logging.getLogger(__name__)
try:
import serial
except ImportError:
LOG.debug("serial library not installed, can't use serial interface")
class Serial... | <commit_before>"""A virtual serial port data source."""
from __future__ import absolute_import
import logging
try:
import serial
except ImportError:
LOG.debug("serial library not installed, can't use serial interface")
from .base import BytestreamDataSource, DataSourceError
LOG = logging.getLogger(__name__)... | """A virtual serial port data source."""
from __future__ import absolute_import
import logging
from .base import BytestreamDataSource, DataSourceError
LOG = logging.getLogger(__name__)
try:
import serial
except ImportError:
LOG.debug("serial library not installed, can't use serial interface")
class Serial... | """A virtual serial port data source."""
from __future__ import absolute_import
import logging
try:
import serial
except ImportError:
LOG.debug("serial library not installed, can't use serial interface")
from .base import BytestreamDataSource, DataSourceError
LOG = logging.getLogger(__name__)
class Serial... | <commit_before>"""A virtual serial port data source."""
from __future__ import absolute_import
import logging
try:
import serial
except ImportError:
LOG.debug("serial library not installed, can't use serial interface")
from .base import BytestreamDataSource, DataSourceError
LOG = logging.getLogger(__name__)... |
fcfceb59cbd368ddaee87906d3f53f15bbb30072 | 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 | solidrails/mongrel2,solidrails/mongrel2,solidrails/mongrel2,solidrails/mongrel2 | 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"... | <commit_before>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(n... | 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"... | <commit_before>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(n... |
f783d8ac4314923f1259208eb221c8874c03884a | calexicon/fn/iso.py | calexicon/fn/iso.py | from datetime import date as vanilla_date, timedelta
from overflow import OverflowDate
def iso_to_gregorian(year, week, weekday):
if week < 1 or week > 54:
raise ValueError(
"Week number %d is invalid for an ISO calendar."
% (week, )
)
jan_8 = vanilla_date(year, 1, 8).... | from datetime import date as vanilla_date, timedelta
from overflow import OverflowDate
def _check_week(week):
if week < 1 or week > 54:
raise ValueError(
"Week number %d is invalid for an ISO calendar."
% (week, )
)
def iso_to_gregorian(year, week, weekday):
_check_w... | Move check for week number out into function. | Move check for week number out into function.
| Python | apache-2.0 | jwg4/qual,jwg4/calexicon | from datetime import date as vanilla_date, timedelta
from overflow import OverflowDate
def iso_to_gregorian(year, week, weekday):
if week < 1 or week > 54:
raise ValueError(
"Week number %d is invalid for an ISO calendar."
% (week, )
)
jan_8 = vanilla_date(year, 1, 8).... | from datetime import date as vanilla_date, timedelta
from overflow import OverflowDate
def _check_week(week):
if week < 1 or week > 54:
raise ValueError(
"Week number %d is invalid for an ISO calendar."
% (week, )
)
def iso_to_gregorian(year, week, weekday):
_check_w... | <commit_before>from datetime import date as vanilla_date, timedelta
from overflow import OverflowDate
def iso_to_gregorian(year, week, weekday):
if week < 1 or week > 54:
raise ValueError(
"Week number %d is invalid for an ISO calendar."
% (week, )
)
jan_8 = vanilla_da... | from datetime import date as vanilla_date, timedelta
from overflow import OverflowDate
def _check_week(week):
if week < 1 or week > 54:
raise ValueError(
"Week number %d is invalid for an ISO calendar."
% (week, )
)
def iso_to_gregorian(year, week, weekday):
_check_w... | from datetime import date as vanilla_date, timedelta
from overflow import OverflowDate
def iso_to_gregorian(year, week, weekday):
if week < 1 or week > 54:
raise ValueError(
"Week number %d is invalid for an ISO calendar."
% (week, )
)
jan_8 = vanilla_date(year, 1, 8).... | <commit_before>from datetime import date as vanilla_date, timedelta
from overflow import OverflowDate
def iso_to_gregorian(year, week, weekday):
if week < 1 or week > 54:
raise ValueError(
"Week number %d is invalid for an ISO calendar."
% (week, )
)
jan_8 = vanilla_da... |
11aab47e3c8c0d4044042aead7c01c990a152bea | tests/integration/customer/test_dispatcher.py | tests/integration/customer/test_dispatcher.py | from django.test import TestCase
from django.core import mail
from oscar.core.compat import get_user_model
from oscar.apps.customer.utils import Dispatcher
from oscar.apps.customer.models import CommunicationEventType
from oscar.test.factories import create_order
User = get_user_model()
class TestDispatcher(TestCa... | from django.test import TestCase
from django.core import mail
from oscar.core.compat import get_user_model
from oscar.apps.customer.utils import Dispatcher
from oscar.apps.customer.models import CommunicationEventType
from oscar.test.factories import create_order
User = get_user_model()
class TestDispatcher(TestCa... | Add tests for sending messages to emails without account. | Add tests for sending messages to emails without account.
| Python | bsd-3-clause | sonofatailor/django-oscar,solarissmoke/django-oscar,okfish/django-oscar,okfish/django-oscar,django-oscar/django-oscar,sasha0/django-oscar,sonofatailor/django-oscar,django-oscar/django-oscar,django-oscar/django-oscar,solarissmoke/django-oscar,django-oscar/django-oscar,okfish/django-oscar,sonofatailor/django-oscar,okfish... | from django.test import TestCase
from django.core import mail
from oscar.core.compat import get_user_model
from oscar.apps.customer.utils import Dispatcher
from oscar.apps.customer.models import CommunicationEventType
from oscar.test.factories import create_order
User = get_user_model()
class TestDispatcher(TestCa... | from django.test import TestCase
from django.core import mail
from oscar.core.compat import get_user_model
from oscar.apps.customer.utils import Dispatcher
from oscar.apps.customer.models import CommunicationEventType
from oscar.test.factories import create_order
User = get_user_model()
class TestDispatcher(TestCa... | <commit_before>from django.test import TestCase
from django.core import mail
from oscar.core.compat import get_user_model
from oscar.apps.customer.utils import Dispatcher
from oscar.apps.customer.models import CommunicationEventType
from oscar.test.factories import create_order
User = get_user_model()
class TestDi... | from django.test import TestCase
from django.core import mail
from oscar.core.compat import get_user_model
from oscar.apps.customer.utils import Dispatcher
from oscar.apps.customer.models import CommunicationEventType
from oscar.test.factories import create_order
User = get_user_model()
class TestDispatcher(TestCa... | from django.test import TestCase
from django.core import mail
from oscar.core.compat import get_user_model
from oscar.apps.customer.utils import Dispatcher
from oscar.apps.customer.models import CommunicationEventType
from oscar.test.factories import create_order
User = get_user_model()
class TestDispatcher(TestCa... | <commit_before>from django.test import TestCase
from django.core import mail
from oscar.core.compat import get_user_model
from oscar.apps.customer.utils import Dispatcher
from oscar.apps.customer.models import CommunicationEventType
from oscar.test.factories import create_order
User = get_user_model()
class TestDi... |
ec7647c264bb702d4211779ef55ca5a694307faf | ibmcnx/doc/DataSources.py | ibmcnx/doc/DataSources.py | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | Create documentation of DataSource Settings | : Create documentation of DataSource Settings
Task-Url: | Python | apache-2.0 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | <commit_before>######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Co... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | <commit_before>######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Co... |
1bdf4e29daaf896fb6bf3416e0cae65cd8144e6f | falcon_hateoas/middleware.py | falcon_hateoas/middleware.py | import json
import decimal
import sqlalchemy
class AlchemyJSONEncoder(json.JSONEncoder):
def default(self, o):
# if isinstance(getattr(o, 'metadata'), sqlalchemy.schema.MetaData):
if issubclass(o.__class__,
sqlalchemy.ext.declarative.DeclarativeMeta):
d = {}
... | import json
import decimal
import sqlalchemy
class AlchemyJSONEncoder(json.JSONEncoder):
def _is_alchemy_object(self, obj):
try:
sqlalchemy.orm.base.object_mapper(obj)
return True
except sqlalchemy.orm.exc.UnmappedInstanceError:
return False
def default(sel... | Use SQLAlchemy object_mapper for testing Alchemy objects | Use SQLAlchemy object_mapper for testing Alchemy objects
Signed-off-by: Michal Juranyi <[email protected]>
| Python | mit | Vnet-as/falcon-hateoas | import json
import decimal
import sqlalchemy
class AlchemyJSONEncoder(json.JSONEncoder):
def default(self, o):
# if isinstance(getattr(o, 'metadata'), sqlalchemy.schema.MetaData):
if issubclass(o.__class__,
sqlalchemy.ext.declarative.DeclarativeMeta):
d = {}
... | import json
import decimal
import sqlalchemy
class AlchemyJSONEncoder(json.JSONEncoder):
def _is_alchemy_object(self, obj):
try:
sqlalchemy.orm.base.object_mapper(obj)
return True
except sqlalchemy.orm.exc.UnmappedInstanceError:
return False
def default(sel... | <commit_before>import json
import decimal
import sqlalchemy
class AlchemyJSONEncoder(json.JSONEncoder):
def default(self, o):
# if isinstance(getattr(o, 'metadata'), sqlalchemy.schema.MetaData):
if issubclass(o.__class__,
sqlalchemy.ext.declarative.DeclarativeMeta):
... | import json
import decimal
import sqlalchemy
class AlchemyJSONEncoder(json.JSONEncoder):
def _is_alchemy_object(self, obj):
try:
sqlalchemy.orm.base.object_mapper(obj)
return True
except sqlalchemy.orm.exc.UnmappedInstanceError:
return False
def default(sel... | import json
import decimal
import sqlalchemy
class AlchemyJSONEncoder(json.JSONEncoder):
def default(self, o):
# if isinstance(getattr(o, 'metadata'), sqlalchemy.schema.MetaData):
if issubclass(o.__class__,
sqlalchemy.ext.declarative.DeclarativeMeta):
d = {}
... | <commit_before>import json
import decimal
import sqlalchemy
class AlchemyJSONEncoder(json.JSONEncoder):
def default(self, o):
# if isinstance(getattr(o, 'metadata'), sqlalchemy.schema.MetaData):
if issubclass(o.__class__,
sqlalchemy.ext.declarative.DeclarativeMeta):
... |
c4103c00b51ddb9cb837d65b43c972505e533bdc | tilescraper.py | tilescraper.py | from PIL import Image
import json, StringIO, requests
import time
service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/"
resp = requests.get(service + "info.json")
js = json.loads(resp.text)
h = js['height']
w = js['width']
img = Image.new("RGB", (w,h), "white")
tilesize = 400
for x in range(w/tilesize+... | from PIL import Image
import json, StringIO, requests
import time
import robotparser
import re
host = "http://dlss-dev-azaroth.stanford.edu/"
service = host + "services/iiif/f1rc/"
resp = requests.get(service + "info.json")
js = json.loads(resp.text)
h = js['height']
w = js['width']
img = Image.new("RGB", (w,h), "whi... | Add in good practices for crawling | Add in good practices for crawling
| Python | apache-2.0 | azaroth42/iiif-harvester | from PIL import Image
import json, StringIO, requests
import time
service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/"
resp = requests.get(service + "info.json")
js = json.loads(resp.text)
h = js['height']
w = js['width']
img = Image.new("RGB", (w,h), "white")
tilesize = 400
for x in range(w/tilesize+... | from PIL import Image
import json, StringIO, requests
import time
import robotparser
import re
host = "http://dlss-dev-azaroth.stanford.edu/"
service = host + "services/iiif/f1rc/"
resp = requests.get(service + "info.json")
js = json.loads(resp.text)
h = js['height']
w = js['width']
img = Image.new("RGB", (w,h), "whi... | <commit_before>from PIL import Image
import json, StringIO, requests
import time
service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/"
resp = requests.get(service + "info.json")
js = json.loads(resp.text)
h = js['height']
w = js['width']
img = Image.new("RGB", (w,h), "white")
tilesize = 400
for x in ra... | from PIL import Image
import json, StringIO, requests
import time
import robotparser
import re
host = "http://dlss-dev-azaroth.stanford.edu/"
service = host + "services/iiif/f1rc/"
resp = requests.get(service + "info.json")
js = json.loads(resp.text)
h = js['height']
w = js['width']
img = Image.new("RGB", (w,h), "whi... | from PIL import Image
import json, StringIO, requests
import time
service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/"
resp = requests.get(service + "info.json")
js = json.loads(resp.text)
h = js['height']
w = js['width']
img = Image.new("RGB", (w,h), "white")
tilesize = 400
for x in range(w/tilesize+... | <commit_before>from PIL import Image
import json, StringIO, requests
import time
service = "http://dlss-dev-azaroth.stanford.edu/services/iiif/f1rc/"
resp = requests.get(service + "info.json")
js = json.loads(resp.text)
h = js['height']
w = js['width']
img = Image.new("RGB", (w,h), "white")
tilesize = 400
for x in ra... |
7873017564570dd993a19648e3c07f0d2e79ec19 | dodocs/profiles/remove.py | dodocs/profiles/remove.py | """Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogge... | """Remove the profiles.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogg... | Adjust logging and fix module documentation | Adjust logging and fix module documentation
| Python | mit | montefra/dodocs | """Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogge... | """Remove the profiles.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogg... | <commit_before>"""Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log ... | """Remove the profiles.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogg... | """Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log = dlog.getLogge... | <commit_before>"""Create the profile.
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import shutil
import dodocs.logger as dlog
import dodocs.utils as dutils
def remove(args):
"""Remove profile(s)
Parameters
----------
args : namespace
parsed command line arguments
"""
log ... |
0ceadc93f0798bd04404cb18d077269f19111438 | nap/auth.py | nap/auth.py | from __future__ import unicode_literals
# Authentication and Authorisation
from functools import wraps
from . import http
def permit(test_func):
'''Decorate a handler to control access'''
def decorator(view_func):
@wraps(view_func)
def _wrapped_view(self, *args, **kwargs):
if test_... | from __future__ import unicode_literals
# Authentication and Authorisation
from functools import wraps
from . import http
def permit(test_func):
'''Decorate a handler to control access'''
def decorator(view_func):
@wraps(view_func)
def _wrapped_view(self, *args, **kwargs):
if test_... | Fix wrong paramter name in permit_groups decorator | Fix wrong paramter name in permit_groups decorator
| Python | bsd-3-clause | MarkusH/django-nap,limbera/django-nap | from __future__ import unicode_literals
# Authentication and Authorisation
from functools import wraps
from . import http
def permit(test_func):
'''Decorate a handler to control access'''
def decorator(view_func):
@wraps(view_func)
def _wrapped_view(self, *args, **kwargs):
if test_... | from __future__ import unicode_literals
# Authentication and Authorisation
from functools import wraps
from . import http
def permit(test_func):
'''Decorate a handler to control access'''
def decorator(view_func):
@wraps(view_func)
def _wrapped_view(self, *args, **kwargs):
if test_... | <commit_before>from __future__ import unicode_literals
# Authentication and Authorisation
from functools import wraps
from . import http
def permit(test_func):
'''Decorate a handler to control access'''
def decorator(view_func):
@wraps(view_func)
def _wrapped_view(self, *args, **kwargs):
... | from __future__ import unicode_literals
# Authentication and Authorisation
from functools import wraps
from . import http
def permit(test_func):
'''Decorate a handler to control access'''
def decorator(view_func):
@wraps(view_func)
def _wrapped_view(self, *args, **kwargs):
if test_... | from __future__ import unicode_literals
# Authentication and Authorisation
from functools import wraps
from . import http
def permit(test_func):
'''Decorate a handler to control access'''
def decorator(view_func):
@wraps(view_func)
def _wrapped_view(self, *args, **kwargs):
if test_... | <commit_before>from __future__ import unicode_literals
# Authentication and Authorisation
from functools import wraps
from . import http
def permit(test_func):
'''Decorate a handler to control access'''
def decorator(view_func):
@wraps(view_func)
def _wrapped_view(self, *args, **kwargs):
... |
f3efb01c530db87f48d813b118f80a2ee1fd5996 | dthm4kaiako/users/apps.py | dthm4kaiako/users/apps.py | """Application configuration for the chapters application."""
from django.apps import AppConfig
class UsersAppConfig(AppConfig):
"""Configuration object for the chapters application."""
name = "users"
verbose_name = "Users"
def ready(self):
"""Import signals upon intialising application."""... | """Application configuration for the chapters application."""
from django.apps import AppConfig
class UsersAppConfig(AppConfig):
"""Configuration object for the chapters application."""
name = "users"
verbose_name = "Users"
def ready(self):
"""Import signals upon intialising application."""... | Exclude import from style checking | Exclude import from style checking
| Python | mit | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | """Application configuration for the chapters application."""
from django.apps import AppConfig
class UsersAppConfig(AppConfig):
"""Configuration object for the chapters application."""
name = "users"
verbose_name = "Users"
def ready(self):
"""Import signals upon intialising application."""... | """Application configuration for the chapters application."""
from django.apps import AppConfig
class UsersAppConfig(AppConfig):
"""Configuration object for the chapters application."""
name = "users"
verbose_name = "Users"
def ready(self):
"""Import signals upon intialising application."""... | <commit_before>"""Application configuration for the chapters application."""
from django.apps import AppConfig
class UsersAppConfig(AppConfig):
"""Configuration object for the chapters application."""
name = "users"
verbose_name = "Users"
def ready(self):
"""Import signals upon intialising ... | """Application configuration for the chapters application."""
from django.apps import AppConfig
class UsersAppConfig(AppConfig):
"""Configuration object for the chapters application."""
name = "users"
verbose_name = "Users"
def ready(self):
"""Import signals upon intialising application."""... | """Application configuration for the chapters application."""
from django.apps import AppConfig
class UsersAppConfig(AppConfig):
"""Configuration object for the chapters application."""
name = "users"
verbose_name = "Users"
def ready(self):
"""Import signals upon intialising application."""... | <commit_before>"""Application configuration for the chapters application."""
from django.apps import AppConfig
class UsersAppConfig(AppConfig):
"""Configuration object for the chapters application."""
name = "users"
verbose_name = "Users"
def ready(self):
"""Import signals upon intialising ... |
6454372da6550455735cbcb3a86a966e61c134a1 | elasticsearch/__init__.py | elasticsearch/__init__.py | from __future__ import absolute_import
VERSION = (0, 4, 3)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
from elasticsearch.client import Elasticsearch
from elasticsearch.transport import Transport
from elasticsearch.connection_pool import ConnectionPool, ConnectionSelector, \
RoundRobinSelec... | from __future__ import absolute_import
VERSION = (0, 4, 3)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
from elasticsearch.client import Elasticsearch
from elasticsearch.transport import Transport
from elasticsearch.connection_pool import ConnectionPool, ConnectionSelector, \
RoundRobinSelec... | Allow people to import ThriftConnection from elasticsearch package itself | Allow people to import ThriftConnection from elasticsearch package itself
| Python | apache-2.0 | veatch/elasticsearch-py,chrisseto/elasticsearch-py,Garrett-R/elasticsearch-py,brunobell/elasticsearch-py,tailhook/elasticsearch-py,AlexMaskovyak/elasticsearch-py,brunobell/elasticsearch-py,mjhennig/elasticsearch-py,thomdixon/elasticsearch-py,kelp404/elasticsearch-py,gardsted/elasticsearch-py,elastic/elasticsearch-py,el... | from __future__ import absolute_import
VERSION = (0, 4, 3)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
from elasticsearch.client import Elasticsearch
from elasticsearch.transport import Transport
from elasticsearch.connection_pool import ConnectionPool, ConnectionSelector, \
RoundRobinSelec... | from __future__ import absolute_import
VERSION = (0, 4, 3)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
from elasticsearch.client import Elasticsearch
from elasticsearch.transport import Transport
from elasticsearch.connection_pool import ConnectionPool, ConnectionSelector, \
RoundRobinSelec... | <commit_before>from __future__ import absolute_import
VERSION = (0, 4, 3)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
from elasticsearch.client import Elasticsearch
from elasticsearch.transport import Transport
from elasticsearch.connection_pool import ConnectionPool, ConnectionSelector, \
... | from __future__ import absolute_import
VERSION = (0, 4, 3)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
from elasticsearch.client import Elasticsearch
from elasticsearch.transport import Transport
from elasticsearch.connection_pool import ConnectionPool, ConnectionSelector, \
RoundRobinSelec... | from __future__ import absolute_import
VERSION = (0, 4, 3)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
from elasticsearch.client import Elasticsearch
from elasticsearch.transport import Transport
from elasticsearch.connection_pool import ConnectionPool, ConnectionSelector, \
RoundRobinSelec... | <commit_before>from __future__ import absolute_import
VERSION = (0, 4, 3)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
from elasticsearch.client import Elasticsearch
from elasticsearch.transport import Transport
from elasticsearch.connection_pool import ConnectionPool, ConnectionSelector, \
... |
4a37feed87efa3dd05e38ad6f85afe392afd3a16 | gitless/cli/gl_switch.py | gitless/cli/gl_switch.py | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git.
# Licensed under GNU GPL v2.
"""gl switch - Switch branches."""
from __future__ import unicode_literals
from clint.textui import colored
from . import pprint
def parser(subparsers, _):
"""Adds the switch parser to the given subpa... | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git.
# Licensed under GNU GPL v2.
"""gl switch - Switch branches."""
from __future__ import unicode_literals
from clint.textui import colored
from . import pprint
def parser(subparsers, _):
"""Adds the switch parser to the given subpa... | Fix ui bug in switch | Fix ui bug in switch
| Python | mit | sdg-mit/gitless,sdg-mit/gitless | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git.
# Licensed under GNU GPL v2.
"""gl switch - Switch branches."""
from __future__ import unicode_literals
from clint.textui import colored
from . import pprint
def parser(subparsers, _):
"""Adds the switch parser to the given subpa... | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git.
# Licensed under GNU GPL v2.
"""gl switch - Switch branches."""
from __future__ import unicode_literals
from clint.textui import colored
from . import pprint
def parser(subparsers, _):
"""Adds the switch parser to the given subpa... | <commit_before># -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git.
# Licensed under GNU GPL v2.
"""gl switch - Switch branches."""
from __future__ import unicode_literals
from clint.textui import colored
from . import pprint
def parser(subparsers, _):
"""Adds the switch parser to ... | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git.
# Licensed under GNU GPL v2.
"""gl switch - Switch branches."""
from __future__ import unicode_literals
from clint.textui import colored
from . import pprint
def parser(subparsers, _):
"""Adds the switch parser to the given subpa... | # -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git.
# Licensed under GNU GPL v2.
"""gl switch - Switch branches."""
from __future__ import unicode_literals
from clint.textui import colored
from . import pprint
def parser(subparsers, _):
"""Adds the switch parser to the given subpa... | <commit_before># -*- coding: utf-8 -*-
# Gitless - a version control system built on top of Git.
# Licensed under GNU GPL v2.
"""gl switch - Switch branches."""
from __future__ import unicode_literals
from clint.textui import colored
from . import pprint
def parser(subparsers, _):
"""Adds the switch parser to ... |
f46a0cdf869b8629a1e4a08105a065933d4199f9 | climlab/__init__.py | climlab/__init__.py | __version__ = '0.4.3.dev0'
# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
from climlab.utils import thermo, legendre
# some more useful shorcuts
from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel
from climlab.m... | __version__ = '0.5.0.dev0'
# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
from climlab.utils import thermo, legendre
# some more useful shorcuts
from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel
from climlab.m... | Increment version number to 0.5.0.dev0 | Increment version number to 0.5.0.dev0
| Python | mit | cjcardinale/climlab,cjcardinale/climlab,cjcardinale/climlab,brian-rose/climlab,brian-rose/climlab | __version__ = '0.4.3.dev0'
# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
from climlab.utils import thermo, legendre
# some more useful shorcuts
from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel
from climlab.m... | __version__ = '0.5.0.dev0'
# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
from climlab.utils import thermo, legendre
# some more useful shorcuts
from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel
from climlab.m... | <commit_before>__version__ = '0.4.3.dev0'
# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
from climlab.utils import thermo, legendre
# some more useful shorcuts
from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel... | __version__ = '0.5.0.dev0'
# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
from climlab.utils import thermo, legendre
# some more useful shorcuts
from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel
from climlab.m... | __version__ = '0.4.3.dev0'
# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
from climlab.utils import thermo, legendre
# some more useful shorcuts
from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel
from climlab.m... | <commit_before>__version__ = '0.4.3.dev0'
# this should ensure that we can still import constants.py as climlab.constants
from climlab.utils import constants
from climlab.utils import thermo, legendre
# some more useful shorcuts
from climlab.model.column import GreyRadiationModel, RadiativeConvectiveModel, BandRCModel... |
56446567f764625e88d8efdbfa2849e0a579d5c4 | indra/tests/test_rest_api.py | indra/tests/test_rest_api.py | import requests
from nose.plugins.attrib import attr
@attr('webservice')
def test_rest_api_responsive():
stmt_str = '{"statements": [{"sbo": "http://identifiers.org/sbo/SBO:0000526", "type": "Complex", "id": "acc6d47c-f622-41a4-8ae9-d7b0f3d24a2f", "members": [{"db_refs": {"TEXT": "MEK", "FPLX": "MEK"}, "name": "ME... | import requests
from nose.plugins.attrib import attr
@attr('webservice')
def test_rest_api_responsive():
stmt_str = '{"statements": [{"sbo": "http://identifiers.org/sbo/SBO:0000526", "type": "Complex", "id": "acc6d47c-f622-41a4-8ae9-d7b0f3d24a2f", "members": [{"db_refs": {"TEXT": "MEK", "FPLX": "MEK"}, "name": "ME... | Update REST API address in test | Update REST API address in test
| Python | bsd-2-clause | sorgerlab/belpy,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,pvtodorov/indra,bgyori/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra,pvtodorov/indra,johnbachman/belpy,bgyori/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,johnbachman/indra,johnbachman/indra | import requests
from nose.plugins.attrib import attr
@attr('webservice')
def test_rest_api_responsive():
stmt_str = '{"statements": [{"sbo": "http://identifiers.org/sbo/SBO:0000526", "type": "Complex", "id": "acc6d47c-f622-41a4-8ae9-d7b0f3d24a2f", "members": [{"db_refs": {"TEXT": "MEK", "FPLX": "MEK"}, "name": "ME... | import requests
from nose.plugins.attrib import attr
@attr('webservice')
def test_rest_api_responsive():
stmt_str = '{"statements": [{"sbo": "http://identifiers.org/sbo/SBO:0000526", "type": "Complex", "id": "acc6d47c-f622-41a4-8ae9-d7b0f3d24a2f", "members": [{"db_refs": {"TEXT": "MEK", "FPLX": "MEK"}, "name": "ME... | <commit_before>import requests
from nose.plugins.attrib import attr
@attr('webservice')
def test_rest_api_responsive():
stmt_str = '{"statements": [{"sbo": "http://identifiers.org/sbo/SBO:0000526", "type": "Complex", "id": "acc6d47c-f622-41a4-8ae9-d7b0f3d24a2f", "members": [{"db_refs": {"TEXT": "MEK", "FPLX": "MEK... | import requests
from nose.plugins.attrib import attr
@attr('webservice')
def test_rest_api_responsive():
stmt_str = '{"statements": [{"sbo": "http://identifiers.org/sbo/SBO:0000526", "type": "Complex", "id": "acc6d47c-f622-41a4-8ae9-d7b0f3d24a2f", "members": [{"db_refs": {"TEXT": "MEK", "FPLX": "MEK"}, "name": "ME... | import requests
from nose.plugins.attrib import attr
@attr('webservice')
def test_rest_api_responsive():
stmt_str = '{"statements": [{"sbo": "http://identifiers.org/sbo/SBO:0000526", "type": "Complex", "id": "acc6d47c-f622-41a4-8ae9-d7b0f3d24a2f", "members": [{"db_refs": {"TEXT": "MEK", "FPLX": "MEK"}, "name": "ME... | <commit_before>import requests
from nose.plugins.attrib import attr
@attr('webservice')
def test_rest_api_responsive():
stmt_str = '{"statements": [{"sbo": "http://identifiers.org/sbo/SBO:0000526", "type": "Complex", "id": "acc6d47c-f622-41a4-8ae9-d7b0f3d24a2f", "members": [{"db_refs": {"TEXT": "MEK", "FPLX": "MEK... |
4ec9d5a5a59c1526a846f6d88f1e43154e859fb7 | report_context/controllers/main.py | report_context/controllers/main.py | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import json
from odoo.http import request, route
from odoo.addons.web.controllers import main as report
class ReportController(report.ReportController):
@route()
def report_routes(self, reportname, docids=None... | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import json
from odoo.http import request, route
from odoo.addons.web.controllers import main as report
class ReportController(report.ReportController):
@route()
def report_routes(self, reportname, docids=None... | Fix json.loads when context is None | Fix json.loads when context is None
Co-authored-by: Pierre Verkest <[email protected]> | Python | agpl-3.0 | OCA/reporting-engine,OCA/reporting-engine,OCA/reporting-engine,OCA/reporting-engine | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import json
from odoo.http import request, route
from odoo.addons.web.controllers import main as report
class ReportController(report.ReportController):
@route()
def report_routes(self, reportname, docids=None... | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import json
from odoo.http import request, route
from odoo.addons.web.controllers import main as report
class ReportController(report.ReportController):
@route()
def report_routes(self, reportname, docids=None... | <commit_before># Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import json
from odoo.http import request, route
from odoo.addons.web.controllers import main as report
class ReportController(report.ReportController):
@route()
def report_routes(self, reportna... | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import json
from odoo.http import request, route
from odoo.addons.web.controllers import main as report
class ReportController(report.ReportController):
@route()
def report_routes(self, reportname, docids=None... | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import json
from odoo.http import request, route
from odoo.addons.web.controllers import main as report
class ReportController(report.ReportController):
@route()
def report_routes(self, reportname, docids=None... | <commit_before># Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import json
from odoo.http import request, route
from odoo.addons.web.controllers import main as report
class ReportController(report.ReportController):
@route()
def report_routes(self, reportna... |
6bdbbf4d5e100856acbaba1c5fc024a9f7f78718 | tests/tools.py | tests/tools.py | """
Test tools required by multiple suites.
"""
__author__ = 'mbach'
import contextlib
import shutil
import subprocess
import tempfile
@contextlib.contextmanager
def devpi_server(port=2414):
server_dir = tempfile.mkdtemp()
try:
subprocess.check_call(['devpi-server', '--start', '--serverdir={}'.form... | """
Test tools required by multiple suites.
"""
__author__ = 'mbach'
import contextlib
import shutil
import subprocess
import tempfile
from brandon import devpi
@contextlib.contextmanager
def devpi_server(port=2414):
server_dir = tempfile.mkdtemp()
try:
subprocess.check_call(['devpi-server', '--sta... | Test tool to create temporary devpi index. | Test tool to create temporary devpi index.
| Python | bsd-3-clause | tylerdave/devpi-builder | """
Test tools required by multiple suites.
"""
__author__ = 'mbach'
import contextlib
import shutil
import subprocess
import tempfile
@contextlib.contextmanager
def devpi_server(port=2414):
server_dir = tempfile.mkdtemp()
try:
subprocess.check_call(['devpi-server', '--start', '--serverdir={}'.form... | """
Test tools required by multiple suites.
"""
__author__ = 'mbach'
import contextlib
import shutil
import subprocess
import tempfile
from brandon import devpi
@contextlib.contextmanager
def devpi_server(port=2414):
server_dir = tempfile.mkdtemp()
try:
subprocess.check_call(['devpi-server', '--sta... | <commit_before>"""
Test tools required by multiple suites.
"""
__author__ = 'mbach'
import contextlib
import shutil
import subprocess
import tempfile
@contextlib.contextmanager
def devpi_server(port=2414):
server_dir = tempfile.mkdtemp()
try:
subprocess.check_call(['devpi-server', '--start', '--ser... | """
Test tools required by multiple suites.
"""
__author__ = 'mbach'
import contextlib
import shutil
import subprocess
import tempfile
from brandon import devpi
@contextlib.contextmanager
def devpi_server(port=2414):
server_dir = tempfile.mkdtemp()
try:
subprocess.check_call(['devpi-server', '--sta... | """
Test tools required by multiple suites.
"""
__author__ = 'mbach'
import contextlib
import shutil
import subprocess
import tempfile
@contextlib.contextmanager
def devpi_server(port=2414):
server_dir = tempfile.mkdtemp()
try:
subprocess.check_call(['devpi-server', '--start', '--serverdir={}'.form... | <commit_before>"""
Test tools required by multiple suites.
"""
__author__ = 'mbach'
import contextlib
import shutil
import subprocess
import tempfile
@contextlib.contextmanager
def devpi_server(port=2414):
server_dir = tempfile.mkdtemp()
try:
subprocess.check_call(['devpi-server', '--start', '--ser... |
8460b1249d1140234798b8b7e482b13cde173a1e | bluebottle/settings/jenkins.py | bluebottle/settings/jenkins.py | # NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGINE': 'django.db... | # NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGINE': 'django.db... | Disable django.contrib.sites tests in Jenkins. | Disable django.contrib.sites tests in Jenkins.
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | # NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGINE': 'django.db... | # NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGINE': 'django.db... | <commit_before># NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGI... | # NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGINE': 'django.db... | # NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGINE': 'django.db... | <commit_before># NOTE: local.py must be an empty file when using this configuration.
from .defaults import *
# Put jenkins environment specific overrides below.
INSTALLED_APPS += ('django_jenkins',)
SECRET_KEY = 'hbqnTEq+m7Tk61bvRV/TLANr3i0WZ6hgBXDh3aYpSU8m+E1iCtlU3Q=='
DATABASES = {
'default': {
'ENGI... |
21a6ddca55c8b5da70d806afa18f08ac20cb04c0 | src/zsl/interface/webservice/performers/method.py | src/zsl/interface/webservice/performers/method.py | """
:mod:`zsl.interface.webservice.performers.method`
-------------------------------------------------
.. moduleauthor:: Martin Babka
"""
from __future__ import unicode_literals
import logging
from importlib import import_module, reload
import sys
from zsl.router.method import get_method_packages
def call_expose... | """
:mod:`zsl.interface.webservice.performers.method`
-------------------------------------------------
.. moduleauthor:: Martin Babka
"""
from __future__ import unicode_literals
import logging
from importlib import import_module
import sys
from zsl.router.method import get_method_packages
def call_exposers_in_me... | Remove the unused import and fix testing library | Remove the unused import and fix testing library
| Python | mit | AtteqCom/zsl,AtteqCom/zsl | """
:mod:`zsl.interface.webservice.performers.method`
-------------------------------------------------
.. moduleauthor:: Martin Babka
"""
from __future__ import unicode_literals
import logging
from importlib import import_module, reload
import sys
from zsl.router.method import get_method_packages
def call_expose... | """
:mod:`zsl.interface.webservice.performers.method`
-------------------------------------------------
.. moduleauthor:: Martin Babka
"""
from __future__ import unicode_literals
import logging
from importlib import import_module
import sys
from zsl.router.method import get_method_packages
def call_exposers_in_me... | <commit_before>"""
:mod:`zsl.interface.webservice.performers.method`
-------------------------------------------------
.. moduleauthor:: Martin Babka
"""
from __future__ import unicode_literals
import logging
from importlib import import_module, reload
import sys
from zsl.router.method import get_method_packages
... | """
:mod:`zsl.interface.webservice.performers.method`
-------------------------------------------------
.. moduleauthor:: Martin Babka
"""
from __future__ import unicode_literals
import logging
from importlib import import_module
import sys
from zsl.router.method import get_method_packages
def call_exposers_in_me... | """
:mod:`zsl.interface.webservice.performers.method`
-------------------------------------------------
.. moduleauthor:: Martin Babka
"""
from __future__ import unicode_literals
import logging
from importlib import import_module, reload
import sys
from zsl.router.method import get_method_packages
def call_expose... | <commit_before>"""
:mod:`zsl.interface.webservice.performers.method`
-------------------------------------------------
.. moduleauthor:: Martin Babka
"""
from __future__ import unicode_literals
import logging
from importlib import import_module, reload
import sys
from zsl.router.method import get_method_packages
... |
497990c526add919dc31965b0afd49d86ace49cf | models.py | models.py | import datetime
import mongoengine
from mongoengine.django import auth
from piplmesh.account import fields
class User(auth.User):
birthdate = fields.LimitedDateTimeField(upper_limit=datetime.datetime.today(), lower_limit=datetime.datetime.today() - datetime.timedelta(366 * 120))
gender = fields.GenderField()... | import datetime
import mongoengine
from mongoengine.django import auth
from piplmesh.account import fields
class User(auth.User):
birthdate = fields.LimitedDateTimeField(upper_limit=datetime.date.today(), lower_limit=datetime.date.today() - datetime.timedelta(366 * 120))
gender = fields.GenderField()
lan... | Change date's limits format to datetime.date. | Change date's limits format to datetime.date.
| Python | agpl-3.0 | mitar/django-mongo-auth,mitar/django-mongo-auth,mitar/django-mongo-auth | import datetime
import mongoengine
from mongoengine.django import auth
from piplmesh.account import fields
class User(auth.User):
birthdate = fields.LimitedDateTimeField(upper_limit=datetime.datetime.today(), lower_limit=datetime.datetime.today() - datetime.timedelta(366 * 120))
gender = fields.GenderField()... | import datetime
import mongoengine
from mongoengine.django import auth
from piplmesh.account import fields
class User(auth.User):
birthdate = fields.LimitedDateTimeField(upper_limit=datetime.date.today(), lower_limit=datetime.date.today() - datetime.timedelta(366 * 120))
gender = fields.GenderField()
lan... | <commit_before>import datetime
import mongoengine
from mongoengine.django import auth
from piplmesh.account import fields
class User(auth.User):
birthdate = fields.LimitedDateTimeField(upper_limit=datetime.datetime.today(), lower_limit=datetime.datetime.today() - datetime.timedelta(366 * 120))
gender = field... | import datetime
import mongoengine
from mongoengine.django import auth
from piplmesh.account import fields
class User(auth.User):
birthdate = fields.LimitedDateTimeField(upper_limit=datetime.date.today(), lower_limit=datetime.date.today() - datetime.timedelta(366 * 120))
gender = fields.GenderField()
lan... | import datetime
import mongoengine
from mongoengine.django import auth
from piplmesh.account import fields
class User(auth.User):
birthdate = fields.LimitedDateTimeField(upper_limit=datetime.datetime.today(), lower_limit=datetime.datetime.today() - datetime.timedelta(366 * 120))
gender = fields.GenderField()... | <commit_before>import datetime
import mongoengine
from mongoengine.django import auth
from piplmesh.account import fields
class User(auth.User):
birthdate = fields.LimitedDateTimeField(upper_limit=datetime.datetime.today(), lower_limit=datetime.datetime.today() - datetime.timedelta(366 * 120))
gender = field... |
392bdf5845be19ece8f582f79caf2d09a0af0dfb | manage.py | manage.py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| #!/usr/bin/env python
# manage.py script of cronos
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| Add header, needed for the upcoming changes in the update_cronos.sh script | Add header, needed for the upcoming changes in the update_cronos.sh
script
| Python | agpl-3.0 | LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
Add header, needed for the upcoming changes in the update_cronos.sh
scrip... | #!/usr/bin/env python
# manage.py script of cronos
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| <commit_before>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<commit_msg>Add header, needed for the upcoming changes in... | #!/usr/bin/env python
# manage.py script of cronos
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
Add header, needed for the upcoming changes in the update_cronos.sh
scrip... | <commit_before>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<commit_msg>Add header, needed for the upcoming changes in... |
6891edfe6228654940808a93fd36bfa6d24ae935 | marionette/tor_browser_tests/test_screenshots.py | marionette/tor_browser_tests/test_screenshots.py | from marionette_driver import By
from marionette_driver.errors import MarionetteException
from marionette_harness import MarionetteTestCase
import testsuite
class Test(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
se... | from marionette_driver import By
from marionette_driver.errors import MarionetteException
from marionette_harness import MarionetteTestCase
import testsuite
class Test(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
se... | Fix url for screenshot test | Fix url for screenshot test
| Python | bsd-3-clause | boklm/tbb-testsuite,boklm/tbb-testsuite,boklm/tbb-testsuite,boklm/tbb-testsuite,boklm/tbb-testsuite | from marionette_driver import By
from marionette_driver.errors import MarionetteException
from marionette_harness import MarionetteTestCase
import testsuite
class Test(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
se... | from marionette_driver import By
from marionette_driver.errors import MarionetteException
from marionette_harness import MarionetteTestCase
import testsuite
class Test(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
se... | <commit_before>from marionette_driver import By
from marionette_driver.errors import MarionetteException
from marionette_harness import MarionetteTestCase
import testsuite
class Test(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts =... | from marionette_driver import By
from marionette_driver.errors import MarionetteException
from marionette_harness import MarionetteTestCase
import testsuite
class Test(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
se... | from marionette_driver import By
from marionette_driver.errors import MarionetteException
from marionette_harness import MarionetteTestCase
import testsuite
class Test(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
se... | <commit_before>from marionette_driver import By
from marionette_driver.errors import MarionetteException
from marionette_harness import MarionetteTestCase
import testsuite
class Test(MarionetteTestCase):
def setUp(self):
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts =... |
6dfd6a4ae687dc9c7567c74a6c3ef3bd0f9dc5a1 | ci_scripts/buildLinuxWheels.py | ci_scripts/buildLinuxWheels.py | from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(sys.argv[1]... | from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(sys.argv[1]... | Fix build wheels and upload 5. | Fix build wheels and upload 5.
| Python | bsd-3-clause | jr-garcia/AssimpCy,jr-garcia/AssimpCy | from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(sys.argv[1]... | from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(sys.argv[1]... | <commit_before>from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.absp... | from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(sys.argv[1]... | from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(sys.argv[1]... | <commit_before>from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.absp... |
6d291571dca59243c0a92f9955776e1acd2e87da | falmer/content/queries.py | falmer/content/queries.py | import graphene
from django.http import Http404
from graphql import GraphQLError
from wagtail.core.models import Page
from . import types
class Query(graphene.ObjectType):
page = graphene.Field(types.Page, path=graphene.String())
all_pages = graphene.List(types.Page, path=graphene.String())
def resolve_... | import graphene
from django.http import Http404
from graphql import GraphQLError
from wagtail.core.models import Page
from . import types
class Query(graphene.ObjectType):
page = graphene.Field(types.Page, path=graphene.String())
all_pages = graphene.List(types.Page, path=graphene.String())
def resolve_... | Return empty result rather than graphql error | Return empty result rather than graphql error
| Python | mit | sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer | import graphene
from django.http import Http404
from graphql import GraphQLError
from wagtail.core.models import Page
from . import types
class Query(graphene.ObjectType):
page = graphene.Field(types.Page, path=graphene.String())
all_pages = graphene.List(types.Page, path=graphene.String())
def resolve_... | import graphene
from django.http import Http404
from graphql import GraphQLError
from wagtail.core.models import Page
from . import types
class Query(graphene.ObjectType):
page = graphene.Field(types.Page, path=graphene.String())
all_pages = graphene.List(types.Page, path=graphene.String())
def resolve_... | <commit_before>import graphene
from django.http import Http404
from graphql import GraphQLError
from wagtail.core.models import Page
from . import types
class Query(graphene.ObjectType):
page = graphene.Field(types.Page, path=graphene.String())
all_pages = graphene.List(types.Page, path=graphene.String())
... | import graphene
from django.http import Http404
from graphql import GraphQLError
from wagtail.core.models import Page
from . import types
class Query(graphene.ObjectType):
page = graphene.Field(types.Page, path=graphene.String())
all_pages = graphene.List(types.Page, path=graphene.String())
def resolve_... | import graphene
from django.http import Http404
from graphql import GraphQLError
from wagtail.core.models import Page
from . import types
class Query(graphene.ObjectType):
page = graphene.Field(types.Page, path=graphene.String())
all_pages = graphene.List(types.Page, path=graphene.String())
def resolve_... | <commit_before>import graphene
from django.http import Http404
from graphql import GraphQLError
from wagtail.core.models import Page
from . import types
class Query(graphene.ObjectType):
page = graphene.Field(types.Page, path=graphene.String())
all_pages = graphene.List(types.Page, path=graphene.String())
... |
819ed0ededbdc8ebe150e5ce9f507c9607e2b724 | greins/__init__.py | greins/__init__.py | version_info = (0, 2, 0)
__version__ = ".".join(map(str, version_info))
| version_info = (0, 1, 0)
__version__ = ".".join(map(str, version_info))
| Revert "bump version" -- Not ready to release yet | Revert "bump version" -- Not ready to release yet
This reverts commit 60e383ce1e4432c360e615598813e3b1747befb8.
| Python | mit | meebo/greins,meebo/greins,harrisonfeng/greins,harrisonfeng/greins | version_info = (0, 2, 0)
__version__ = ".".join(map(str, version_info))
Revert "bump version" -- Not ready to release yet
This reverts commit 60e383ce1e4432c360e615598813e3b1747befb8. | version_info = (0, 1, 0)
__version__ = ".".join(map(str, version_info))
| <commit_before>version_info = (0, 2, 0)
__version__ = ".".join(map(str, version_info))
<commit_msg>Revert "bump version" -- Not ready to release yet
This reverts commit 60e383ce1e4432c360e615598813e3b1747befb8.<commit_after> | version_info = (0, 1, 0)
__version__ = ".".join(map(str, version_info))
| version_info = (0, 2, 0)
__version__ = ".".join(map(str, version_info))
Revert "bump version" -- Not ready to release yet
This reverts commit 60e383ce1e4432c360e615598813e3b1747befb8.version_info = (0, 1, 0)
__version__ = ".".join(map(str, version_info))
| <commit_before>version_info = (0, 2, 0)
__version__ = ".".join(map(str, version_info))
<commit_msg>Revert "bump version" -- Not ready to release yet
This reverts commit 60e383ce1e4432c360e615598813e3b1747befb8.<commit_after>version_info = (0, 1, 0)
__version__ = ".".join(map(str, version_info))
|
af2885d2bc9d2dfefd39e5d1dab53da137c793c2 | builders/horizons_telnet.py | builders/horizons_telnet.py | #!/usr/bin/env python2.7
#import argparse
from telnetlib import Telnet
def main(in_path, out_path):
with open(in_path) as f:
lines = f.read().split('\n')
tn = Telnet('horizons.jpl.nasa.gov', 6775)
out = open(out_path, 'w')
for line in lines:
print(repr(line))
tn.write(line + '\... | #!/usr/bin/env python2.7
#import argparse
from telnetlib import Telnet
def main(in_path, out_path):
with open(in_path) as f:
lines = f.read().split('\n')
tn = Telnet('horizons.jpl.nasa.gov', 6775)
out = open(out_path, 'w')
for line in lines:
print(repr(line))
tn.write(line + '\... | Fix filename error in HORIZONS telnet script | Fix filename error in HORIZONS telnet script
| Python | mit | GuidoBR/python-skyfield,exoanalytic/python-skyfield,ozialien/python-skyfield,exoanalytic/python-skyfield,skyfielders/python-skyfield,skyfielders/python-skyfield,ozialien/python-skyfield,GuidoBR/python-skyfield | #!/usr/bin/env python2.7
#import argparse
from telnetlib import Telnet
def main(in_path, out_path):
with open(in_path) as f:
lines = f.read().split('\n')
tn = Telnet('horizons.jpl.nasa.gov', 6775)
out = open(out_path, 'w')
for line in lines:
print(repr(line))
tn.write(line + '\... | #!/usr/bin/env python2.7
#import argparse
from telnetlib import Telnet
def main(in_path, out_path):
with open(in_path) as f:
lines = f.read().split('\n')
tn = Telnet('horizons.jpl.nasa.gov', 6775)
out = open(out_path, 'w')
for line in lines:
print(repr(line))
tn.write(line + '\... | <commit_before>#!/usr/bin/env python2.7
#import argparse
from telnetlib import Telnet
def main(in_path, out_path):
with open(in_path) as f:
lines = f.read().split('\n')
tn = Telnet('horizons.jpl.nasa.gov', 6775)
out = open(out_path, 'w')
for line in lines:
print(repr(line))
tn.... | #!/usr/bin/env python2.7
#import argparse
from telnetlib import Telnet
def main(in_path, out_path):
with open(in_path) as f:
lines = f.read().split('\n')
tn = Telnet('horizons.jpl.nasa.gov', 6775)
out = open(out_path, 'w')
for line in lines:
print(repr(line))
tn.write(line + '\... | #!/usr/bin/env python2.7
#import argparse
from telnetlib import Telnet
def main(in_path, out_path):
with open(in_path) as f:
lines = f.read().split('\n')
tn = Telnet('horizons.jpl.nasa.gov', 6775)
out = open(out_path, 'w')
for line in lines:
print(repr(line))
tn.write(line + '\... | <commit_before>#!/usr/bin/env python2.7
#import argparse
from telnetlib import Telnet
def main(in_path, out_path):
with open(in_path) as f:
lines = f.read().split('\n')
tn = Telnet('horizons.jpl.nasa.gov', 6775)
out = open(out_path, 'w')
for line in lines:
print(repr(line))
tn.... |
bf2502fc45854db8ce7666c9fa511d487eccfb2e | pavement.py | pavement.py | from paver.easy import task, needs, path, sh, cmdopts
from paver.setuputils import setup, install_distutils_tasks, find_package_data
from distutils.extension import Extension
from optparse import make_option
from Cython.Build import cythonize
import version
pyx_files = ['si_prefix/si_prefix.pyx']
ext_modules = [Ex... | from paver.easy import task, needs, path, sh, cmdopts
from paver.setuputils import setup, install_distutils_tasks, find_package_data
from distutils.extension import Extension
from optparse import make_option
from Cython.Build import cythonize
import version
pyx_files = ['si_prefix/si_prefix.pyx']
ext_modules = [Ex... | Rename package "si_prefix" to "si-prefix" | Rename package "si_prefix" to "si-prefix"
| Python | bsd-3-clause | cfobel/si-prefix | from paver.easy import task, needs, path, sh, cmdopts
from paver.setuputils import setup, install_distutils_tasks, find_package_data
from distutils.extension import Extension
from optparse import make_option
from Cython.Build import cythonize
import version
pyx_files = ['si_prefix/si_prefix.pyx']
ext_modules = [Ex... | from paver.easy import task, needs, path, sh, cmdopts
from paver.setuputils import setup, install_distutils_tasks, find_package_data
from distutils.extension import Extension
from optparse import make_option
from Cython.Build import cythonize
import version
pyx_files = ['si_prefix/si_prefix.pyx']
ext_modules = [Ex... | <commit_before>from paver.easy import task, needs, path, sh, cmdopts
from paver.setuputils import setup, install_distutils_tasks, find_package_data
from distutils.extension import Extension
from optparse import make_option
from Cython.Build import cythonize
import version
pyx_files = ['si_prefix/si_prefix.pyx']
ex... | from paver.easy import task, needs, path, sh, cmdopts
from paver.setuputils import setup, install_distutils_tasks, find_package_data
from distutils.extension import Extension
from optparse import make_option
from Cython.Build import cythonize
import version
pyx_files = ['si_prefix/si_prefix.pyx']
ext_modules = [Ex... | from paver.easy import task, needs, path, sh, cmdopts
from paver.setuputils import setup, install_distutils_tasks, find_package_data
from distutils.extension import Extension
from optparse import make_option
from Cython.Build import cythonize
import version
pyx_files = ['si_prefix/si_prefix.pyx']
ext_modules = [Ex... | <commit_before>from paver.easy import task, needs, path, sh, cmdopts
from paver.setuputils import setup, install_distutils_tasks, find_package_data
from distutils.extension import Extension
from optparse import make_option
from Cython.Build import cythonize
import version
pyx_files = ['si_prefix/si_prefix.pyx']
ex... |
d63905158f5148b07534e823d271326262369d42 | pavement.py | pavement.py | import os
import re
from paver.easy import *
from paver.setuputils import setup
def get_version():
"""
Grab the version from irclib.py.
"""
here = os.path.dirname(__file__)
irclib = os.path.join(here, 'irclib.py')
with open(irclib) as f:
content = f.read()
VERSION = eval(re.search(... | import os
import re
from paver.easy import *
from paver.setuputils import setup
def get_version():
"""
Grab the version from irclib.py.
"""
here = os.path.dirname(__file__)
irclib = os.path.join(here, 'irclib.py')
with open(irclib) as f:
content = f.read()
VERSION = eval(re.search(... | Use context manager to read README | Use context manager to read README
| Python | mit | jaraco/irc | import os
import re
from paver.easy import *
from paver.setuputils import setup
def get_version():
"""
Grab the version from irclib.py.
"""
here = os.path.dirname(__file__)
irclib = os.path.join(here, 'irclib.py')
with open(irclib) as f:
content = f.read()
VERSION = eval(re.search(... | import os
import re
from paver.easy import *
from paver.setuputils import setup
def get_version():
"""
Grab the version from irclib.py.
"""
here = os.path.dirname(__file__)
irclib = os.path.join(here, 'irclib.py')
with open(irclib) as f:
content = f.read()
VERSION = eval(re.search(... | <commit_before>import os
import re
from paver.easy import *
from paver.setuputils import setup
def get_version():
"""
Grab the version from irclib.py.
"""
here = os.path.dirname(__file__)
irclib = os.path.join(here, 'irclib.py')
with open(irclib) as f:
content = f.read()
VERSION = ... | import os
import re
from paver.easy import *
from paver.setuputils import setup
def get_version():
"""
Grab the version from irclib.py.
"""
here = os.path.dirname(__file__)
irclib = os.path.join(here, 'irclib.py')
with open(irclib) as f:
content = f.read()
VERSION = eval(re.search(... | import os
import re
from paver.easy import *
from paver.setuputils import setup
def get_version():
"""
Grab the version from irclib.py.
"""
here = os.path.dirname(__file__)
irclib = os.path.join(here, 'irclib.py')
with open(irclib) as f:
content = f.read()
VERSION = eval(re.search(... | <commit_before>import os
import re
from paver.easy import *
from paver.setuputils import setup
def get_version():
"""
Grab the version from irclib.py.
"""
here = os.path.dirname(__file__)
irclib = os.path.join(here, 'irclib.py')
with open(irclib) as f:
content = f.read()
VERSION = ... |
06d1039ccbf4653c2f285528b2ab058edca2ff1f | py/test/selenium/webdriver/common/proxy_tests.py | py/test/selenium/webdriver/common/proxy_tests.py | #!/usr/bin/python
# Copyright 2012 Software Freedom Conservancy.
#
# 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 appl... | #!/usr/bin/python
# Copyright 2012 Software Freedom Conservancy.
#
# 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 appl... | Fix test as well :) | DanielWagnerHall: Fix test as well :)
r17825
| Python | apache-2.0 | misttechnologies/selenium,markodolancic/selenium,uchida/selenium,yukaReal/selenium,mestihudson/selenium,alb-i986/selenium,jabbrwcky/selenium,krmahadevan/selenium,jabbrwcky/selenium,AutomatedTester/selenium,s2oBCN/selenium,asolntsev/selenium,twalpole/selenium,o-schneider/selenium,jsakamoto/selenium,compstak/selenium,tku... | #!/usr/bin/python
# Copyright 2012 Software Freedom Conservancy.
#
# 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 appl... | #!/usr/bin/python
# Copyright 2012 Software Freedom Conservancy.
#
# 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 appl... | <commit_before>#!/usr/bin/python
# Copyright 2012 Software Freedom Conservancy.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | #!/usr/bin/python
# Copyright 2012 Software Freedom Conservancy.
#
# 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 appl... | #!/usr/bin/python
# Copyright 2012 Software Freedom Conservancy.
#
# 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 appl... | <commit_before>#!/usr/bin/python
# Copyright 2012 Software Freedom Conservancy.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
6453baefa8c2f6ab9841efd3961da0a65aaa688f | test/test_packages.py | test/test_packages.py | import pytest
@pytest.mark.parametrize("name", [
("apt-file"),
("apt-transport-https"),
("atom"),
("blktrace"),
("ca-certificates"),
("chromium-browser"),
("cron"),
("curl"),
("diod"),
("docker-ce"),
("fonts-font-awesome"),
("git"),
("gnupg"),
("gnupg2"),
("gnupg-agent"),
("handbrake"),... | import pytest
@pytest.mark.parametrize("name", [
("apt-file"),
("apt-transport-https"),
("atom"),
("blktrace"),
("ca-certificates"),
("chromium-browser"),
("cron"),
("curl"),
("diod"),
("docker-ce"),
("fonts-font-awesome"),
("git"),
("gnupg"),
("gnupg2"),
("gnupg-agent"),
("handbrake"),... | Add a test for sysdig | Add a test for sysdig
| Python | mit | wicksy/laptop-build,wicksy/laptop-build,wicksy/laptop-build,wicksy/laptop-build | import pytest
@pytest.mark.parametrize("name", [
("apt-file"),
("apt-transport-https"),
("atom"),
("blktrace"),
("ca-certificates"),
("chromium-browser"),
("cron"),
("curl"),
("diod"),
("docker-ce"),
("fonts-font-awesome"),
("git"),
("gnupg"),
("gnupg2"),
("gnupg-agent"),
("handbrake"),... | import pytest
@pytest.mark.parametrize("name", [
("apt-file"),
("apt-transport-https"),
("atom"),
("blktrace"),
("ca-certificates"),
("chromium-browser"),
("cron"),
("curl"),
("diod"),
("docker-ce"),
("fonts-font-awesome"),
("git"),
("gnupg"),
("gnupg2"),
("gnupg-agent"),
("handbrake"),... | <commit_before>import pytest
@pytest.mark.parametrize("name", [
("apt-file"),
("apt-transport-https"),
("atom"),
("blktrace"),
("ca-certificates"),
("chromium-browser"),
("cron"),
("curl"),
("diod"),
("docker-ce"),
("fonts-font-awesome"),
("git"),
("gnupg"),
("gnupg2"),
("gnupg-agent"),
... | import pytest
@pytest.mark.parametrize("name", [
("apt-file"),
("apt-transport-https"),
("atom"),
("blktrace"),
("ca-certificates"),
("chromium-browser"),
("cron"),
("curl"),
("diod"),
("docker-ce"),
("fonts-font-awesome"),
("git"),
("gnupg"),
("gnupg2"),
("gnupg-agent"),
("handbrake"),... | import pytest
@pytest.mark.parametrize("name", [
("apt-file"),
("apt-transport-https"),
("atom"),
("blktrace"),
("ca-certificates"),
("chromium-browser"),
("cron"),
("curl"),
("diod"),
("docker-ce"),
("fonts-font-awesome"),
("git"),
("gnupg"),
("gnupg2"),
("gnupg-agent"),
("handbrake"),... | <commit_before>import pytest
@pytest.mark.parametrize("name", [
("apt-file"),
("apt-transport-https"),
("atom"),
("blktrace"),
("ca-certificates"),
("chromium-browser"),
("cron"),
("curl"),
("diod"),
("docker-ce"),
("fonts-font-awesome"),
("git"),
("gnupg"),
("gnupg2"),
("gnupg-agent"),
... |
ff50b3e43de0c083cd8c3daaa7644394daadc1a0 | test_passwd_change.py | test_passwd_change.py | #!/usr/bin/env python3
from passwd_change import passwd_change, shadow_change, mails_delete
from unittest import TestCase, TestLoader, TextTestRunner
import subprocess
class PasswdChange_Test(TestCase):
def setUp(self):
"""
Preconditions
"""
subprocess.call(['mkdir', 'test'])
... | #!/usr/bin/env python3
from passwd_change import passwd_change, shadow_change, mails_delete
from unittest import TestCase, TestLoader, TextTestRunner
import os
import subprocess
class PasswdChange_Test(TestCase):
def setUp(self):
"""
Preconditions
"""
subprocess.call(['mkdir', 't... | Add tearDown() - remove test dir, test files existing and not existing. | Add tearDown() - remove test dir, test files existing and not existing.
| Python | mit | maxsocl/oldmailer | #!/usr/bin/env python3
from passwd_change import passwd_change, shadow_change, mails_delete
from unittest import TestCase, TestLoader, TextTestRunner
import subprocess
class PasswdChange_Test(TestCase):
def setUp(self):
"""
Preconditions
"""
subprocess.call(['mkdir', 'test'])
... | #!/usr/bin/env python3
from passwd_change import passwd_change, shadow_change, mails_delete
from unittest import TestCase, TestLoader, TextTestRunner
import os
import subprocess
class PasswdChange_Test(TestCase):
def setUp(self):
"""
Preconditions
"""
subprocess.call(['mkdir', 't... | <commit_before>#!/usr/bin/env python3
from passwd_change import passwd_change, shadow_change, mails_delete
from unittest import TestCase, TestLoader, TextTestRunner
import subprocess
class PasswdChange_Test(TestCase):
def setUp(self):
"""
Preconditions
"""
subprocess.call(['mkdir... | #!/usr/bin/env python3
from passwd_change import passwd_change, shadow_change, mails_delete
from unittest import TestCase, TestLoader, TextTestRunner
import os
import subprocess
class PasswdChange_Test(TestCase):
def setUp(self):
"""
Preconditions
"""
subprocess.call(['mkdir', 't... | #!/usr/bin/env python3
from passwd_change import passwd_change, shadow_change, mails_delete
from unittest import TestCase, TestLoader, TextTestRunner
import subprocess
class PasswdChange_Test(TestCase):
def setUp(self):
"""
Preconditions
"""
subprocess.call(['mkdir', 'test'])
... | <commit_before>#!/usr/bin/env python3
from passwd_change import passwd_change, shadow_change, mails_delete
from unittest import TestCase, TestLoader, TextTestRunner
import subprocess
class PasswdChange_Test(TestCase):
def setUp(self):
"""
Preconditions
"""
subprocess.call(['mkdir... |
8db4213d20486a60abda1ba486438f54c3b830c0 | ci_scripts/installPandoc.py | ci_scripts/installPandoc.py | import os
from subprocess import call, check_output
import sys
from shutil import copy2
def checkAndInstall():
try:
check_output('pandoc -v'.split())
except OSError:
cudir = os.path.abspath(os.curdir)
os.chdir('downloads')
from requests import get
pandocFile = 'pandoc... | import os
from subprocess import call, check_output
import sys
from shutil import copy2
platform = sys.platform
def checkAndInstall():
try:
check_output('pandoc -v'.split())
except OSError:
cudir = os.path.abspath(os.curdir)
os.chdir(os.path.abspath(os.path.join(os.path.pardir, 'downl... | Fix build wheels with Pandoc. | Fix build wheels with Pandoc.
| Python | bsd-3-clause | jr-garcia/AssimpCy,jr-garcia/AssimpCy | import os
from subprocess import call, check_output
import sys
from shutil import copy2
def checkAndInstall():
try:
check_output('pandoc -v'.split())
except OSError:
cudir = os.path.abspath(os.curdir)
os.chdir('downloads')
from requests import get
pandocFile = 'pandoc... | import os
from subprocess import call, check_output
import sys
from shutil import copy2
platform = sys.platform
def checkAndInstall():
try:
check_output('pandoc -v'.split())
except OSError:
cudir = os.path.abspath(os.curdir)
os.chdir(os.path.abspath(os.path.join(os.path.pardir, 'downl... | <commit_before>import os
from subprocess import call, check_output
import sys
from shutil import copy2
def checkAndInstall():
try:
check_output('pandoc -v'.split())
except OSError:
cudir = os.path.abspath(os.curdir)
os.chdir('downloads')
from requests import get
pando... | import os
from subprocess import call, check_output
import sys
from shutil import copy2
platform = sys.platform
def checkAndInstall():
try:
check_output('pandoc -v'.split())
except OSError:
cudir = os.path.abspath(os.curdir)
os.chdir(os.path.abspath(os.path.join(os.path.pardir, 'downl... | import os
from subprocess import call, check_output
import sys
from shutil import copy2
def checkAndInstall():
try:
check_output('pandoc -v'.split())
except OSError:
cudir = os.path.abspath(os.curdir)
os.chdir('downloads')
from requests import get
pandocFile = 'pandoc... | <commit_before>import os
from subprocess import call, check_output
import sys
from shutil import copy2
def checkAndInstall():
try:
check_output('pandoc -v'.split())
except OSError:
cudir = os.path.abspath(os.curdir)
os.chdir('downloads')
from requests import get
pando... |
d407f1bcd95daf4f4bd8dfe8ae3b4b9e68061cb5 | cref/sequence/fragment.py | cref/sequence/fragment.py |
def fragment(sequence, size=5):
"""
Fragment a string sequence using a sliding window given by size
:param sequence: String containing the sequence
:param size: Size of the window
:return: a fragment of the sequence with the given size
"""
for i in range(len(sequence) - size + 1):
... |
def fragment(sequence, size=5):
"""
Fragment a string sequence using a sliding window given by size
:param sequence: String containing the sequence
:param size: Size of the window
:return: a fragment of the sequence with the given size
"""
if size > 0:
for i in range(len(sequence)... | Handle sliding window with size 0 | Handle sliding window with size 0
| Python | mit | mchelem/cref2,mchelem/cref2,mchelem/cref2 |
def fragment(sequence, size=5):
"""
Fragment a string sequence using a sliding window given by size
:param sequence: String containing the sequence
:param size: Size of the window
:return: a fragment of the sequence with the given size
"""
for i in range(len(sequence) - size + 1):
... |
def fragment(sequence, size=5):
"""
Fragment a string sequence using a sliding window given by size
:param sequence: String containing the sequence
:param size: Size of the window
:return: a fragment of the sequence with the given size
"""
if size > 0:
for i in range(len(sequence)... | <commit_before>
def fragment(sequence, size=5):
"""
Fragment a string sequence using a sliding window given by size
:param sequence: String containing the sequence
:param size: Size of the window
:return: a fragment of the sequence with the given size
"""
for i in range(len(sequence) - siz... |
def fragment(sequence, size=5):
"""
Fragment a string sequence using a sliding window given by size
:param sequence: String containing the sequence
:param size: Size of the window
:return: a fragment of the sequence with the given size
"""
if size > 0:
for i in range(len(sequence)... |
def fragment(sequence, size=5):
"""
Fragment a string sequence using a sliding window given by size
:param sequence: String containing the sequence
:param size: Size of the window
:return: a fragment of the sequence with the given size
"""
for i in range(len(sequence) - size + 1):
... | <commit_before>
def fragment(sequence, size=5):
"""
Fragment a string sequence using a sliding window given by size
:param sequence: String containing the sequence
:param size: Size of the window
:return: a fragment of the sequence with the given size
"""
for i in range(len(sequence) - siz... |
471681cc25f44f31792813a968074b6813efb38c | yle/serializers.py | yle/serializers.py | from rest_framework.fields import SerializerMethodField
from rest_framework.serializers import ModelSerializer, CharField, UUIDField
from alexa.settings import RADIO_LINK_BASE
from yle.models import News
class NewsSerializer(ModelSerializer):
uid = UUIDField(source='uuid')
updateDate = CharField(source='mod... | from rest_framework.fields import SerializerMethodField
from rest_framework.serializers import ModelSerializer, CharField, UUIDField
from alexa.settings import RADIO_LINK_BASE
from yle.models import News
class NewsSerializer(ModelSerializer):
uid = UUIDField(source='uuid')
updateDate = CharField(source='cre... | Update date from creation time | Update date from creation time
| Python | mit | anttipalola/alexa | from rest_framework.fields import SerializerMethodField
from rest_framework.serializers import ModelSerializer, CharField, UUIDField
from alexa.settings import RADIO_LINK_BASE
from yle.models import News
class NewsSerializer(ModelSerializer):
uid = UUIDField(source='uuid')
updateDate = CharField(source='mod... | from rest_framework.fields import SerializerMethodField
from rest_framework.serializers import ModelSerializer, CharField, UUIDField
from alexa.settings import RADIO_LINK_BASE
from yle.models import News
class NewsSerializer(ModelSerializer):
uid = UUIDField(source='uuid')
updateDate = CharField(source='cre... | <commit_before>from rest_framework.fields import SerializerMethodField
from rest_framework.serializers import ModelSerializer, CharField, UUIDField
from alexa.settings import RADIO_LINK_BASE
from yle.models import News
class NewsSerializer(ModelSerializer):
uid = UUIDField(source='uuid')
updateDate = CharFi... | from rest_framework.fields import SerializerMethodField
from rest_framework.serializers import ModelSerializer, CharField, UUIDField
from alexa.settings import RADIO_LINK_BASE
from yle.models import News
class NewsSerializer(ModelSerializer):
uid = UUIDField(source='uuid')
updateDate = CharField(source='cre... | from rest_framework.fields import SerializerMethodField
from rest_framework.serializers import ModelSerializer, CharField, UUIDField
from alexa.settings import RADIO_LINK_BASE
from yle.models import News
class NewsSerializer(ModelSerializer):
uid = UUIDField(source='uuid')
updateDate = CharField(source='mod... | <commit_before>from rest_framework.fields import SerializerMethodField
from rest_framework.serializers import ModelSerializer, CharField, UUIDField
from alexa.settings import RADIO_LINK_BASE
from yle.models import News
class NewsSerializer(ModelSerializer):
uid = UUIDField(source='uuid')
updateDate = CharFi... |
dc186adbb1b49c821911af724725df4512fbf9f5 | socialregistration/templatetags/facebook_tags.py | socialregistration/templatetags/facebook_tags.py | from django import template
from django.conf import settings
from socialregistration.utils import _https
register = template.Library()
@register.inclusion_tag('socialregistration/facebook_js.html')
def facebook_js():
return {'facebook_api_key' : settings.FACEBOOK_API_KEY, 'is_https' : bool(_https())}
@register.i... | from django import template
from django.conf import settings
from socialregistration.utils import _https
register = template.Library()
@register.inclusion_tag('socialregistration/facebook_js.html')
def facebook_js():
return {'facebook_api_key' : settings.FACEBOOK_API_KEY, 'is_https' : bool(_https())}
@register.i... | Use syntax compatible with Python 2.4 | Use syntax compatible with Python 2.4
| Python | mit | bopo/django-socialregistration,bopo/django-socialregistration,bopo/django-socialregistration,kapt/django-socialregistration,lgapontes/django-socialregistration,mark-adams/django-socialregistration,0101/django-socialregistration,praekelt/django-socialregistration,flashingpumpkin/django-socialregistration,itmustbejj/djan... | from django import template
from django.conf import settings
from socialregistration.utils import _https
register = template.Library()
@register.inclusion_tag('socialregistration/facebook_js.html')
def facebook_js():
return {'facebook_api_key' : settings.FACEBOOK_API_KEY, 'is_https' : bool(_https())}
@register.i... | from django import template
from django.conf import settings
from socialregistration.utils import _https
register = template.Library()
@register.inclusion_tag('socialregistration/facebook_js.html')
def facebook_js():
return {'facebook_api_key' : settings.FACEBOOK_API_KEY, 'is_https' : bool(_https())}
@register.i... | <commit_before>from django import template
from django.conf import settings
from socialregistration.utils import _https
register = template.Library()
@register.inclusion_tag('socialregistration/facebook_js.html')
def facebook_js():
return {'facebook_api_key' : settings.FACEBOOK_API_KEY, 'is_https' : bool(_https()... | from django import template
from django.conf import settings
from socialregistration.utils import _https
register = template.Library()
@register.inclusion_tag('socialregistration/facebook_js.html')
def facebook_js():
return {'facebook_api_key' : settings.FACEBOOK_API_KEY, 'is_https' : bool(_https())}
@register.i... | from django import template
from django.conf import settings
from socialregistration.utils import _https
register = template.Library()
@register.inclusion_tag('socialregistration/facebook_js.html')
def facebook_js():
return {'facebook_api_key' : settings.FACEBOOK_API_KEY, 'is_https' : bool(_https())}
@register.i... | <commit_before>from django import template
from django.conf import settings
from socialregistration.utils import _https
register = template.Library()
@register.inclusion_tag('socialregistration/facebook_js.html')
def facebook_js():
return {'facebook_api_key' : settings.FACEBOOK_API_KEY, 'is_https' : bool(_https()... |
2f16eb25db856b72138f6dfb7d19e799bd460287 | tests/test_helpers.py | tests/test_helpers.py | # -*- coding: utf-8 -*-
import pytest
from os.path import basename
from helpers import utils, fixture
@pytest.mark.skipif(pytest.config.getoption("--application") is not False, reason="application passed; skipping base module tests")
class TestHelpers():
def test_wildcards1():
d = utils.get_wildcards([('"... | # -*- coding: utf-8 -*-
import pytest
from os.path import basename
from helpers import utils, fixture
pytestmark = pytest.mark.skipif(pytest.config.getoption("--application") is not False, reason="application passed; skipping base module tests")
def test_wildcards1():
d = utils.get_wildcards([('"{prefix}.bam"', ... | Use global pytestmark to skip tests; deprecate class | Use global pytestmark to skip tests; deprecate class
| Python | mit | percyfal/snakemake-rules,percyfal/snakemake-rules,percyfal/snakemakelib-rules,percyfal/snakemakelib-rules,percyfal/snakemakelib-rules | # -*- coding: utf-8 -*-
import pytest
from os.path import basename
from helpers import utils, fixture
@pytest.mark.skipif(pytest.config.getoption("--application") is not False, reason="application passed; skipping base module tests")
class TestHelpers():
def test_wildcards1():
d = utils.get_wildcards([('"... | # -*- coding: utf-8 -*-
import pytest
from os.path import basename
from helpers import utils, fixture
pytestmark = pytest.mark.skipif(pytest.config.getoption("--application") is not False, reason="application passed; skipping base module tests")
def test_wildcards1():
d = utils.get_wildcards([('"{prefix}.bam"', ... | <commit_before># -*- coding: utf-8 -*-
import pytest
from os.path import basename
from helpers import utils, fixture
@pytest.mark.skipif(pytest.config.getoption("--application") is not False, reason="application passed; skipping base module tests")
class TestHelpers():
def test_wildcards1():
d = utils.get... | # -*- coding: utf-8 -*-
import pytest
from os.path import basename
from helpers import utils, fixture
pytestmark = pytest.mark.skipif(pytest.config.getoption("--application") is not False, reason="application passed; skipping base module tests")
def test_wildcards1():
d = utils.get_wildcards([('"{prefix}.bam"', ... | # -*- coding: utf-8 -*-
import pytest
from os.path import basename
from helpers import utils, fixture
@pytest.mark.skipif(pytest.config.getoption("--application") is not False, reason="application passed; skipping base module tests")
class TestHelpers():
def test_wildcards1():
d = utils.get_wildcards([('"... | <commit_before># -*- coding: utf-8 -*-
import pytest
from os.path import basename
from helpers import utils, fixture
@pytest.mark.skipif(pytest.config.getoption("--application") is not False, reason="application passed; skipping base module tests")
class TestHelpers():
def test_wildcards1():
d = utils.get... |
723d7410b48fd4fc42ed9afe470ba3b37381599a | noxfile.py | noxfile.py | """Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extras),
si... | """Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extras),
si... | Add docs-live to perform demo-runs | Add docs-live to perform demo-runs
| Python | mit | GaretJax/sphinx-autobuild | """Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extras),
si... | """Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extras),
si... | <commit_before>"""Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extr... | """Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extras),
si... | """Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extras),
si... | <commit_before>"""Development automation."""
import nox
def _install_this_editable(session, *, extras=None):
if extras is None:
extras = []
session.install("flit")
session.run(
"flit",
"install",
"-s",
"--deps=production",
"--extras",
",".join(extr... |
41209aa3e27673f003ed62a46c9bfae0c19d0bf3 | il2fb/ds/airbridge/typing.py | il2fb/ds/airbridge/typing.py | # coding: utf-8
from pathlib import Path
from typing import Callable, Optional, List, Union
from il2fb.parsers.events.events import Event
EventOrNone = Optional[Event]
EventHandler = Callable[[Event], None]
IntOrNone = Optional[int]
StringProducer = Callable[[], str]
StringHandler = Callable[[str], None]
StringO... | # coding: utf-8
from pathlib import Path
from typing import Callable, Optional, List, Union
from il2fb.commons.events import Event
EventOrNone = Optional[Event]
EventHandler = Callable[[Event], None]
IntOrNone = Optional[int]
StringProducer = Callable[[], str]
StringHandler = Callable[[str], None]
StringOrNone =... | Update import of Event class | Update import of Event class
| Python | mit | IL2HorusTeam/il2fb-ds-airbridge | # coding: utf-8
from pathlib import Path
from typing import Callable, Optional, List, Union
from il2fb.parsers.events.events import Event
EventOrNone = Optional[Event]
EventHandler = Callable[[Event], None]
IntOrNone = Optional[int]
StringProducer = Callable[[], str]
StringHandler = Callable[[str], None]
StringO... | # coding: utf-8
from pathlib import Path
from typing import Callable, Optional, List, Union
from il2fb.commons.events import Event
EventOrNone = Optional[Event]
EventHandler = Callable[[Event], None]
IntOrNone = Optional[int]
StringProducer = Callable[[], str]
StringHandler = Callable[[str], None]
StringOrNone =... | <commit_before># coding: utf-8
from pathlib import Path
from typing import Callable, Optional, List, Union
from il2fb.parsers.events.events import Event
EventOrNone = Optional[Event]
EventHandler = Callable[[Event], None]
IntOrNone = Optional[int]
StringProducer = Callable[[], str]
StringHandler = Callable[[str],... | # coding: utf-8
from pathlib import Path
from typing import Callable, Optional, List, Union
from il2fb.commons.events import Event
EventOrNone = Optional[Event]
EventHandler = Callable[[Event], None]
IntOrNone = Optional[int]
StringProducer = Callable[[], str]
StringHandler = Callable[[str], None]
StringOrNone =... | # coding: utf-8
from pathlib import Path
from typing import Callable, Optional, List, Union
from il2fb.parsers.events.events import Event
EventOrNone = Optional[Event]
EventHandler = Callable[[Event], None]
IntOrNone = Optional[int]
StringProducer = Callable[[], str]
StringHandler = Callable[[str], None]
StringO... | <commit_before># coding: utf-8
from pathlib import Path
from typing import Callable, Optional, List, Union
from il2fb.parsers.events.events import Event
EventOrNone = Optional[Event]
EventHandler = Callable[[Event], None]
IntOrNone = Optional[int]
StringProducer = Callable[[], str]
StringHandler = Callable[[str],... |
462d94ddd57d2385889d2c6ef09563e38ffcccc9 | decisiontree/multitenancy/utils.py | decisiontree/multitenancy/utils.py | from django.conf import settings
from django.core.urlresolvers import reverse
from django.db.models import Q
def multitenancy_enabled():
return "decisiontree.multitenancy" in settings.INSTALLED_APPS
def get_tenants_for_user(user):
"""Return all tenants that the user can manage."""
from multitenancy.mode... | from django.conf import settings
from django.core.urlresolvers import reverse
from django.db.models import Q
def multitenancy_enabled():
return "decisiontree.multitenancy" in settings.INSTALLED_APPS
def get_tenants_for_user(user):
"""Return all tenants that the user can manage."""
from multitenancy.mode... | Fix error if passing a list of args to tenancy_reverse | Fix error if passing a list of args to tenancy_reverse
| Python | bsd-3-clause | caktus/rapidsms-decisiontree-app,caktus/rapidsms-decisiontree-app,caktus/rapidsms-decisiontree-app | from django.conf import settings
from django.core.urlresolvers import reverse
from django.db.models import Q
def multitenancy_enabled():
return "decisiontree.multitenancy" in settings.INSTALLED_APPS
def get_tenants_for_user(user):
"""Return all tenants that the user can manage."""
from multitenancy.mode... | from django.conf import settings
from django.core.urlresolvers import reverse
from django.db.models import Q
def multitenancy_enabled():
return "decisiontree.multitenancy" in settings.INSTALLED_APPS
def get_tenants_for_user(user):
"""Return all tenants that the user can manage."""
from multitenancy.mode... | <commit_before>from django.conf import settings
from django.core.urlresolvers import reverse
from django.db.models import Q
def multitenancy_enabled():
return "decisiontree.multitenancy" in settings.INSTALLED_APPS
def get_tenants_for_user(user):
"""Return all tenants that the user can manage."""
from mu... | from django.conf import settings
from django.core.urlresolvers import reverse
from django.db.models import Q
def multitenancy_enabled():
return "decisiontree.multitenancy" in settings.INSTALLED_APPS
def get_tenants_for_user(user):
"""Return all tenants that the user can manage."""
from multitenancy.mode... | from django.conf import settings
from django.core.urlresolvers import reverse
from django.db.models import Q
def multitenancy_enabled():
return "decisiontree.multitenancy" in settings.INSTALLED_APPS
def get_tenants_for_user(user):
"""Return all tenants that the user can manage."""
from multitenancy.mode... | <commit_before>from django.conf import settings
from django.core.urlresolvers import reverse
from django.db.models import Q
def multitenancy_enabled():
return "decisiontree.multitenancy" in settings.INSTALLED_APPS
def get_tenants_for_user(user):
"""Return all tenants that the user can manage."""
from mu... |
7ee86e9b52292a8824dfa7bab632526cbb365b51 | routes.py | routes.py | # -*- coding:utf-8 -*-
from flask import request, redirect
import requests
cookiename = 'openAMUserCookieName'
amURL = 'https://openam.example.com/'
validTokenAPI = amURL + 'openam/identity/istokenvalid?tokenid='
loginURL = amURL + 'openam/UI/Login'
def session_required(f):
@wraps(f)
def decorated_function(*args... | # -*- coding:utf-8 -*-
from flask import request, redirect
import requests
cookiename = 'openAMUserCookieName'
amURL = 'https://openam.example.com/'
validTokenAPI = amURL + 'openam/json/sessions/{token}?_action=validate'
loginURL = amURL + 'openam/UI/Login'
def session_required(f):
@wraps(f)
def decorated_functi... | Use new OpenAM token validation endpoint | Use new OpenAM token validation endpoint
| Python | unlicense | timhberry/openam-flask-decorator | # -*- coding:utf-8 -*-
from flask import request, redirect
import requests
cookiename = 'openAMUserCookieName'
amURL = 'https://openam.example.com/'
validTokenAPI = amURL + 'openam/identity/istokenvalid?tokenid='
loginURL = amURL + 'openam/UI/Login'
def session_required(f):
@wraps(f)
def decorated_function(*args... | # -*- coding:utf-8 -*-
from flask import request, redirect
import requests
cookiename = 'openAMUserCookieName'
amURL = 'https://openam.example.com/'
validTokenAPI = amURL + 'openam/json/sessions/{token}?_action=validate'
loginURL = amURL + 'openam/UI/Login'
def session_required(f):
@wraps(f)
def decorated_functi... | <commit_before># -*- coding:utf-8 -*-
from flask import request, redirect
import requests
cookiename = 'openAMUserCookieName'
amURL = 'https://openam.example.com/'
validTokenAPI = amURL + 'openam/identity/istokenvalid?tokenid='
loginURL = amURL + 'openam/UI/Login'
def session_required(f):
@wraps(f)
def decorated... | # -*- coding:utf-8 -*-
from flask import request, redirect
import requests
cookiename = 'openAMUserCookieName'
amURL = 'https://openam.example.com/'
validTokenAPI = amURL + 'openam/json/sessions/{token}?_action=validate'
loginURL = amURL + 'openam/UI/Login'
def session_required(f):
@wraps(f)
def decorated_functi... | # -*- coding:utf-8 -*-
from flask import request, redirect
import requests
cookiename = 'openAMUserCookieName'
amURL = 'https://openam.example.com/'
validTokenAPI = amURL + 'openam/identity/istokenvalid?tokenid='
loginURL = amURL + 'openam/UI/Login'
def session_required(f):
@wraps(f)
def decorated_function(*args... | <commit_before># -*- coding:utf-8 -*-
from flask import request, redirect
import requests
cookiename = 'openAMUserCookieName'
amURL = 'https://openam.example.com/'
validTokenAPI = amURL + 'openam/identity/istokenvalid?tokenid='
loginURL = amURL + 'openam/UI/Login'
def session_required(f):
@wraps(f)
def decorated... |
d52f59911929eda6b8c0c42837ae9c19b9e133e4 | twokenize_py/align.py | twokenize_py/align.py | """Aligner for texts and their segmentations.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['AlignmentFailed', 'Aligner']
class AlignmentFailed(Exception): pass
class Aligner(object):
"""Align a text with its tokenization.
... | """Aligner for texts and their segmentations.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['AlignmentFailed', 'Aligner']
class AlignmentFailed(Exception): pass
class Aligner(object):
"""Align a text with its tokenization.
... | Fix typo in variable name. | BUG: Fix typo in variable name.
| Python | apache-2.0 | nryant/twokenize_py | """Aligner for texts and their segmentations.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['AlignmentFailed', 'Aligner']
class AlignmentFailed(Exception): pass
class Aligner(object):
"""Align a text with its tokenization.
... | """Aligner for texts and their segmentations.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['AlignmentFailed', 'Aligner']
class AlignmentFailed(Exception): pass
class Aligner(object):
"""Align a text with its tokenization.
... | <commit_before>"""Aligner for texts and their segmentations.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['AlignmentFailed', 'Aligner']
class AlignmentFailed(Exception): pass
class Aligner(object):
"""Align a text with its t... | """Aligner for texts and their segmentations.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['AlignmentFailed', 'Aligner']
class AlignmentFailed(Exception): pass
class Aligner(object):
"""Align a text with its tokenization.
... | """Aligner for texts and their segmentations.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['AlignmentFailed', 'Aligner']
class AlignmentFailed(Exception): pass
class Aligner(object):
"""Align a text with its tokenization.
... | <commit_before>"""Aligner for texts and their segmentations.
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['AlignmentFailed', 'Aligner']
class AlignmentFailed(Exception): pass
class Aligner(object):
"""Align a text with its t... |
463abcce738ca1c47729cc0e465da9dc399e21dd | examples/remote_download.py | examples/remote_download.py | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
from xunleipy.remote import XunLeiRemote
def remote_download(username, password, rk_username, rk_password, download_links, proxy=None, path='C:/TD/', peer=0):
remote_client = XunLeiRemote(username, password, rk_username, rk_password, proxy=proxy)
remote_client.l... | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
import sys
import os
from xunleipy.remote import XunLeiRemote
sys.path.append('/Users/gunner/workspace/xunleipy')
def remote_download(username,
password,
rk_username,
rk_password,
download_l... | Change example style for python3 | Change example style for python3
| Python | mit | lazygunner/xunleipy | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
from xunleipy.remote import XunLeiRemote
def remote_download(username, password, rk_username, rk_password, download_links, proxy=None, path='C:/TD/', peer=0):
remote_client = XunLeiRemote(username, password, rk_username, rk_password, proxy=proxy)
remote_client.l... | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
import sys
import os
from xunleipy.remote import XunLeiRemote
sys.path.append('/Users/gunner/workspace/xunleipy')
def remote_download(username,
password,
rk_username,
rk_password,
download_l... | <commit_before>#!/usr/bin/env python
# -*- encoding:utf-8 -*-
from xunleipy.remote import XunLeiRemote
def remote_download(username, password, rk_username, rk_password, download_links, proxy=None, path='C:/TD/', peer=0):
remote_client = XunLeiRemote(username, password, rk_username, rk_password, proxy=proxy)
... | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
import sys
import os
from xunleipy.remote import XunLeiRemote
sys.path.append('/Users/gunner/workspace/xunleipy')
def remote_download(username,
password,
rk_username,
rk_password,
download_l... | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
from xunleipy.remote import XunLeiRemote
def remote_download(username, password, rk_username, rk_password, download_links, proxy=None, path='C:/TD/', peer=0):
remote_client = XunLeiRemote(username, password, rk_username, rk_password, proxy=proxy)
remote_client.l... | <commit_before>#!/usr/bin/env python
# -*- encoding:utf-8 -*-
from xunleipy.remote import XunLeiRemote
def remote_download(username, password, rk_username, rk_password, download_links, proxy=None, path='C:/TD/', peer=0):
remote_client = XunLeiRemote(username, password, rk_username, rk_password, proxy=proxy)
... |
ab47c678b37527a7b8a970b365503b65ffccda87 | populous/cli.py | populous/cli.py | import click
from .loader import load_yaml
from .blueprint import Blueprint
from .exceptions import ValidationError, YAMLError
def get_blueprint(*files):
try:
return Blueprint.from_description(load_yaml(*files))
except (YAMLError, ValidationError) as e:
raise click.ClickException(e.message)
... | import click
from .loader import load_yaml
from .blueprint import Blueprint
from .exceptions import ValidationError, YAMLError
def get_blueprint(*files):
try:
return Blueprint.from_description(load_yaml(*files))
except (YAMLError, ValidationError) as e:
raise click.ClickException(e.message)
... | Handle unexpected errors properly in load_blueprint | Handle unexpected errors properly in load_blueprint
| Python | mit | novafloss/populous | import click
from .loader import load_yaml
from .blueprint import Blueprint
from .exceptions import ValidationError, YAMLError
def get_blueprint(*files):
try:
return Blueprint.from_description(load_yaml(*files))
except (YAMLError, ValidationError) as e:
raise click.ClickException(e.message)
... | import click
from .loader import load_yaml
from .blueprint import Blueprint
from .exceptions import ValidationError, YAMLError
def get_blueprint(*files):
try:
return Blueprint.from_description(load_yaml(*files))
except (YAMLError, ValidationError) as e:
raise click.ClickException(e.message)
... | <commit_before>import click
from .loader import load_yaml
from .blueprint import Blueprint
from .exceptions import ValidationError, YAMLError
def get_blueprint(*files):
try:
return Blueprint.from_description(load_yaml(*files))
except (YAMLError, ValidationError) as e:
raise click.ClickExcepti... | import click
from .loader import load_yaml
from .blueprint import Blueprint
from .exceptions import ValidationError, YAMLError
def get_blueprint(*files):
try:
return Blueprint.from_description(load_yaml(*files))
except (YAMLError, ValidationError) as e:
raise click.ClickException(e.message)
... | import click
from .loader import load_yaml
from .blueprint import Blueprint
from .exceptions import ValidationError, YAMLError
def get_blueprint(*files):
try:
return Blueprint.from_description(load_yaml(*files))
except (YAMLError, ValidationError) as e:
raise click.ClickException(e.message)
... | <commit_before>import click
from .loader import load_yaml
from .blueprint import Blueprint
from .exceptions import ValidationError, YAMLError
def get_blueprint(*files):
try:
return Blueprint.from_description(load_yaml(*files))
except (YAMLError, ValidationError) as e:
raise click.ClickExcepti... |
3b0e80a159c4544a69adf35f4871b9167335795c | examples/user_agent_test.py | examples/user_agent_test.py | import time
from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_user_agent(self):
self.open('http://www.whatsmyua.info/')
user_agent = self.get_text("#custom-ua-string")
print("\n\nUser-Agent = %s\n" % user_agent)
print("Displaying User-Agent Info:")
pr... | import time
from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_user_agent(self):
self.open('https://www.whatsmyua.info/')
user_agent = self.get_text("#custom-ua-string")
print("\n\nUser-Agent = %s\n" % user_agent)
print("Displaying User-Agent Info:")
p... | Update the user agent test | Update the user agent test
| Python | mit | mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase | import time
from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_user_agent(self):
self.open('http://www.whatsmyua.info/')
user_agent = self.get_text("#custom-ua-string")
print("\n\nUser-Agent = %s\n" % user_agent)
print("Displaying User-Agent Info:")
pr... | import time
from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_user_agent(self):
self.open('https://www.whatsmyua.info/')
user_agent = self.get_text("#custom-ua-string")
print("\n\nUser-Agent = %s\n" % user_agent)
print("Displaying User-Agent Info:")
p... | <commit_before>import time
from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_user_agent(self):
self.open('http://www.whatsmyua.info/')
user_agent = self.get_text("#custom-ua-string")
print("\n\nUser-Agent = %s\n" % user_agent)
print("Displaying User-Agent Inf... | import time
from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_user_agent(self):
self.open('https://www.whatsmyua.info/')
user_agent = self.get_text("#custom-ua-string")
print("\n\nUser-Agent = %s\n" % user_agent)
print("Displaying User-Agent Info:")
p... | import time
from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_user_agent(self):
self.open('http://www.whatsmyua.info/')
user_agent = self.get_text("#custom-ua-string")
print("\n\nUser-Agent = %s\n" % user_agent)
print("Displaying User-Agent Info:")
pr... | <commit_before>import time
from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_user_agent(self):
self.open('http://www.whatsmyua.info/')
user_agent = self.get_text("#custom-ua-string")
print("\n\nUser-Agent = %s\n" % user_agent)
print("Displaying User-Agent Inf... |
0485e6dcaf19061812d0e571890e58b85b5dea12 | lava_results_app/utils.py | lava_results_app/utils.py | import os
import yaml
import logging
from django.utils.translation import ungettext_lazy
from django.conf import settings
def help_max_length(max_length):
return ungettext_lazy(
u"Maximum length: {0} character",
u"Maximum length: {0} characters",
max_length).format(max_length)
class Stre... | import os
import yaml
import logging
from django.utils.translation import ungettext_lazy
from django.conf import settings
def help_max_length(max_length):
return ungettext_lazy(
u"Maximum length: {0} character",
u"Maximum length: {0} characters",
max_length).format(max_length)
class Stre... | Return an empty dict if no data | Return an empty dict if no data
Avoids a HTTP500 on slow instances where the file
may be created before data is written, causing the
YAML parser to return None.
Change-Id: I13b92941f3e368839a9665fe3197c706babd9335
| Python | agpl-3.0 | Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server | import os
import yaml
import logging
from django.utils.translation import ungettext_lazy
from django.conf import settings
def help_max_length(max_length):
return ungettext_lazy(
u"Maximum length: {0} character",
u"Maximum length: {0} characters",
max_length).format(max_length)
class Stre... | import os
import yaml
import logging
from django.utils.translation import ungettext_lazy
from django.conf import settings
def help_max_length(max_length):
return ungettext_lazy(
u"Maximum length: {0} character",
u"Maximum length: {0} characters",
max_length).format(max_length)
class Stre... | <commit_before>import os
import yaml
import logging
from django.utils.translation import ungettext_lazy
from django.conf import settings
def help_max_length(max_length):
return ungettext_lazy(
u"Maximum length: {0} character",
u"Maximum length: {0} characters",
max_length).format(max_lengt... | import os
import yaml
import logging
from django.utils.translation import ungettext_lazy
from django.conf import settings
def help_max_length(max_length):
return ungettext_lazy(
u"Maximum length: {0} character",
u"Maximum length: {0} characters",
max_length).format(max_length)
class Stre... | import os
import yaml
import logging
from django.utils.translation import ungettext_lazy
from django.conf import settings
def help_max_length(max_length):
return ungettext_lazy(
u"Maximum length: {0} character",
u"Maximum length: {0} characters",
max_length).format(max_length)
class Stre... | <commit_before>import os
import yaml
import logging
from django.utils.translation import ungettext_lazy
from django.conf import settings
def help_max_length(max_length):
return ungettext_lazy(
u"Maximum length: {0} character",
u"Maximum length: {0} characters",
max_length).format(max_lengt... |
28c6af1381a1fc38b20ce05e85f494f3ae2beeb4 | arcutils/masquerade/templatetags/masquerade.py | arcutils/masquerade/templatetags/masquerade.py | from django import template
from .. import perms
from ..settings import get_user_attr
register = template.Library()
@register.filter
def is_masquerading(user):
info = getattr(user, get_user_attr())
return info['is_masquerading']
@register.filter
def can_masquerade(user):
return perms.can_masquerade(u... | from django import template
from .. import perms
from ..settings import get_user_attr, is_enabled
register = template.Library()
@register.filter
def is_masquerading(user):
if not is_enabled():
return False
info = getattr(user, get_user_attr(), None)
return info['is_masquerading']
@register.fi... | Make is_masquerading template tag more robust | Make is_masquerading template tag more robust
When masquerading is not enabled, immediately return False to avoid
checking for a request attribute that won't be present.
| Python | mit | PSU-OIT-ARC/django-arcutils,wylee/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils | from django import template
from .. import perms
from ..settings import get_user_attr
register = template.Library()
@register.filter
def is_masquerading(user):
info = getattr(user, get_user_attr())
return info['is_masquerading']
@register.filter
def can_masquerade(user):
return perms.can_masquerade(u... | from django import template
from .. import perms
from ..settings import get_user_attr, is_enabled
register = template.Library()
@register.filter
def is_masquerading(user):
if not is_enabled():
return False
info = getattr(user, get_user_attr(), None)
return info['is_masquerading']
@register.fi... | <commit_before>from django import template
from .. import perms
from ..settings import get_user_attr
register = template.Library()
@register.filter
def is_masquerading(user):
info = getattr(user, get_user_attr())
return info['is_masquerading']
@register.filter
def can_masquerade(user):
return perms.c... | from django import template
from .. import perms
from ..settings import get_user_attr, is_enabled
register = template.Library()
@register.filter
def is_masquerading(user):
if not is_enabled():
return False
info = getattr(user, get_user_attr(), None)
return info['is_masquerading']
@register.fi... | from django import template
from .. import perms
from ..settings import get_user_attr
register = template.Library()
@register.filter
def is_masquerading(user):
info = getattr(user, get_user_attr())
return info['is_masquerading']
@register.filter
def can_masquerade(user):
return perms.can_masquerade(u... | <commit_before>from django import template
from .. import perms
from ..settings import get_user_attr
register = template.Library()
@register.filter
def is_masquerading(user):
info = getattr(user, get_user_attr())
return info['is_masquerading']
@register.filter
def can_masquerade(user):
return perms.c... |
98c2c311ad1a0797205da58ce4d3b7d9b4c66c57 | nova/policies/pause_server.py | nova/policies/pause_server.py | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | Introduce scope_types in pause server policy | Introduce scope_types in pause server policy
oslo.policy introduced the scope_type feature which can
control the access level at system-level and project-level.
- https://docs.openstack.org/oslo.policy/latest/user/usage.html#setting-scope
- http://specs.openstack.org/openstack/keystone-specs/specs/keystone/queens/sy... | Python | apache-2.0 | openstack/nova,klmitch/nova,klmitch/nova,mahak/nova,mahak/nova,mahak/nova,klmitch/nova,openstack/nova,openstack/nova,klmitch/nova | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | <commit_before># Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | <commit_before># Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... |
263e517004df36938b430d8802d4fc80067fadf5 | djangoreact/urls.py | djangoreact/urls.py | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from server import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
urlpatterns = [
url(r'^$', views.index),
url(r'^ap... | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from server import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
urlpatterns = [
url(r'^api/auth/', include('rest_auth.... | Fix to use react-router for all unmatched routes. | Fix to use react-router for all unmatched routes.
| Python | mit | willy-claes/django-react,willy-claes/django-react,willy-claes/django-react | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from server import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
urlpatterns = [
url(r'^$', views.index),
url(r'^ap... | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from server import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
urlpatterns = [
url(r'^api/auth/', include('rest_auth.... | <commit_before>from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from server import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
urlpatterns = [
url(r'^$', views.index)... | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from server import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
urlpatterns = [
url(r'^api/auth/', include('rest_auth.... | from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from server import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
urlpatterns = [
url(r'^$', views.index),
url(r'^ap... | <commit_before>from django.conf.urls import url, include
from django.contrib import admin
from rest_framework import routers
from server import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
urlpatterns = [
url(r'^$', views.index)... |
f83282b1747e255d35e18e9fecad1750d1564f9e | do_record/record.py | do_record/record.py | """DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = hostname
... | """DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = hostname
... | Remove Code That Doesn't Have a Test | Remove Code That Doesn't Have a Test
| Python | apache-2.0 | Jitsusama/lets-do-dns | """DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = hostname
... | """DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = hostname
... | <commit_before>"""DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = ... | """DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = hostname
... | """DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = hostname
... | <commit_before>"""DigitalOcean DNS Records."""
from certbot_dns_auth.printer import printer
from do_record import http
class Record(object):
"""Handle DigitalOcean DNS records."""
def __init__(self, api_key, domain, hostname):
self._number = None
self.domain = domain
self.hostname = ... |
1633b9a1ace74a5a7cbf445ce7ceb790d0411e79 | modules/__init__.py | modules/__init__.py | #pipe2py modules package
#Author: Greg Gaughan
__all__ = ['pipefetch',
'pipefetchdata',
'pipedatebuilder',
'pipeurlbuilder',
'pipetextinput',
'pipeurlinput',
'pipefilter',
'pipeunion',
'pipeoutput',
]
| #pipe2py modules package
#Author: Greg Gaughan
#Note: each module name must match the name used internally by Yahoo, preceded by pipe
__all__ = ['pipefetch',
'pipefetchdata',
'pipedatebuilder',
'pipeurlbuilder',
'pipetextinput',
'pipeurlinput',
'pipef... | Add comment about module naming | Add comment about module naming
| Python | mit | nerevu/riko,nerevu/riko | #pipe2py modules package
#Author: Greg Gaughan
__all__ = ['pipefetch',
'pipefetchdata',
'pipedatebuilder',
'pipeurlbuilder',
'pipetextinput',
'pipeurlinput',
'pipefilter',
'pipeunion',
'pipeoutput',
]
Add com... | #pipe2py modules package
#Author: Greg Gaughan
#Note: each module name must match the name used internally by Yahoo, preceded by pipe
__all__ = ['pipefetch',
'pipefetchdata',
'pipedatebuilder',
'pipeurlbuilder',
'pipetextinput',
'pipeurlinput',
'pipef... | <commit_before>#pipe2py modules package
#Author: Greg Gaughan
__all__ = ['pipefetch',
'pipefetchdata',
'pipedatebuilder',
'pipeurlbuilder',
'pipetextinput',
'pipeurlinput',
'pipefilter',
'pipeunion',
'pipeoutput',
... | #pipe2py modules package
#Author: Greg Gaughan
#Note: each module name must match the name used internally by Yahoo, preceded by pipe
__all__ = ['pipefetch',
'pipefetchdata',
'pipedatebuilder',
'pipeurlbuilder',
'pipetextinput',
'pipeurlinput',
'pipef... | #pipe2py modules package
#Author: Greg Gaughan
__all__ = ['pipefetch',
'pipefetchdata',
'pipedatebuilder',
'pipeurlbuilder',
'pipetextinput',
'pipeurlinput',
'pipefilter',
'pipeunion',
'pipeoutput',
]
Add com... | <commit_before>#pipe2py modules package
#Author: Greg Gaughan
__all__ = ['pipefetch',
'pipefetchdata',
'pipedatebuilder',
'pipeurlbuilder',
'pipetextinput',
'pipeurlinput',
'pipefilter',
'pipeunion',
'pipeoutput',
... |
413c3e9e8a093e3f336e27a663f347f5ea9866a6 | performanceplatform/collector/ga/__init__.py | performanceplatform/collector/ga/__init__.py | from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from performanceplatform.collector.ga.core \
import create_client, query_documents_for, send_data
from performanceplatform.collector.write import DataSet
def main(credentials, data_set_config, query, options, start_at, end_at):
clien... | from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from performanceplatform.collector.ga.core \
import create_client, query_documents_for, send_data
from performanceplatform.collector.write import DataSet
def main(credentials, data_set_config, query, options, start_at, end_at):
clien... | Allow the 'dataType' field to be overriden | Allow the 'dataType' field to be overriden
The 'dataType' field in records predates data groups and data types. As
such they don't always match the new world order of data types. It's
fine to change in all cases other than Licensing which is run on
limelight, that we don't really want to touch.
| Python | mit | alphagov/performanceplatform-collector,alphagov/performanceplatform-collector,alphagov/performanceplatform-collector | from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from performanceplatform.collector.ga.core \
import create_client, query_documents_for, send_data
from performanceplatform.collector.write import DataSet
def main(credentials, data_set_config, query, options, start_at, end_at):
clien... | from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from performanceplatform.collector.ga.core \
import create_client, query_documents_for, send_data
from performanceplatform.collector.write import DataSet
def main(credentials, data_set_config, query, options, start_at, end_at):
clien... | <commit_before>from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from performanceplatform.collector.ga.core \
import create_client, query_documents_for, send_data
from performanceplatform.collector.write import DataSet
def main(credentials, data_set_config, query, options, start_at, end... | from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from performanceplatform.collector.ga.core \
import create_client, query_documents_for, send_data
from performanceplatform.collector.write import DataSet
def main(credentials, data_set_config, query, options, start_at, end_at):
clien... | from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from performanceplatform.collector.ga.core \
import create_client, query_documents_for, send_data
from performanceplatform.collector.write import DataSet
def main(credentials, data_set_config, query, options, start_at, end_at):
clien... | <commit_before>from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from performanceplatform.collector.ga.core \
import create_client, query_documents_for, send_data
from performanceplatform.collector.write import DataSet
def main(credentials, data_set_config, query, options, start_at, end... |
95542ab1b7c22a6e0160e242349c66f2cef7e390 | syntacticframes_project/syntacticframes/management/commands/check_correspondance_errors.py | syntacticframes_project/syntacticframes/management/commands/check_correspondance_errors.py | from django.core.management.base import BaseCommand
from syntacticframes.models import VerbNetClass
from parsecorrespondance import parse
from loadmapping import mapping
class Command(BaseCommand):
def handle(self, *args, **options):
for vn_class in VerbNetClass.objects.all():
try:
... | from django.core.management.base import BaseCommand
from syntacticframes.models import VerbNetFrameSet
from parsecorrespondance import parse
from loadmapping import mapping
class Command(BaseCommand):
def handle(self, *args, **options):
for frameset in VerbNetFrameSet.objects.all():
print("{}:... | Check correspondances in framesets now | Check correspondances in framesets now
| Python | mit | aymara/verbenet-editor,aymara/verbenet-editor,aymara/verbenet-editor | from django.core.management.base import BaseCommand
from syntacticframes.models import VerbNetClass
from parsecorrespondance import parse
from loadmapping import mapping
class Command(BaseCommand):
def handle(self, *args, **options):
for vn_class in VerbNetClass.objects.all():
try:
... | from django.core.management.base import BaseCommand
from syntacticframes.models import VerbNetFrameSet
from parsecorrespondance import parse
from loadmapping import mapping
class Command(BaseCommand):
def handle(self, *args, **options):
for frameset in VerbNetFrameSet.objects.all():
print("{}:... | <commit_before>from django.core.management.base import BaseCommand
from syntacticframes.models import VerbNetClass
from parsecorrespondance import parse
from loadmapping import mapping
class Command(BaseCommand):
def handle(self, *args, **options):
for vn_class in VerbNetClass.objects.all():
t... | from django.core.management.base import BaseCommand
from syntacticframes.models import VerbNetFrameSet
from parsecorrespondance import parse
from loadmapping import mapping
class Command(BaseCommand):
def handle(self, *args, **options):
for frameset in VerbNetFrameSet.objects.all():
print("{}:... | from django.core.management.base import BaseCommand
from syntacticframes.models import VerbNetClass
from parsecorrespondance import parse
from loadmapping import mapping
class Command(BaseCommand):
def handle(self, *args, **options):
for vn_class in VerbNetClass.objects.all():
try:
... | <commit_before>from django.core.management.base import BaseCommand
from syntacticframes.models import VerbNetClass
from parsecorrespondance import parse
from loadmapping import mapping
class Command(BaseCommand):
def handle(self, *args, **options):
for vn_class in VerbNetClass.objects.all():
t... |
6c54fc230e8c889a2351f20b524382a5c6e29d1c | examples/apps.py | examples/apps.py | # coding: utf-8
import os
import sys
from pysuru import TsuruClient
TSURU_TARGET = os.environ.get('TSURU_TARGET', None)
TSURU_TOKEN = os.environ.get('TSURU_TOKEN', None)
if not TSURU_TARGET or not TSURU_TOKEN:
print('You must set TSURU_TARGET and TSURU_TOKEN.')
sys.exit(1)
api = TsuruClient(TSURU_TARGET, T... | # coding: utf-8
import os
import sys
from pysuru import TsuruClient
TSURU_TARGET = os.environ.get('TSURU_TARGET', None)
TSURU_TOKEN = os.environ.get('TSURU_TOKEN', None)
if not TSURU_TARGET or not TSURU_TOKEN:
print('You must set TSURU_TARGET and TSURU_TOKEN env variables.')
sys.exit(1)
# Creating TsuruCli... | Update examples to match docs | Update examples to match docs
Use the interface defined in the docs in the examples scripts.
| Python | mit | rcmachado/pysuru | # coding: utf-8
import os
import sys
from pysuru import TsuruClient
TSURU_TARGET = os.environ.get('TSURU_TARGET', None)
TSURU_TOKEN = os.environ.get('TSURU_TOKEN', None)
if not TSURU_TARGET or not TSURU_TOKEN:
print('You must set TSURU_TARGET and TSURU_TOKEN.')
sys.exit(1)
api = TsuruClient(TSURU_TARGET, T... | # coding: utf-8
import os
import sys
from pysuru import TsuruClient
TSURU_TARGET = os.environ.get('TSURU_TARGET', None)
TSURU_TOKEN = os.environ.get('TSURU_TOKEN', None)
if not TSURU_TARGET or not TSURU_TOKEN:
print('You must set TSURU_TARGET and TSURU_TOKEN env variables.')
sys.exit(1)
# Creating TsuruCli... | <commit_before># coding: utf-8
import os
import sys
from pysuru import TsuruClient
TSURU_TARGET = os.environ.get('TSURU_TARGET', None)
TSURU_TOKEN = os.environ.get('TSURU_TOKEN', None)
if not TSURU_TARGET or not TSURU_TOKEN:
print('You must set TSURU_TARGET and TSURU_TOKEN.')
sys.exit(1)
api = TsuruClient(... | # coding: utf-8
import os
import sys
from pysuru import TsuruClient
TSURU_TARGET = os.environ.get('TSURU_TARGET', None)
TSURU_TOKEN = os.environ.get('TSURU_TOKEN', None)
if not TSURU_TARGET or not TSURU_TOKEN:
print('You must set TSURU_TARGET and TSURU_TOKEN env variables.')
sys.exit(1)
# Creating TsuruCli... | # coding: utf-8
import os
import sys
from pysuru import TsuruClient
TSURU_TARGET = os.environ.get('TSURU_TARGET', None)
TSURU_TOKEN = os.environ.get('TSURU_TOKEN', None)
if not TSURU_TARGET or not TSURU_TOKEN:
print('You must set TSURU_TARGET and TSURU_TOKEN.')
sys.exit(1)
api = TsuruClient(TSURU_TARGET, T... | <commit_before># coding: utf-8
import os
import sys
from pysuru import TsuruClient
TSURU_TARGET = os.environ.get('TSURU_TARGET', None)
TSURU_TOKEN = os.environ.get('TSURU_TOKEN', None)
if not TSURU_TARGET or not TSURU_TOKEN:
print('You must set TSURU_TARGET and TSURU_TOKEN.')
sys.exit(1)
api = TsuruClient(... |
5af4ef36ff7a56b34fc8d30df37c82a6837918e3 | pambox/speech/__init__.py | pambox/speech/__init__.py | """
The :mod:`pambox.speech` module gather speech intelligibility
models.
"""
from __future__ import absolute_import
from .binauralsepsm import BinauralSepsm
from .sepsm import Sepsm
from .mrsepsm import MrSepsm
from .sii import Sii
from .material import Material
from .experiment import Experiment
__all__ = [
'Bi... | """
The :mod:`pambox.speech` module gather speech intelligibility
models.
"""
from __future__ import absolute_import
from .binauralsepsm import BinauralSepsm
from .binauralmrsepsm import BinauralMrSepsm
from .sepsm import Sepsm
from .mrsepsm import MrSepsm
from .sii import Sii
from .material import Material
from .expe... | Include both binaural mr-sEPSM and sEPSM | Include both binaural mr-sEPSM and sEPSM
| Python | bsd-3-clause | achabotl/pambox | """
The :mod:`pambox.speech` module gather speech intelligibility
models.
"""
from __future__ import absolute_import
from .binauralsepsm import BinauralSepsm
from .sepsm import Sepsm
from .mrsepsm import MrSepsm
from .sii import Sii
from .material import Material
from .experiment import Experiment
__all__ = [
'Bi... | """
The :mod:`pambox.speech` module gather speech intelligibility
models.
"""
from __future__ import absolute_import
from .binauralsepsm import BinauralSepsm
from .binauralmrsepsm import BinauralMrSepsm
from .sepsm import Sepsm
from .mrsepsm import MrSepsm
from .sii import Sii
from .material import Material
from .expe... | <commit_before>"""
The :mod:`pambox.speech` module gather speech intelligibility
models.
"""
from __future__ import absolute_import
from .binauralsepsm import BinauralSepsm
from .sepsm import Sepsm
from .mrsepsm import MrSepsm
from .sii import Sii
from .material import Material
from .experiment import Experiment
__al... | """
The :mod:`pambox.speech` module gather speech intelligibility
models.
"""
from __future__ import absolute_import
from .binauralsepsm import BinauralSepsm
from .binauralmrsepsm import BinauralMrSepsm
from .sepsm import Sepsm
from .mrsepsm import MrSepsm
from .sii import Sii
from .material import Material
from .expe... | """
The :mod:`pambox.speech` module gather speech intelligibility
models.
"""
from __future__ import absolute_import
from .binauralsepsm import BinauralSepsm
from .sepsm import Sepsm
from .mrsepsm import MrSepsm
from .sii import Sii
from .material import Material
from .experiment import Experiment
__all__ = [
'Bi... | <commit_before>"""
The :mod:`pambox.speech` module gather speech intelligibility
models.
"""
from __future__ import absolute_import
from .binauralsepsm import BinauralSepsm
from .sepsm import Sepsm
from .mrsepsm import MrSepsm
from .sii import Sii
from .material import Material
from .experiment import Experiment
__al... |
b5a8e7b6926bf7224abed6bd335d62b3f1ad1fb1 | performance_testing/command_line.py | performance_testing/command_line.py | import os
import yaml
from performance_testing.errors import ConfigFileError, ConfigKeyError
from performance_testing import web
from datetime import datetime as date
from time import time
class Tool:
def __init__(self, config='config.yml', result_directory='result'):
self.read_config(config_file=config)
... | import os
import yaml
from performance_testing.errors import ConfigFileError, ConfigKeyError
from performance_testing import web
from performance_testing.config import Config
from performance_testing.result import Result
class Tool:
def __init__(self, config='config.yml', result_directory='result'):
self.... | Use Config and Result class in Tool | Use Config and Result class in Tool
| Python | mit | BakeCode/performance-testing,BakeCode/performance-testing | import os
import yaml
from performance_testing.errors import ConfigFileError, ConfigKeyError
from performance_testing import web
from datetime import datetime as date
from time import time
class Tool:
def __init__(self, config='config.yml', result_directory='result'):
self.read_config(config_file=config)
... | import os
import yaml
from performance_testing.errors import ConfigFileError, ConfigKeyError
from performance_testing import web
from performance_testing.config import Config
from performance_testing.result import Result
class Tool:
def __init__(self, config='config.yml', result_directory='result'):
self.... | <commit_before>import os
import yaml
from performance_testing.errors import ConfigFileError, ConfigKeyError
from performance_testing import web
from datetime import datetime as date
from time import time
class Tool:
def __init__(self, config='config.yml', result_directory='result'):
self.read_config(confi... | import os
import yaml
from performance_testing.errors import ConfigFileError, ConfigKeyError
from performance_testing import web
from performance_testing.config import Config
from performance_testing.result import Result
class Tool:
def __init__(self, config='config.yml', result_directory='result'):
self.... | import os
import yaml
from performance_testing.errors import ConfigFileError, ConfigKeyError
from performance_testing import web
from datetime import datetime as date
from time import time
class Tool:
def __init__(self, config='config.yml', result_directory='result'):
self.read_config(config_file=config)
... | <commit_before>import os
import yaml
from performance_testing.errors import ConfigFileError, ConfigKeyError
from performance_testing import web
from datetime import datetime as date
from time import time
class Tool:
def __init__(self, config='config.yml', result_directory='result'):
self.read_config(confi... |
5fc699b89eae0c41923a813ac48281729c4d80b8 | orderable_inlines/inlines.py | orderable_inlines/inlines.py | from django.contrib.admin import StackedInline, TabularInline
from django.template.defaultfilters import slugify
class OrderableInlineMixin(object):
class Media:
js = (
'js/jquery.browser.min.js',
'js/orderable-inline-jquery-ui.js',
'js/orderable-inline.js',
)
... | from django.contrib.admin import StackedInline, TabularInline
from django.template.defaultfilters import slugify
class OrderableInlineMixin(object):
class Media:
js = (
'js/jquery.browser.min.js',
'js/orderable-inline-jquery-ui.js',
'js/orderable-inline.js',
)
... | Make this hack compatible with Django 1.9 | Make this hack compatible with Django 1.9
| Python | bsd-2-clause | frx0119/django-orderable-inlines,frx0119/django-orderable-inlines | from django.contrib.admin import StackedInline, TabularInline
from django.template.defaultfilters import slugify
class OrderableInlineMixin(object):
class Media:
js = (
'js/jquery.browser.min.js',
'js/orderable-inline-jquery-ui.js',
'js/orderable-inline.js',
)
... | from django.contrib.admin import StackedInline, TabularInline
from django.template.defaultfilters import slugify
class OrderableInlineMixin(object):
class Media:
js = (
'js/jquery.browser.min.js',
'js/orderable-inline-jquery-ui.js',
'js/orderable-inline.js',
)
... | <commit_before>from django.contrib.admin import StackedInline, TabularInline
from django.template.defaultfilters import slugify
class OrderableInlineMixin(object):
class Media:
js = (
'js/jquery.browser.min.js',
'js/orderable-inline-jquery-ui.js',
'js/orderable-inline.j... | from django.contrib.admin import StackedInline, TabularInline
from django.template.defaultfilters import slugify
class OrderableInlineMixin(object):
class Media:
js = (
'js/jquery.browser.min.js',
'js/orderable-inline-jquery-ui.js',
'js/orderable-inline.js',
)
... | from django.contrib.admin import StackedInline, TabularInline
from django.template.defaultfilters import slugify
class OrderableInlineMixin(object):
class Media:
js = (
'js/jquery.browser.min.js',
'js/orderable-inline-jquery-ui.js',
'js/orderable-inline.js',
)
... | <commit_before>from django.contrib.admin import StackedInline, TabularInline
from django.template.defaultfilters import slugify
class OrderableInlineMixin(object):
class Media:
js = (
'js/jquery.browser.min.js',
'js/orderable-inline-jquery-ui.js',
'js/orderable-inline.j... |
533fb21586322c26fd9696213108d6a9e45ada64 | lib/ansible/cache/base.py | lib/ansible/cache/base.py | import exceptions
class BaseCacheModule(object):
def get(self, key):
raise exceptions.NotImplementedError
def set(self, key, value):
raise exceptions.NotImplementedError
def keys(self):
raise exceptions.NotImplementedError
def contains(self, key):
raise exceptions.No... | # (c) 2014, Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | Add copyright header, let me know if corrections are needed. | Add copyright header, let me know if corrections are needed.
| Python | mit | thaim/ansible,thaim/ansible | import exceptions
class BaseCacheModule(object):
def get(self, key):
raise exceptions.NotImplementedError
def set(self, key, value):
raise exceptions.NotImplementedError
def keys(self):
raise exceptions.NotImplementedError
def contains(self, key):
raise exceptions.No... | # (c) 2014, Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | <commit_before>import exceptions
class BaseCacheModule(object):
def get(self, key):
raise exceptions.NotImplementedError
def set(self, key, value):
raise exceptions.NotImplementedError
def keys(self):
raise exceptions.NotImplementedError
def contains(self, key):
rais... | # (c) 2014, Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | import exceptions
class BaseCacheModule(object):
def get(self, key):
raise exceptions.NotImplementedError
def set(self, key, value):
raise exceptions.NotImplementedError
def keys(self):
raise exceptions.NotImplementedError
def contains(self, key):
raise exceptions.No... | <commit_before>import exceptions
class BaseCacheModule(object):
def get(self, key):
raise exceptions.NotImplementedError
def set(self, key, value):
raise exceptions.NotImplementedError
def keys(self):
raise exceptions.NotImplementedError
def contains(self, key):
rais... |
aff0eba2c0f7f5a0c9bebbfc9402f04c2c9d6d11 | preference/miExecPref.py | preference/miExecPref.py | import os
import json
SCRIPT_PATH = os.path.dirname(__file__)
def getPreference():
""" Load pref json data nad return as dict"""
prefFile = open(os.path.join(SCRIPT_PATH, "miExecPref.json"), 'r')
prefDict = json.load(prefFile)
prefFile.close()
return prefDict
def getWindowSe... | import os
import json
import maya.cmds as cmds
SCRIPT_PATH = os.path.dirname(__file__)
MAYA_SCRIPT_DIR = cmds.internalVar(userScriptDir=True)
def getPreference():
""" Load pref json data nad return as dict"""
for root, dirs, files in os.walk(MAYA_SCRIPT_DIR):
if 'miExecPref.json' in file... | Load user pref file if exists in the maya user script directory | Load user pref file if exists in the maya user script directory
| Python | mit | minoue/miExecutor | import os
import json
SCRIPT_PATH = os.path.dirname(__file__)
def getPreference():
""" Load pref json data nad return as dict"""
prefFile = open(os.path.join(SCRIPT_PATH, "miExecPref.json"), 'r')
prefDict = json.load(prefFile)
prefFile.close()
return prefDict
def getWindowSe... | import os
import json
import maya.cmds as cmds
SCRIPT_PATH = os.path.dirname(__file__)
MAYA_SCRIPT_DIR = cmds.internalVar(userScriptDir=True)
def getPreference():
""" Load pref json data nad return as dict"""
for root, dirs, files in os.walk(MAYA_SCRIPT_DIR):
if 'miExecPref.json' in file... | <commit_before>import os
import json
SCRIPT_PATH = os.path.dirname(__file__)
def getPreference():
""" Load pref json data nad return as dict"""
prefFile = open(os.path.join(SCRIPT_PATH, "miExecPref.json"), 'r')
prefDict = json.load(prefFile)
prefFile.close()
return prefDict
... | import os
import json
import maya.cmds as cmds
SCRIPT_PATH = os.path.dirname(__file__)
MAYA_SCRIPT_DIR = cmds.internalVar(userScriptDir=True)
def getPreference():
""" Load pref json data nad return as dict"""
for root, dirs, files in os.walk(MAYA_SCRIPT_DIR):
if 'miExecPref.json' in file... | import os
import json
SCRIPT_PATH = os.path.dirname(__file__)
def getPreference():
""" Load pref json data nad return as dict"""
prefFile = open(os.path.join(SCRIPT_PATH, "miExecPref.json"), 'r')
prefDict = json.load(prefFile)
prefFile.close()
return prefDict
def getWindowSe... | <commit_before>import os
import json
SCRIPT_PATH = os.path.dirname(__file__)
def getPreference():
""" Load pref json data nad return as dict"""
prefFile = open(os.path.join(SCRIPT_PATH, "miExecPref.json"), 'r')
prefDict = json.load(prefFile)
prefFile.close()
return prefDict
... |
64ed32aa5e2e36ce58209b0e356f7482137a81f2 | getMesosStats.py | getMesosStats.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import json
import argparse
def get_metric(host, port, metric):
response = urllib2.urlopen(
'http://' + host + ':' + port + '/metrics/snapshot')
data = json.load(response)
# print json.dumps(data, indent=4, sort_keys=Tru... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import json
import argparse
def get_metric(host, port, metric):
response = urllib2.urlopen(
'http://' + host + ':' + port + '/metrics/snapshot')
data = json.load(response)
# print json.dumps(data, indent=4, sort_keys=Tru... | Add KeyError exception and ZBX_NOT_SUPPORTED message. | Add KeyError exception and ZBX_NOT_SUPPORTED message.
| Python | mit | zolech/zabbix-mesos-template | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import json
import argparse
def get_metric(host, port, metric):
response = urllib2.urlopen(
'http://' + host + ':' + port + '/metrics/snapshot')
data = json.load(response)
# print json.dumps(data, indent=4, sort_keys=Tru... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import json
import argparse
def get_metric(host, port, metric):
response = urllib2.urlopen(
'http://' + host + ':' + port + '/metrics/snapshot')
data = json.load(response)
# print json.dumps(data, indent=4, sort_keys=Tru... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import json
import argparse
def get_metric(host, port, metric):
response = urllib2.urlopen(
'http://' + host + ':' + port + '/metrics/snapshot')
data = json.load(response)
# print json.dumps(data, indent=4... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import json
import argparse
def get_metric(host, port, metric):
response = urllib2.urlopen(
'http://' + host + ':' + port + '/metrics/snapshot')
data = json.load(response)
# print json.dumps(data, indent=4, sort_keys=Tru... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import json
import argparse
def get_metric(host, port, metric):
response = urllib2.urlopen(
'http://' + host + ':' + port + '/metrics/snapshot')
data = json.load(response)
# print json.dumps(data, indent=4, sort_keys=Tru... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import json
import argparse
def get_metric(host, port, metric):
response = urllib2.urlopen(
'http://' + host + ':' + port + '/metrics/snapshot')
data = json.load(response)
# print json.dumps(data, indent=4... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.