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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cee76d5c2216f6f42a54b28a753fe288accc40d7 | corehq/apps/accounting/migrations/0026_auto_20180508_1956.py | corehq/apps/accounting/migrations/0026_auto_20180508_1956.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-08 19:56
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations
from corehq.sql_db.operations import HqRunPython
def noop(*args, **kwargs):
pass
def _convert_emailed_to_array_field(apps, sc... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-08 19:56
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations
from corehq.sql_db.operations import HqRunPython
def noop(*args, **kwargs):
pass
def _convert_emailed_to_array_field(apps, sc... | Save record in migrations file | Save record in migrations file
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-08 19:56
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations
from corehq.sql_db.operations import HqRunPython
def noop(*args, **kwargs):
pass
def _convert_emailed_to_array_field(apps, sc... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-08 19:56
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations
from corehq.sql_db.operations import HqRunPython
def noop(*args, **kwargs):
pass
def _convert_emailed_to_array_field(apps, sc... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-08 19:56
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations
from corehq.sql_db.operations import HqRunPython
def noop(*args, **kwargs):
pass
def _convert_emailed_to_array... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-08 19:56
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations
from corehq.sql_db.operations import HqRunPython
def noop(*args, **kwargs):
pass
def _convert_emailed_to_array_field(apps, sc... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-08 19:56
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations
from corehq.sql_db.operations import HqRunPython
def noop(*args, **kwargs):
pass
def _convert_emailed_to_array_field(apps, sc... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-08 19:56
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import migrations
from corehq.sql_db.operations import HqRunPython
def noop(*args, **kwargs):
pass
def _convert_emailed_to_array... |
f646fb88e793897cf827fd7d9484386a4bb08594 | pages/tests/test_serializers.py | pages/tests/test_serializers.py | from mock import patch
from django.test import TestCase
from rest_framework.reverse import reverse
from .. import serializers
from . import factories
from pages.utils import build_url
class PageSerializerTest(TestCase):
def expected_data(self, page):
expected = {
'id': page.pk,
'... | from rest_framework.reverse import reverse
from user_management.models.tests.utils import APIRequestTestCase
from .. import serializers
from . import factories
from pages.utils import build_url
class PageSerializerTest(APIRequestTestCase):
def setUp(self):
self.request = self.create_request()
sel... | Fix DeprecationWarnings for serializer context | Fix DeprecationWarnings for serializer context
* Pass a context containing a request to every serializer
Conflicts:
pages/tests/test_serializers.py
| Python | bsd-2-clause | incuna/feincms-pages-api | from mock import patch
from django.test import TestCase
from rest_framework.reverse import reverse
from .. import serializers
from . import factories
from pages.utils import build_url
class PageSerializerTest(TestCase):
def expected_data(self, page):
expected = {
'id': page.pk,
'... | from rest_framework.reverse import reverse
from user_management.models.tests.utils import APIRequestTestCase
from .. import serializers
from . import factories
from pages.utils import build_url
class PageSerializerTest(APIRequestTestCase):
def setUp(self):
self.request = self.create_request()
sel... | <commit_before>from mock import patch
from django.test import TestCase
from rest_framework.reverse import reverse
from .. import serializers
from . import factories
from pages.utils import build_url
class PageSerializerTest(TestCase):
def expected_data(self, page):
expected = {
'id': page.pk... | from rest_framework.reverse import reverse
from user_management.models.tests.utils import APIRequestTestCase
from .. import serializers
from . import factories
from pages.utils import build_url
class PageSerializerTest(APIRequestTestCase):
def setUp(self):
self.request = self.create_request()
sel... | from mock import patch
from django.test import TestCase
from rest_framework.reverse import reverse
from .. import serializers
from . import factories
from pages.utils import build_url
class PageSerializerTest(TestCase):
def expected_data(self, page):
expected = {
'id': page.pk,
'... | <commit_before>from mock import patch
from django.test import TestCase
from rest_framework.reverse import reverse
from .. import serializers
from . import factories
from pages.utils import build_url
class PageSerializerTest(TestCase):
def expected_data(self, page):
expected = {
'id': page.pk... |
cf9b1805b55c567c5f5365d3f2f51f119304e6ba | AC_tools/__init__.py | AC_tools/__init__.py | # compatibility with both python 2 and 3
from __future__ import print_function
from . plotting_REDUNDENT import *
from . plotting import *
from . variables import *
from . AC_time import *
from . planeflight import *
from . generic import *
from . core import *
from . GEOSChem_bpch import *
from . GEOSChem_nc import *
... | # compatibility with both python 2 and 3
from __future__ import print_function
import numpy as np
# AC_tools modules
from . AC_time import *
from . core import *
from . generic import *
from . GEOSChem_bpch import *
from . GEOSChem_nc import *
from . KPP import *
from . planeflight import *
from . plotting_REDUNDENT im... | Include integrator modules for KPP and SMVGEAR | Include integrator modules for KPP and SMVGEAR
| Python | mit | tsherwen/AC_tools,tsherwen/AC_tools | # compatibility with both python 2 and 3
from __future__ import print_function
from . plotting_REDUNDENT import *
from . plotting import *
from . variables import *
from . AC_time import *
from . planeflight import *
from . generic import *
from . core import *
from . GEOSChem_bpch import *
from . GEOSChem_nc import *
... | # compatibility with both python 2 and 3
from __future__ import print_function
import numpy as np
# AC_tools modules
from . AC_time import *
from . core import *
from . generic import *
from . GEOSChem_bpch import *
from . GEOSChem_nc import *
from . KPP import *
from . planeflight import *
from . plotting_REDUNDENT im... | <commit_before># compatibility with both python 2 and 3
from __future__ import print_function
from . plotting_REDUNDENT import *
from . plotting import *
from . variables import *
from . AC_time import *
from . planeflight import *
from . generic import *
from . core import *
from . GEOSChem_bpch import *
from . GEOSCh... | # compatibility with both python 2 and 3
from __future__ import print_function
import numpy as np
# AC_tools modules
from . AC_time import *
from . core import *
from . generic import *
from . GEOSChem_bpch import *
from . GEOSChem_nc import *
from . KPP import *
from . planeflight import *
from . plotting_REDUNDENT im... | # compatibility with both python 2 and 3
from __future__ import print_function
from . plotting_REDUNDENT import *
from . plotting import *
from . variables import *
from . AC_time import *
from . planeflight import *
from . generic import *
from . core import *
from . GEOSChem_bpch import *
from . GEOSChem_nc import *
... | <commit_before># compatibility with both python 2 and 3
from __future__ import print_function
from . plotting_REDUNDENT import *
from . plotting import *
from . variables import *
from . AC_time import *
from . planeflight import *
from . generic import *
from . core import *
from . GEOSChem_bpch import *
from . GEOSCh... |
419131bba11cab27c36ef2b21199cdc3540cde16 | byceps/services/shop/order/actions/revoke_ticket_bundles.py | byceps/services/shop/order/actions/revoke_ticket_bundles.py | """
byceps.services.shop.order.actions.revoke_ticket_bundles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from .....typing import UserID
from ..transfer.action import ActionParameters
from ..transfer.ord... | """
byceps.services.shop.order.actions.revoke_ticket_bundles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from .....typing import UserID
from ..transfer.action import ActionParameters
from ..transfer.ord... | Fix ticket bundle revocation order action | Fix ticket bundle revocation order action
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | """
byceps.services.shop.order.actions.revoke_ticket_bundles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from .....typing import UserID
from ..transfer.action import ActionParameters
from ..transfer.ord... | """
byceps.services.shop.order.actions.revoke_ticket_bundles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from .....typing import UserID
from ..transfer.action import ActionParameters
from ..transfer.ord... | <commit_before>"""
byceps.services.shop.order.actions.revoke_ticket_bundles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from .....typing import UserID
from ..transfer.action import ActionParameters
from... | """
byceps.services.shop.order.actions.revoke_ticket_bundles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from .....typing import UserID
from ..transfer.action import ActionParameters
from ..transfer.ord... | """
byceps.services.shop.order.actions.revoke_ticket_bundles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from .....typing import UserID
from ..transfer.action import ActionParameters
from ..transfer.ord... | <commit_before>"""
byceps.services.shop.order.actions.revoke_ticket_bundles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2014-2022 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from .....typing import UserID
from ..transfer.action import ActionParameters
from... |
ece899be682b8713c27e5a4d6189c09afb722c5c | partner_firstname/migrations/12.0.1.0.0/pre-ir_config_param.py | partner_firstname/migrations/12.0.1.0.0/pre-ir_config_param.py | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_names_order'")
... | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE key = 'partner_names_order'")
... | Fix migration script 12.0.1.0.0 of partner_firstname | [12.0] Fix migration script 12.0.1.0.0 of partner_firstname
| Python | agpl-3.0 | BT-rmartin/partner-contact,BT-rmartin/partner-contact,OCA/partner-contact,OCA/partner-contact | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_names_order'")
... | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE key = 'partner_names_order'")
... | <commit_before>def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_n... | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE key = 'partner_names_order'")
... | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_names_order'")
... | <commit_before>def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_n... |
83d45c0fa64da347eec6b96f46c5eb1fbfe516d4 | plugins/call_bad_permissions.py | plugins/call_bad_permissions.py | # -*- coding:utf-8 -*-
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | # -*- coding:utf-8 -*-
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | Fix bug with permissions matching | Fix bug with permissions matching
| Python | apache-2.0 | chair6/bandit,stackforge/bandit,austin987/bandit,pombredanne/bandit,stackforge/bandit,pombredanne/bandit | # -*- coding:utf-8 -*-
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | # -*- coding:utf-8 -*-
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | <commit_before># -*- coding:utf-8 -*-
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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/l... | # -*- coding:utf-8 -*-
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | # -*- coding:utf-8 -*-
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | <commit_before># -*- coding:utf-8 -*-
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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/l... |
99cbd692ae6b7dab65aae9d77fd2d8333fe075e4 | Lib/scipy_version.py | Lib/scipy_version.py | major = 0
minor = 3
micro = 3
#release_level = 'alpha'
release_level=''
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
if release_level:
scipy_version = '%(major)d.%(minor)d.%(micro)d_%(release_level)s'\
'_%(cvs_minor)d.%(cvs_serial)d' % (local... | major = 0
minor = 3
micro = 2
#release_level = 'alpha'
release_level=''
try:
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
except ImportError,msg:
print msg
cvs_minor = 0
cvs_serial = 0
if cvs_minor or cvs_serial:
if release_level:
... | Handle missing __cvs_version__.py in a branch. | Handle missing __cvs_version__.py in a branch.
| Python | bsd-3-clause | gef756/scipy,aman-iitj/scipy,jakevdp/scipy,efiring/scipy,Eric89GXL/scipy,WarrenWeckesser/scipy,zerothi/scipy,argriffing/scipy,futurulus/scipy,juliantaylor/scipy,tylerjereddy/scipy,fernand/scipy,ndchorley/scipy,fredrikw/scipy,niknow/scipy,nmayorov/scipy,nmayorov/scipy,Gillu13/scipy,WarrenWeckesser/scipy,mdhaber/scipy,wi... | major = 0
minor = 3
micro = 3
#release_level = 'alpha'
release_level=''
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
if release_level:
scipy_version = '%(major)d.%(minor)d.%(micro)d_%(release_level)s'\
'_%(cvs_minor)d.%(cvs_serial)d' % (local... | major = 0
minor = 3
micro = 2
#release_level = 'alpha'
release_level=''
try:
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
except ImportError,msg:
print msg
cvs_minor = 0
cvs_serial = 0
if cvs_minor or cvs_serial:
if release_level:
... | <commit_before>major = 0
minor = 3
micro = 3
#release_level = 'alpha'
release_level=''
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
if release_level:
scipy_version = '%(major)d.%(minor)d.%(micro)d_%(release_level)s'\
'_%(cvs_minor)d.%(cvs_ser... | major = 0
minor = 3
micro = 2
#release_level = 'alpha'
release_level=''
try:
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
except ImportError,msg:
print msg
cvs_minor = 0
cvs_serial = 0
if cvs_minor or cvs_serial:
if release_level:
... | major = 0
minor = 3
micro = 3
#release_level = 'alpha'
release_level=''
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
if release_level:
scipy_version = '%(major)d.%(minor)d.%(micro)d_%(release_level)s'\
'_%(cvs_minor)d.%(cvs_serial)d' % (local... | <commit_before>major = 0
minor = 3
micro = 3
#release_level = 'alpha'
release_level=''
from __cvs_version__ import cvs_version
cvs_minor = cvs_version[-3]
cvs_serial = cvs_version[-1]
if release_level:
scipy_version = '%(major)d.%(minor)d.%(micro)d_%(release_level)s'\
'_%(cvs_minor)d.%(cvs_ser... |
a895661f7ce1a814f308dbe8b5836a4cdb472c8c | cla_public/apps/base/filters.py | cla_public/apps/base/filters.py | import re
from cla_public.apps.base import base
@base.app_template_filter()
def matches(value, pattern):
return bool(re.search(pattern, value))
| from cla_public.apps.base import base
@base.app_template_filter()
def test(value):
return value
| Revert "BE: Update custom template filter" | Revert "BE: Update custom template filter"
This reverts commit ea0c0beb1d2aa0d5970b629ac06e6f9b9708bfdd.
| Python | mit | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | import re
from cla_public.apps.base import base
@base.app_template_filter()
def matches(value, pattern):
return bool(re.search(pattern, value))
Revert "BE: Update custom template filter"
This reverts commit ea0c0beb1d2aa0d5970b629ac06e6f9b9708bfdd. | from cla_public.apps.base import base
@base.app_template_filter()
def test(value):
return value
| <commit_before>import re
from cla_public.apps.base import base
@base.app_template_filter()
def matches(value, pattern):
return bool(re.search(pattern, value))
<commit_msg>Revert "BE: Update custom template filter"
This reverts commit ea0c0beb1d2aa0d5970b629ac06e6f9b9708bfdd.<commit_after> | from cla_public.apps.base import base
@base.app_template_filter()
def test(value):
return value
| import re
from cla_public.apps.base import base
@base.app_template_filter()
def matches(value, pattern):
return bool(re.search(pattern, value))
Revert "BE: Update custom template filter"
This reverts commit ea0c0beb1d2aa0d5970b629ac06e6f9b9708bfdd.from cla_public.apps.base import base
@base.app_template_filter()... | <commit_before>import re
from cla_public.apps.base import base
@base.app_template_filter()
def matches(value, pattern):
return bool(re.search(pattern, value))
<commit_msg>Revert "BE: Update custom template filter"
This reverts commit ea0c0beb1d2aa0d5970b629ac06e6f9b9708bfdd.<commit_after>from cla_public.apps.base... |
8e4e12b3c9d64a8c6771b9deb7613c3653f47656 | rpihelper/transmission/tasks.py | rpihelper/transmission/tasks.py | # -*- coding: utf-8 -*-
from rpihelper.celery import current_app, celery
from rpihelper.dropboxclient.logic import Client as DropBoxClient
from rpihelper.transmission.logic import (
transmissionrpc_client, transmissionrpc_add_torrent,
)
__all__ = (
'check_torrent_files',
)
@celery.task
def check_torrent_fil... | # -*- coding: utf-8 -*-
from tempfile import NamedTemporaryFile
from rpihelper.celery import current_app, celery
from rpihelper.dropboxclient.logic import Client as DropBoxClient
from rpihelper.transmission.logic import (
transmissionrpc_client, transmissionrpc_add_torrent,
)
__all__ = (
'check_torrent_files... | Fix transmission task for torrent files | Fix transmission task for torrent files
| Python | mit | Gr1N/rpihelper,Gr1N/rpihelper | # -*- coding: utf-8 -*-
from rpihelper.celery import current_app, celery
from rpihelper.dropboxclient.logic import Client as DropBoxClient
from rpihelper.transmission.logic import (
transmissionrpc_client, transmissionrpc_add_torrent,
)
__all__ = (
'check_torrent_files',
)
@celery.task
def check_torrent_fil... | # -*- coding: utf-8 -*-
from tempfile import NamedTemporaryFile
from rpihelper.celery import current_app, celery
from rpihelper.dropboxclient.logic import Client as DropBoxClient
from rpihelper.transmission.logic import (
transmissionrpc_client, transmissionrpc_add_torrent,
)
__all__ = (
'check_torrent_files... | <commit_before># -*- coding: utf-8 -*-
from rpihelper.celery import current_app, celery
from rpihelper.dropboxclient.logic import Client as DropBoxClient
from rpihelper.transmission.logic import (
transmissionrpc_client, transmissionrpc_add_torrent,
)
__all__ = (
'check_torrent_files',
)
@celery.task
def ch... | # -*- coding: utf-8 -*-
from tempfile import NamedTemporaryFile
from rpihelper.celery import current_app, celery
from rpihelper.dropboxclient.logic import Client as DropBoxClient
from rpihelper.transmission.logic import (
transmissionrpc_client, transmissionrpc_add_torrent,
)
__all__ = (
'check_torrent_files... | # -*- coding: utf-8 -*-
from rpihelper.celery import current_app, celery
from rpihelper.dropboxclient.logic import Client as DropBoxClient
from rpihelper.transmission.logic import (
transmissionrpc_client, transmissionrpc_add_torrent,
)
__all__ = (
'check_torrent_files',
)
@celery.task
def check_torrent_fil... | <commit_before># -*- coding: utf-8 -*-
from rpihelper.celery import current_app, celery
from rpihelper.dropboxclient.logic import Client as DropBoxClient
from rpihelper.transmission.logic import (
transmissionrpc_client, transmissionrpc_add_torrent,
)
__all__ = (
'check_torrent_files',
)
@celery.task
def ch... |
f672d140987614c5e4e80114cf28f2f6350be233 | pyBattleship.py | pyBattleship.py | import boards
def main():
playerDead = False
enemyDead = False
enemyBoard = boards.makeEnemyBoard()
enemyLocations = boards.setupEnemyBoard()
playerBoard = boards.makePlayerBoard()
print("----BATTLESHIP----")
boards.printBoards(enemyBoard, playerBoard)
while not playerDea... | import boards
def main():
MAX_HITS = 17
enemyDead = False
playerDead = False
hitsOnEnemy = 0
hitsOnPlayer = 0
turn = 1
enemyBoard = boards.makeEnemyBoard()
enemyLocations = boards.setupEnemyBoard()
playerBoard = boards.makePlayerBoard()
print("----BATTLESHIP----")
... | Add player input evaluation, determines hit/miss | Add player input evaluation, determines hit/miss
| Python | apache-2.0 | awhittle3/pyBattleship | import boards
def main():
playerDead = False
enemyDead = False
enemyBoard = boards.makeEnemyBoard()
enemyLocations = boards.setupEnemyBoard()
playerBoard = boards.makePlayerBoard()
print("----BATTLESHIP----")
boards.printBoards(enemyBoard, playerBoard)
while not playerDea... | import boards
def main():
MAX_HITS = 17
enemyDead = False
playerDead = False
hitsOnEnemy = 0
hitsOnPlayer = 0
turn = 1
enemyBoard = boards.makeEnemyBoard()
enemyLocations = boards.setupEnemyBoard()
playerBoard = boards.makePlayerBoard()
print("----BATTLESHIP----")
... | <commit_before>import boards
def main():
playerDead = False
enemyDead = False
enemyBoard = boards.makeEnemyBoard()
enemyLocations = boards.setupEnemyBoard()
playerBoard = boards.makePlayerBoard()
print("----BATTLESHIP----")
boards.printBoards(enemyBoard, playerBoard)
whil... | import boards
def main():
MAX_HITS = 17
enemyDead = False
playerDead = False
hitsOnEnemy = 0
hitsOnPlayer = 0
turn = 1
enemyBoard = boards.makeEnemyBoard()
enemyLocations = boards.setupEnemyBoard()
playerBoard = boards.makePlayerBoard()
print("----BATTLESHIP----")
... | import boards
def main():
playerDead = False
enemyDead = False
enemyBoard = boards.makeEnemyBoard()
enemyLocations = boards.setupEnemyBoard()
playerBoard = boards.makePlayerBoard()
print("----BATTLESHIP----")
boards.printBoards(enemyBoard, playerBoard)
while not playerDea... | <commit_before>import boards
def main():
playerDead = False
enemyDead = False
enemyBoard = boards.makeEnemyBoard()
enemyLocations = boards.setupEnemyBoard()
playerBoard = boards.makePlayerBoard()
print("----BATTLESHIP----")
boards.printBoards(enemyBoard, playerBoard)
whil... |
a365d9a9021b9500475d4f54b7c29cede0064017 | pynmea2/types/proprietary/grm.py | pynmea2/types/proprietary/grm.py | # Garmin
from ... import nmea
class GRM(nmea.ProprietarySentence):
sentence_types = {}
def __new__(_cls, manufacturer, data):
name = manufacturer + data[0]
cls = _cls.sentence_types.get(name, _cls)
return super(GRM, cls).__new__(cls)
class GRME(GRM):
""" GARMIN Estim... | # Garmin
from ... import nmea
class GRM(nmea.ProprietarySentence):
sentence_types = {}
def __new__(_cls, manufacturer, data):
name = manufacturer + data[0]
cls = _cls.sentence_types.get(name, _cls)
return super(GRM, cls).__new__(cls)
def __init__(self, manufacturer, dat... | Add __init__ method to fix parsing | Add __init__ method to fix parsing
Ported this init method from ubx.py. This has the effect of removing the sentence sub-type from the data list.
Addresses issue #44 | Python | mit | silentquasar/pynmea2,Knio/pynmea2 | # Garmin
from ... import nmea
class GRM(nmea.ProprietarySentence):
sentence_types = {}
def __new__(_cls, manufacturer, data):
name = manufacturer + data[0]
cls = _cls.sentence_types.get(name, _cls)
return super(GRM, cls).__new__(cls)
class GRME(GRM):
""" GARMIN Estim... | # Garmin
from ... import nmea
class GRM(nmea.ProprietarySentence):
sentence_types = {}
def __new__(_cls, manufacturer, data):
name = manufacturer + data[0]
cls = _cls.sentence_types.get(name, _cls)
return super(GRM, cls).__new__(cls)
def __init__(self, manufacturer, dat... | <commit_before># Garmin
from ... import nmea
class GRM(nmea.ProprietarySentence):
sentence_types = {}
def __new__(_cls, manufacturer, data):
name = manufacturer + data[0]
cls = _cls.sentence_types.get(name, _cls)
return super(GRM, cls).__new__(cls)
class GRME(GRM):
"... | # Garmin
from ... import nmea
class GRM(nmea.ProprietarySentence):
sentence_types = {}
def __new__(_cls, manufacturer, data):
name = manufacturer + data[0]
cls = _cls.sentence_types.get(name, _cls)
return super(GRM, cls).__new__(cls)
def __init__(self, manufacturer, dat... | # Garmin
from ... import nmea
class GRM(nmea.ProprietarySentence):
sentence_types = {}
def __new__(_cls, manufacturer, data):
name = manufacturer + data[0]
cls = _cls.sentence_types.get(name, _cls)
return super(GRM, cls).__new__(cls)
class GRME(GRM):
""" GARMIN Estim... | <commit_before># Garmin
from ... import nmea
class GRM(nmea.ProprietarySentence):
sentence_types = {}
def __new__(_cls, manufacturer, data):
name = manufacturer + data[0]
cls = _cls.sentence_types.get(name, _cls)
return super(GRM, cls).__new__(cls)
class GRME(GRM):
"... |
12d04493f1bb9b79f2f4adf639fdb07619539305 | catwatch/blueprints/admin/models.py | catwatch/blueprints/admin/models.py | from sqlalchemy import func
from catwatch.blueprints.user.models import db, User
from catwatch.blueprints.issue.models import Issue
class Dashboard(object):
@classmethod
def group_and_count_users(cls):
"""
Perform a group by/count on all user types.
:return: List of results
"... | from sqlalchemy import func
from catwatch.blueprints.user.models import db, User
from catwatch.blueprints.issue.models import Issue
class Dashboard(object):
@classmethod
def group_and_count_users(cls):
"""
Perform a group by/count on all user types.
:return: List of results
"... | Fix inaccurate docstring for dashboard issue count | Fix inaccurate docstring for dashboard issue count
| Python | mit | nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask | from sqlalchemy import func
from catwatch.blueprints.user.models import db, User
from catwatch.blueprints.issue.models import Issue
class Dashboard(object):
@classmethod
def group_and_count_users(cls):
"""
Perform a group by/count on all user types.
:return: List of results
"... | from sqlalchemy import func
from catwatch.blueprints.user.models import db, User
from catwatch.blueprints.issue.models import Issue
class Dashboard(object):
@classmethod
def group_and_count_users(cls):
"""
Perform a group by/count on all user types.
:return: List of results
"... | <commit_before>from sqlalchemy import func
from catwatch.blueprints.user.models import db, User
from catwatch.blueprints.issue.models import Issue
class Dashboard(object):
@classmethod
def group_and_count_users(cls):
"""
Perform a group by/count on all user types.
:return: List of re... | from sqlalchemy import func
from catwatch.blueprints.user.models import db, User
from catwatch.blueprints.issue.models import Issue
class Dashboard(object):
@classmethod
def group_and_count_users(cls):
"""
Perform a group by/count on all user types.
:return: List of results
"... | from sqlalchemy import func
from catwatch.blueprints.user.models import db, User
from catwatch.blueprints.issue.models import Issue
class Dashboard(object):
@classmethod
def group_and_count_users(cls):
"""
Perform a group by/count on all user types.
:return: List of results
"... | <commit_before>from sqlalchemy import func
from catwatch.blueprints.user.models import db, User
from catwatch.blueprints.issue.models import Issue
class Dashboard(object):
@classmethod
def group_and_count_users(cls):
"""
Perform a group by/count on all user types.
:return: List of re... |
76ca06c26d74aaad1f0773321fdd382b12addcdc | src/django_easyfilters/utils.py | src/django_easyfilters/utils.py | try:
from django.db.models.constants import LOOKUP_SEP
except ImportError: # Django < 1.5 fallback
from django.db.models.sql.constants import LOOKUP_SEP
from django.db.models.related import RelatedObject
import six
def python_2_unicode_compatible(klass): # Copied from Django 1.5
"""
A decorator that de... | try:
from django.db.models.constants import LOOKUP_SEP
except ImportError: # Django < 1.5 fallback
from django.db.models.sql.constants import LOOKUP_SEP
from django.db.models.related import RelatedObject
from six import PY3
def python_2_unicode_compatible(klass): # Copied from Django 1.5
"""
A decorat... | Fix error handling in get_model_field (passthrough). | Fix error handling in get_model_field (passthrough).
| Python | mit | ionelmc/django-easyfilters,ionelmc/django-easyfilters | try:
from django.db.models.constants import LOOKUP_SEP
except ImportError: # Django < 1.5 fallback
from django.db.models.sql.constants import LOOKUP_SEP
from django.db.models.related import RelatedObject
import six
def python_2_unicode_compatible(klass): # Copied from Django 1.5
"""
A decorator that de... | try:
from django.db.models.constants import LOOKUP_SEP
except ImportError: # Django < 1.5 fallback
from django.db.models.sql.constants import LOOKUP_SEP
from django.db.models.related import RelatedObject
from six import PY3
def python_2_unicode_compatible(klass): # Copied from Django 1.5
"""
A decorat... | <commit_before>try:
from django.db.models.constants import LOOKUP_SEP
except ImportError: # Django < 1.5 fallback
from django.db.models.sql.constants import LOOKUP_SEP
from django.db.models.related import RelatedObject
import six
def python_2_unicode_compatible(klass): # Copied from Django 1.5
"""
A de... | try:
from django.db.models.constants import LOOKUP_SEP
except ImportError: # Django < 1.5 fallback
from django.db.models.sql.constants import LOOKUP_SEP
from django.db.models.related import RelatedObject
from six import PY3
def python_2_unicode_compatible(klass): # Copied from Django 1.5
"""
A decorat... | try:
from django.db.models.constants import LOOKUP_SEP
except ImportError: # Django < 1.5 fallback
from django.db.models.sql.constants import LOOKUP_SEP
from django.db.models.related import RelatedObject
import six
def python_2_unicode_compatible(klass): # Copied from Django 1.5
"""
A decorator that de... | <commit_before>try:
from django.db.models.constants import LOOKUP_SEP
except ImportError: # Django < 1.5 fallback
from django.db.models.sql.constants import LOOKUP_SEP
from django.db.models.related import RelatedObject
import six
def python_2_unicode_compatible(klass): # Copied from Django 1.5
"""
A de... |
f7c7cf55b6536fd5646272b700ce42cc02936fbb | st2common/st2common/transport/__init__.py | st2common/st2common/transport/__init__.py | from st2common.transport import actionexecution, publishers
__all__ = ['actionexecution', 'publishers']
| from st2common.transport import actionexecution, publishers
# TODO(manas) : Exchanges, Queues and RoutingKey design discussion pending.
__all__ = ['actionexecution', 'publishers']
| Add TODO to capture the fact that design discussion is pending. | Add TODO to capture the fact that design discussion is pending.
| Python | apache-2.0 | pixelrebel/st2,StackStorm/st2,pinterb/st2,jtopjian/st2,tonybaloney/st2,pinterb/st2,Itxaka/st2,emedvedev/st2,jtopjian/st2,lakshmi-kannan/st2,pixelrebel/st2,Plexxi/st2,alfasin/st2,nzlosh/st2,punalpatel/st2,StackStorm/st2,dennybaa/st2,Itxaka/st2,emedvedev/st2,dennybaa/st2,punalpatel/st2,armab/st2,StackStorm/st2,Plexxi/st2... | from st2common.transport import actionexecution, publishers
__all__ = ['actionexecution', 'publishers']
Add TODO to capture the fact that design discussion is pending. | from st2common.transport import actionexecution, publishers
# TODO(manas) : Exchanges, Queues and RoutingKey design discussion pending.
__all__ = ['actionexecution', 'publishers']
| <commit_before>from st2common.transport import actionexecution, publishers
__all__ = ['actionexecution', 'publishers']
<commit_msg>Add TODO to capture the fact that design discussion is pending.<commit_after> | from st2common.transport import actionexecution, publishers
# TODO(manas) : Exchanges, Queues and RoutingKey design discussion pending.
__all__ = ['actionexecution', 'publishers']
| from st2common.transport import actionexecution, publishers
__all__ = ['actionexecution', 'publishers']
Add TODO to capture the fact that design discussion is pending.from st2common.transport import actionexecution, publishers
# TODO(manas) : Exchanges, Queues and RoutingKey design discussion pending.
__all__ = ['ac... | <commit_before>from st2common.transport import actionexecution, publishers
__all__ = ['actionexecution', 'publishers']
<commit_msg>Add TODO to capture the fact that design discussion is pending.<commit_after>from st2common.transport import actionexecution, publishers
# TODO(manas) : Exchanges, Queues and RoutingKey d... |
b04fcc4a11eec2df0e9b2f8057aff2d073684122 | config/experiment_config_lib.py | config/experiment_config_lib.py | import itertools
import string
class ControllerConfig(object):
_port_gen = itertools.count(8888)
def __init__(self, cmdline="", address="127.0.0.1", port=None, nom_port=None):
'''
Store metadata for the controller.
- cmdline is an array of command line tokens.
Note: if you need to pass in t... | import itertools
import string
class ControllerConfig(object):
_port_gen = itertools.count(8888)
def __init__(self, cmdline="", address="127.0.0.1", port=None):
'''
Store metadata for the controller.
- cmdline is an array of command line tokens.
Note: if you need to pass in the address and ... | Remove nom_port from options. This should be infered by the controller name. Add a name member for that. For now, infer the controller from the commandline string' | Remove nom_port from options. This should be infered by the controller name. Add a name member for that. For now, infer the controller from the commandline string'
| Python | apache-2.0 | ucb-sts/sts,jmiserez/sts,ucb-sts/sts,jmiserez/sts | import itertools
import string
class ControllerConfig(object):
_port_gen = itertools.count(8888)
def __init__(self, cmdline="", address="127.0.0.1", port=None, nom_port=None):
'''
Store metadata for the controller.
- cmdline is an array of command line tokens.
Note: if you need to pass in t... | import itertools
import string
class ControllerConfig(object):
_port_gen = itertools.count(8888)
def __init__(self, cmdline="", address="127.0.0.1", port=None):
'''
Store metadata for the controller.
- cmdline is an array of command line tokens.
Note: if you need to pass in the address and ... | <commit_before>import itertools
import string
class ControllerConfig(object):
_port_gen = itertools.count(8888)
def __init__(self, cmdline="", address="127.0.0.1", port=None, nom_port=None):
'''
Store metadata for the controller.
- cmdline is an array of command line tokens.
Note: if you ne... | import itertools
import string
class ControllerConfig(object):
_port_gen = itertools.count(8888)
def __init__(self, cmdline="", address="127.0.0.1", port=None):
'''
Store metadata for the controller.
- cmdline is an array of command line tokens.
Note: if you need to pass in the address and ... | import itertools
import string
class ControllerConfig(object):
_port_gen = itertools.count(8888)
def __init__(self, cmdline="", address="127.0.0.1", port=None, nom_port=None):
'''
Store metadata for the controller.
- cmdline is an array of command line tokens.
Note: if you need to pass in t... | <commit_before>import itertools
import string
class ControllerConfig(object):
_port_gen = itertools.count(8888)
def __init__(self, cmdline="", address="127.0.0.1", port=None, nom_port=None):
'''
Store metadata for the controller.
- cmdline is an array of command line tokens.
Note: if you ne... |
6c86f7ef2ba5acdb387d154a618dd0f6bb65af6c | stacker/hooks/route53.py | stacker/hooks/route53.py | import logging
logger = logging.getLogger(__name__)
from aws_helper.connection import ConnectionManager
from stacker.util import create_route53_zone
def create_domain(region, namespace, mappings, parameters, **kwargs):
conn = ConnectionManager(region)
try:
domain = parameters['BaseDomain']
exc... | import logging
logger = logging.getLogger(__name__)
from aws_helper.connection import ConnectionManager
from stacker.util import create_route53_zone
def create_domain(region, namespace, mappings, parameters, **kwargs):
conn = ConnectionManager(region)
domain = kwargs.get('domain', parameters.get('BaseDoma... | Allow creation of domains without BaseDomain | Allow creation of domains without BaseDomain
Gives the hook the ability to parse args.
| Python | bsd-2-clause | mhahn/stacker,mhahn/stacker,federicobaldo/stacker,EnTeQuAk/stacker,remind101/stacker,remind101/stacker | import logging
logger = logging.getLogger(__name__)
from aws_helper.connection import ConnectionManager
from stacker.util import create_route53_zone
def create_domain(region, namespace, mappings, parameters, **kwargs):
conn = ConnectionManager(region)
try:
domain = parameters['BaseDomain']
exc... | import logging
logger = logging.getLogger(__name__)
from aws_helper.connection import ConnectionManager
from stacker.util import create_route53_zone
def create_domain(region, namespace, mappings, parameters, **kwargs):
conn = ConnectionManager(region)
domain = kwargs.get('domain', parameters.get('BaseDoma... | <commit_before>import logging
logger = logging.getLogger(__name__)
from aws_helper.connection import ConnectionManager
from stacker.util import create_route53_zone
def create_domain(region, namespace, mappings, parameters, **kwargs):
conn = ConnectionManager(region)
try:
domain = parameters['BaseD... | import logging
logger = logging.getLogger(__name__)
from aws_helper.connection import ConnectionManager
from stacker.util import create_route53_zone
def create_domain(region, namespace, mappings, parameters, **kwargs):
conn = ConnectionManager(region)
domain = kwargs.get('domain', parameters.get('BaseDoma... | import logging
logger = logging.getLogger(__name__)
from aws_helper.connection import ConnectionManager
from stacker.util import create_route53_zone
def create_domain(region, namespace, mappings, parameters, **kwargs):
conn = ConnectionManager(region)
try:
domain = parameters['BaseDomain']
exc... | <commit_before>import logging
logger = logging.getLogger(__name__)
from aws_helper.connection import ConnectionManager
from stacker.util import create_route53_zone
def create_domain(region, namespace, mappings, parameters, **kwargs):
conn = ConnectionManager(region)
try:
domain = parameters['BaseD... |
a01be482c81641624d77f0bfe32ad6f884996aed | pydaqmx_helper/getDeviceName.py | pydaqmx_helper/getDeviceName.py | from PyDAQmx.DAQmxFunctions import *
def getDeviceName():
buffer = create_string_buffer(1024)
# Buffer will break if too many devices, like 10 or 15, make number 100 bigger if you have to
b = c_ulong(1024)
DAQmxGetSysDevNames(buffer, b)
return a.value.decode('utf-8').split(',')[-1].strip() | from PyDAQmx.DAQmxFunctions import *
def getDeviceName():
buffer = create_string_buffer(1024)
# Buffer will break if too many devices, like 10 or 15, make number 100 bigger if you have to
b = c_ulong(1024)
DAQmxGetSysDevNames(a, b)
return a.value.decode('utf-8').split(',')[-1].strip() | Revert "Reassign a variable following previous commit" | Revert "Reassign a variable following previous commit"
This reverts commit 5c963691d3af4cddb0e3090a709110573ac97f6a.
| Python | mit | MarcoForte/PyDAQmx_Helper | from PyDAQmx.DAQmxFunctions import *
def getDeviceName():
buffer = create_string_buffer(1024)
# Buffer will break if too many devices, like 10 or 15, make number 100 bigger if you have to
b = c_ulong(1024)
DAQmxGetSysDevNames(buffer, b)
return a.value.decode('utf-8').split(',')[-1].strip()Revert "Reassign a varia... | from PyDAQmx.DAQmxFunctions import *
def getDeviceName():
buffer = create_string_buffer(1024)
# Buffer will break if too many devices, like 10 or 15, make number 100 bigger if you have to
b = c_ulong(1024)
DAQmxGetSysDevNames(a, b)
return a.value.decode('utf-8').split(',')[-1].strip() | <commit_before>from PyDAQmx.DAQmxFunctions import *
def getDeviceName():
buffer = create_string_buffer(1024)
# Buffer will break if too many devices, like 10 or 15, make number 100 bigger if you have to
b = c_ulong(1024)
DAQmxGetSysDevNames(buffer, b)
return a.value.decode('utf-8').split(',')[-1].strip()<commit_m... | from PyDAQmx.DAQmxFunctions import *
def getDeviceName():
buffer = create_string_buffer(1024)
# Buffer will break if too many devices, like 10 or 15, make number 100 bigger if you have to
b = c_ulong(1024)
DAQmxGetSysDevNames(a, b)
return a.value.decode('utf-8').split(',')[-1].strip() | from PyDAQmx.DAQmxFunctions import *
def getDeviceName():
buffer = create_string_buffer(1024)
# Buffer will break if too many devices, like 10 or 15, make number 100 bigger if you have to
b = c_ulong(1024)
DAQmxGetSysDevNames(buffer, b)
return a.value.decode('utf-8').split(',')[-1].strip()Revert "Reassign a varia... | <commit_before>from PyDAQmx.DAQmxFunctions import *
def getDeviceName():
buffer = create_string_buffer(1024)
# Buffer will break if too many devices, like 10 or 15, make number 100 bigger if you have to
b = c_ulong(1024)
DAQmxGetSysDevNames(buffer, b)
return a.value.decode('utf-8').split(',')[-1].strip()<commit_m... |
415d0bc36e509303242d32c5fc2f994346cbdb3c | pastas/version.py | pastas/version.py | # This is the only location where the version will be written and changed.
# Based on https://packaging.python.org/single_source_version/
__version__ = '0.15.0'
| # This is the only location where the version will be written and changed.
# Based on https://packaging.python.org/single_source_version/
__version__ = '0.16.0b'
| Update dev branch to 0.16.0b | Update dev branch to 0.16.0b
| Python | mit | pastas/pasta,pastas/pastas | # This is the only location where the version will be written and changed.
# Based on https://packaging.python.org/single_source_version/
__version__ = '0.15.0'
Update dev branch to 0.16.0b | # This is the only location where the version will be written and changed.
# Based on https://packaging.python.org/single_source_version/
__version__ = '0.16.0b'
| <commit_before># This is the only location where the version will be written and changed.
# Based on https://packaging.python.org/single_source_version/
__version__ = '0.15.0'
<commit_msg>Update dev branch to 0.16.0b<commit_after> | # This is the only location where the version will be written and changed.
# Based on https://packaging.python.org/single_source_version/
__version__ = '0.16.0b'
| # This is the only location where the version will be written and changed.
# Based on https://packaging.python.org/single_source_version/
__version__ = '0.15.0'
Update dev branch to 0.16.0b# This is the only location where the version will be written and changed.
# Based on https://packaging.python.org/single_source_ve... | <commit_before># This is the only location where the version will be written and changed.
# Based on https://packaging.python.org/single_source_version/
__version__ = '0.15.0'
<commit_msg>Update dev branch to 0.16.0b<commit_after># This is the only location where the version will be written and changed.
# Based on http... |
1f1699bb7b8cf537b8d2e206ac0ff03b74d5b3a7 | container_files/init/mldb_finish.py | container_files/init/mldb_finish.py | #!/usr/bin/env python
# Copyright Datacratic 2016
# Author: Jean Raby <jean@datacratic.com>
# This script is called by runsv when the mldb service exits.
# See http://smarden.org/runit/runsv.8.html for more details.
# Two arguments are given to ./finish:
# The first one is ./run's exit code, or -1 if ./run didn't exit... | #!/usr/bin/env python
# Copyright Datacratic 2016
# Author: Jean Raby <jean@datacratic.com>
# This script is called by runsv when the mldb service exits.
# See http://smarden.org/runit/runsv.8.html for more details.
# Two arguments are given to ./finish:
# The first one is ./run's exit code, or -1 if ./run didn't exit... | Add signal map and human readable description | Add signal map and human readable description
| Python | apache-2.0 | mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb,mldbai/mldb | #!/usr/bin/env python
# Copyright Datacratic 2016
# Author: Jean Raby <jean@datacratic.com>
# This script is called by runsv when the mldb service exits.
# See http://smarden.org/runit/runsv.8.html for more details.
# Two arguments are given to ./finish:
# The first one is ./run's exit code, or -1 if ./run didn't exit... | #!/usr/bin/env python
# Copyright Datacratic 2016
# Author: Jean Raby <jean@datacratic.com>
# This script is called by runsv when the mldb service exits.
# See http://smarden.org/runit/runsv.8.html for more details.
# Two arguments are given to ./finish:
# The first one is ./run's exit code, or -1 if ./run didn't exit... | <commit_before>#!/usr/bin/env python
# Copyright Datacratic 2016
# Author: Jean Raby <jean@datacratic.com>
# This script is called by runsv when the mldb service exits.
# See http://smarden.org/runit/runsv.8.html for more details.
# Two arguments are given to ./finish:
# The first one is ./run's exit code, or -1 if ./... | #!/usr/bin/env python
# Copyright Datacratic 2016
# Author: Jean Raby <jean@datacratic.com>
# This script is called by runsv when the mldb service exits.
# See http://smarden.org/runit/runsv.8.html for more details.
# Two arguments are given to ./finish:
# The first one is ./run's exit code, or -1 if ./run didn't exit... | #!/usr/bin/env python
# Copyright Datacratic 2016
# Author: Jean Raby <jean@datacratic.com>
# This script is called by runsv when the mldb service exits.
# See http://smarden.org/runit/runsv.8.html for more details.
# Two arguments are given to ./finish:
# The first one is ./run's exit code, or -1 if ./run didn't exit... | <commit_before>#!/usr/bin/env python
# Copyright Datacratic 2016
# Author: Jean Raby <jean@datacratic.com>
# This script is called by runsv when the mldb service exits.
# See http://smarden.org/runit/runsv.8.html for more details.
# Two arguments are given to ./finish:
# The first one is ./run's exit code, or -1 if ./... |
cec8a1d5afa936ce7df5bae8b7cead9564ac7b97 | youmap/views.py | youmap/views.py | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-modified_at')[:100]
return {
... | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-pk')[:100]
return {
"ma... | Order by modified_at create problem with endless_navigation and browser cache | Order by modified_at create problem with endless_navigation and browser cache
Need to handle cache properly before
| Python | agpl-3.0 | diraol/umap | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-modified_at')[:100]
return {
... | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-pk')[:100]
return {
"ma... | <commit_before>from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-modified_at')[:100]
... | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-pk')[:100]
return {
"ma... | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-modified_at')[:100]
return {
... | <commit_before>from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-modified_at')[:100]
... |
b6052b35235a09f508aa75012badc830df8bcfa0 | sethji/views/sync.py | sethji/views/sync.py | # -*- coding: utf-8 -*-
#
from sethji.model.sync import SyncAws
from sethji.views.account import requires_login
from flask import Blueprint, redirect, url_for, flash, request
mod = Blueprint('sync', __name__, url_prefix='/sync')
@mod.route("/", methods=["POST"])
@requires_login
def sync():
sync_aws = SyncAws()... | # -*- coding: utf-8 -*-
#
from sethji.model.sync import SyncAws
from sethji.views.account import requires_login
from flask import Blueprint, redirect, url_for, flash
mod = Blueprint('sync', __name__, url_prefix='/sync')
@mod.route("/", methods=["POST"])
@requires_login
def sync():
sync_aws = SyncAws()
sync... | Revert "Redirect to same page" | Revert "Redirect to same page"
This reverts commit 1f49ee31c21e1bebefb3be9ecc9e4df7c115a5ef.
| Python | mit | rohit01/sethji,rohit01/sethji,rohit01/sethji | # -*- coding: utf-8 -*-
#
from sethji.model.sync import SyncAws
from sethji.views.account import requires_login
from flask import Blueprint, redirect, url_for, flash, request
mod = Blueprint('sync', __name__, url_prefix='/sync')
@mod.route("/", methods=["POST"])
@requires_login
def sync():
sync_aws = SyncAws()... | # -*- coding: utf-8 -*-
#
from sethji.model.sync import SyncAws
from sethji.views.account import requires_login
from flask import Blueprint, redirect, url_for, flash
mod = Blueprint('sync', __name__, url_prefix='/sync')
@mod.route("/", methods=["POST"])
@requires_login
def sync():
sync_aws = SyncAws()
sync... | <commit_before># -*- coding: utf-8 -*-
#
from sethji.model.sync import SyncAws
from sethji.views.account import requires_login
from flask import Blueprint, redirect, url_for, flash, request
mod = Blueprint('sync', __name__, url_prefix='/sync')
@mod.route("/", methods=["POST"])
@requires_login
def sync():
sync_... | # -*- coding: utf-8 -*-
#
from sethji.model.sync import SyncAws
from sethji.views.account import requires_login
from flask import Blueprint, redirect, url_for, flash
mod = Blueprint('sync', __name__, url_prefix='/sync')
@mod.route("/", methods=["POST"])
@requires_login
def sync():
sync_aws = SyncAws()
sync... | # -*- coding: utf-8 -*-
#
from sethji.model.sync import SyncAws
from sethji.views.account import requires_login
from flask import Blueprint, redirect, url_for, flash, request
mod = Blueprint('sync', __name__, url_prefix='/sync')
@mod.route("/", methods=["POST"])
@requires_login
def sync():
sync_aws = SyncAws()... | <commit_before># -*- coding: utf-8 -*-
#
from sethji.model.sync import SyncAws
from sethji.views.account import requires_login
from flask import Blueprint, redirect, url_for, flash, request
mod = Blueprint('sync', __name__, url_prefix='/sync')
@mod.route("/", methods=["POST"])
@requires_login
def sync():
sync_... |
fa8e30c2b41e8078ca87a73cc90c2652c46b1ee0 | corvus/console.py | corvus/console.py | import sys
from corvus.client import Corvus
def main():
corvus = Corvus()
corvus.init_drive()
total_sectors = corvus.get_drive_capacity(1)
with open("image.bin", "wb") as f:
for i in range(total_sectors):
orig_data = corvus.read_sector_512(1, i)
corvus.write_sector_512(1... | import sys
from corvus.client import Corvus
def backup(corvus, filename):
total_sectors = corvus.get_drive_capacity(1)
with open(filename, "wb") as f:
for i in range(total_sectors):
data = corvus.read_sector_512(1, i)
f.write(''.join([ chr(d) for d in data ]))
sys.st... | Add backup and restore functions | Add backup and restore functions
| Python | bsd-3-clause | mnaberez/corvus | import sys
from corvus.client import Corvus
def main():
corvus = Corvus()
corvus.init_drive()
total_sectors = corvus.get_drive_capacity(1)
with open("image.bin", "wb") as f:
for i in range(total_sectors):
orig_data = corvus.read_sector_512(1, i)
corvus.write_sector_512(1... | import sys
from corvus.client import Corvus
def backup(corvus, filename):
total_sectors = corvus.get_drive_capacity(1)
with open(filename, "wb") as f:
for i in range(total_sectors):
data = corvus.read_sector_512(1, i)
f.write(''.join([ chr(d) for d in data ]))
sys.st... | <commit_before>import sys
from corvus.client import Corvus
def main():
corvus = Corvus()
corvus.init_drive()
total_sectors = corvus.get_drive_capacity(1)
with open("image.bin", "wb") as f:
for i in range(total_sectors):
orig_data = corvus.read_sector_512(1, i)
corvus.wri... | import sys
from corvus.client import Corvus
def backup(corvus, filename):
total_sectors = corvus.get_drive_capacity(1)
with open(filename, "wb") as f:
for i in range(total_sectors):
data = corvus.read_sector_512(1, i)
f.write(''.join([ chr(d) for d in data ]))
sys.st... | import sys
from corvus.client import Corvus
def main():
corvus = Corvus()
corvus.init_drive()
total_sectors = corvus.get_drive_capacity(1)
with open("image.bin", "wb") as f:
for i in range(total_sectors):
orig_data = corvus.read_sector_512(1, i)
corvus.write_sector_512(1... | <commit_before>import sys
from corvus.client import Corvus
def main():
corvus = Corvus()
corvus.init_drive()
total_sectors = corvus.get_drive_capacity(1)
with open("image.bin", "wb") as f:
for i in range(total_sectors):
orig_data = corvus.read_sector_512(1, i)
corvus.wri... |
adb4e5bcf08dc8703cbd5dbd651e1fef3afbbbad | simphony/__init__.py | simphony/__init__.py | # -*- coding: utf-8 -*-
"""SimPhoNy: Simulation framework for multi-scale phenomena in micro-
and nanosystems.
SimPhoNy is an EU-project funded by the 7th Framework Programme (Project
number 604005) under the call NMP.2013.1.4-1: "Development of an integrated
multi-scale modelling environment for nanomaterials and ... | # -*- coding: utf-8 -*-
"""SimPhoNy: Simulation framework for multi-scale phenomena in micro-
and nanosystems.
SimPhoNy is an EU-project funded by the 7th Framework Programme (Project
number 604005) under the call NMP.2013.1.4-1: "Development of an integrated
multi-scale modelling environment for nanomaterials and ... | Add 2016 to copyright notice | Add 2016 to copyright notice
| Python | bsd-2-clause | simphony/simphony-common | # -*- coding: utf-8 -*-
"""SimPhoNy: Simulation framework for multi-scale phenomena in micro-
and nanosystems.
SimPhoNy is an EU-project funded by the 7th Framework Programme (Project
number 604005) under the call NMP.2013.1.4-1: "Development of an integrated
multi-scale modelling environment for nanomaterials and ... | # -*- coding: utf-8 -*-
"""SimPhoNy: Simulation framework for multi-scale phenomena in micro-
and nanosystems.
SimPhoNy is an EU-project funded by the 7th Framework Programme (Project
number 604005) under the call NMP.2013.1.4-1: "Development of an integrated
multi-scale modelling environment for nanomaterials and ... | <commit_before># -*- coding: utf-8 -*-
"""SimPhoNy: Simulation framework for multi-scale phenomena in micro-
and nanosystems.
SimPhoNy is an EU-project funded by the 7th Framework Programme (Project
number 604005) under the call NMP.2013.1.4-1: "Development of an integrated
multi-scale modelling environment for nan... | # -*- coding: utf-8 -*-
"""SimPhoNy: Simulation framework for multi-scale phenomena in micro-
and nanosystems.
SimPhoNy is an EU-project funded by the 7th Framework Programme (Project
number 604005) under the call NMP.2013.1.4-1: "Development of an integrated
multi-scale modelling environment for nanomaterials and ... | # -*- coding: utf-8 -*-
"""SimPhoNy: Simulation framework for multi-scale phenomena in micro-
and nanosystems.
SimPhoNy is an EU-project funded by the 7th Framework Programme (Project
number 604005) under the call NMP.2013.1.4-1: "Development of an integrated
multi-scale modelling environment for nanomaterials and ... | <commit_before># -*- coding: utf-8 -*-
"""SimPhoNy: Simulation framework for multi-scale phenomena in micro-
and nanosystems.
SimPhoNy is an EU-project funded by the 7th Framework Programme (Project
number 604005) under the call NMP.2013.1.4-1: "Development of an integrated
multi-scale modelling environment for nan... |
cdcecaad78b8acf1c067c5eb631e6c3ae7167c2c | elasticsearch_dsl/__init__.py | elasticsearch_dsl/__init__.py | from .query import Q
from .filter import F
from .aggs import A
from .function import SF
from .search import Search
from .field import *
from .document import DocType
from .mapping import Mapping
from .index import Index
from .analysis import analyzer, token_filter, char_filter, tokenizer
VERSION = (0, 0, 4, 'dev')
__v... | from .query import Q
from .filter import F
from .aggs import A
from .function import SF
from .search import Search
from .field import *
from .document import DocType, MetaField
from .mapping import Mapping
from .index import Index
from .analysis import analyzer, token_filter, char_filter, tokenizer
VERSION = (0, 0, 4,... | Include MetaField in things importable from root | Include MetaField in things importable from root
| Python | apache-2.0 | sangheestyle/elasticsearch-dsl-py,3lnc/elasticsearch-dsl-py,elastic/elasticsearch-dsl-py,harshmaur/elasticsearch-dsl-py,solarissmoke/elasticsearch-dsl-py,Quiri/elasticsearch-dsl-py,harshit298/elasticsearch-dsl-py,f-santos/elasticsearch-dsl-py,reflection/elasticsearch-dsl-py,REVLWorld/elasticsearch-dsl-py,ziky90/elastic... | from .query import Q
from .filter import F
from .aggs import A
from .function import SF
from .search import Search
from .field import *
from .document import DocType
from .mapping import Mapping
from .index import Index
from .analysis import analyzer, token_filter, char_filter, tokenizer
VERSION = (0, 0, 4, 'dev')
__v... | from .query import Q
from .filter import F
from .aggs import A
from .function import SF
from .search import Search
from .field import *
from .document import DocType, MetaField
from .mapping import Mapping
from .index import Index
from .analysis import analyzer, token_filter, char_filter, tokenizer
VERSION = (0, 0, 4,... | <commit_before>from .query import Q
from .filter import F
from .aggs import A
from .function import SF
from .search import Search
from .field import *
from .document import DocType
from .mapping import Mapping
from .index import Index
from .analysis import analyzer, token_filter, char_filter, tokenizer
VERSION = (0, 0... | from .query import Q
from .filter import F
from .aggs import A
from .function import SF
from .search import Search
from .field import *
from .document import DocType, MetaField
from .mapping import Mapping
from .index import Index
from .analysis import analyzer, token_filter, char_filter, tokenizer
VERSION = (0, 0, 4,... | from .query import Q
from .filter import F
from .aggs import A
from .function import SF
from .search import Search
from .field import *
from .document import DocType
from .mapping import Mapping
from .index import Index
from .analysis import analyzer, token_filter, char_filter, tokenizer
VERSION = (0, 0, 4, 'dev')
__v... | <commit_before>from .query import Q
from .filter import F
from .aggs import A
from .function import SF
from .search import Search
from .field import *
from .document import DocType
from .mapping import Mapping
from .index import Index
from .analysis import analyzer, token_filter, char_filter, tokenizer
VERSION = (0, 0... |
eac383015161f661de33a94dae958a21761071dc | zeus/run.py | zeus/run.py | #!/usr/bin/env python
"""
run.py makes it easy to start Flask's built-in development webserver.
To start a development server, ensure all the necessary packages are
installed: (I suggest setting up a Virtualenv for this)
$ pip install -r requirements.txt
< ... >
$ python run.py
* Running on http://127.0.0.1:5000/
... | #!/usr/bin/env python
"""
run.py makes it easy to start Flask's built-in development webserver.
To start a development server, ensure all the necessary packages are
installed: (I suggest setting up a Virtualenv for this)
$ pip install -r requirements.txt
< ... >
$ python run.py
* Running on http://127.0.0.1:5000/
... | Move all api routes into /api/ | Move all api routes into /api/
| Python | bsd-2-clause | nbroeking/OPLabs,jrahm/OPLabs,jrahm/OPLabs,ZachAnders/OPLabs,nbroeking/OPLabs,ZachAnders/OPLabs,ZachAnders/OPLabs,nbroeking/OPLabs,ZachAnders/OPLabs,nbroeking/OPLabs,nbroeking/OPLabs,jrahm/OPLabs,jrahm/OPLabs,ZachAnders/OPLabs,nbroeking/OPLabs,jrahm/OPLabs,jrahm/OPLabs,ZachAnders/OPLabs | #!/usr/bin/env python
"""
run.py makes it easy to start Flask's built-in development webserver.
To start a development server, ensure all the necessary packages are
installed: (I suggest setting up a Virtualenv for this)
$ pip install -r requirements.txt
< ... >
$ python run.py
* Running on http://127.0.0.1:5000/
... | #!/usr/bin/env python
"""
run.py makes it easy to start Flask's built-in development webserver.
To start a development server, ensure all the necessary packages are
installed: (I suggest setting up a Virtualenv for this)
$ pip install -r requirements.txt
< ... >
$ python run.py
* Running on http://127.0.0.1:5000/
... | <commit_before>#!/usr/bin/env python
"""
run.py makes it easy to start Flask's built-in development webserver.
To start a development server, ensure all the necessary packages are
installed: (I suggest setting up a Virtualenv for this)
$ pip install -r requirements.txt
< ... >
$ python run.py
* Running on http://12... | #!/usr/bin/env python
"""
run.py makes it easy to start Flask's built-in development webserver.
To start a development server, ensure all the necessary packages are
installed: (I suggest setting up a Virtualenv for this)
$ pip install -r requirements.txt
< ... >
$ python run.py
* Running on http://127.0.0.1:5000/
... | #!/usr/bin/env python
"""
run.py makes it easy to start Flask's built-in development webserver.
To start a development server, ensure all the necessary packages are
installed: (I suggest setting up a Virtualenv for this)
$ pip install -r requirements.txt
< ... >
$ python run.py
* Running on http://127.0.0.1:5000/
... | <commit_before>#!/usr/bin/env python
"""
run.py makes it easy to start Flask's built-in development webserver.
To start a development server, ensure all the necessary packages are
installed: (I suggest setting up a Virtualenv for this)
$ pip install -r requirements.txt
< ... >
$ python run.py
* Running on http://12... |
b0231d8d8832559a2e5382c3e0ad47e6d6232761 | src/oscar/apps/offer/signals.py | src/oscar/apps/offer/signals.py | from django.db.models.signals import post_delete
from django.dispatch import receiver
from oscar.core.loading import get_model
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Condition = get_model('offer', 'Condition')
Benefit = get_model('offer', 'Benefit')
@receiver(post_delete, sender=ConditionalOffer)... | from django.db.models.signals import post_delete
from django.dispatch import receiver
from oscar.core.loading import get_model
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Condition = get_model('offer', 'Condition')
Benefit = get_model('offer', 'Benefit')
@receiver(post_delete, sender=ConditionalOffer)... | Rename offer signal to remove unused conditions/benefits | Rename offer signal to remove unused conditions/benefits
| Python | bsd-3-clause | sasha0/django-oscar,sasha0/django-oscar,sasha0/django-oscar,solarissmoke/django-oscar,solarissmoke/django-oscar,sonofatailor/django-oscar,django-oscar/django-oscar,solarissmoke/django-oscar,sasha0/django-oscar,sonofatailor/django-oscar,django-oscar/django-oscar,django-oscar/django-oscar,sonofatailor/django-oscar,solari... | from django.db.models.signals import post_delete
from django.dispatch import receiver
from oscar.core.loading import get_model
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Condition = get_model('offer', 'Condition')
Benefit = get_model('offer', 'Benefit')
@receiver(post_delete, sender=ConditionalOffer)... | from django.db.models.signals import post_delete
from django.dispatch import receiver
from oscar.core.loading import get_model
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Condition = get_model('offer', 'Condition')
Benefit = get_model('offer', 'Benefit')
@receiver(post_delete, sender=ConditionalOffer)... | <commit_before>from django.db.models.signals import post_delete
from django.dispatch import receiver
from oscar.core.loading import get_model
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Condition = get_model('offer', 'Condition')
Benefit = get_model('offer', 'Benefit')
@receiver(post_delete, sender=Co... | from django.db.models.signals import post_delete
from django.dispatch import receiver
from oscar.core.loading import get_model
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Condition = get_model('offer', 'Condition')
Benefit = get_model('offer', 'Benefit')
@receiver(post_delete, sender=ConditionalOffer)... | from django.db.models.signals import post_delete
from django.dispatch import receiver
from oscar.core.loading import get_model
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Condition = get_model('offer', 'Condition')
Benefit = get_model('offer', 'Benefit')
@receiver(post_delete, sender=ConditionalOffer)... | <commit_before>from django.db.models.signals import post_delete
from django.dispatch import receiver
from oscar.core.loading import get_model
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Condition = get_model('offer', 'Condition')
Benefit = get_model('offer', 'Benefit')
@receiver(post_delete, sender=Co... |
dda35a476f81be0deb67c1a45320d17dc927788b | smile_base/models/ir_config_parameter.py | smile_base/models/ir_config_parameter.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | Allow to override any config parameter via config file | [IMP] Allow to override any config parameter via config file | Python | agpl-3.0 | chadyred/odoo_addons,chadyred/odoo_addons,ovnicraft/odoo_addons,bmya/odoo_addons,chadyred/odoo_addons,odoocn/odoo_addons,tiexinliu/odoo_addons,bmya/odoo_addons,odoocn/odoo_addons,ovnicraft/odoo_addons,tiexinliu/odoo_addons,ovnicraft/odoo_addons,odoocn/odoo_addons,tiexinliu/odoo_addons,bmya/odoo_addons | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
#... | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
#... |
a12ea60be17dabf837984e03162ebff152f0fd21 | examples/project_one/input.py | examples/project_one/input.py | def read_file(filename):
# Open the file
file_obj = open(filename)
# Iterate over lines in the file
for line in file_obj:
# Split line by spaces (creates a list)
# Alternatives: split(',')
numbers = line.split()
if len(numbers) != 2:
# Convert strings to nu... | def read_file(filename):
# Open the file
file_obj = open(filename)
# Iterate over lines in the file
for line in file_obj:
# Split line by spaces (creates a list)
# Alternatives: split(',')
numbers = line.split()
if len(numbers) != 2:
# Convert strings to nu... | Use map for smarter iteration. | Use map for smarter iteration.
| Python | mit | dokterbob/slf-programming-workshops,dokterbob/slf-programming-workshops,dokterbob/slf-programming-workshops,dokterbob/slf-programming-workshops | def read_file(filename):
# Open the file
file_obj = open(filename)
# Iterate over lines in the file
for line in file_obj:
# Split line by spaces (creates a list)
# Alternatives: split(',')
numbers = line.split()
if len(numbers) != 2:
# Convert strings to nu... | def read_file(filename):
# Open the file
file_obj = open(filename)
# Iterate over lines in the file
for line in file_obj:
# Split line by spaces (creates a list)
# Alternatives: split(',')
numbers = line.split()
if len(numbers) != 2:
# Convert strings to nu... | <commit_before>def read_file(filename):
# Open the file
file_obj = open(filename)
# Iterate over lines in the file
for line in file_obj:
# Split line by spaces (creates a list)
# Alternatives: split(',')
numbers = line.split()
if len(numbers) != 2:
# Conver... | def read_file(filename):
# Open the file
file_obj = open(filename)
# Iterate over lines in the file
for line in file_obj:
# Split line by spaces (creates a list)
# Alternatives: split(',')
numbers = line.split()
if len(numbers) != 2:
# Convert strings to nu... | def read_file(filename):
# Open the file
file_obj = open(filename)
# Iterate over lines in the file
for line in file_obj:
# Split line by spaces (creates a list)
# Alternatives: split(',')
numbers = line.split()
if len(numbers) != 2:
# Convert strings to nu... | <commit_before>def read_file(filename):
# Open the file
file_obj = open(filename)
# Iterate over lines in the file
for line in file_obj:
# Split line by spaces (creates a list)
# Alternatives: split(',')
numbers = line.split()
if len(numbers) != 2:
# Conver... |
48da784fbf74d47f22f2527695b2d9de1528a484 | flow_workflow/commands/submit_workflow.py | flow_workflow/commands/submit_workflow.py | from flow_workflow.commands.launch_base import LaunchWorkflowCommandBase
from flow.configuration.inject.broker import BrokerConfiguration
from flow.configuration.inject.redis_conf import RedisConfiguration
from flow.configuration.inject.service_locator import ServiceLocatorConfiguration
from twisted.internet import def... | from flow_workflow.commands.launch_base import LaunchWorkflowCommandBase
from flow.configuration.inject.broker import BrokerConfiguration
from flow.configuration.inject.redis_conf import RedisConfiguration
from flow.configuration.inject.service_locator import ServiceLocatorConfiguration
from twisted.internet import def... | Make submit workflow's local_workflow be False | Make submit workflow's local_workflow be False
| Python | agpl-3.0 | genome/flow-workflow,genome/flow-workflow,genome/flow-workflow | from flow_workflow.commands.launch_base import LaunchWorkflowCommandBase
from flow.configuration.inject.broker import BrokerConfiguration
from flow.configuration.inject.redis_conf import RedisConfiguration
from flow.configuration.inject.service_locator import ServiceLocatorConfiguration
from twisted.internet import def... | from flow_workflow.commands.launch_base import LaunchWorkflowCommandBase
from flow.configuration.inject.broker import BrokerConfiguration
from flow.configuration.inject.redis_conf import RedisConfiguration
from flow.configuration.inject.service_locator import ServiceLocatorConfiguration
from twisted.internet import def... | <commit_before>from flow_workflow.commands.launch_base import LaunchWorkflowCommandBase
from flow.configuration.inject.broker import BrokerConfiguration
from flow.configuration.inject.redis_conf import RedisConfiguration
from flow.configuration.inject.service_locator import ServiceLocatorConfiguration
from twisted.inte... | from flow_workflow.commands.launch_base import LaunchWorkflowCommandBase
from flow.configuration.inject.broker import BrokerConfiguration
from flow.configuration.inject.redis_conf import RedisConfiguration
from flow.configuration.inject.service_locator import ServiceLocatorConfiguration
from twisted.internet import def... | from flow_workflow.commands.launch_base import LaunchWorkflowCommandBase
from flow.configuration.inject.broker import BrokerConfiguration
from flow.configuration.inject.redis_conf import RedisConfiguration
from flow.configuration.inject.service_locator import ServiceLocatorConfiguration
from twisted.internet import def... | <commit_before>from flow_workflow.commands.launch_base import LaunchWorkflowCommandBase
from flow.configuration.inject.broker import BrokerConfiguration
from flow.configuration.inject.redis_conf import RedisConfiguration
from flow.configuration.inject.service_locator import ServiceLocatorConfiguration
from twisted.inte... |
9f3f9229718694570d7b56fe6cd63478f59f0de5 | us_ignite/common/tests/utils.py | us_ignite/common/tests/utils.py | from django.core.urlresolvers import reverse
from django.contrib.messages.storage.base import BaseStorage, Message
def get_login_url(url):
"""Returns an expected login URL."""
return ('%s?next=%s' % (reverse('auth_login'), url))
class TestMessagesBackend(BaseStorage):
"""
When unit testing a django ... | from django.contrib.auth.models import User, AnonymousUser
from django.core.urlresolvers import reverse
from django.contrib.messages.storage.base import BaseStorage, Message
from django.test import client
from mock import Mock
def get_login_url(url):
"""Returns an expected login URL."""
return ('%s?next=%s'... | Add utilities to generate request doubles. | Add utilities to generate request doubles.
The new ``get_request`` function is a helper used to generate
request doubles the first argument is the ``method``, an
optional user can be attached to the request.
| Python | bsd-3-clause | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | from django.core.urlresolvers import reverse
from django.contrib.messages.storage.base import BaseStorage, Message
def get_login_url(url):
"""Returns an expected login URL."""
return ('%s?next=%s' % (reverse('auth_login'), url))
class TestMessagesBackend(BaseStorage):
"""
When unit testing a django ... | from django.contrib.auth.models import User, AnonymousUser
from django.core.urlresolvers import reverse
from django.contrib.messages.storage.base import BaseStorage, Message
from django.test import client
from mock import Mock
def get_login_url(url):
"""Returns an expected login URL."""
return ('%s?next=%s'... | <commit_before>from django.core.urlresolvers import reverse
from django.contrib.messages.storage.base import BaseStorage, Message
def get_login_url(url):
"""Returns an expected login URL."""
return ('%s?next=%s' % (reverse('auth_login'), url))
class TestMessagesBackend(BaseStorage):
"""
When unit te... | from django.contrib.auth.models import User, AnonymousUser
from django.core.urlresolvers import reverse
from django.contrib.messages.storage.base import BaseStorage, Message
from django.test import client
from mock import Mock
def get_login_url(url):
"""Returns an expected login URL."""
return ('%s?next=%s'... | from django.core.urlresolvers import reverse
from django.contrib.messages.storage.base import BaseStorage, Message
def get_login_url(url):
"""Returns an expected login URL."""
return ('%s?next=%s' % (reverse('auth_login'), url))
class TestMessagesBackend(BaseStorage):
"""
When unit testing a django ... | <commit_before>from django.core.urlresolvers import reverse
from django.contrib.messages.storage.base import BaseStorage, Message
def get_login_url(url):
"""Returns an expected login URL."""
return ('%s?next=%s' % (reverse('auth_login'), url))
class TestMessagesBackend(BaseStorage):
"""
When unit te... |
38221a3d8df945981f9595842871b5dae6a68c0f | user_management/models/tests/factories.py | user_management/models/tests/factories.py | import factory
from django.contrib.auth import get_user_model
class UserFactory(factory.DjangoModelFactory):
FACTORY_FOR = get_user_model()
name = factory.Sequence(lambda i: 'Test User {}'.format(i))
email = factory.Sequence(lambda i: 'email{}@example.com'.format(i))
password = factory.PostGeneration... | import factory
from django.contrib.auth import get_user_model
class UserFactory(factory.DjangoModelFactory):
FACTORY_FOR = get_user_model()
name = factory.Sequence(lambda i: 'Test User {}'.format(i))
email = factory.Sequence(lambda i: 'email{}@example.com'.format(i))
is_active = True
@factory.po... | Add raw_password to Users in tests | Add raw_password to Users in tests
| Python | bsd-2-clause | incuna/django-user-management,incuna/django-user-management | import factory
from django.contrib.auth import get_user_model
class UserFactory(factory.DjangoModelFactory):
FACTORY_FOR = get_user_model()
name = factory.Sequence(lambda i: 'Test User {}'.format(i))
email = factory.Sequence(lambda i: 'email{}@example.com'.format(i))
password = factory.PostGeneration... | import factory
from django.contrib.auth import get_user_model
class UserFactory(factory.DjangoModelFactory):
FACTORY_FOR = get_user_model()
name = factory.Sequence(lambda i: 'Test User {}'.format(i))
email = factory.Sequence(lambda i: 'email{}@example.com'.format(i))
is_active = True
@factory.po... | <commit_before>import factory
from django.contrib.auth import get_user_model
class UserFactory(factory.DjangoModelFactory):
FACTORY_FOR = get_user_model()
name = factory.Sequence(lambda i: 'Test User {}'.format(i))
email = factory.Sequence(lambda i: 'email{}@example.com'.format(i))
password = factory... | import factory
from django.contrib.auth import get_user_model
class UserFactory(factory.DjangoModelFactory):
FACTORY_FOR = get_user_model()
name = factory.Sequence(lambda i: 'Test User {}'.format(i))
email = factory.Sequence(lambda i: 'email{}@example.com'.format(i))
is_active = True
@factory.po... | import factory
from django.contrib.auth import get_user_model
class UserFactory(factory.DjangoModelFactory):
FACTORY_FOR = get_user_model()
name = factory.Sequence(lambda i: 'Test User {}'.format(i))
email = factory.Sequence(lambda i: 'email{}@example.com'.format(i))
password = factory.PostGeneration... | <commit_before>import factory
from django.contrib.auth import get_user_model
class UserFactory(factory.DjangoModelFactory):
FACTORY_FOR = get_user_model()
name = factory.Sequence(lambda i: 'Test User {}'.format(i))
email = factory.Sequence(lambda i: 'email{}@example.com'.format(i))
password = factory... |
39d377c462ac031203877a2c13df79be41c68585 | tests/fileutils-tests.py | tests/fileutils-tests.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import raises
from spec_cleaner.fileutils import FileUtils
from spec_cleaner import RpmException
class TestFileutils(unittest.TestCase):
"""
We run few tests to ensure fileutils class works fine
"""
def setUp(self):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import raises
from spec_cleaner.fileutils import FileUtils
from spec_cleaner import RpmException
class TestFileutils(unittest.TestCase):
"""
We run few tests to ensure fileutils class works fine
"""
def setUp(self):
... | Fix variable in testcase from previous commit change | Fix variable in testcase from previous commit change
| Python | bsd-3-clause | plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import raises
from spec_cleaner.fileutils import FileUtils
from spec_cleaner import RpmException
class TestFileutils(unittest.TestCase):
"""
We run few tests to ensure fileutils class works fine
"""
def setUp(self):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import raises
from spec_cleaner.fileutils import FileUtils
from spec_cleaner import RpmException
class TestFileutils(unittest.TestCase):
"""
We run few tests to ensure fileutils class works fine
"""
def setUp(self):
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import raises
from spec_cleaner.fileutils import FileUtils
from spec_cleaner import RpmException
class TestFileutils(unittest.TestCase):
"""
We run few tests to ensure fileutils class works fine
"""
def set... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import raises
from spec_cleaner.fileutils import FileUtils
from spec_cleaner import RpmException
class TestFileutils(unittest.TestCase):
"""
We run few tests to ensure fileutils class works fine
"""
def setUp(self):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import raises
from spec_cleaner.fileutils import FileUtils
from spec_cleaner import RpmException
class TestFileutils(unittest.TestCase):
"""
We run few tests to ensure fileutils class works fine
"""
def setUp(self):
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import raises
from spec_cleaner.fileutils import FileUtils
from spec_cleaner import RpmException
class TestFileutils(unittest.TestCase):
"""
We run few tests to ensure fileutils class works fine
"""
def set... |
cbaab510c92566ffdcc7eb65af0ec9cf1320f173 | recipes/webrtc.py | recipes/webrtc.py | # Copyright (c) 2014 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 sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232... | # Copyright (c) 2014 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 sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232... | Switch WebRTC recipe to Git. | Switch WebRTC recipe to Git.
BUG=412012
Review URL: https://codereview.chromium.org/765373002
git-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@294546 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| Python | bsd-3-clause | svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools | # Copyright (c) 2014 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 sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232... | # Copyright (c) 2014 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 sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232... | <commit_before># Copyright (c) 2014 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 sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint... | # Copyright (c) 2014 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 sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232... | # Copyright (c) 2014 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 sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232... | <commit_before># Copyright (c) 2014 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 sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint... |
54ab41cb8c30ddd46154f23e89947286222616e1 | raven/__init__.py | raven/__init__.py | """
raven
~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
__all__ = ('VERSION', 'Client', 'load')
try:
VERSION = __import__('pkg_resources') \
.get_distribution('raven').version
except Exception as e:
VERSION = 'unknow... | """
raven
~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import os
import os.path
from raven.base import * # NOQA
from raven.conf import * # NOQA
__all__ = ('VERSION', 'Client', 'load', 'get_version')
try:
VERSION = __import... | Add git sha to version if available | Add git sha to version if available
| Python | bsd-3-clause | getsentry/raven-python,icereval/raven-python,inspirehep/raven-python,inspirehep/raven-python,dbravender/raven-python,hzy/raven-python,getsentry/raven-python,jmagnusson/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,icereval/raven-python,ewdurbin/raven-python,smarkets/raven-python,johansteffner/raven-python,j... | """
raven
~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
__all__ = ('VERSION', 'Client', 'load')
try:
VERSION = __import__('pkg_resources') \
.get_distribution('raven').version
except Exception as e:
VERSION = 'unknow... | """
raven
~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import os
import os.path
from raven.base import * # NOQA
from raven.conf import * # NOQA
__all__ = ('VERSION', 'Client', 'load', 'get_version')
try:
VERSION = __import... | <commit_before>"""
raven
~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
__all__ = ('VERSION', 'Client', 'load')
try:
VERSION = __import__('pkg_resources') \
.get_distribution('raven').version
except Exception as e:
VE... | """
raven
~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import os
import os.path
from raven.base import * # NOQA
from raven.conf import * # NOQA
__all__ = ('VERSION', 'Client', 'load', 'get_version')
try:
VERSION = __import... | """
raven
~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
__all__ = ('VERSION', 'Client', 'load')
try:
VERSION = __import__('pkg_resources') \
.get_distribution('raven').version
except Exception as e:
VERSION = 'unknow... | <commit_before>"""
raven
~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
__all__ = ('VERSION', 'Client', 'load')
try:
VERSION = __import__('pkg_resources') \
.get_distribution('raven').version
except Exception as e:
VE... |
b58caeae59a5ab363b4b6b40cbd19004b40dd206 | calvin/actorstore/systemactors/sensor/Distance.py | calvin/actorstore/systemactors/sensor/Distance.py | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | Fix a bug where periodic timers weren't removed when application was stopped. FIXME: Check up on the semantics of will/did_start, will_migrate, did_migrate, will_stop. | Fix a bug where periodic timers weren't removed when application was stopped.
FIXME: Check up on the semantics of will/did_start, will_migrate, did_migrate, will_stop.
| Python | apache-2.0 | EricssonResearch/calvin-base,EricssonResearch/calvin-base,EricssonResearch/calvin-base,EricssonResearch/calvin-base | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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... | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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... |
3f88f20a8855dd38ef53b270621d15bf0df4d62c | scavenger/main.py | scavenger/main.py | import logging
from time import time, sleep
from .net_utils import *
logger = logging.getLogger(__name__)
def target_scaner(interface, min_interval=30):
old_peers = {}
while True:
begin_time = time()
peers = {}
for ip, mac in arp_scaner():
peers[ip] = mac
if ip... | import logging
from time import time, sleep
from .net_utils import *
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
def target_scaner(interface, min_interval=30):
old_peers = {}
while True:
begin_time = time()
peers = {}
for ip, mac in arp_scaner():
... | Set logging level to INFO | Set logging level to INFO
| Python | mit | ThomasLee969/scavenger | import logging
from time import time, sleep
from .net_utils import *
logger = logging.getLogger(__name__)
def target_scaner(interface, min_interval=30):
old_peers = {}
while True:
begin_time = time()
peers = {}
for ip, mac in arp_scaner():
peers[ip] = mac
if ip... | import logging
from time import time, sleep
from .net_utils import *
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
def target_scaner(interface, min_interval=30):
old_peers = {}
while True:
begin_time = time()
peers = {}
for ip, mac in arp_scaner():
... | <commit_before>import logging
from time import time, sleep
from .net_utils import *
logger = logging.getLogger(__name__)
def target_scaner(interface, min_interval=30):
old_peers = {}
while True:
begin_time = time()
peers = {}
for ip, mac in arp_scaner():
peers[ip] = mac
... | import logging
from time import time, sleep
from .net_utils import *
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
def target_scaner(interface, min_interval=30):
old_peers = {}
while True:
begin_time = time()
peers = {}
for ip, mac in arp_scaner():
... | import logging
from time import time, sleep
from .net_utils import *
logger = logging.getLogger(__name__)
def target_scaner(interface, min_interval=30):
old_peers = {}
while True:
begin_time = time()
peers = {}
for ip, mac in arp_scaner():
peers[ip] = mac
if ip... | <commit_before>import logging
from time import time, sleep
from .net_utils import *
logger = logging.getLogger(__name__)
def target_scaner(interface, min_interval=30):
old_peers = {}
while True:
begin_time = time()
peers = {}
for ip, mac in arp_scaner():
peers[ip] = mac
... |
f48cb4fd946c8fa4b6157b8e1ea9ad8b385bc67a | src/hades/bin/generate_config.py | src/hades/bin/generate_config.py | import os
import sys
from hades import constants
from hades.common.cli import ArgumentParser, parser as common_parser
from hades.config.generate import ConfigGenerator
from hades.config.loader import load_config
def main():
parser = ArgumentParser(parents=[common_parser])
parser.add_argument(dest='source', m... | import logging
import os
import sys
from hades import constants
from hades.common.cli import ArgumentParser, parser as common_parser
from hades.config.generate import ConfigGenerator
from hades.config.loader import load_config
logger = logging.getLogger()
def main():
parser = ArgumentParser(parents=[common_pars... | Use logger for hades-generate-config error messages | Use logger for hades-generate-config error messages
| Python | mit | agdsn/hades,agdsn/hades,agdsn/hades,agdsn/hades,agdsn/hades | import os
import sys
from hades import constants
from hades.common.cli import ArgumentParser, parser as common_parser
from hades.config.generate import ConfigGenerator
from hades.config.loader import load_config
def main():
parser = ArgumentParser(parents=[common_parser])
parser.add_argument(dest='source', m... | import logging
import os
import sys
from hades import constants
from hades.common.cli import ArgumentParser, parser as common_parser
from hades.config.generate import ConfigGenerator
from hades.config.loader import load_config
logger = logging.getLogger()
def main():
parser = ArgumentParser(parents=[common_pars... | <commit_before>import os
import sys
from hades import constants
from hades.common.cli import ArgumentParser, parser as common_parser
from hades.config.generate import ConfigGenerator
from hades.config.loader import load_config
def main():
parser = ArgumentParser(parents=[common_parser])
parser.add_argument(d... | import logging
import os
import sys
from hades import constants
from hades.common.cli import ArgumentParser, parser as common_parser
from hades.config.generate import ConfigGenerator
from hades.config.loader import load_config
logger = logging.getLogger()
def main():
parser = ArgumentParser(parents=[common_pars... | import os
import sys
from hades import constants
from hades.common.cli import ArgumentParser, parser as common_parser
from hades.config.generate import ConfigGenerator
from hades.config.loader import load_config
def main():
parser = ArgumentParser(parents=[common_parser])
parser.add_argument(dest='source', m... | <commit_before>import os
import sys
from hades import constants
from hades.common.cli import ArgumentParser, parser as common_parser
from hades.config.generate import ConfigGenerator
from hades.config.loader import load_config
def main():
parser = ArgumentParser(parents=[common_parser])
parser.add_argument(d... |
295200dba8569a7a667de46a13c6e36ca757f5d5 | quickstart/python/understand/example-2/create_joke_intent.6.x.py | quickstart/python/understand/example-2/create_joke_intent.6.x.py | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new intent named ... | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new task named 't... | Update console link, intent-->task in comments | Update console link, intent-->task in comments | Python | mit | TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new intent named ... | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new task named 't... | <commit_before># Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a ne... | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new task named 't... | # Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a new intent named ... | <commit_before># Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)
# Create a ne... |
3df59e18a98be4da2ca2ed2d40a869d65696fe9b | src/helpers/utils.py | src/helpers/utils.py | from __future__ import unicode_literals
from config import settings
import os
import re
import string
import pytz
def clear_screen():
# Clear screen
os.system(['clear', 'cls'][os.name == 'nt'])
def print_obj(obj):
for attr, val in obj.__dict__.iteritems():
print "{0}: {1}".format(attr, val)
d... | from __future__ import unicode_literals
from config import settings
import os
import re
import string
import pytz
def clear_screen():
# Clear screen
os.system(['clear', 'cls'][os.name == 'nt'])
def print_obj(obj):
for attr, val in obj.__dict__.iteritems():
print "{0}: {1}".format(attr, val)
d... | Fix error in delta_minutes, use timedelta.total_seconds()/60 instead of timedelta.seconds/60. | Fix error in delta_minutes, use timedelta.total_seconds()/60 instead of timedelta.seconds/60.
| Python | mit | lesh1k/VKStalk | from __future__ import unicode_literals
from config import settings
import os
import re
import string
import pytz
def clear_screen():
# Clear screen
os.system(['clear', 'cls'][os.name == 'nt'])
def print_obj(obj):
for attr, val in obj.__dict__.iteritems():
print "{0}: {1}".format(attr, val)
d... | from __future__ import unicode_literals
from config import settings
import os
import re
import string
import pytz
def clear_screen():
# Clear screen
os.system(['clear', 'cls'][os.name == 'nt'])
def print_obj(obj):
for attr, val in obj.__dict__.iteritems():
print "{0}: {1}".format(attr, val)
d... | <commit_before>from __future__ import unicode_literals
from config import settings
import os
import re
import string
import pytz
def clear_screen():
# Clear screen
os.system(['clear', 'cls'][os.name == 'nt'])
def print_obj(obj):
for attr, val in obj.__dict__.iteritems():
print "{0}: {1}".format... | from __future__ import unicode_literals
from config import settings
import os
import re
import string
import pytz
def clear_screen():
# Clear screen
os.system(['clear', 'cls'][os.name == 'nt'])
def print_obj(obj):
for attr, val in obj.__dict__.iteritems():
print "{0}: {1}".format(attr, val)
d... | from __future__ import unicode_literals
from config import settings
import os
import re
import string
import pytz
def clear_screen():
# Clear screen
os.system(['clear', 'cls'][os.name == 'nt'])
def print_obj(obj):
for attr, val in obj.__dict__.iteritems():
print "{0}: {1}".format(attr, val)
d... | <commit_before>from __future__ import unicode_literals
from config import settings
import os
import re
import string
import pytz
def clear_screen():
# Clear screen
os.system(['clear', 'cls'][os.name == 'nt'])
def print_obj(obj):
for attr, val in obj.__dict__.iteritems():
print "{0}: {1}".format... |
e7962ec34a86fe464862ab81ec8cc8da14a732f6 | models/weather.py | models/weather.py | from configparser import ConfigParser
from googletrans import Translator
import pyowm
import logging
import re
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
cfg = ConfigParser()
cfg.read('config')
api_key = cfg.get('auth', 'o... | from configparser import ConfigParser
from googletrans import Translator
import pyowm
import logging
import re
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
cfg = ConfigParser()
cfg.read('config')
api_key = cfg.get('auth', 'o... | Add Info to Weather Check | Add Info to Weather Check
Add current weather status to weather check features.
| Python | mit | iGene/igene_bot | from configparser import ConfigParser
from googletrans import Translator
import pyowm
import logging
import re
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
cfg = ConfigParser()
cfg.read('config')
api_key = cfg.get('auth', 'o... | from configparser import ConfigParser
from googletrans import Translator
import pyowm
import logging
import re
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
cfg = ConfigParser()
cfg.read('config')
api_key = cfg.get('auth', 'o... | <commit_before>from configparser import ConfigParser
from googletrans import Translator
import pyowm
import logging
import re
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
cfg = ConfigParser()
cfg.read('config')
api_key = cfg... | from configparser import ConfigParser
from googletrans import Translator
import pyowm
import logging
import re
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
cfg = ConfigParser()
cfg.read('config')
api_key = cfg.get('auth', 'o... | from configparser import ConfigParser
from googletrans import Translator
import pyowm
import logging
import re
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
cfg = ConfigParser()
cfg.read('config')
api_key = cfg.get('auth', 'o... | <commit_before>from configparser import ConfigParser
from googletrans import Translator
import pyowm
import logging
import re
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
cfg = ConfigParser()
cfg.read('config')
api_key = cfg... |
6cdb6ada40f28ecc7629ecdb5dd67c06f6013e88 | router_monitor.py | router_monitor.py | import schedule, time, os, sys, urllib2, base64
from datetime import datetime
def check_connection():
sys.stdout.write(datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " Connection")
hostname = "google.com"
response = os.system("ping -c 1 " + hostname + " > /dev/null")
if response == 0:
print " is up"
else:
prin... | # python -u router_monitor.py >> router_log.txt 2>&1 &
import schedule, time, os, sys, urllib2, base64
from datetime import datetime
def check_connection():
sys.stdout.write(datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " Connection")
hostname = "google.com"
response = os.system("ping -c 1 " + hostname + " > /dev/n... | Add usage comment and remove python version | Add usage comment and remove python version
| Python | mit | danic85/router_monitor | import schedule, time, os, sys, urllib2, base64
from datetime import datetime
def check_connection():
sys.stdout.write(datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " Connection")
hostname = "google.com"
response = os.system("ping -c 1 " + hostname + " > /dev/null")
if response == 0:
print " is up"
else:
prin... | # python -u router_monitor.py >> router_log.txt 2>&1 &
import schedule, time, os, sys, urllib2, base64
from datetime import datetime
def check_connection():
sys.stdout.write(datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " Connection")
hostname = "google.com"
response = os.system("ping -c 1 " + hostname + " > /dev/n... | <commit_before>import schedule, time, os, sys, urllib2, base64
from datetime import datetime
def check_connection():
sys.stdout.write(datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " Connection")
hostname = "google.com"
response = os.system("ping -c 1 " + hostname + " > /dev/null")
if response == 0:
print " is up... | # python -u router_monitor.py >> router_log.txt 2>&1 &
import schedule, time, os, sys, urllib2, base64
from datetime import datetime
def check_connection():
sys.stdout.write(datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " Connection")
hostname = "google.com"
response = os.system("ping -c 1 " + hostname + " > /dev/n... | import schedule, time, os, sys, urllib2, base64
from datetime import datetime
def check_connection():
sys.stdout.write(datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " Connection")
hostname = "google.com"
response = os.system("ping -c 1 " + hostname + " > /dev/null")
if response == 0:
print " is up"
else:
prin... | <commit_before>import schedule, time, os, sys, urllib2, base64
from datetime import datetime
def check_connection():
sys.stdout.write(datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " Connection")
hostname = "google.com"
response = os.system("ping -c 1 " + hostname + " > /dev/null")
if response == 0:
print " is up... |
779639680e02fb4de920a95558eceecc2a55ab46 | indra/bel/ndex_client.py | indra/bel/ndex_client.py | import requests
import json
import time
#ndex_base_url = 'http://services.bigmech.ndexbio.org'
ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_result(re... | import requests
import json
import time
ndex_base_url = 'http://general.bigmech.ndexbio.org:8082'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_resul... | Add new URL for NDEx service | Add new URL for NDEx service
| Python | bsd-2-clause | jmuhlich/indra,johnbachman/belpy,sorgerlab/indra,jmuhlich/indra,sorgerlab/belpy,bgyori/indra,johnbachman/indra,johnbachman/belpy,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,pvtodorov/indra,jmuhlich/ind... | import requests
import json
import time
#ndex_base_url = 'http://services.bigmech.ndexbio.org'
ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_result(re... | import requests
import json
import time
ndex_base_url = 'http://general.bigmech.ndexbio.org:8082'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_resul... | <commit_before>import requests
import json
import time
#ndex_base_url = 'http://services.bigmech.ndexbio.org'
ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
de... | import requests
import json
import time
ndex_base_url = 'http://general.bigmech.ndexbio.org:8082'
#ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_resul... | import requests
import json
import time
#ndex_base_url = 'http://services.bigmech.ndexbio.org'
ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
def get_result(re... | <commit_before>import requests
import json
import time
#ndex_base_url = 'http://services.bigmech.ndexbio.org'
ndex_base_url = 'http://52.37.175.128'
def send_request(url_suffix, params):
res = requests.post(ndex_base_url + url_suffix, data=json.dumps(params))
res_json = get_result(res)
return res_json
de... |
a2005d98cd81424a2a43277cae0595806751e9dc | swh/web/ui/controller/service.py | swh/web/ui/controller/service.py | # Copyright (C) 2015 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.web.ui.back import http, api_query
from swh.core.json import SW... | # Copyright (C) 2015 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.web.ui.back import http, api_query
from swh.core.json import SW... | Refactor - Simplify the call to api | Refactor - Simplify the call to api
| Python | agpl-3.0 | SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui | # Copyright (C) 2015 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.web.ui.back import http, api_query
from swh.core.json import SW... | # Copyright (C) 2015 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.web.ui.back import http, api_query
from swh.core.json import SW... | <commit_before># Copyright (C) 2015 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.web.ui.back import http, api_query
from swh.core... | # Copyright (C) 2015 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.web.ui.back import http, api_query
from swh.core.json import SW... | # Copyright (C) 2015 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.web.ui.back import http, api_query
from swh.core.json import SW... | <commit_before># Copyright (C) 2015 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.web.ui.back import http, api_query
from swh.core... |
3db5c62d116399a0b26e8c68d3e4274d5a6bd17b | django_makemessages_xgettext/management/commands/makemessagesxgettext.py | django_makemessages_xgettext/management/commands/makemessagesxgettext.py | import django
if django.get_version().startswith("1.8"):
from django_makemessages_xgettext import django18_makemessagesxgettext
Command = django18_makemessagesxgettext.Command
else:
from django_makemessages_xgettext import django17_makemessagesxgettext
Command = django17_makemessagesxgettext.Command
| import django
if django.get_version().startswith("1.7"):
from django_makemessages_xgettext import django17_makemessagesxgettext
Command = django17_makemessagesxgettext.Command
else:
from django_makemessages_xgettext import django18_makemessagesxgettext
Command = django18_makemessagesxgettext.Command
| Support for django 1.9 and beyond! | Support for django 1.9 and beyond! | Python | bsd-3-clause | resulto-admin/django-makemessages-xgettext | import django
if django.get_version().startswith("1.8"):
from django_makemessages_xgettext import django18_makemessagesxgettext
Command = django18_makemessagesxgettext.Command
else:
from django_makemessages_xgettext import django17_makemessagesxgettext
Command = django17_makemessagesxgettext.Command
S... | import django
if django.get_version().startswith("1.7"):
from django_makemessages_xgettext import django17_makemessagesxgettext
Command = django17_makemessagesxgettext.Command
else:
from django_makemessages_xgettext import django18_makemessagesxgettext
Command = django18_makemessagesxgettext.Command
| <commit_before>import django
if django.get_version().startswith("1.8"):
from django_makemessages_xgettext import django18_makemessagesxgettext
Command = django18_makemessagesxgettext.Command
else:
from django_makemessages_xgettext import django17_makemessagesxgettext
Command = django17_makemessagesxge... | import django
if django.get_version().startswith("1.7"):
from django_makemessages_xgettext import django17_makemessagesxgettext
Command = django17_makemessagesxgettext.Command
else:
from django_makemessages_xgettext import django18_makemessagesxgettext
Command = django18_makemessagesxgettext.Command
| import django
if django.get_version().startswith("1.8"):
from django_makemessages_xgettext import django18_makemessagesxgettext
Command = django18_makemessagesxgettext.Command
else:
from django_makemessages_xgettext import django17_makemessagesxgettext
Command = django17_makemessagesxgettext.Command
S... | <commit_before>import django
if django.get_version().startswith("1.8"):
from django_makemessages_xgettext import django18_makemessagesxgettext
Command = django18_makemessagesxgettext.Command
else:
from django_makemessages_xgettext import django17_makemessagesxgettext
Command = django17_makemessagesxge... |
50926966919fa5cf140e3f30815f86c93189cc49 | percy/utils.py | percy/utils.py | from __future__ import print_function
import sys
import hashlib
import base64
def print_error(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def to_unicode(content):
# TODO: considering using the 'six' library for this, for now just do something simple.
if sys.version_info >= (3,0):
ret... | from __future__ import print_function
import sys
import hashlib
import base64
def print_error(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def to_unicode(content):
# TODO: considering using the 'six' library for this, for now just do something simple.
if sys.version_info >= (3,0):
ret... | Return serializable string from base64encode. | Return serializable string from base64encode.
| Python | mit | percy/python-percy-client | from __future__ import print_function
import sys
import hashlib
import base64
def print_error(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def to_unicode(content):
# TODO: considering using the 'six' library for this, for now just do something simple.
if sys.version_info >= (3,0):
ret... | from __future__ import print_function
import sys
import hashlib
import base64
def print_error(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def to_unicode(content):
# TODO: considering using the 'six' library for this, for now just do something simple.
if sys.version_info >= (3,0):
ret... | <commit_before>from __future__ import print_function
import sys
import hashlib
import base64
def print_error(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def to_unicode(content):
# TODO: considering using the 'six' library for this, for now just do something simple.
if sys.version_info >= (3,... | from __future__ import print_function
import sys
import hashlib
import base64
def print_error(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def to_unicode(content):
# TODO: considering using the 'six' library for this, for now just do something simple.
if sys.version_info >= (3,0):
ret... | from __future__ import print_function
import sys
import hashlib
import base64
def print_error(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def to_unicode(content):
# TODO: considering using the 'six' library for this, for now just do something simple.
if sys.version_info >= (3,0):
ret... | <commit_before>from __future__ import print_function
import sys
import hashlib
import base64
def print_error(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def to_unicode(content):
# TODO: considering using the 'six' library for this, for now just do something simple.
if sys.version_info >= (3,... |
c20fd19d10a77cda0c16fd5a4fa329a43933751f | src/commoner/profiles/models.py | src/commoner/profiles/models.py | from django.db import models
from django.db.models import permalink
from django.contrib.auth.models import User
class Content(models.Model):
commoner = models.ForeignKey(User)
title = models.CharField(max_length=255, blank=True)
url = models.URLField(max_length=255, blank=False)
def __unicode__(self... | import urlparse
from django.db import models
from django.db.models import permalink
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from commoner.util import getBaseURL
class Content(models.Model):
commoner = models.ForeignKey(User)
title = models.CharField(max_leng... | Support generating a completely absolute URL for the profile; added a display_name method to the Profile model. | Support generating a completely absolute URL for the profile; added a
display_name method to the Profile model.
| Python | agpl-3.0 | cc-archive/commoner,cc-archive/commoner | from django.db import models
from django.db.models import permalink
from django.contrib.auth.models import User
class Content(models.Model):
commoner = models.ForeignKey(User)
title = models.CharField(max_length=255, blank=True)
url = models.URLField(max_length=255, blank=False)
def __unicode__(self... | import urlparse
from django.db import models
from django.db.models import permalink
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from commoner.util import getBaseURL
class Content(models.Model):
commoner = models.ForeignKey(User)
title = models.CharField(max_leng... | <commit_before>from django.db import models
from django.db.models import permalink
from django.contrib.auth.models import User
class Content(models.Model):
commoner = models.ForeignKey(User)
title = models.CharField(max_length=255, blank=True)
url = models.URLField(max_length=255, blank=False)
def _... | import urlparse
from django.db import models
from django.db.models import permalink
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from commoner.util import getBaseURL
class Content(models.Model):
commoner = models.ForeignKey(User)
title = models.CharField(max_leng... | from django.db import models
from django.db.models import permalink
from django.contrib.auth.models import User
class Content(models.Model):
commoner = models.ForeignKey(User)
title = models.CharField(max_length=255, blank=True)
url = models.URLField(max_length=255, blank=False)
def __unicode__(self... | <commit_before>from django.db import models
from django.db.models import permalink
from django.contrib.auth.models import User
class Content(models.Model):
commoner = models.ForeignKey(User)
title = models.CharField(max_length=255, blank=True)
url = models.URLField(max_length=255, blank=False)
def _... |
24e2e391dece37c245d8a459456f3e30cd2346a8 | openxc/vehicle.py | openxc/vehicle.py | from .measurements import Measurement
from .sinks.base import MeasurementNotifierSink
class Vehicle(object):
def __init__(self, source=None):
self.sources = set()
self.sinks = set()
self.measurements = {}
self.add_source(source)
self.notifier = MeasurementNotifierSink()
... | from .measurements import Measurement
from .sinks.base import MeasurementNotifierSink
class Vehicle(object):
def __init__(self, interface=None):
self.sources = set()
self.sinks = set()
self.measurements = {}
if interface is not None:
self.add_source(interface)
... | Change constructor of Vehicle to accept an Interface instead of just Source. | Change constructor of Vehicle to accept an Interface instead of just Source.
| Python | bsd-3-clause | openxc/openxc-python,openxc/openxc-python,openxc/openxc-python | from .measurements import Measurement
from .sinks.base import MeasurementNotifierSink
class Vehicle(object):
def __init__(self, source=None):
self.sources = set()
self.sinks = set()
self.measurements = {}
self.add_source(source)
self.notifier = MeasurementNotifierSink()
... | from .measurements import Measurement
from .sinks.base import MeasurementNotifierSink
class Vehicle(object):
def __init__(self, interface=None):
self.sources = set()
self.sinks = set()
self.measurements = {}
if interface is not None:
self.add_source(interface)
... | <commit_before>from .measurements import Measurement
from .sinks.base import MeasurementNotifierSink
class Vehicle(object):
def __init__(self, source=None):
self.sources = set()
self.sinks = set()
self.measurements = {}
self.add_source(source)
self.notifier = MeasurementNo... | from .measurements import Measurement
from .sinks.base import MeasurementNotifierSink
class Vehicle(object):
def __init__(self, interface=None):
self.sources = set()
self.sinks = set()
self.measurements = {}
if interface is not None:
self.add_source(interface)
... | from .measurements import Measurement
from .sinks.base import MeasurementNotifierSink
class Vehicle(object):
def __init__(self, source=None):
self.sources = set()
self.sinks = set()
self.measurements = {}
self.add_source(source)
self.notifier = MeasurementNotifierSink()
... | <commit_before>from .measurements import Measurement
from .sinks.base import MeasurementNotifierSink
class Vehicle(object):
def __init__(self, source=None):
self.sources = set()
self.sinks = set()
self.measurements = {}
self.add_source(source)
self.notifier = MeasurementNo... |
ffd429281ed6695457304646467a6d9e0a0301a4 | src/nyc_trees/apps/core/tasks.py | src/nyc_trees/apps/core/tasks.py | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from celery import task
from django.core.files.storage import default_storage
@task(bind=True, max_retries=15, default_retry_delay=2)
def wait_... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from celery import task
from django.core.files.storage import default_storage
@task(bind=True, max_retries=15, default_retry_delay=2)
def wait_... | Send RSVP email even if PDF doesn't exist | Send RSVP email even if PDF doesn't exist
If the PDF can't be found on the disk after the maximum number of
retries, return None, instead of raising an exception. This ensures that
the RSVP email notification still sends even without the PDF attachment.
Refs #1655
| Python | agpl-3.0 | azavea/nyc-trees,maurizi/nyc-trees,kdeloach/nyc-trees,azavea/nyc-trees,kdeloach/nyc-trees,azavea/nyc-trees,maurizi/nyc-trees,kdeloach/nyc-trees,kdeloach/nyc-trees,maurizi/nyc-trees,azavea/nyc-trees,kdeloach/nyc-trees,maurizi/nyc-trees,azavea/nyc-trees | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from celery import task
from django.core.files.storage import default_storage
@task(bind=True, max_retries=15, default_retry_delay=2)
def wait_... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from celery import task
from django.core.files.storage import default_storage
@task(bind=True, max_retries=15, default_retry_delay=2)
def wait_... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from celery import task
from django.core.files.storage import default_storage
@task(bind=True, max_retries=15, default_retry_del... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from celery import task
from django.core.files.storage import default_storage
@task(bind=True, max_retries=15, default_retry_delay=2)
def wait_... | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from celery import task
from django.core.files.storage import default_storage
@task(bind=True, max_retries=15, default_retry_delay=2)
def wait_... | <commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from celery import task
from django.core.files.storage import default_storage
@task(bind=True, max_retries=15, default_retry_del... |
3bad6c23fad5525628db1c3c1b99f3f86c08db63 | cloudmeta/apps/metadata/models.py | cloudmeta/apps/metadata/models.py | from django.db import models
KEYTYPE_CHOICES = (
('RSA', 'ssh-rsa'),
('DSA', 'ssh-dsa'),
('ECC-256', 'ecdsa-sha2-nistp256'),
('ECC-521', 'ecdsa-sha2-nistp521'),
)
class Node(models.Model):
name = models.CharField(unique=True, primary_key=True, max_length=256)
hostname = models.CharField(blank=... | from django.db import models
KEYTYPE_CHOICES = (
('RSA', 'ssh-rsa'),
('DSA', 'ssh-dsa'),
('ECC-256', 'ecdsa-sha2-nistp256'),
('ECC-384', 'ecdsa-sha2-nistp384'),
('ECC-521', 'ecdsa-sha2-nistp521'),
)
class Node(models.Model):
name = models.CharField(unique=True, primary_key=True, max_length=256... | Allow ecdsa 384 bit keys too | Allow ecdsa 384 bit keys too
| Python | agpl-3.0 | bencord0/cloudmeta,bencord0/cloudmeta | from django.db import models
KEYTYPE_CHOICES = (
('RSA', 'ssh-rsa'),
('DSA', 'ssh-dsa'),
('ECC-256', 'ecdsa-sha2-nistp256'),
('ECC-521', 'ecdsa-sha2-nistp521'),
)
class Node(models.Model):
name = models.CharField(unique=True, primary_key=True, max_length=256)
hostname = models.CharField(blank=... | from django.db import models
KEYTYPE_CHOICES = (
('RSA', 'ssh-rsa'),
('DSA', 'ssh-dsa'),
('ECC-256', 'ecdsa-sha2-nistp256'),
('ECC-384', 'ecdsa-sha2-nistp384'),
('ECC-521', 'ecdsa-sha2-nistp521'),
)
class Node(models.Model):
name = models.CharField(unique=True, primary_key=True, max_length=256... | <commit_before>from django.db import models
KEYTYPE_CHOICES = (
('RSA', 'ssh-rsa'),
('DSA', 'ssh-dsa'),
('ECC-256', 'ecdsa-sha2-nistp256'),
('ECC-521', 'ecdsa-sha2-nistp521'),
)
class Node(models.Model):
name = models.CharField(unique=True, primary_key=True, max_length=256)
hostname = models.C... | from django.db import models
KEYTYPE_CHOICES = (
('RSA', 'ssh-rsa'),
('DSA', 'ssh-dsa'),
('ECC-256', 'ecdsa-sha2-nistp256'),
('ECC-384', 'ecdsa-sha2-nistp384'),
('ECC-521', 'ecdsa-sha2-nistp521'),
)
class Node(models.Model):
name = models.CharField(unique=True, primary_key=True, max_length=256... | from django.db import models
KEYTYPE_CHOICES = (
('RSA', 'ssh-rsa'),
('DSA', 'ssh-dsa'),
('ECC-256', 'ecdsa-sha2-nistp256'),
('ECC-521', 'ecdsa-sha2-nistp521'),
)
class Node(models.Model):
name = models.CharField(unique=True, primary_key=True, max_length=256)
hostname = models.CharField(blank=... | <commit_before>from django.db import models
KEYTYPE_CHOICES = (
('RSA', 'ssh-rsa'),
('DSA', 'ssh-dsa'),
('ECC-256', 'ecdsa-sha2-nistp256'),
('ECC-521', 'ecdsa-sha2-nistp521'),
)
class Node(models.Model):
name = models.CharField(unique=True, primary_key=True, max_length=256)
hostname = models.C... |
6932164f20ced80ff6d08402b84aba954a983e2d | iota/commands/extended/get_transaction_objects.py | iota/commands/extended/get_transaction_objects.py | # coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
from typing import Iterable, List, Optional
import filters as f
from iota import Transaction, TransactionHash
from iota.commands.core import GetTrytesCommand
from iota.commands import FilterCommand, RequestFilter
... | # coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
from typing import Iterable, List, Optional
import filters as f
from iota import Transaction, TransactionHash
from iota.commands.core import GetTrytesCommand
from iota.commands import FilterCommand, RequestFilter
... | Use filter macro for request validation | Use filter macro for request validation
StringifiedTrytesArray(Type) filter macro was
introduced in #243. Becasue of this, no request
filter test case is needed, hence the macro is
covered already in other test cases.
| Python | mit | iotaledger/iota.lib.py | # coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
from typing import Iterable, List, Optional
import filters as f
from iota import Transaction, TransactionHash
from iota.commands.core import GetTrytesCommand
from iota.commands import FilterCommand, RequestFilter
... | # coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
from typing import Iterable, List, Optional
import filters as f
from iota import Transaction, TransactionHash
from iota.commands.core import GetTrytesCommand
from iota.commands import FilterCommand, RequestFilter
... | <commit_before># coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
from typing import Iterable, List, Optional
import filters as f
from iota import Transaction, TransactionHash
from iota.commands.core import GetTrytesCommand
from iota.commands import FilterCommand,... | # coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
from typing import Iterable, List, Optional
import filters as f
from iota import Transaction, TransactionHash
from iota.commands.core import GetTrytesCommand
from iota.commands import FilterCommand, RequestFilter
... | # coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
from typing import Iterable, List, Optional
import filters as f
from iota import Transaction, TransactionHash
from iota.commands.core import GetTrytesCommand
from iota.commands import FilterCommand, RequestFilter
... | <commit_before># coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
from typing import Iterable, List, Optional
import filters as f
from iota import Transaction, TransactionHash
from iota.commands.core import GetTrytesCommand
from iota.commands import FilterCommand,... |
0a0ebdde63628d9504ac9834ef20b996ab595d7d | stock_quant_package_product_packaging/models/stock_move_line.py | stock_quant_package_product_packaging/models/stock_move_line.py | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
for line in self.filtered(lambda l: l.result_package_id):... | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
# _action_done in stock module sometimes delete a move li... | Fix "record does not exist" when validating move line | Fix "record does not exist" when validating move line
When _action_done is called on a transfer, it may delete a part of
the move lines. The extension of `_action_done()` that assigns
a packaging fails with "Record does not exist or has been deleted".
Check if the if lines still exist before writing on them.
| Python | agpl-3.0 | BT-ojossen/stock-logistics-workflow,OCA/stock-logistics-workflow,BT-ojossen/stock-logistics-workflow,OCA/stock-logistics-workflow | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
for line in self.filtered(lambda l: l.result_package_id):... | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
# _action_done in stock module sometimes delete a move li... | <commit_before># Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
for line in self.filtered(lambda l: l.resu... | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
# _action_done in stock module sometimes delete a move li... | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
for line in self.filtered(lambda l: l.result_package_id):... | <commit_before># Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _action_done(self):
res = super()._action_done()
for line in self.filtered(lambda l: l.resu... |
92d0a09cfb232270d04f82eccc451ee63bd7901a | dev/TOPSECRET/SirBot/lib/sirbot/shutdown.py | dev/TOPSECRET/SirBot/lib/sirbot/shutdown.py | # -*- coding: utf-8 -*-
#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run
from json import dumps
def shutdown(config,interinput=None,interoutput=None):
#check for lingering runtime erro... | # -*- coding: utf-8 -*-
#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run
def shutdown(config,interinput,interoutput):
#check for lingering runtime errors
#finishing writing log queu... | Revert "changes to config during runtime are now saved" | Revert "changes to config during runtime are now saved"
This reverts commit e09a780da17bb2f97d20aafc2c007fe3fc3051bb.
| Python | mit | SirRujak/SirBot | # -*- coding: utf-8 -*-
#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run
from json import dumps
def shutdown(config,interinput=None,interoutput=None):
#check for lingering runtime erro... | # -*- coding: utf-8 -*-
#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run
def shutdown(config,interinput,interoutput):
#check for lingering runtime errors
#finishing writing log queu... | <commit_before># -*- coding: utf-8 -*-
#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run
from json import dumps
def shutdown(config,interinput=None,interoutput=None):
#check for lingeri... | # -*- coding: utf-8 -*-
#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run
def shutdown(config,interinput,interoutput):
#check for lingering runtime errors
#finishing writing log queu... | # -*- coding: utf-8 -*-
#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run
from json import dumps
def shutdown(config,interinput=None,interoutput=None):
#check for lingering runtime erro... | <commit_before># -*- coding: utf-8 -*-
#script containing all pertinent tasks to prepare for software termination.
#successful completion of this process at last runtime, will skip extra validation
#steps on next run
from json import dumps
def shutdown(config,interinput=None,interoutput=None):
#check for lingeri... |
84af16cb5c6938fad4a10d248ec6e1ff20ec2306 | neupy/__init__.py | neupy/__init__.py | """
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.2.2'
| """
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.3.0dev1'
| Set up version 0.3.0 dev 1. | Set up version 0.3.0 dev 1.
| Python | mit | itdxer/neupy,itdxer/neupy,itdxer/neupy,itdxer/neupy | """
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.2.2'
Set up version 0.3.0 dev 1. | """
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.3.0dev1'
| <commit_before>"""
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.2.2'
<commit_msg>Set up version 0.3.0 dev 1.<commit_after> | """
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.3.0dev1'
| """
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.2.2'
Set up version 0.3.0 dev 1."""
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.3.0dev1'
| <commit_before>"""
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.2.2'
<commit_msg>Set up version 0.3.0 dev 1.<commit_after>"""
NeuPy is the Artificial Neural Network library implemented in Python.
"""
__version__ = '0.3.0dev1'
|
411813bafe4b2af57aa7695f035e3e02b20ae85e | src/syntax/infix_coordination.py | src/syntax/infix_coordination.py | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
self.result_string = ""
# Break the tree
def break_tree(self, tree):
... | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
# Break the tree
def break_tree(self, tree):
self.has_infix_coordinati... | Change the rules for infix coordinario | Change the rules for infix coordinario
| Python | mit | Somsubhra/Simplify,Somsubhra/Simplify,Somsubhra/Simplify | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
self.result_string = ""
# Break the tree
def break_tree(self, tree):
... | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
# Break the tree
def break_tree(self, tree):
self.has_infix_coordinati... | <commit_before>__author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
self.result_string = ""
# Break the tree
def break_tree... | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
# Break the tree
def break_tree(self, tree):
self.has_infix_coordinati... | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
self.result_string = ""
# Break the tree
def break_tree(self, tree):
... | <commit_before>__author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
self.result_string = ""
# Break the tree
def break_tree... |
b154eef7d36359d0fbcc11a165371d3a54f40682 | libtbx_refresh.py | libtbx_refresh.py | from __future__ import division
def run():
from dials.util.config import CompletionGenerator
gen = CompletionGenerator()
gen.generate()
try:
run()
except Exception, e:
pass
| from __future__ import division
def run():
from dials.util.config import CompletionGenerator
gen = CompletionGenerator()
gen.generate()
try:
run()
except Exception, e:
pass
try:
from glob import glob
import os
filenames = glob("extensions/*.pyc")
if len(filenames) > 0:
print "Cleaning up 'dials... | Delete *.pyc files from dials/extensions when doing libtbx.refresh | Delete *.pyc files from dials/extensions when doing libtbx.refresh | Python | bsd-3-clause | dials/dials,dials/dials,dials/dials,dials/dials,dials/dials | from __future__ import division
def run():
from dials.util.config import CompletionGenerator
gen = CompletionGenerator()
gen.generate()
try:
run()
except Exception, e:
pass
Delete *.pyc files from dials/extensions when doing libtbx.refresh | from __future__ import division
def run():
from dials.util.config import CompletionGenerator
gen = CompletionGenerator()
gen.generate()
try:
run()
except Exception, e:
pass
try:
from glob import glob
import os
filenames = glob("extensions/*.pyc")
if len(filenames) > 0:
print "Cleaning up 'dials... | <commit_before>from __future__ import division
def run():
from dials.util.config import CompletionGenerator
gen = CompletionGenerator()
gen.generate()
try:
run()
except Exception, e:
pass
<commit_msg>Delete *.pyc files from dials/extensions when doing libtbx.refresh<commit_after> | from __future__ import division
def run():
from dials.util.config import CompletionGenerator
gen = CompletionGenerator()
gen.generate()
try:
run()
except Exception, e:
pass
try:
from glob import glob
import os
filenames = glob("extensions/*.pyc")
if len(filenames) > 0:
print "Cleaning up 'dials... | from __future__ import division
def run():
from dials.util.config import CompletionGenerator
gen = CompletionGenerator()
gen.generate()
try:
run()
except Exception, e:
pass
Delete *.pyc files from dials/extensions when doing libtbx.refreshfrom __future__ import division
def run():
from dials.util.config ... | <commit_before>from __future__ import division
def run():
from dials.util.config import CompletionGenerator
gen = CompletionGenerator()
gen.generate()
try:
run()
except Exception, e:
pass
<commit_msg>Delete *.pyc files from dials/extensions when doing libtbx.refresh<commit_after>from __future__ import divis... |
89454b1e83e01a4d523b776f74429a81467762da | redis/utils.py | redis/utils.py | try:
import hiredis
HIREDIS_AVAILABLE = True
except ImportError:
HIREDIS_AVAILABLE = False
def from_url(url, db=None, **kwargs):
"""
Returns an active Redis client generated from the given database URL.
Will attempt to extract the database id from the path url fragment, if
none is provide... | from contextlib import contextmanager
try:
import hiredis
HIREDIS_AVAILABLE = True
except ImportError:
HIREDIS_AVAILABLE = False
def from_url(url, db=None, **kwargs):
"""
Returns an active Redis client generated from the given database URL.
Will attempt to extract the database id from the p... | Move import statement on top for PEP8 compliancy. | Move import statement on top for PEP8 compliancy.
| Python | mit | MegaByte875/redis-py,fengshao0907/redis-py,sigma-random/redis-py,sunminghong/redis-py,garnertb/redis-py,softliumin/redis-py,sirk390/redis-py,barseghyanartur/redis-py,zhangyancoder/redis-py,LTD-Beget/redis-py,boyxuper/redis-py,barseghyanartur/redis-py,dmugtasimov/redis-py,LTD-Beget/redis-py,yuruidong/redis-py,sigma-rand... | try:
import hiredis
HIREDIS_AVAILABLE = True
except ImportError:
HIREDIS_AVAILABLE = False
def from_url(url, db=None, **kwargs):
"""
Returns an active Redis client generated from the given database URL.
Will attempt to extract the database id from the path url fragment, if
none is provide... | from contextlib import contextmanager
try:
import hiredis
HIREDIS_AVAILABLE = True
except ImportError:
HIREDIS_AVAILABLE = False
def from_url(url, db=None, **kwargs):
"""
Returns an active Redis client generated from the given database URL.
Will attempt to extract the database id from the p... | <commit_before>try:
import hiredis
HIREDIS_AVAILABLE = True
except ImportError:
HIREDIS_AVAILABLE = False
def from_url(url, db=None, **kwargs):
"""
Returns an active Redis client generated from the given database URL.
Will attempt to extract the database id from the path url fragment, if
... | from contextlib import contextmanager
try:
import hiredis
HIREDIS_AVAILABLE = True
except ImportError:
HIREDIS_AVAILABLE = False
def from_url(url, db=None, **kwargs):
"""
Returns an active Redis client generated from the given database URL.
Will attempt to extract the database id from the p... | try:
import hiredis
HIREDIS_AVAILABLE = True
except ImportError:
HIREDIS_AVAILABLE = False
def from_url(url, db=None, **kwargs):
"""
Returns an active Redis client generated from the given database URL.
Will attempt to extract the database id from the path url fragment, if
none is provide... | <commit_before>try:
import hiredis
HIREDIS_AVAILABLE = True
except ImportError:
HIREDIS_AVAILABLE = False
def from_url(url, db=None, **kwargs):
"""
Returns an active Redis client generated from the given database URL.
Will attempt to extract the database id from the path url fragment, if
... |
a42ffdcd34876bcd1df81ce00dbfd6426580bd82 | gaphor/UML/classes/copypaste.py | gaphor/UML/classes/copypaste.py | import itertools
from gaphor.diagram.copypaste import copy, copy_named_element
from gaphor.UML import Association, Class, Interface, Operation
@copy.register(Class)
@copy.register(Interface)
def copy_class(element):
yield element.id, copy_named_element(element)
for feature in itertools.chain(
element... | import itertools
from gaphor.diagram.copypaste import copy, copy_named_element
from gaphor.UML import Association, Class, Enumeration, Interface, Operation
@copy.register(Class)
@copy.register(Interface)
def copy_class(element):
yield element.id, copy_named_element(element)
for feature in itertools.chain(
... | Copy enumeration literals when pasting an Enumeration | Copy enumeration literals when pasting an Enumeration
Signed-off-by: Dan Yeaw <2591e5f46f28d303f9dc027d475a5c60d8dea17a@yeaw.me>
| Python | lgpl-2.1 | amolenaar/gaphor,amolenaar/gaphor | import itertools
from gaphor.diagram.copypaste import copy, copy_named_element
from gaphor.UML import Association, Class, Interface, Operation
@copy.register(Class)
@copy.register(Interface)
def copy_class(element):
yield element.id, copy_named_element(element)
for feature in itertools.chain(
element... | import itertools
from gaphor.diagram.copypaste import copy, copy_named_element
from gaphor.UML import Association, Class, Enumeration, Interface, Operation
@copy.register(Class)
@copy.register(Interface)
def copy_class(element):
yield element.id, copy_named_element(element)
for feature in itertools.chain(
... | <commit_before>import itertools
from gaphor.diagram.copypaste import copy, copy_named_element
from gaphor.UML import Association, Class, Interface, Operation
@copy.register(Class)
@copy.register(Interface)
def copy_class(element):
yield element.id, copy_named_element(element)
for feature in itertools.chain(
... | import itertools
from gaphor.diagram.copypaste import copy, copy_named_element
from gaphor.UML import Association, Class, Enumeration, Interface, Operation
@copy.register(Class)
@copy.register(Interface)
def copy_class(element):
yield element.id, copy_named_element(element)
for feature in itertools.chain(
... | import itertools
from gaphor.diagram.copypaste import copy, copy_named_element
from gaphor.UML import Association, Class, Interface, Operation
@copy.register(Class)
@copy.register(Interface)
def copy_class(element):
yield element.id, copy_named_element(element)
for feature in itertools.chain(
element... | <commit_before>import itertools
from gaphor.diagram.copypaste import copy, copy_named_element
from gaphor.UML import Association, Class, Interface, Operation
@copy.register(Class)
@copy.register(Interface)
def copy_class(element):
yield element.id, copy_named_element(element)
for feature in itertools.chain(
... |
e72156f50b0bab241b90b0f0c53414529740acd6 | ds_binary_heap.py | ds_binary_heap.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class BinaryHeap(object):
def __init__(self):
# Put single zero as the 1st element, so that
# integer division can be used in later methods.
self.heap_ls = [0]
self.current_... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class BinaryHeap(object):
def __init__(self):
# Put single zero as the 1st element, so that
# integer division can be used in later methods.
self.heap_ls = [0]
self.current_... | Add delete_min() and its helper func’s | Add delete_min() and its helper func’s
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class BinaryHeap(object):
def __init__(self):
# Put single zero as the 1st element, so that
# integer division can be used in later methods.
self.heap_ls = [0]
self.current_... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class BinaryHeap(object):
def __init__(self):
# Put single zero as the 1st element, so that
# integer division can be used in later methods.
self.heap_ls = [0]
self.current_... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class BinaryHeap(object):
def __init__(self):
# Put single zero as the 1st element, so that
# integer division can be used in later methods.
self.heap_ls = [0]
... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class BinaryHeap(object):
def __init__(self):
# Put single zero as the 1st element, so that
# integer division can be used in later methods.
self.heap_ls = [0]
self.current_... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class BinaryHeap(object):
def __init__(self):
# Put single zero as the 1st element, so that
# integer division can be used in later methods.
self.heap_ls = [0]
self.current_... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
class BinaryHeap(object):
def __init__(self):
# Put single zero as the 1st element, so that
# integer division can be used in later methods.
self.heap_ls = [0]
... |
59536a70ef39e34a5aea57131492a475e05cd227 | lg_cms_director/setup.py | lg_cms_director/setup.py | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.packages import find_packages
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['trollius', 'pulsar'],
package_dir={'': 'src'},
scripts=[],
requires=[]
)
setup(**d)
# vim: tabsto... | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.packages import find_packages
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=find_packages('src'),
package_dir={'': 'src'},
scripts=[],
requires=[]
)
setup(**d)
# vim: tabstop=... | Revert to previous packaging of director's dependencies thx to @mvollrath | Revert to previous packaging of director's dependencies thx to @mvollrath
| Python | apache-2.0 | EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes,EndPointCorp/lg_ros_nodes | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.packages import find_packages
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['trollius', 'pulsar'],
package_dir={'': 'src'},
scripts=[],
requires=[]
)
setup(**d)
# vim: tabsto... | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.packages import find_packages
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=find_packages('src'),
package_dir={'': 'src'},
scripts=[],
requires=[]
)
setup(**d)
# vim: tabstop=... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.packages import find_packages
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['trollius', 'pulsar'],
package_dir={'': 'src'},
scripts=[],
requires=[]
)
setup(**d)... | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.packages import find_packages
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=find_packages('src'),
package_dir={'': 'src'},
scripts=[],
requires=[]
)
setup(**d)
# vim: tabstop=... | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.packages import find_packages
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['trollius', 'pulsar'],
package_dir={'': 'src'},
scripts=[],
requires=[]
)
setup(**d)
# vim: tabsto... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.packages import find_packages
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['trollius', 'pulsar'],
package_dir={'': 'src'},
scripts=[],
requires=[]
)
setup(**d)... |
cc4a17db1e4ba81019ed312cbe324874430b9814 | billybot/tests/test_billybot.py | billybot/tests/test_billybot.py | import time
import datetime
import unittest
from unittest.mock import patch, call
from billybot.billybot import MessageTriage
class TestMessageTriage(unittest.TestCase):
def setUp(self):
self.thread1 = MessageTriage('USERID1', 'user1', 'Warren', 'testchanl')
self.thread1.daemon = True
s... | import time
import datetime
import unittest
from unittest.mock import patch, call
from billybot.billybot import MessageTriage
class TestMessageTriage(unittest.TestCase):
def setUp(self):
self.thread1 = MessageTriage('USERID1', 'user1', 'Warren', 'testchanl')
self.thread1.daemon = True
s... | Use a lambda to add a time delay function onto the mocked run method | Use a lambda to add a time delay function onto the mocked run method
| Python | mit | mosegontar/billybot | import time
import datetime
import unittest
from unittest.mock import patch, call
from billybot.billybot import MessageTriage
class TestMessageTriage(unittest.TestCase):
def setUp(self):
self.thread1 = MessageTriage('USERID1', 'user1', 'Warren', 'testchanl')
self.thread1.daemon = True
s... | import time
import datetime
import unittest
from unittest.mock import patch, call
from billybot.billybot import MessageTriage
class TestMessageTriage(unittest.TestCase):
def setUp(self):
self.thread1 = MessageTriage('USERID1', 'user1', 'Warren', 'testchanl')
self.thread1.daemon = True
s... | <commit_before>import time
import datetime
import unittest
from unittest.mock import patch, call
from billybot.billybot import MessageTriage
class TestMessageTriage(unittest.TestCase):
def setUp(self):
self.thread1 = MessageTriage('USERID1', 'user1', 'Warren', 'testchanl')
self.thread1.daemon =... | import time
import datetime
import unittest
from unittest.mock import patch, call
from billybot.billybot import MessageTriage
class TestMessageTriage(unittest.TestCase):
def setUp(self):
self.thread1 = MessageTriage('USERID1', 'user1', 'Warren', 'testchanl')
self.thread1.daemon = True
s... | import time
import datetime
import unittest
from unittest.mock import patch, call
from billybot.billybot import MessageTriage
class TestMessageTriage(unittest.TestCase):
def setUp(self):
self.thread1 = MessageTriage('USERID1', 'user1', 'Warren', 'testchanl')
self.thread1.daemon = True
s... | <commit_before>import time
import datetime
import unittest
from unittest.mock import patch, call
from billybot.billybot import MessageTriage
class TestMessageTriage(unittest.TestCase):
def setUp(self):
self.thread1 = MessageTriage('USERID1', 'user1', 'Warren', 'testchanl')
self.thread1.daemon =... |
4949b1051656566ce544a8240b0328a61259868a | migrations/versions/139_add_ns_index_to_contact_and_event.py | migrations/versions/139_add_ns_index_to_contact_and_event.py | """Add compound index to Contact and Event
Revision ID: 1fd7b3e0b662
Revises: 5305d4ae30b4
Create Date: 2015-02-17 18:11:30.726188
"""
# revision identifiers, used by Alembic.
revision = '1fd7b3e0b662'
down_revision = '2d8a350b4885'
from alembic import op
def upgrade():
op.create_index(
'ix_contact_ns... | """Add compound index to Contact and Event
Revision ID: 1fd7b3e0b662
Revises: 5305d4ae30b4
Create Date: 2015-02-17 18:11:30.726188
"""
# revision identifiers, used by Alembic.
revision = '1fd7b3e0b662'
down_revision = '5305d4ae30b4'
from alembic import op
def upgrade():
op.create_index(
'ix_contact_ns... | Fix migration history bug introduced with merge | Fix migration history bug introduced with merge
| Python | agpl-3.0 | wakermahmud/sync-engine,EthanBlackburn/sync-engine,Eagles2F/sync-engine,EthanBlackburn/sync-engine,gale320/sync-engine,wakermahmud/sync-engine,nylas/sync-engine,jobscore/sync-engine,nylas/sync-engine,jobscore/sync-engine,closeio/nylas,gale320/sync-engine,wakermahmud/sync-engine,closeio/nylas,PriviPK/privipk-sync-engine... | """Add compound index to Contact and Event
Revision ID: 1fd7b3e0b662
Revises: 5305d4ae30b4
Create Date: 2015-02-17 18:11:30.726188
"""
# revision identifiers, used by Alembic.
revision = '1fd7b3e0b662'
down_revision = '2d8a350b4885'
from alembic import op
def upgrade():
op.create_index(
'ix_contact_ns... | """Add compound index to Contact and Event
Revision ID: 1fd7b3e0b662
Revises: 5305d4ae30b4
Create Date: 2015-02-17 18:11:30.726188
"""
# revision identifiers, used by Alembic.
revision = '1fd7b3e0b662'
down_revision = '5305d4ae30b4'
from alembic import op
def upgrade():
op.create_index(
'ix_contact_ns... | <commit_before>"""Add compound index to Contact and Event
Revision ID: 1fd7b3e0b662
Revises: 5305d4ae30b4
Create Date: 2015-02-17 18:11:30.726188
"""
# revision identifiers, used by Alembic.
revision = '1fd7b3e0b662'
down_revision = '2d8a350b4885'
from alembic import op
def upgrade():
op.create_index(
... | """Add compound index to Contact and Event
Revision ID: 1fd7b3e0b662
Revises: 5305d4ae30b4
Create Date: 2015-02-17 18:11:30.726188
"""
# revision identifiers, used by Alembic.
revision = '1fd7b3e0b662'
down_revision = '5305d4ae30b4'
from alembic import op
def upgrade():
op.create_index(
'ix_contact_ns... | """Add compound index to Contact and Event
Revision ID: 1fd7b3e0b662
Revises: 5305d4ae30b4
Create Date: 2015-02-17 18:11:30.726188
"""
# revision identifiers, used by Alembic.
revision = '1fd7b3e0b662'
down_revision = '2d8a350b4885'
from alembic import op
def upgrade():
op.create_index(
'ix_contact_ns... | <commit_before>"""Add compound index to Contact and Event
Revision ID: 1fd7b3e0b662
Revises: 5305d4ae30b4
Create Date: 2015-02-17 18:11:30.726188
"""
# revision identifiers, used by Alembic.
revision = '1fd7b3e0b662'
down_revision = '2d8a350b4885'
from alembic import op
def upgrade():
op.create_index(
... |
de89049649fe720d45b271f519674845104f1941 | flow_workflow/petri_net/future_nets/base.py | flow_workflow/petri_net/future_nets/base.py | from flow.petri_net.future_net import FutureNet
from flow.petri_net.success_failure_net import SuccessFailureNet
class SimplifiedSuccessFailureNet(FutureNet):
def __init__(self, name=''):
FutureNet.__init__(self, name=name)
# Internal -- subclasses should connect to these
self.internal_st... | from flow.petri_net.future_net import FutureNet
from flow.petri_net.success_failure_net import SuccessFailureNet
class GenomeNetBase(SuccessFailureNet):
def __init__(self, name, operation_id, parent_operation_id=None):
SuccessFailureNet.__init__(self, name=name)
self.operation_id = operation_id
... | Make GenomeNetBase a SuccessFailureNet again | Make GenomeNetBase a SuccessFailureNet again
| Python | agpl-3.0 | genome/flow-workflow,genome/flow-workflow,genome/flow-workflow | from flow.petri_net.future_net import FutureNet
from flow.petri_net.success_failure_net import SuccessFailureNet
class SimplifiedSuccessFailureNet(FutureNet):
def __init__(self, name=''):
FutureNet.__init__(self, name=name)
# Internal -- subclasses should connect to these
self.internal_st... | from flow.petri_net.future_net import FutureNet
from flow.petri_net.success_failure_net import SuccessFailureNet
class GenomeNetBase(SuccessFailureNet):
def __init__(self, name, operation_id, parent_operation_id=None):
SuccessFailureNet.__init__(self, name=name)
self.operation_id = operation_id
... | <commit_before>from flow.petri_net.future_net import FutureNet
from flow.petri_net.success_failure_net import SuccessFailureNet
class SimplifiedSuccessFailureNet(FutureNet):
def __init__(self, name=''):
FutureNet.__init__(self, name=name)
# Internal -- subclasses should connect to these
s... | from flow.petri_net.future_net import FutureNet
from flow.petri_net.success_failure_net import SuccessFailureNet
class GenomeNetBase(SuccessFailureNet):
def __init__(self, name, operation_id, parent_operation_id=None):
SuccessFailureNet.__init__(self, name=name)
self.operation_id = operation_id
... | from flow.petri_net.future_net import FutureNet
from flow.petri_net.success_failure_net import SuccessFailureNet
class SimplifiedSuccessFailureNet(FutureNet):
def __init__(self, name=''):
FutureNet.__init__(self, name=name)
# Internal -- subclasses should connect to these
self.internal_st... | <commit_before>from flow.petri_net.future_net import FutureNet
from flow.petri_net.success_failure_net import SuccessFailureNet
class SimplifiedSuccessFailureNet(FutureNet):
def __init__(self, name=''):
FutureNet.__init__(self, name=name)
# Internal -- subclasses should connect to these
s... |
3486d3cb7122ba59c64d9af5b6eb6b12bc97e193 | brew/utilities/efficiency.py | brew/utilities/efficiency.py | # -*- coding: utf-8 -*-
from .sugar import sg_to_gu
__all__ = [
u'calculate_brew_house_yield',
]
def calculate_brew_house_yield(wort_volume, sg, grain_additions):
"""
Calculate Brew House Yield
:param float wort_volume: The volume of the wort
:param float sg: THe specific gravity of the wort
... | # -*- coding: utf-8 -*-
from ..constants import GRAIN_TYPE_DME
from ..constants import GRAIN_TYPE_LME
from .sugar import sg_to_gu
__all__ = [
u'calculate_brew_house_yield',
]
def calculate_brew_house_yield(wort_volume, sg, grain_additions):
"""
Calculate Brew House Yield
:param float wort_volume: T... | Clean up brew house yield calculator to deal with DME and LME additions | Clean up brew house yield calculator to deal with DME and LME additions
| Python | mit | chrisgilmerproj/brewday,chrisgilmerproj/brewday | # -*- coding: utf-8 -*-
from .sugar import sg_to_gu
__all__ = [
u'calculate_brew_house_yield',
]
def calculate_brew_house_yield(wort_volume, sg, grain_additions):
"""
Calculate Brew House Yield
:param float wort_volume: The volume of the wort
:param float sg: THe specific gravity of the wort
... | # -*- coding: utf-8 -*-
from ..constants import GRAIN_TYPE_DME
from ..constants import GRAIN_TYPE_LME
from .sugar import sg_to_gu
__all__ = [
u'calculate_brew_house_yield',
]
def calculate_brew_house_yield(wort_volume, sg, grain_additions):
"""
Calculate Brew House Yield
:param float wort_volume: T... | <commit_before># -*- coding: utf-8 -*-
from .sugar import sg_to_gu
__all__ = [
u'calculate_brew_house_yield',
]
def calculate_brew_house_yield(wort_volume, sg, grain_additions):
"""
Calculate Brew House Yield
:param float wort_volume: The volume of the wort
:param float sg: THe specific gravity... | # -*- coding: utf-8 -*-
from ..constants import GRAIN_TYPE_DME
from ..constants import GRAIN_TYPE_LME
from .sugar import sg_to_gu
__all__ = [
u'calculate_brew_house_yield',
]
def calculate_brew_house_yield(wort_volume, sg, grain_additions):
"""
Calculate Brew House Yield
:param float wort_volume: T... | # -*- coding: utf-8 -*-
from .sugar import sg_to_gu
__all__ = [
u'calculate_brew_house_yield',
]
def calculate_brew_house_yield(wort_volume, sg, grain_additions):
"""
Calculate Brew House Yield
:param float wort_volume: The volume of the wort
:param float sg: THe specific gravity of the wort
... | <commit_before># -*- coding: utf-8 -*-
from .sugar import sg_to_gu
__all__ = [
u'calculate_brew_house_yield',
]
def calculate_brew_house_yield(wort_volume, sg, grain_additions):
"""
Calculate Brew House Yield
:param float wort_volume: The volume of the wort
:param float sg: THe specific gravity... |
e65a8c057d9dbd156222542a0e544d294292de00 | thinglang/lexer/symbols/base.py | thinglang/lexer/symbols/base.py | from thinglang.utils.type_descriptors import ValueType
from thinglang.lexer.symbols import LexicalSymbol
class LexicalQuote(LexicalSymbol): # "
EMITTABLE = False
@classmethod
def next_operator_set(cls, current, original):
if current is original:
return {'"': LexicalQuote}
ret... | from thinglang.utils.type_descriptors import ValueType
from thinglang.lexer.symbols import LexicalSymbol
class LexicalQuote(LexicalSymbol): # "
EMITTABLE = False
@classmethod
def next_operator_set(cls, current, original):
if current is original:
return {'"': LexicalQuote}
ret... | Use new resolver in LexicalID resolution | Use new resolver in LexicalID resolution
| Python | mit | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | from thinglang.utils.type_descriptors import ValueType
from thinglang.lexer.symbols import LexicalSymbol
class LexicalQuote(LexicalSymbol): # "
EMITTABLE = False
@classmethod
def next_operator_set(cls, current, original):
if current is original:
return {'"': LexicalQuote}
ret... | from thinglang.utils.type_descriptors import ValueType
from thinglang.lexer.symbols import LexicalSymbol
class LexicalQuote(LexicalSymbol): # "
EMITTABLE = False
@classmethod
def next_operator_set(cls, current, original):
if current is original:
return {'"': LexicalQuote}
ret... | <commit_before>from thinglang.utils.type_descriptors import ValueType
from thinglang.lexer.symbols import LexicalSymbol
class LexicalQuote(LexicalSymbol): # "
EMITTABLE = False
@classmethod
def next_operator_set(cls, current, original):
if current is original:
return {'"': LexicalQuo... | from thinglang.utils.type_descriptors import ValueType
from thinglang.lexer.symbols import LexicalSymbol
class LexicalQuote(LexicalSymbol): # "
EMITTABLE = False
@classmethod
def next_operator_set(cls, current, original):
if current is original:
return {'"': LexicalQuote}
ret... | from thinglang.utils.type_descriptors import ValueType
from thinglang.lexer.symbols import LexicalSymbol
class LexicalQuote(LexicalSymbol): # "
EMITTABLE = False
@classmethod
def next_operator_set(cls, current, original):
if current is original:
return {'"': LexicalQuote}
ret... | <commit_before>from thinglang.utils.type_descriptors import ValueType
from thinglang.lexer.symbols import LexicalSymbol
class LexicalQuote(LexicalSymbol): # "
EMITTABLE = False
@classmethod
def next_operator_set(cls, current, original):
if current is original:
return {'"': LexicalQuo... |
e559c897cec534c58ab7940e2623a1decfb4958a | numpy/distutils/command/install_clib.py | numpy/distutils/command/install_clib.py | import os
from distutils.core import Command
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
self.outfiles = []
def finalize_o... | import os
from distutils.core import Command
from distutils.ccompiler import new_compiler
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
... | Move import at the top of module. | Move import at the top of module.
| Python | bsd-3-clause | jorisvandenbossche/numpy,MichaelAquilina/numpy,b-carter/numpy,sonnyhu/numpy,GrimDerp/numpy,dch312/numpy,githubmlai/numpy,astrofrog/numpy,brandon-rhodes/numpy,joferkington/numpy,CMartelLML/numpy,rajathkumarmp/numpy,ahaldane/numpy,MaPePeR/numpy,empeeu/numpy,pelson/numpy,nguyentu1602/numpy,jakirkham/numpy,jakirkham/numpy,... | import os
from distutils.core import Command
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
self.outfiles = []
def finalize_o... | import os
from distutils.core import Command
from distutils.ccompiler import new_compiler
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
... | <commit_before>import os
from distutils.core import Command
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
self.outfiles = []
... | import os
from distutils.core import Command
from distutils.ccompiler import new_compiler
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
... | import os
from distutils.core import Command
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
self.outfiles = []
def finalize_o... | <commit_before>import os
from distutils.core import Command
from numpy.distutils.misc_util import get_cmd
class install_clib(Command):
description = "Command to install installable C libraries"
user_options = []
def initialize_options(self):
self.install_dir = None
self.outfiles = []
... |
1d96f8a1456d902fe5a9e6ce5410a41b1468a810 | thinglang/parser/tokens/logic.py | thinglang/parser/tokens/logic.py | from thinglang.lexer.symbols.logic import LexicalEquality
from thinglang.parser.tokens import BaseToken
class Conditional(BaseToken):
ADVANCE = False
COMPARATORS = {
LexicalEquality: lambda lhs, rhs: lhs == rhs
}
def __init__(self, slice):
super(Conditional, self).__init__(slice)
... | from thinglang.lexer.symbols.logic import LexicalEquality
from thinglang.parser.tokens import BaseToken
class Conditional(BaseToken):
ADVANCE = False
def __init__(self, slice):
super(Conditional, self).__init__(slice)
_, self.value = slice
def describe(self):
return 'if {}'.form... | Complete migration from conditional to arithmetic operation | Complete migration from conditional to arithmetic operation
| Python | mit | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | from thinglang.lexer.symbols.logic import LexicalEquality
from thinglang.parser.tokens import BaseToken
class Conditional(BaseToken):
ADVANCE = False
COMPARATORS = {
LexicalEquality: lambda lhs, rhs: lhs == rhs
}
def __init__(self, slice):
super(Conditional, self).__init__(slice)
... | from thinglang.lexer.symbols.logic import LexicalEquality
from thinglang.parser.tokens import BaseToken
class Conditional(BaseToken):
ADVANCE = False
def __init__(self, slice):
super(Conditional, self).__init__(slice)
_, self.value = slice
def describe(self):
return 'if {}'.form... | <commit_before>from thinglang.lexer.symbols.logic import LexicalEquality
from thinglang.parser.tokens import BaseToken
class Conditional(BaseToken):
ADVANCE = False
COMPARATORS = {
LexicalEquality: lambda lhs, rhs: lhs == rhs
}
def __init__(self, slice):
super(Conditional, self).__in... | from thinglang.lexer.symbols.logic import LexicalEquality
from thinglang.parser.tokens import BaseToken
class Conditional(BaseToken):
ADVANCE = False
def __init__(self, slice):
super(Conditional, self).__init__(slice)
_, self.value = slice
def describe(self):
return 'if {}'.form... | from thinglang.lexer.symbols.logic import LexicalEquality
from thinglang.parser.tokens import BaseToken
class Conditional(BaseToken):
ADVANCE = False
COMPARATORS = {
LexicalEquality: lambda lhs, rhs: lhs == rhs
}
def __init__(self, slice):
super(Conditional, self).__init__(slice)
... | <commit_before>from thinglang.lexer.symbols.logic import LexicalEquality
from thinglang.parser.tokens import BaseToken
class Conditional(BaseToken):
ADVANCE = False
COMPARATORS = {
LexicalEquality: lambda lhs, rhs: lhs == rhs
}
def __init__(self, slice):
super(Conditional, self).__in... |
1f4d1fb8e8923609aae8e90d186d4e0e3ca40329 | notifications/rest/bindings/list-binding/list-binding.6.x.py | notifications/rest/bindings/list-binding/list-binding.6.x.py | # NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
from twilio.rest import Client
from datetime import datetime
# Your Account Sid and Auth Token from twilio.com/user/account
acco... | # NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
from twilio.rest import Client
from datetime import datetime
# Your Account Sid and Auth Token from twilio.com/user/account
acco... | Update .py list-binding API snippet with 'new user' tag | Update .py list-binding API snippet with 'new user' tag
| Python | mit | TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snip... | # NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
from twilio.rest import Client
from datetime import datetime
# Your Account Sid and Auth Token from twilio.com/user/account
acco... | # NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
from twilio.rest import Client
from datetime import datetime
# Your Account Sid and Auth Token from twilio.com/user/account
acco... | <commit_before># NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
from twilio.rest import Client
from datetime import datetime
# Your Account Sid and Auth Token from twilio.com/us... | # NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
from twilio.rest import Client
from datetime import datetime
# Your Account Sid and Auth Token from twilio.com/user/account
acco... | # NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
from twilio.rest import Client
from datetime import datetime
# Your Account Sid and Auth Token from twilio.com/user/account
acco... | <commit_before># NOTE: This example uses the next generation Twilio helper library - for more
# information on how to download and install this version, visit
# https://www.twilio.com/docs/libraries/python
from twilio.rest import Client
from datetime import datetime
# Your Account Sid and Auth Token from twilio.com/us... |
0d9085b0335fe52a8d9682d18c64b540e5a5e71e | tests/backends/gstreamer_test.py | tests/backends/gstreamer_test.py | import unittest
import os
from mopidy.models import Playlist, Track
from mopidy.backends.gstreamer import GStreamerBackend
from tests.backends.base import (BasePlaybackControllerTest,
BaseCurrentPlaylistControllerTest)
folder = os.path.dirname(__file__)
folder = os.path.join(folder, ... | import unittest
import os
from mopidy.models import Playlist, Track
from mopidy.backends.gstreamer import GStreamerBackend
from tests.backends.base import (BasePlaybackControllerTest,
BaseCurrentPlaylistControllerTest)
folder = os.path.dirname(__file__)
folder = os.path.join(folder, ... | Add test for mp3, ogg and flac support in gstreamer backend | Add test for mp3, ogg and flac support in gstreamer backend
| Python | apache-2.0 | vrs01/mopidy,jcass77/mopidy,kingosticks/mopidy,bacontext/mopidy,mokieyue/mopidy,jodal/mopidy,liamw9534/mopidy,mopidy/mopidy,liamw9534/mopidy,diandiankan/mopidy,jodal/mopidy,mokieyue/mopidy,pacificIT/mopidy,glogiotatidis/mopidy,quartz55/mopidy,adamcik/mopidy,jmarsik/mopidy,jcass77/mopidy,abarisain/mopidy,bencevans/mopid... | import unittest
import os
from mopidy.models import Playlist, Track
from mopidy.backends.gstreamer import GStreamerBackend
from tests.backends.base import (BasePlaybackControllerTest,
BaseCurrentPlaylistControllerTest)
folder = os.path.dirname(__file__)
folder = os.path.join(folder, ... | import unittest
import os
from mopidy.models import Playlist, Track
from mopidy.backends.gstreamer import GStreamerBackend
from tests.backends.base import (BasePlaybackControllerTest,
BaseCurrentPlaylistControllerTest)
folder = os.path.dirname(__file__)
folder = os.path.join(folder, ... | <commit_before>import unittest
import os
from mopidy.models import Playlist, Track
from mopidy.backends.gstreamer import GStreamerBackend
from tests.backends.base import (BasePlaybackControllerTest,
BaseCurrentPlaylistControllerTest)
folder = os.path.dirname(__file__)
folder = os.pat... | import unittest
import os
from mopidy.models import Playlist, Track
from mopidy.backends.gstreamer import GStreamerBackend
from tests.backends.base import (BasePlaybackControllerTest,
BaseCurrentPlaylistControllerTest)
folder = os.path.dirname(__file__)
folder = os.path.join(folder, ... | import unittest
import os
from mopidy.models import Playlist, Track
from mopidy.backends.gstreamer import GStreamerBackend
from tests.backends.base import (BasePlaybackControllerTest,
BaseCurrentPlaylistControllerTest)
folder = os.path.dirname(__file__)
folder = os.path.join(folder, ... | <commit_before>import unittest
import os
from mopidy.models import Playlist, Track
from mopidy.backends.gstreamer import GStreamerBackend
from tests.backends.base import (BasePlaybackControllerTest,
BaseCurrentPlaylistControllerTest)
folder = os.path.dirname(__file__)
folder = os.pat... |
5606e8d56b7f6441eeb121795b0f400d65858b3b | tests/integration/test_fanout.py | tests/integration/test_fanout.py | import uuid
import diesel
from diesel.util.queue import Fanout
class FanoutHarness(object):
def setup(self):
self.fan = Fanout()
self.subscriber_data = {}
for x in xrange(10):
diesel.fork(self.subscriber)
diesel.sleep()
for i in xrange(10):
self.fan... | import uuid
import diesel
from diesel.util.queue import Fanout
from diesel.util.event import Countdown
class FanoutHarness(object):
def setup(self):
self.done = Countdown(10)
self.fan = Fanout()
self.subscriber_data = {}
for x in xrange(10):
diesel.fork(self.subscriber... | Add "done" tracking for fanout test. | Add "done" tracking for fanout test.
| Python | bsd-3-clause | dieseldev/diesel | import uuid
import diesel
from diesel.util.queue import Fanout
class FanoutHarness(object):
def setup(self):
self.fan = Fanout()
self.subscriber_data = {}
for x in xrange(10):
diesel.fork(self.subscriber)
diesel.sleep()
for i in xrange(10):
self.fan... | import uuid
import diesel
from diesel.util.queue import Fanout
from diesel.util.event import Countdown
class FanoutHarness(object):
def setup(self):
self.done = Countdown(10)
self.fan = Fanout()
self.subscriber_data = {}
for x in xrange(10):
diesel.fork(self.subscriber... | <commit_before>import uuid
import diesel
from diesel.util.queue import Fanout
class FanoutHarness(object):
def setup(self):
self.fan = Fanout()
self.subscriber_data = {}
for x in xrange(10):
diesel.fork(self.subscriber)
diesel.sleep()
for i in xrange(10):
... | import uuid
import diesel
from diesel.util.queue import Fanout
from diesel.util.event import Countdown
class FanoutHarness(object):
def setup(self):
self.done = Countdown(10)
self.fan = Fanout()
self.subscriber_data = {}
for x in xrange(10):
diesel.fork(self.subscriber... | import uuid
import diesel
from diesel.util.queue import Fanout
class FanoutHarness(object):
def setup(self):
self.fan = Fanout()
self.subscriber_data = {}
for x in xrange(10):
diesel.fork(self.subscriber)
diesel.sleep()
for i in xrange(10):
self.fan... | <commit_before>import uuid
import diesel
from diesel.util.queue import Fanout
class FanoutHarness(object):
def setup(self):
self.fan = Fanout()
self.subscriber_data = {}
for x in xrange(10):
diesel.fork(self.subscriber)
diesel.sleep()
for i in xrange(10):
... |
76deb311dbb981501a1fa2686ec2cf4c92d7b83b | taggit/admin.py | taggit/admin.py | from django.contrib import admin
from taggit.models import Tag, TaggedItem
class TaggedItemInline(admin.StackedInline):
model = TaggedItem
class TagAdmin(admin.ModelAdmin):
inlines = [
TaggedItemInline
]
ordering = ['name']
admin.site.register(Tag, TagAdmin)
| from django.contrib import admin
from taggit.models import Tag, TaggedItem
class TaggedItemInline(admin.StackedInline):
model = TaggedItem
extra = 0
class TagAdmin(admin.ModelAdmin):
inlines = [
TaggedItemInline
]
ordering = ['name']
admin.site.register(Tag, TagAdmin)
| Remove extra inlines from django-taggit | Remove extra inlines from django-taggit | Python | bsd-3-clause | theatlantic/django-taggit,theatlantic/django-taggit2,theatlantic/django-taggit2,theatlantic/django-taggit,decibyte/django-taggit,decibyte/django-taggit | from django.contrib import admin
from taggit.models import Tag, TaggedItem
class TaggedItemInline(admin.StackedInline):
model = TaggedItem
class TagAdmin(admin.ModelAdmin):
inlines = [
TaggedItemInline
]
ordering = ['name']
admin.site.register(Tag, TagAdmin)
Remove extra inlines from django... | from django.contrib import admin
from taggit.models import Tag, TaggedItem
class TaggedItemInline(admin.StackedInline):
model = TaggedItem
extra = 0
class TagAdmin(admin.ModelAdmin):
inlines = [
TaggedItemInline
]
ordering = ['name']
admin.site.register(Tag, TagAdmin)
| <commit_before>from django.contrib import admin
from taggit.models import Tag, TaggedItem
class TaggedItemInline(admin.StackedInline):
model = TaggedItem
class TagAdmin(admin.ModelAdmin):
inlines = [
TaggedItemInline
]
ordering = ['name']
admin.site.register(Tag, TagAdmin)
<commit_msg>Remov... | from django.contrib import admin
from taggit.models import Tag, TaggedItem
class TaggedItemInline(admin.StackedInline):
model = TaggedItem
extra = 0
class TagAdmin(admin.ModelAdmin):
inlines = [
TaggedItemInline
]
ordering = ['name']
admin.site.register(Tag, TagAdmin)
| from django.contrib import admin
from taggit.models import Tag, TaggedItem
class TaggedItemInline(admin.StackedInline):
model = TaggedItem
class TagAdmin(admin.ModelAdmin):
inlines = [
TaggedItemInline
]
ordering = ['name']
admin.site.register(Tag, TagAdmin)
Remove extra inlines from django... | <commit_before>from django.contrib import admin
from taggit.models import Tag, TaggedItem
class TaggedItemInline(admin.StackedInline):
model = TaggedItem
class TagAdmin(admin.ModelAdmin):
inlines = [
TaggedItemInline
]
ordering = ['name']
admin.site.register(Tag, TagAdmin)
<commit_msg>Remov... |
1862317c3b463704c8264f71007e7b910772b44e | tests/test_pprint.py | tests/test_pprint.py | import pytest
from mappyfile.pprint import PrettyPrinter
def test_print_map():
mf = {}
pp = PrettyPrinter() # expected
txt = pp.pprint(mf)
assert(expected == txt)
def run_tests():
#pytest.main(["tests/test_pprint.py::test_print_map"])
pytest.main(["tests/test_pprint.py"])
if __name__ ... | import pytest
from mappyfile.pprint import PrettyPrinter
import mappyfile
def test_format_list():
s = """
CLASS
STYLE
COLOR 173 216 230
END
STYLE
OUTLINECOLOR 2 2 2
WIDTH 1
LINECAP BUTT
PATT... | Add pair list formatting test | Add pair list formatting test
| Python | mit | Jenselme/mappyfile,geographika/mappyfile,geographika/mappyfile | import pytest
from mappyfile.pprint import PrettyPrinter
def test_print_map():
mf = {}
pp = PrettyPrinter() # expected
txt = pp.pprint(mf)
assert(expected == txt)
def run_tests():
#pytest.main(["tests/test_pprint.py::test_print_map"])
pytest.main(["tests/test_pprint.py"])
if __name__ ... | import pytest
from mappyfile.pprint import PrettyPrinter
import mappyfile
def test_format_list():
s = """
CLASS
STYLE
COLOR 173 216 230
END
STYLE
OUTLINECOLOR 2 2 2
WIDTH 1
LINECAP BUTT
PATT... | <commit_before>import pytest
from mappyfile.pprint import PrettyPrinter
def test_print_map():
mf = {}
pp = PrettyPrinter() # expected
txt = pp.pprint(mf)
assert(expected == txt)
def run_tests():
#pytest.main(["tests/test_pprint.py::test_print_map"])
pytest.main(["tests/test_pprint.py"]... | import pytest
from mappyfile.pprint import PrettyPrinter
import mappyfile
def test_format_list():
s = """
CLASS
STYLE
COLOR 173 216 230
END
STYLE
OUTLINECOLOR 2 2 2
WIDTH 1
LINECAP BUTT
PATT... | import pytest
from mappyfile.pprint import PrettyPrinter
def test_print_map():
mf = {}
pp = PrettyPrinter() # expected
txt = pp.pprint(mf)
assert(expected == txt)
def run_tests():
#pytest.main(["tests/test_pprint.py::test_print_map"])
pytest.main(["tests/test_pprint.py"])
if __name__ ... | <commit_before>import pytest
from mappyfile.pprint import PrettyPrinter
def test_print_map():
mf = {}
pp = PrettyPrinter() # expected
txt = pp.pprint(mf)
assert(expected == txt)
def run_tests():
#pytest.main(["tests/test_pprint.py::test_print_map"])
pytest.main(["tests/test_pprint.py"]... |
207bb83a7a41a36dbe27cb4b75f93fe0ae3a5625 | sgext/util/aws.py | sgext/util/aws.py | # -*- coding: utf-8 -*-
#
# © 2011 SimpleGeo, Inc. All rights reserved.
# Author: Paul Lathrop <paul@simplegeo.com>
#
"""Utility functions for AWS-related tasks."""
from getpass import getpass
import boto.pyami.config as boto_config
def get_credentials(batch=False):
"""Return a tuple (key, secret) of AWS crede... | # -*- coding: utf-8 -*-
#
# © 2011 SimpleGeo, Inc. All rights reserved.
# Author: Paul Lathrop <paul@simplegeo.com>
#
"""Utility functions for AWS-related tasks."""
from getpass import getpass
import boto.pyami.config as boto_config
def get_credentials(batch=False):
"""Return a dictionary of AWS credentials. C... | Fix get_credentials so it returns a dict. | Fix get_credentials so it returns a dict.
| Python | bsd-2-clause | simplegeo/clusto-sgext | # -*- coding: utf-8 -*-
#
# © 2011 SimpleGeo, Inc. All rights reserved.
# Author: Paul Lathrop <paul@simplegeo.com>
#
"""Utility functions for AWS-related tasks."""
from getpass import getpass
import boto.pyami.config as boto_config
def get_credentials(batch=False):
"""Return a tuple (key, secret) of AWS crede... | # -*- coding: utf-8 -*-
#
# © 2011 SimpleGeo, Inc. All rights reserved.
# Author: Paul Lathrop <paul@simplegeo.com>
#
"""Utility functions for AWS-related tasks."""
from getpass import getpass
import boto.pyami.config as boto_config
def get_credentials(batch=False):
"""Return a dictionary of AWS credentials. C... | <commit_before># -*- coding: utf-8 -*-
#
# © 2011 SimpleGeo, Inc. All rights reserved.
# Author: Paul Lathrop <paul@simplegeo.com>
#
"""Utility functions for AWS-related tasks."""
from getpass import getpass
import boto.pyami.config as boto_config
def get_credentials(batch=False):
"""Return a tuple (key, secre... | # -*- coding: utf-8 -*-
#
# © 2011 SimpleGeo, Inc. All rights reserved.
# Author: Paul Lathrop <paul@simplegeo.com>
#
"""Utility functions for AWS-related tasks."""
from getpass import getpass
import boto.pyami.config as boto_config
def get_credentials(batch=False):
"""Return a dictionary of AWS credentials. C... | # -*- coding: utf-8 -*-
#
# © 2011 SimpleGeo, Inc. All rights reserved.
# Author: Paul Lathrop <paul@simplegeo.com>
#
"""Utility functions for AWS-related tasks."""
from getpass import getpass
import boto.pyami.config as boto_config
def get_credentials(batch=False):
"""Return a tuple (key, secret) of AWS crede... | <commit_before># -*- coding: utf-8 -*-
#
# © 2011 SimpleGeo, Inc. All rights reserved.
# Author: Paul Lathrop <paul@simplegeo.com>
#
"""Utility functions for AWS-related tasks."""
from getpass import getpass
import boto.pyami.config as boto_config
def get_credentials(batch=False):
"""Return a tuple (key, secre... |
20a92ff1ffe143193d95235c7a5ea8e9edb0df64 | yowsup/layers/protocol_acks/protocolentities/ack_outgoing.py | yowsup/layers/protocol_acks/protocolentities/ack_outgoing.py | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class OutgoingAckProtocolEntity(AckProtocolEntity):
'''
<ack type="{{delivery | read}}" class="{{message | receipt | ?}}" id="{{MESSAGE_ID}} to={{TO_JID}}">
</ack>
'''
def __init__(self, _id, _class, _ty... | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class OutgoingAckProtocolEntity(AckProtocolEntity):
'''
<ack type="{{delivery | read}}" class="{{message | receipt | ?}}" id="{{MESSAGE_ID}} to={{TO_JID}}">
</ack>
<ack to="{{GROUP_JID}}" participant="{{JID}... | Include participant in outgoing ack | Include participant in outgoing ack
| Python | mit | ongair/yowsup,biji/yowsup | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class OutgoingAckProtocolEntity(AckProtocolEntity):
'''
<ack type="{{delivery | read}}" class="{{message | receipt | ?}}" id="{{MESSAGE_ID}} to={{TO_JID}}">
</ack>
'''
def __init__(self, _id, _class, _ty... | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class OutgoingAckProtocolEntity(AckProtocolEntity):
'''
<ack type="{{delivery | read}}" class="{{message | receipt | ?}}" id="{{MESSAGE_ID}} to={{TO_JID}}">
</ack>
<ack to="{{GROUP_JID}}" participant="{{JID}... | <commit_before>from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class OutgoingAckProtocolEntity(AckProtocolEntity):
'''
<ack type="{{delivery | read}}" class="{{message | receipt | ?}}" id="{{MESSAGE_ID}} to={{TO_JID}}">
</ack>
'''
def __init__(self, _... | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class OutgoingAckProtocolEntity(AckProtocolEntity):
'''
<ack type="{{delivery | read}}" class="{{message | receipt | ?}}" id="{{MESSAGE_ID}} to={{TO_JID}}">
</ack>
<ack to="{{GROUP_JID}}" participant="{{JID}... | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class OutgoingAckProtocolEntity(AckProtocolEntity):
'''
<ack type="{{delivery | read}}" class="{{message | receipt | ?}}" id="{{MESSAGE_ID}} to={{TO_JID}}">
</ack>
'''
def __init__(self, _id, _class, _ty... | <commit_before>from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class OutgoingAckProtocolEntity(AckProtocolEntity):
'''
<ack type="{{delivery | read}}" class="{{message | receipt | ?}}" id="{{MESSAGE_ID}} to={{TO_JID}}">
</ack>
'''
def __init__(self, _... |
30907bbfc1b6d38034867070075a28fd3c5d3c6b | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/cli.py | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/cli.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
os.environ["KIVY_NO_ARGS"] = "1"
import click
from {{cookiecutter.repo_name}} import {{cookiecutter.app_class_name}}
@click.command()
@click.option(
'-l', '--language', help='Default language of the App', default='en',
type=click.Choice(['en', 'es', '... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
os.environ["KIVY_NO_ARGS"] = "1"
import click
from {{cookiecutter.repo_name}}.{{cookiecutter.repo_name}} import {{cookiecutter.app_class_name}}
@click.command()
@click.option(
'-l', '--language', help='Default language of the App', default='en',
type=... | Use absolute path for app import | Use absolute path for app import
| Python | mit | hackebrot/cookiedozer,hackebrot/cookiedozer | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
os.environ["KIVY_NO_ARGS"] = "1"
import click
from {{cookiecutter.repo_name}} import {{cookiecutter.app_class_name}}
@click.command()
@click.option(
'-l', '--language', help='Default language of the App', default='en',
type=click.Choice(['en', 'es', '... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
os.environ["KIVY_NO_ARGS"] = "1"
import click
from {{cookiecutter.repo_name}}.{{cookiecutter.repo_name}} import {{cookiecutter.app_class_name}}
@click.command()
@click.option(
'-l', '--language', help='Default language of the App', default='en',
type=... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
os.environ["KIVY_NO_ARGS"] = "1"
import click
from {{cookiecutter.repo_name}} import {{cookiecutter.app_class_name}}
@click.command()
@click.option(
'-l', '--language', help='Default language of the App', default='en',
type=click.Choice... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
os.environ["KIVY_NO_ARGS"] = "1"
import click
from {{cookiecutter.repo_name}}.{{cookiecutter.repo_name}} import {{cookiecutter.app_class_name}}
@click.command()
@click.option(
'-l', '--language', help='Default language of the App', default='en',
type=... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
os.environ["KIVY_NO_ARGS"] = "1"
import click
from {{cookiecutter.repo_name}} import {{cookiecutter.app_class_name}}
@click.command()
@click.option(
'-l', '--language', help='Default language of the App', default='en',
type=click.Choice(['en', 'es', '... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
os.environ["KIVY_NO_ARGS"] = "1"
import click
from {{cookiecutter.repo_name}} import {{cookiecutter.app_class_name}}
@click.command()
@click.option(
'-l', '--language', help='Default language of the App', default='en',
type=click.Choice... |
f872bd95e9a26b326ea49922a373f90d73d0df2f | show_usbcamera.py | show_usbcamera.py | #! /usr/bin/env python
#
# Show the USB camera
#
#
# External dependencies
#
import sys
from PySide import QtGui
import VisionToolkit as vtk
#
# Main application
#
if __name__ == '__main__' :
application = QtGui.QApplication( sys.argv )
widget = vtk.UsbCameraWidget()
widget.show()
sys.exit( appli... | #! /usr/bin/env python
# -*- coding:utf-8 -*-
#
# Show the images from a USB camera
#
#
# External dependencies
#
import sys
from PySide import QtGui
import VisionToolkit as vtk
#
# Main application
#
if __name__ == '__main__' :
application = QtGui.QApplication( sys.argv )
widget = vtk.UsbCameraWidget()
... | Change character coding and a comment. | Change character coding and a comment.
| Python | mit | microy/StereoVision,microy/VisionToolkit,microy/StereoVision,microy/PyStereoVisionToolkit,microy/PyStereoVisionToolkit,microy/VisionToolkit | #! /usr/bin/env python
#
# Show the USB camera
#
#
# External dependencies
#
import sys
from PySide import QtGui
import VisionToolkit as vtk
#
# Main application
#
if __name__ == '__main__' :
application = QtGui.QApplication( sys.argv )
widget = vtk.UsbCameraWidget()
widget.show()
sys.exit( appli... | #! /usr/bin/env python
# -*- coding:utf-8 -*-
#
# Show the images from a USB camera
#
#
# External dependencies
#
import sys
from PySide import QtGui
import VisionToolkit as vtk
#
# Main application
#
if __name__ == '__main__' :
application = QtGui.QApplication( sys.argv )
widget = vtk.UsbCameraWidget()
... | <commit_before>#! /usr/bin/env python
#
# Show the USB camera
#
#
# External dependencies
#
import sys
from PySide import QtGui
import VisionToolkit as vtk
#
# Main application
#
if __name__ == '__main__' :
application = QtGui.QApplication( sys.argv )
widget = vtk.UsbCameraWidget()
widget.show()
... | #! /usr/bin/env python
# -*- coding:utf-8 -*-
#
# Show the images from a USB camera
#
#
# External dependencies
#
import sys
from PySide import QtGui
import VisionToolkit as vtk
#
# Main application
#
if __name__ == '__main__' :
application = QtGui.QApplication( sys.argv )
widget = vtk.UsbCameraWidget()
... | #! /usr/bin/env python
#
# Show the USB camera
#
#
# External dependencies
#
import sys
from PySide import QtGui
import VisionToolkit as vtk
#
# Main application
#
if __name__ == '__main__' :
application = QtGui.QApplication( sys.argv )
widget = vtk.UsbCameraWidget()
widget.show()
sys.exit( appli... | <commit_before>#! /usr/bin/env python
#
# Show the USB camera
#
#
# External dependencies
#
import sys
from PySide import QtGui
import VisionToolkit as vtk
#
# Main application
#
if __name__ == '__main__' :
application = QtGui.QApplication( sys.argv )
widget = vtk.UsbCameraWidget()
widget.show()
... |
fc0ee0d418496f0ec8da01e8bd8e2d12024accaa | simulate_loads.py | simulate_loads.py | import random
import itertools as it
from sklearn.externals import joblib
def simulate_loads(nfrag, ngt, q):
loads = [1] * nfrag
active = set(range(nfrag))
for k in range(1, len(loads)):
i0, i1 = random.sample(active, k=2)
active.remove(i0)
active.remove(i1)
active.add(len(l... | import pickle
import random
import itertools as it
from sklearn.externals import joblib
def simulate_loads(nfrag, ngt, q):
loads = [1] * nfrag
active = set(range(nfrag))
for k in range(1, len(loads)):
i0, i1 = random.sample(active, k=2)
active.remove(i0)
active.remove(i1)
ac... | Add main script to CSR simulations | Add main script to CSR simulations
| Python | bsd-3-clause | jni/gala-scripts | import random
import itertools as it
from sklearn.externals import joblib
def simulate_loads(nfrag, ngt, q):
loads = [1] * nfrag
active = set(range(nfrag))
for k in range(1, len(loads)):
i0, i1 = random.sample(active, k=2)
active.remove(i0)
active.remove(i1)
active.add(len(l... | import pickle
import random
import itertools as it
from sklearn.externals import joblib
def simulate_loads(nfrag, ngt, q):
loads = [1] * nfrag
active = set(range(nfrag))
for k in range(1, len(loads)):
i0, i1 = random.sample(active, k=2)
active.remove(i0)
active.remove(i1)
ac... | <commit_before>import random
import itertools as it
from sklearn.externals import joblib
def simulate_loads(nfrag, ngt, q):
loads = [1] * nfrag
active = set(range(nfrag))
for k in range(1, len(loads)):
i0, i1 = random.sample(active, k=2)
active.remove(i0)
active.remove(i1)
a... | import pickle
import random
import itertools as it
from sklearn.externals import joblib
def simulate_loads(nfrag, ngt, q):
loads = [1] * nfrag
active = set(range(nfrag))
for k in range(1, len(loads)):
i0, i1 = random.sample(active, k=2)
active.remove(i0)
active.remove(i1)
ac... | import random
import itertools as it
from sklearn.externals import joblib
def simulate_loads(nfrag, ngt, q):
loads = [1] * nfrag
active = set(range(nfrag))
for k in range(1, len(loads)):
i0, i1 = random.sample(active, k=2)
active.remove(i0)
active.remove(i1)
active.add(len(l... | <commit_before>import random
import itertools as it
from sklearn.externals import joblib
def simulate_loads(nfrag, ngt, q):
loads = [1] * nfrag
active = set(range(nfrag))
for k in range(1, len(loads)):
i0, i1 = random.sample(active, k=2)
active.remove(i0)
active.remove(i1)
a... |
bdae1f203f3d5d600dd62470dea3d2ddb3048b9d | turbustat/tests/test_wavelet.py | turbustat/tests/test_wavelet.py | # Licensed under an MIT open source license - see LICENSE
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import wt2D, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class tes... | # Licensed under an MIT open source license - see LICENSE
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Wavelet, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class ... | Change class name in tests | Change class name in tests
| Python | mit | e-koch/TurbuStat,Astroua/TurbuStat | # Licensed under an MIT open source license - see LICENSE
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import wt2D, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class tes... | # Licensed under an MIT open source license - see LICENSE
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Wavelet, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class ... | <commit_before># Licensed under an MIT open source license - see LICENSE
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import wt2D, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distan... | # Licensed under an MIT open source license - see LICENSE
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Wavelet, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class ... | # Licensed under an MIT open source license - see LICENSE
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import wt2D, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class tes... | <commit_before># Licensed under an MIT open source license - see LICENSE
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import wt2D, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distan... |
293f44e211e4f26a0b7eca842dd2af515957a4bd | octavia/certificates/generator/cert_gen.py | octavia/certificates/generator/cert_gen.py | # Copyright (c) 2014 Rackspace US, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | # Copyright (c) 2014 Rackspace US, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | Add Cert+PK generation to Certificate Interface | Add Cert+PK generation to Certificate Interface
Change-Id: I82aa573c7db13c7a491b18540379b234c1023eb9
| Python | apache-2.0 | openstack/octavia,openstack/octavia,openstack/octavia | # Copyright (c) 2014 Rackspace US, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | # Copyright (c) 2014 Rackspace US, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | <commit_before># Copyright (c) 2014 Rackspace US, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | # Copyright (c) 2014 Rackspace US, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | # Copyright (c) 2014 Rackspace US, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | <commit_before># Copyright (c) 2014 Rackspace US, Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... |
44d103359cff312865f409ff34f528f63e441ef4 | graphapi/views.py | graphapi/views.py | from simplekeys.verifier import verify_request
from graphene_django.views import GraphQLView
from django.conf import settings
class KeyedGraphQLView(GraphQLView):
graphiql_template = "graphene/graphiql-keyed.html"
def get_response(self, request, data, show_graphiql=False):
# check key only if we're n... | from simplekeys.verifier import verify_request
from graphene_django.views import GraphQLView
from django.conf import settings
class KeyedGraphQLView(GraphQLView):
graphiql_template = "graphene/graphiql-keyed.html"
def get_response(self, request, data, show_graphiql=False):
# check key only if we're n... | Revert "Reimplement using explicit variable lookup" | Revert "Reimplement using explicit variable lookup"
This reverts commit 94683e6c
| Python | mit | openstates/openstates.org,openstates/openstates.org,openstates/openstates.org,openstates/openstates.org | from simplekeys.verifier import verify_request
from graphene_django.views import GraphQLView
from django.conf import settings
class KeyedGraphQLView(GraphQLView):
graphiql_template = "graphene/graphiql-keyed.html"
def get_response(self, request, data, show_graphiql=False):
# check key only if we're n... | from simplekeys.verifier import verify_request
from graphene_django.views import GraphQLView
from django.conf import settings
class KeyedGraphQLView(GraphQLView):
graphiql_template = "graphene/graphiql-keyed.html"
def get_response(self, request, data, show_graphiql=False):
# check key only if we're n... | <commit_before>from simplekeys.verifier import verify_request
from graphene_django.views import GraphQLView
from django.conf import settings
class KeyedGraphQLView(GraphQLView):
graphiql_template = "graphene/graphiql-keyed.html"
def get_response(self, request, data, show_graphiql=False):
# check key ... | from simplekeys.verifier import verify_request
from graphene_django.views import GraphQLView
from django.conf import settings
class KeyedGraphQLView(GraphQLView):
graphiql_template = "graphene/graphiql-keyed.html"
def get_response(self, request, data, show_graphiql=False):
# check key only if we're n... | from simplekeys.verifier import verify_request
from graphene_django.views import GraphQLView
from django.conf import settings
class KeyedGraphQLView(GraphQLView):
graphiql_template = "graphene/graphiql-keyed.html"
def get_response(self, request, data, show_graphiql=False):
# check key only if we're n... | <commit_before>from simplekeys.verifier import verify_request
from graphene_django.views import GraphQLView
from django.conf import settings
class KeyedGraphQLView(GraphQLView):
graphiql_template = "graphene/graphiql-keyed.html"
def get_response(self, request, data, show_graphiql=False):
# check key ... |
fc508462e3fa9b03f0ee55df21c44863fbd8bae0 | tests/providers/phone_number.py | tests/providers/phone_number.py | # coding=utf-8
from __future__ import unicode_literals
import unittest
from faker import Factory
from .. import string_types
class TestJaJP(unittest.TestCase):
""" Tests phone_number in the ja_JP locale """
def setUp(self):
self.factory = Factory.create('ja')
def test_phone_number(self):
... | # coding=utf-8
from __future__ import unicode_literals
import unittest
from faker import Factory
from .. import string_types
class TestJaJP(unittest.TestCase):
""" Tests phone_number in the ja_JP locale """
def setUp(self):
self.factory = Factory.create('ja')
def test_phone_number(self):
... | Add the msisdn provider test | Add the msisdn provider test
| Python | mit | joke2k/faker,danhuss/faker,joke2k/faker | # coding=utf-8
from __future__ import unicode_literals
import unittest
from faker import Factory
from .. import string_types
class TestJaJP(unittest.TestCase):
""" Tests phone_number in the ja_JP locale """
def setUp(self):
self.factory = Factory.create('ja')
def test_phone_number(self):
... | # coding=utf-8
from __future__ import unicode_literals
import unittest
from faker import Factory
from .. import string_types
class TestJaJP(unittest.TestCase):
""" Tests phone_number in the ja_JP locale """
def setUp(self):
self.factory = Factory.create('ja')
def test_phone_number(self):
... | <commit_before># coding=utf-8
from __future__ import unicode_literals
import unittest
from faker import Factory
from .. import string_types
class TestJaJP(unittest.TestCase):
""" Tests phone_number in the ja_JP locale """
def setUp(self):
self.factory = Factory.create('ja')
def test_phone_num... | # coding=utf-8
from __future__ import unicode_literals
import unittest
from faker import Factory
from .. import string_types
class TestJaJP(unittest.TestCase):
""" Tests phone_number in the ja_JP locale """
def setUp(self):
self.factory = Factory.create('ja')
def test_phone_number(self):
... | # coding=utf-8
from __future__ import unicode_literals
import unittest
from faker import Factory
from .. import string_types
class TestJaJP(unittest.TestCase):
""" Tests phone_number in the ja_JP locale """
def setUp(self):
self.factory = Factory.create('ja')
def test_phone_number(self):
... | <commit_before># coding=utf-8
from __future__ import unicode_literals
import unittest
from faker import Factory
from .. import string_types
class TestJaJP(unittest.TestCase):
""" Tests phone_number in the ja_JP locale """
def setUp(self):
self.factory = Factory.create('ja')
def test_phone_num... |
48081a925d5b69e18a1f04c74cbe98b590e77c5b | tests/unit/test_pylama_isort.py | tests/unit/test_pylama_isort.py | import os
from isort.pylama_isort import Linter
class TestLinter:
instance = Linter()
def test_allow(self):
assert not self.instance.allow("test_case.pyc")
assert not self.instance.allow("test_case.c")
assert self.instance.allow("test_case.py")
def test_run(self, src_dir, tmpdir... | import os
from isort.pylama_isort import Linter
class TestLinter:
instance = Linter()
def test_allow(self):
assert not self.instance.allow("test_case.pyc")
assert not self.instance.allow("test_case.c")
assert self.instance.allow("test_case.py")
def test_run(self, src_dir, tmpdir... | Add a test for skip functionality | Add a test for skip functionality
| Python | mit | PyCQA/isort,PyCQA/isort | import os
from isort.pylama_isort import Linter
class TestLinter:
instance = Linter()
def test_allow(self):
assert not self.instance.allow("test_case.pyc")
assert not self.instance.allow("test_case.c")
assert self.instance.allow("test_case.py")
def test_run(self, src_dir, tmpdir... | import os
from isort.pylama_isort import Linter
class TestLinter:
instance = Linter()
def test_allow(self):
assert not self.instance.allow("test_case.pyc")
assert not self.instance.allow("test_case.c")
assert self.instance.allow("test_case.py")
def test_run(self, src_dir, tmpdir... | <commit_before>import os
from isort.pylama_isort import Linter
class TestLinter:
instance = Linter()
def test_allow(self):
assert not self.instance.allow("test_case.pyc")
assert not self.instance.allow("test_case.c")
assert self.instance.allow("test_case.py")
def test_run(self, ... | import os
from isort.pylama_isort import Linter
class TestLinter:
instance = Linter()
def test_allow(self):
assert not self.instance.allow("test_case.pyc")
assert not self.instance.allow("test_case.c")
assert self.instance.allow("test_case.py")
def test_run(self, src_dir, tmpdir... | import os
from isort.pylama_isort import Linter
class TestLinter:
instance = Linter()
def test_allow(self):
assert not self.instance.allow("test_case.pyc")
assert not self.instance.allow("test_case.c")
assert self.instance.allow("test_case.py")
def test_run(self, src_dir, tmpdir... | <commit_before>import os
from isort.pylama_isort import Linter
class TestLinter:
instance = Linter()
def test_allow(self):
assert not self.instance.allow("test_case.pyc")
assert not self.instance.allow("test_case.c")
assert self.instance.allow("test_case.py")
def test_run(self, ... |
ca0d9e9651e51797ad317e54c58a174bcb351610 | channels/__init__.py | channels/__init__.py | __version__ = "0.9"
default_app_config = 'channels.apps.ChannelsConfig'
DEFAULT_CHANNEL_LAYER = 'default'
from .asgi import channel_layers # NOQA isort:skip
from .channel import Channel, Group # NOQA isort:skip
| __version__ = "0.9"
default_app_config = 'channels.apps.ChannelsConfig'
DEFAULT_CHANNEL_LAYER = 'default'
try:
from .asgi import channel_layers # NOQA isort:skip
from .channel import Channel, Group # NOQA isort:skip
except ImportError: # No django installed, allow vars to be read
pass
| Fix version import during pip install | Fix version import during pip install
| Python | bsd-3-clause | raphael-boucher/channels,Coread/channels,Coread/channels,django/channels,Krukov/channels,andrewgodwin/channels,Krukov/channels,andrewgodwin/django-channels,raiderrobert/channels,linuxlewis/channels | __version__ = "0.9"
default_app_config = 'channels.apps.ChannelsConfig'
DEFAULT_CHANNEL_LAYER = 'default'
from .asgi import channel_layers # NOQA isort:skip
from .channel import Channel, Group # NOQA isort:skip
Fix version import during pip install | __version__ = "0.9"
default_app_config = 'channels.apps.ChannelsConfig'
DEFAULT_CHANNEL_LAYER = 'default'
try:
from .asgi import channel_layers # NOQA isort:skip
from .channel import Channel, Group # NOQA isort:skip
except ImportError: # No django installed, allow vars to be read
pass
| <commit_before>__version__ = "0.9"
default_app_config = 'channels.apps.ChannelsConfig'
DEFAULT_CHANNEL_LAYER = 'default'
from .asgi import channel_layers # NOQA isort:skip
from .channel import Channel, Group # NOQA isort:skip
<commit_msg>Fix version import during pip install<commit_after> | __version__ = "0.9"
default_app_config = 'channels.apps.ChannelsConfig'
DEFAULT_CHANNEL_LAYER = 'default'
try:
from .asgi import channel_layers # NOQA isort:skip
from .channel import Channel, Group # NOQA isort:skip
except ImportError: # No django installed, allow vars to be read
pass
| __version__ = "0.9"
default_app_config = 'channels.apps.ChannelsConfig'
DEFAULT_CHANNEL_LAYER = 'default'
from .asgi import channel_layers # NOQA isort:skip
from .channel import Channel, Group # NOQA isort:skip
Fix version import during pip install__version__ = "0.9"
default_app_config = 'channels.apps.ChannelsCon... | <commit_before>__version__ = "0.9"
default_app_config = 'channels.apps.ChannelsConfig'
DEFAULT_CHANNEL_LAYER = 'default'
from .asgi import channel_layers # NOQA isort:skip
from .channel import Channel, Group # NOQA isort:skip
<commit_msg>Fix version import during pip install<commit_after>__version__ = "0.9"
defaul... |
b7bb933b23b5b86a2555e5fdd8919f852960a4cb | firecares/firestation/management/commands/export-building-fires.py | firecares/firestation/management/commands/export-building-fires.py | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | Update export building fires script. | Update export building fires script.
| Python | mit | FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | <commit_before>from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def h... | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def handle(self, *ar... | <commit_before>from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
class Command(BaseCommand):
"""
This command is used to export data that department heat maps visualize.
"""
help = 'Creates a sql file to export building fires from.'
def h... |
289be31dff1bbff200054e5acffc4d6640caaa97 | civis/utils/_jobs.py | civis/utils/_jobs.py | from civis import APIClient
from civis.futures import CivisFuture
def run_job(job_id, api_key=None):
"""Run a job.
Parameters
----------
job_id : str or int
The ID of the job.
api_key : str, optional
Your Civis API key. If not given, the :envvar:`CIVIS_API_KEY`
environment... | from civis import APIClient
from civis.futures import CivisFuture
def run_job(job_id, api_key=None):
"""Run a job.
Parameters
----------
job_id : str or int
The ID of the job.
api_key : str, optional
Your Civis API key. If not given, the :envvar:`CIVIS_API_KEY`
environment... | Set poll_on_creation to False for run_job | Set poll_on_creation to False for run_job
| Python | bsd-3-clause | civisanalytics/civis-python | from civis import APIClient
from civis.futures import CivisFuture
def run_job(job_id, api_key=None):
"""Run a job.
Parameters
----------
job_id : str or int
The ID of the job.
api_key : str, optional
Your Civis API key. If not given, the :envvar:`CIVIS_API_KEY`
environment... | from civis import APIClient
from civis.futures import CivisFuture
def run_job(job_id, api_key=None):
"""Run a job.
Parameters
----------
job_id : str or int
The ID of the job.
api_key : str, optional
Your Civis API key. If not given, the :envvar:`CIVIS_API_KEY`
environment... | <commit_before>from civis import APIClient
from civis.futures import CivisFuture
def run_job(job_id, api_key=None):
"""Run a job.
Parameters
----------
job_id : str or int
The ID of the job.
api_key : str, optional
Your Civis API key. If not given, the :envvar:`CIVIS_API_KEY`
... | from civis import APIClient
from civis.futures import CivisFuture
def run_job(job_id, api_key=None):
"""Run a job.
Parameters
----------
job_id : str or int
The ID of the job.
api_key : str, optional
Your Civis API key. If not given, the :envvar:`CIVIS_API_KEY`
environment... | from civis import APIClient
from civis.futures import CivisFuture
def run_job(job_id, api_key=None):
"""Run a job.
Parameters
----------
job_id : str or int
The ID of the job.
api_key : str, optional
Your Civis API key. If not given, the :envvar:`CIVIS_API_KEY`
environment... | <commit_before>from civis import APIClient
from civis.futures import CivisFuture
def run_job(job_id, api_key=None):
"""Run a job.
Parameters
----------
job_id : str or int
The ID of the job.
api_key : str, optional
Your Civis API key. If not given, the :envvar:`CIVIS_API_KEY`
... |
9ff64fa4fe884b8c255737c38e9e6d108f16aec9 | vinotes/apps/api/permissions.py | vinotes/apps/api/permissions.py | from rest_framework import permissions
class IsSameUserOrAdmin(permissions.BasePermission):
"""
Custom permissions to only allow same user or admins to view user details.
"""
def has_object_permission(self, request, view, user):
return request.user == user or request.user.is_staff | from rest_framework import permissions
class IsSameUserOrAdmin(permissions.BasePermission):
"""
Custom permission to only allow same user or admin to view user details.
"""
def has_object_permission(self, request, view, user):
return request.user == user or request.user.is_staff | Update docstring for IsSameUserOrAdmin permission. | Update docstring for IsSameUserOrAdmin permission.
| Python | unlicense | rcutmore/vinotes-api,rcutmore/vinotes-api | from rest_framework import permissions
class IsSameUserOrAdmin(permissions.BasePermission):
"""
Custom permissions to only allow same user or admins to view user details.
"""
def has_object_permission(self, request, view, user):
return request.user == user or request.user.is_staffUpdate docstr... | from rest_framework import permissions
class IsSameUserOrAdmin(permissions.BasePermission):
"""
Custom permission to only allow same user or admin to view user details.
"""
def has_object_permission(self, request, view, user):
return request.user == user or request.user.is_staff | <commit_before>from rest_framework import permissions
class IsSameUserOrAdmin(permissions.BasePermission):
"""
Custom permissions to only allow same user or admins to view user details.
"""
def has_object_permission(self, request, view, user):
return request.user == user or request.user.is_sta... | from rest_framework import permissions
class IsSameUserOrAdmin(permissions.BasePermission):
"""
Custom permission to only allow same user or admin to view user details.
"""
def has_object_permission(self, request, view, user):
return request.user == user or request.user.is_staff | from rest_framework import permissions
class IsSameUserOrAdmin(permissions.BasePermission):
"""
Custom permissions to only allow same user or admins to view user details.
"""
def has_object_permission(self, request, view, user):
return request.user == user or request.user.is_staffUpdate docstr... | <commit_before>from rest_framework import permissions
class IsSameUserOrAdmin(permissions.BasePermission):
"""
Custom permissions to only allow same user or admins to view user details.
"""
def has_object_permission(self, request, view, user):
return request.user == user or request.user.is_sta... |
0ac671d554f322524741a795f4a3250ef705f872 | server/ec2spotmanager/migrations/0010_extend_instance_types.py | server/ec2spotmanager/migrations/0010_extend_instance_types.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-24 14:55
from __future__ import unicode_literals
from django.db import migrations, models
import ec2spotmanager.models
class Migration(migrations.Migration):
dependencies = [
('ec2spotmanager', '0009_add_instance_size'),
]
operati... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-24 14:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ec2spotmanager', '0009_add_instance_size'),
]
operations = [
migrations.Al... | Fix Flake8 error in migration. | Fix Flake8 error in migration.
| Python | mpl-2.0 | MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-24 14:55
from __future__ import unicode_literals
from django.db import migrations, models
import ec2spotmanager.models
class Migration(migrations.Migration):
dependencies = [
('ec2spotmanager', '0009_add_instance_size'),
]
operati... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-24 14:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ec2spotmanager', '0009_add_instance_size'),
]
operations = [
migrations.Al... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-24 14:55
from __future__ import unicode_literals
from django.db import migrations, models
import ec2spotmanager.models
class Migration(migrations.Migration):
dependencies = [
('ec2spotmanager', '0009_add_instance_size'),
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-24 14:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ec2spotmanager', '0009_add_instance_size'),
]
operations = [
migrations.Al... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-24 14:55
from __future__ import unicode_literals
from django.db import migrations, models
import ec2spotmanager.models
class Migration(migrations.Migration):
dependencies = [
('ec2spotmanager', '0009_add_instance_size'),
]
operati... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-24 14:55
from __future__ import unicode_literals
from django.db import migrations, models
import ec2spotmanager.models
class Migration(migrations.Migration):
dependencies = [
('ec2spotmanager', '0009_add_instance_size'),
... |
0b3a414be19546df348ebca148362bf370c61c15 | zerver/migrations/0127_disallow_chars_in_stream_and_user_name.py | zerver/migrations/0127_disallow_chars_in_stream_and_user_name.py | # -*- coding: utf-8 -*-
from django.db import models, migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from typing import Text
def remove_special_chars_from_streamname(apps, schema_editor):
# type: (StateApps, DatabaseSchemaE... | # -*- coding: utf-8 -*-
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('zerver', '0126_prereg_remove_users_without_realm'),
]
operations = [
# There was a migration here, which wasn't ready for wide deployment
# and was backed out. This ... | Revert "migrations: Replace special chars in stream & user names with space." | Revert "migrations: Replace special chars in stream & user names with space."
This reverts commit acebd3a5e, as well as a subsequent fixup commit
0975bebac "quick fix: Fix migrations to be linear."
These changes need more work and thought before they're ready to
deploy on any large established Zulip server, such as z... | Python | apache-2.0 | showell/zulip,andersk/zulip,tommyip/zulip,hackerkid/zulip,timabbott/zulip,synicalsyntax/zulip,brainwane/zulip,zulip/zulip,shubhamdhama/zulip,shubhamdhama/zulip,brainwane/zulip,jackrzhang/zulip,eeshangarg/zulip,rishig/zulip,rishig/zulip,eeshangarg/zulip,brainwane/zulip,rishig/zulip,zulip/zulip,rishig/zulip,eeshangarg/zu... | # -*- coding: utf-8 -*-
from django.db import models, migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from typing import Text
def remove_special_chars_from_streamname(apps, schema_editor):
# type: (StateApps, DatabaseSchemaE... | # -*- coding: utf-8 -*-
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('zerver', '0126_prereg_remove_users_without_realm'),
]
operations = [
# There was a migration here, which wasn't ready for wide deployment
# and was backed out. This ... | <commit_before># -*- coding: utf-8 -*-
from django.db import models, migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from typing import Text
def remove_special_chars_from_streamname(apps, schema_editor):
# type: (StateApps, ... | # -*- coding: utf-8 -*-
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('zerver', '0126_prereg_remove_users_without_realm'),
]
operations = [
# There was a migration here, which wasn't ready for wide deployment
# and was backed out. This ... | # -*- coding: utf-8 -*-
from django.db import models, migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from typing import Text
def remove_special_chars_from_streamname(apps, schema_editor):
# type: (StateApps, DatabaseSchemaE... | <commit_before># -*- coding: utf-8 -*-
from django.db import models, migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from typing import Text
def remove_special_chars_from_streamname(apps, schema_editor):
# type: (StateApps, ... |
e28988724edcf2c4d6c0545eb9b8dba50169dc28 | config/flask_prod.py | config/flask_prod.py | import os
from rmc.config.flask_base import *
import rmc.shared.secrets as s
JS_DIR = 'js'
DEBUG = False
ENV = 'prod'
GA_PROPERTY_ID = 'UA-35073503-1'
LOG_DIR = '/home/rmc/logs'
LOG_PATH = os.path.join(LOG_DIR, 'server/server.log')
FB_APP_ID = '219309734863464'
FB_APP_SECRET = s.FB_APP_SECRET_PROD
| import os
from rmc.config.flask_base import *
import rmc.shared.secrets as s
JS_DIR = 'js_prod'
DEBUG = False
ENV = 'prod'
GA_PROPERTY_ID = 'UA-35073503-1'
LOG_DIR = '/home/rmc/logs'
LOG_PATH = os.path.join(LOG_DIR, 'server/server.log')
FB_APP_ID = '219309734863464'
FB_APP_SECRET = s.FB_APP_SECRET_PROD
| Revert "Revert "Revert "do not use minified js on prod""" | Revert "Revert "Revert "do not use minified js on prod"""
This reverts commit c7d03f4f8d4d50ce837cf0df446a52b24e891cee.
| Python | mit | shakilkanji/rmc,MichalKononenko/rmc,rageandqq/rmc,UWFlow/rmc,JGulbronson/rmc,UWFlow/rmc,MichalKononenko/rmc,sachdevs/rmc,MichalKononenko/rmc,sachdevs/rmc,UWFlow/rmc,sachdevs/rmc,ccqi/rmc,ccqi/rmc,duaayousif/rmc,JGulbronson/rmc,JGulbronson/rmc,MichalKononenko/rmc,duaayousif/rmc,ccqi/rmc,shakilkanji/rmc,JGulbronson/rmc,M... | import os
from rmc.config.flask_base import *
import rmc.shared.secrets as s
JS_DIR = 'js'
DEBUG = False
ENV = 'prod'
GA_PROPERTY_ID = 'UA-35073503-1'
LOG_DIR = '/home/rmc/logs'
LOG_PATH = os.path.join(LOG_DIR, 'server/server.log')
FB_APP_ID = '219309734863464'
FB_APP_SECRET = s.FB_APP_SECRET_PROD
Revert "Revert "Rev... | import os
from rmc.config.flask_base import *
import rmc.shared.secrets as s
JS_DIR = 'js_prod'
DEBUG = False
ENV = 'prod'
GA_PROPERTY_ID = 'UA-35073503-1'
LOG_DIR = '/home/rmc/logs'
LOG_PATH = os.path.join(LOG_DIR, 'server/server.log')
FB_APP_ID = '219309734863464'
FB_APP_SECRET = s.FB_APP_SECRET_PROD
| <commit_before>import os
from rmc.config.flask_base import *
import rmc.shared.secrets as s
JS_DIR = 'js'
DEBUG = False
ENV = 'prod'
GA_PROPERTY_ID = 'UA-35073503-1'
LOG_DIR = '/home/rmc/logs'
LOG_PATH = os.path.join(LOG_DIR, 'server/server.log')
FB_APP_ID = '219309734863464'
FB_APP_SECRET = s.FB_APP_SECRET_PROD
<com... | import os
from rmc.config.flask_base import *
import rmc.shared.secrets as s
JS_DIR = 'js_prod'
DEBUG = False
ENV = 'prod'
GA_PROPERTY_ID = 'UA-35073503-1'
LOG_DIR = '/home/rmc/logs'
LOG_PATH = os.path.join(LOG_DIR, 'server/server.log')
FB_APP_ID = '219309734863464'
FB_APP_SECRET = s.FB_APP_SECRET_PROD
| import os
from rmc.config.flask_base import *
import rmc.shared.secrets as s
JS_DIR = 'js'
DEBUG = False
ENV = 'prod'
GA_PROPERTY_ID = 'UA-35073503-1'
LOG_DIR = '/home/rmc/logs'
LOG_PATH = os.path.join(LOG_DIR, 'server/server.log')
FB_APP_ID = '219309734863464'
FB_APP_SECRET = s.FB_APP_SECRET_PROD
Revert "Revert "Rev... | <commit_before>import os
from rmc.config.flask_base import *
import rmc.shared.secrets as s
JS_DIR = 'js'
DEBUG = False
ENV = 'prod'
GA_PROPERTY_ID = 'UA-35073503-1'
LOG_DIR = '/home/rmc/logs'
LOG_PATH = os.path.join(LOG_DIR, 'server/server.log')
FB_APP_ID = '219309734863464'
FB_APP_SECRET = s.FB_APP_SECRET_PROD
<com... |
1b9213f0ab0652da23f498799a19420313ec560b | examples/generate-manager-file.py | examples/generate-manager-file.py | #!/usr/bin/python
import sys
import telepathy
from telepathy.interfaces import CONN_MGR_INTERFACE
if len(sys.argv) >= 2:
manager_name = sys.argv[1]
else:
manager_name = "haze"
service_name = "org.freedesktop.Telepathy.ConnectionManager.%s" % manager_name
object_path = "/org/freedesktop/Telepathy/ConnectionMana... | #!/usr/bin/python
import sys
import telepathy
from telepathy.interfaces import CONN_MGR_INTERFACE
if len(sys.argv) >= 2:
manager_name = sys.argv[1]
else:
manager_name = "haze"
service_name = "org.freedesktop.Telepathy.ConnectionManager.%s" % manager_name
object_path = "/org/freedesktop/Telepathy/ConnectionMana... | Rename variables to less haze-specific alternatives | Rename variables to less haze-specific alternatives
20070831150511-4210b-48ed5b3cc7b1f15f42885c043a1b9678257902a7.gz
| Python | lgpl-2.1 | freedesktop-unofficial-mirror/telepathy__telepathy-python,epage/telepathy-python,detrout/telepathy-python,max-posedon/telepathy-python,PabloCastellano/telepathy-python,freedesktop-unofficial-mirror/telepathy__telepathy-python,max-posedon/telepathy-python,epage/telepathy-python,PabloCastellano/telepathy-python,detrout/t... | #!/usr/bin/python
import sys
import telepathy
from telepathy.interfaces import CONN_MGR_INTERFACE
if len(sys.argv) >= 2:
manager_name = sys.argv[1]
else:
manager_name = "haze"
service_name = "org.freedesktop.Telepathy.ConnectionManager.%s" % manager_name
object_path = "/org/freedesktop/Telepathy/ConnectionMana... | #!/usr/bin/python
import sys
import telepathy
from telepathy.interfaces import CONN_MGR_INTERFACE
if len(sys.argv) >= 2:
manager_name = sys.argv[1]
else:
manager_name = "haze"
service_name = "org.freedesktop.Telepathy.ConnectionManager.%s" % manager_name
object_path = "/org/freedesktop/Telepathy/ConnectionMana... | <commit_before>#!/usr/bin/python
import sys
import telepathy
from telepathy.interfaces import CONN_MGR_INTERFACE
if len(sys.argv) >= 2:
manager_name = sys.argv[1]
else:
manager_name = "haze"
service_name = "org.freedesktop.Telepathy.ConnectionManager.%s" % manager_name
object_path = "/org/freedesktop/Telepathy... | #!/usr/bin/python
import sys
import telepathy
from telepathy.interfaces import CONN_MGR_INTERFACE
if len(sys.argv) >= 2:
manager_name = sys.argv[1]
else:
manager_name = "haze"
service_name = "org.freedesktop.Telepathy.ConnectionManager.%s" % manager_name
object_path = "/org/freedesktop/Telepathy/ConnectionMana... | #!/usr/bin/python
import sys
import telepathy
from telepathy.interfaces import CONN_MGR_INTERFACE
if len(sys.argv) >= 2:
manager_name = sys.argv[1]
else:
manager_name = "haze"
service_name = "org.freedesktop.Telepathy.ConnectionManager.%s" % manager_name
object_path = "/org/freedesktop/Telepathy/ConnectionMana... | <commit_before>#!/usr/bin/python
import sys
import telepathy
from telepathy.interfaces import CONN_MGR_INTERFACE
if len(sys.argv) >= 2:
manager_name = sys.argv[1]
else:
manager_name = "haze"
service_name = "org.freedesktop.Telepathy.ConnectionManager.%s" % manager_name
object_path = "/org/freedesktop/Telepathy... |
e1dc2c3e2515daf3aae51242221fab4fbd5c553f | aim/db/migration/alembic_migrations/versions/72fa5bce100b_tree_model.py | aim/db/migration/alembic_migrations/versions/72fa5bce100b_tree_model.py | # Copyright (c) 2016 Cisco Systems
# 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 require... | # Copyright (c) 2016 Cisco Systems
# 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 require... | Fix db migration for tree model | Fix db migration for tree model
| Python | apache-2.0 | noironetworks/aci-integration-module,noironetworks/aci-integration-module | # Copyright (c) 2016 Cisco Systems
# 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 require... | # Copyright (c) 2016 Cisco Systems
# 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 require... | <commit_before># Copyright (c) 2016 Cisco Systems
# 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 (c) 2016 Cisco Systems
# 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 require... | # Copyright (c) 2016 Cisco Systems
# 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 require... | <commit_before># Copyright (c) 2016 Cisco Systems
# 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
#
# ... |
f2000016a9e2acd4cad28b1ea301620723140a4e | sheldon/bot.py | sheldon/bot.py | # -*- coding: utf-8 -*-
"""
@author: Seva Zhidkov
@contact: zhidkovseva@gmail.com
@license: The MIT license
Copyright (C) 2015
"""
from sheldon.adapter import *
from sheldon.config import *
from sheldon.exceptions import *
from sheldon.manager import *
from sheldon.storage import *
from sheldon.utils import logger
... | # -*- coding: utf-8 -*-
"""
@author: Seva Zhidkov
@contact: zhidkovseva@gmail.com
@license: The MIT license
Copyright (C) 2015
"""
from sheldon.adapter import *
from sheldon.config import *
from sheldon.exceptions import *
from sheldon.manager import *
from sheldon.storage import *
from sheldon.utils import logger
... | Change error status with config problems to critical | Change error status with config problems to critical
| Python | mit | lises/sheldon | # -*- coding: utf-8 -*-
"""
@author: Seva Zhidkov
@contact: zhidkovseva@gmail.com
@license: The MIT license
Copyright (C) 2015
"""
from sheldon.adapter import *
from sheldon.config import *
from sheldon.exceptions import *
from sheldon.manager import *
from sheldon.storage import *
from sheldon.utils import logger
... | # -*- coding: utf-8 -*-
"""
@author: Seva Zhidkov
@contact: zhidkovseva@gmail.com
@license: The MIT license
Copyright (C) 2015
"""
from sheldon.adapter import *
from sheldon.config import *
from sheldon.exceptions import *
from sheldon.manager import *
from sheldon.storage import *
from sheldon.utils import logger
... | <commit_before># -*- coding: utf-8 -*-
"""
@author: Seva Zhidkov
@contact: zhidkovseva@gmail.com
@license: The MIT license
Copyright (C) 2015
"""
from sheldon.adapter import *
from sheldon.config import *
from sheldon.exceptions import *
from sheldon.manager import *
from sheldon.storage import *
from sheldon.utils ... | # -*- coding: utf-8 -*-
"""
@author: Seva Zhidkov
@contact: zhidkovseva@gmail.com
@license: The MIT license
Copyright (C) 2015
"""
from sheldon.adapter import *
from sheldon.config import *
from sheldon.exceptions import *
from sheldon.manager import *
from sheldon.storage import *
from sheldon.utils import logger
... | # -*- coding: utf-8 -*-
"""
@author: Seva Zhidkov
@contact: zhidkovseva@gmail.com
@license: The MIT license
Copyright (C) 2015
"""
from sheldon.adapter import *
from sheldon.config import *
from sheldon.exceptions import *
from sheldon.manager import *
from sheldon.storage import *
from sheldon.utils import logger
... | <commit_before># -*- coding: utf-8 -*-
"""
@author: Seva Zhidkov
@contact: zhidkovseva@gmail.com
@license: The MIT license
Copyright (C) 2015
"""
from sheldon.adapter import *
from sheldon.config import *
from sheldon.exceptions import *
from sheldon.manager import *
from sheldon.storage import *
from sheldon.utils ... |
450cbc7d0cb9a2477b80e94c874de1da4a00e431 | source/services/rotten_tomatoes_service.py | source/services/rotten_tomatoes_service.py | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | Remove colon from title for RT search | Remove colon from title for RT search
| Python | mit | jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | <commit_before>import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = se... | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = self.__URL + self... | <commit_before>import requests
from bs4 import BeautifulSoup
from source.models.rt_rating import RTRating
class RottenTomatoesService:
__URL = 'http://www.rottentomatoes.com/m/'
__SEPERATOR = '_'
def __init__(self, title):
self.title = title
def get_rt_rating(self):
search_url = se... |
ec244cc9c56fec571502529ef24af2ca18d9f5f5 | spirit/templatetags/tags/utils/gravatar.py | spirit/templatetags/tags/utils/gravatar.py | #-*- coding: utf-8 -*-
import hashlib
from django.utils.http import urlencode, urlquote
from .. import register
@register.simple_tag()
def get_gravatar_url(user, size, rating='g', default='identicon'):
url = "http://www.gravatar.com/avatar/"
hash = hashlib.md5(user.email.strip().lower()).hexdigest()
d... | #-*- coding: utf-8 -*-
import hashlib
from django.utils.http import urlencode, urlquote
from django.utils.encoding import force_bytes
from .. import register
@register.simple_tag()
def get_gravatar_url(user, size, rating='g', default='identicon'):
url = "http://www.gravatar.com/avatar/"
hash = hashlib.md5... | Use django utils force_bytes to arguments of hashlib | Use django utils force_bytes to arguments of hashlib
| Python | mit | alesdotio/Spirit,a-olszewski/Spirit,raybesiga/Spirit,a-olszewski/Spirit,dvreed/Spirit,ramaseshan/Spirit,adiyengar/Spirit,battlecat/Spirit,ramaseshan/Spirit,gogobook/Spirit,dvreed/Spirit,nitely/Spirit,mastak/Spirit,battlecat/Spirit,nitely/Spirit,a-olszewski/Spirit,alesdotio/Spirit,mastak/Spirit,alesdotio/Spirit,gogobook... | #-*- coding: utf-8 -*-
import hashlib
from django.utils.http import urlencode, urlquote
from .. import register
@register.simple_tag()
def get_gravatar_url(user, size, rating='g', default='identicon'):
url = "http://www.gravatar.com/avatar/"
hash = hashlib.md5(user.email.strip().lower()).hexdigest()
d... | #-*- coding: utf-8 -*-
import hashlib
from django.utils.http import urlencode, urlquote
from django.utils.encoding import force_bytes
from .. import register
@register.simple_tag()
def get_gravatar_url(user, size, rating='g', default='identicon'):
url = "http://www.gravatar.com/avatar/"
hash = hashlib.md5... | <commit_before>#-*- coding: utf-8 -*-
import hashlib
from django.utils.http import urlencode, urlquote
from .. import register
@register.simple_tag()
def get_gravatar_url(user, size, rating='g', default='identicon'):
url = "http://www.gravatar.com/avatar/"
hash = hashlib.md5(user.email.strip().lower()).he... | #-*- coding: utf-8 -*-
import hashlib
from django.utils.http import urlencode, urlquote
from django.utils.encoding import force_bytes
from .. import register
@register.simple_tag()
def get_gravatar_url(user, size, rating='g', default='identicon'):
url = "http://www.gravatar.com/avatar/"
hash = hashlib.md5... | #-*- coding: utf-8 -*-
import hashlib
from django.utils.http import urlencode, urlquote
from .. import register
@register.simple_tag()
def get_gravatar_url(user, size, rating='g', default='identicon'):
url = "http://www.gravatar.com/avatar/"
hash = hashlib.md5(user.email.strip().lower()).hexdigest()
d... | <commit_before>#-*- coding: utf-8 -*-
import hashlib
from django.utils.http import urlencode, urlquote
from .. import register
@register.simple_tag()
def get_gravatar_url(user, size, rating='g', default='identicon'):
url = "http://www.gravatar.com/avatar/"
hash = hashlib.md5(user.email.strip().lower()).he... |
85d71d8a5d7cdf34c12791b84c9f1bdec4ad1ed1 | partner_compassion/wizards/portal_wizard.py | partner_compassion/wizards/portal_wizard.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py... | Fix bug, set notify_email to always after create portal user | Fix bug, set notify_email to always after create portal user
| Python | agpl-3.0 | ecino/compassion-switzerland,CompassionCH/compassion-switzerland,ecino/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland,ecino/compassion-switzerland | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file ... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file ... |
8e3beda427e2edc2bc7b8f7f96f8ef1c7dd571c7 | downloads/urls.py | downloads/urls.py | from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(_(r'solutions/(?P<path>.*)$'), download_protected_file,
dict(path_prefix='solutions/', mode... | from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(_(r'solutions/(?P<path>.*)$'), download_protected_file,
dict(path_prefix='solutions/', mode... | Add view for displaying corrected solutions | downloads: Add view for displaying corrected solutions
| Python | mit | matus-stehlik/roots,tbabej/roots,tbabej/roots,matus-stehlik/roots,rtrembecky/roots,matus-stehlik/roots,rtrembecky/roots,tbabej/roots,rtrembecky/roots | from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(_(r'solutions/(?P<path>.*)$'), download_protected_file,
dict(path_prefix='solutions/', mode... | from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(_(r'solutions/(?P<path>.*)$'), download_protected_file,
dict(path_prefix='solutions/', mode... | <commit_before>from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(_(r'solutions/(?P<path>.*)$'), download_protected_file,
dict(path_prefix='so... | from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(_(r'solutions/(?P<path>.*)$'), download_protected_file,
dict(path_prefix='solutions/', mode... | from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(_(r'solutions/(?P<path>.*)$'), download_protected_file,
dict(path_prefix='solutions/', mode... | <commit_before>from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(_(r'solutions/(?P<path>.*)$'), download_protected_file,
dict(path_prefix='so... |
390851ce7c606e803094487e6278ea5620d26f3c | src/python/vff.py | src/python/vff.py | """Show a command to edit fred files"""
import os
import sys
from dotsite.paths import makepath, pwd
def get_freds(paths):
if not paths:
paths = ['.']
result = set()
for path in paths:
path = makepath(path)
if path.isdir():
result |= {p for p in path.files('fred*') i... | """Show a command to edit fred files"""
import os
import sys
from dotsite.paths import makepath, pwd
def get_freds(paths):
if not paths:
paths = ['~/tmp']
result = set()
for path in paths:
path = makepath(path)
if path.isdir():
result |= {p for p in path.files('fred*... | Put temp files in ~/tmp by default | Put temp files in ~/tmp by default
| Python | mit | jalanb/jab,jalanb/dotjab,jalanb/jab,jalanb/dotjab | """Show a command to edit fred files"""
import os
import sys
from dotsite.paths import makepath, pwd
def get_freds(paths):
if not paths:
paths = ['.']
result = set()
for path in paths:
path = makepath(path)
if path.isdir():
result |= {p for p in path.files('fred*') i... | """Show a command to edit fred files"""
import os
import sys
from dotsite.paths import makepath, pwd
def get_freds(paths):
if not paths:
paths = ['~/tmp']
result = set()
for path in paths:
path = makepath(path)
if path.isdir():
result |= {p for p in path.files('fred*... | <commit_before>"""Show a command to edit fred files"""
import os
import sys
from dotsite.paths import makepath, pwd
def get_freds(paths):
if not paths:
paths = ['.']
result = set()
for path in paths:
path = makepath(path)
if path.isdir():
result |= {p for p in path.f... | """Show a command to edit fred files"""
import os
import sys
from dotsite.paths import makepath, pwd
def get_freds(paths):
if not paths:
paths = ['~/tmp']
result = set()
for path in paths:
path = makepath(path)
if path.isdir():
result |= {p for p in path.files('fred*... | """Show a command to edit fred files"""
import os
import sys
from dotsite.paths import makepath, pwd
def get_freds(paths):
if not paths:
paths = ['.']
result = set()
for path in paths:
path = makepath(path)
if path.isdir():
result |= {p for p in path.files('fred*') i... | <commit_before>"""Show a command to edit fred files"""
import os
import sys
from dotsite.paths import makepath, pwd
def get_freds(paths):
if not paths:
paths = ['.']
result = set()
for path in paths:
path = makepath(path)
if path.isdir():
result |= {p for p in path.f... |
5dece3e052a1bebda6b1e1af63855399435f2e49 | src/mailflow/settings.py | src/mailflow/settings.py | SQLALCHEMY_DATABASE_URI = "postgres://@/mailflow"
SECRET_KEY = 'Chi6riup1gaetiengaShoh=Wey1pohph0ieDaes7eeph'
INBOX_LOGIN_LENGTH = 16
INBOX_PASSWORD_LENGTH = 16
INBOX_PAGE_SIZE = 50
INBOX_HOST = 'mailflow.openpz.org'
INBOX_PORT = 25
RAW_EMAIL_FOLDER = "/var/tmp"
RABBITMQ_URI = 'amqp://mailflow:youneverguess@localho... | SQLALCHEMY_DATABASE_URI = "postgres://@/mailflow"
SECRET_KEY = 'Chi6riup1gaetiengaShoh=Wey1pohph0ieDaes7eeph'
INBOX_LOGIN_LENGTH = 16
INBOX_PASSWORD_LENGTH = 16
INBOX_PAGE_SIZE = 50
INBOX_HOST = 'mailflow.openpz.org'
INBOX_PORT = 25
RAW_EMAIL_FOLDER = "/var/tmp"
RABBITMQ_URI = 'amqp://mailflow:youneverguess@localho... | Set CSRF token expirtion time to 6 hours | Set CSRF token expirtion time to 6 hours
| Python | apache-2.0 | zzzombat/mailflow,zzzombat/mailflow | SQLALCHEMY_DATABASE_URI = "postgres://@/mailflow"
SECRET_KEY = 'Chi6riup1gaetiengaShoh=Wey1pohph0ieDaes7eeph'
INBOX_LOGIN_LENGTH = 16
INBOX_PASSWORD_LENGTH = 16
INBOX_PAGE_SIZE = 50
INBOX_HOST = 'mailflow.openpz.org'
INBOX_PORT = 25
RAW_EMAIL_FOLDER = "/var/tmp"
RABBITMQ_URI = 'amqp://mailflow:youneverguess@localho... | SQLALCHEMY_DATABASE_URI = "postgres://@/mailflow"
SECRET_KEY = 'Chi6riup1gaetiengaShoh=Wey1pohph0ieDaes7eeph'
INBOX_LOGIN_LENGTH = 16
INBOX_PASSWORD_LENGTH = 16
INBOX_PAGE_SIZE = 50
INBOX_HOST = 'mailflow.openpz.org'
INBOX_PORT = 25
RAW_EMAIL_FOLDER = "/var/tmp"
RABBITMQ_URI = 'amqp://mailflow:youneverguess@localho... | <commit_before>SQLALCHEMY_DATABASE_URI = "postgres://@/mailflow"
SECRET_KEY = 'Chi6riup1gaetiengaShoh=Wey1pohph0ieDaes7eeph'
INBOX_LOGIN_LENGTH = 16
INBOX_PASSWORD_LENGTH = 16
INBOX_PAGE_SIZE = 50
INBOX_HOST = 'mailflow.openpz.org'
INBOX_PORT = 25
RAW_EMAIL_FOLDER = "/var/tmp"
RABBITMQ_URI = 'amqp://mailflow:younev... | SQLALCHEMY_DATABASE_URI = "postgres://@/mailflow"
SECRET_KEY = 'Chi6riup1gaetiengaShoh=Wey1pohph0ieDaes7eeph'
INBOX_LOGIN_LENGTH = 16
INBOX_PASSWORD_LENGTH = 16
INBOX_PAGE_SIZE = 50
INBOX_HOST = 'mailflow.openpz.org'
INBOX_PORT = 25
RAW_EMAIL_FOLDER = "/var/tmp"
RABBITMQ_URI = 'amqp://mailflow:youneverguess@localho... | SQLALCHEMY_DATABASE_URI = "postgres://@/mailflow"
SECRET_KEY = 'Chi6riup1gaetiengaShoh=Wey1pohph0ieDaes7eeph'
INBOX_LOGIN_LENGTH = 16
INBOX_PASSWORD_LENGTH = 16
INBOX_PAGE_SIZE = 50
INBOX_HOST = 'mailflow.openpz.org'
INBOX_PORT = 25
RAW_EMAIL_FOLDER = "/var/tmp"
RABBITMQ_URI = 'amqp://mailflow:youneverguess@localho... | <commit_before>SQLALCHEMY_DATABASE_URI = "postgres://@/mailflow"
SECRET_KEY = 'Chi6riup1gaetiengaShoh=Wey1pohph0ieDaes7eeph'
INBOX_LOGIN_LENGTH = 16
INBOX_PASSWORD_LENGTH = 16
INBOX_PAGE_SIZE = 50
INBOX_HOST = 'mailflow.openpz.org'
INBOX_PORT = 25
RAW_EMAIL_FOLDER = "/var/tmp"
RABBITMQ_URI = 'amqp://mailflow:younev... |
a93b8986f1cd2c64b75abd9bf695ff6e44a85b29 | scripts/travis_build_dependent_projects.py | scripts/travis_build_dependent_projects.py | # -*- coding: utf-8 -*-
import os
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
print "Enumerate repos on ", domain
conn = TravisPy.github_auth(os.environ['GITHUB_KEY'], domain)
... | # -*- coding: utf-8 -*-
import os
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
print "Enumerate repos on ", domain
conn = TravisPy.github_auth(os.environ['GITHUB_KEY'], domain)
... | Fix to Travis build script. | Fix to Travis build script.
| Python | mit | dgnorth/drift,dgnorth/drift,dgnorth/drift | # -*- coding: utf-8 -*-
import os
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
print "Enumerate repos on ", domain
conn = TravisPy.github_auth(os.environ['GITHUB_KEY'], domain)
... | # -*- coding: utf-8 -*-
import os
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
print "Enumerate repos on ", domain
conn = TravisPy.github_auth(os.environ['GITHUB_KEY'], domain)
... | <commit_before># -*- coding: utf-8 -*-
import os
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
print "Enumerate repos on ", domain
conn = TravisPy.github_auth(os.environ['GITHUB_KE... | # -*- coding: utf-8 -*-
import os
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
print "Enumerate repos on ", domain
conn = TravisPy.github_auth(os.environ['GITHUB_KEY'], domain)
... | # -*- coding: utf-8 -*-
import os
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
print "Enumerate repos on ", domain
conn = TravisPy.github_auth(os.environ['GITHUB_KEY'], domain)
... | <commit_before># -*- coding: utf-8 -*-
import os
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
print "Enumerate repos on ", domain
conn = TravisPy.github_auth(os.environ['GITHUB_KE... |
08d83313d2e077e760adc9a4bfd7c181d9f8a60a | cal_pipe/update_pipeline_paths.py | cal_pipe/update_pipeline_paths.py |
'''
Update EVLA pipeline variables to the current system.
'''
def update_paths(pipe_dict, ms_path, pipepath):
pipe_dict['ms_active'] = ms_path
pipe_dict['SDM_name'] = ms_path[:-3] # Cutoff '.ms'
pipe_dict['pipepath'] = pipepath
return pipe_dict
if __name__ == '__main__':
import sys
pipe... |
'''
Update EVLA pipeline variables to the current system.
'''
def update_paths(pipe_dict, ms_path, pipepath):
pipe_dict['ms_active'] = ms_path
pipe_dict['SDM_name'] = ms_path[:-3] # Cutoff '.ms'
pipe_dict['pipepath'] = pipepath
return pipe_dict
if __name__ == '__main__':
import sys
pipe... | Print out changed paths in pipeline file | Print out changed paths in pipeline file
| Python | mit | e-koch/canfar_scripts,e-koch/canfar_scripts |
'''
Update EVLA pipeline variables to the current system.
'''
def update_paths(pipe_dict, ms_path, pipepath):
pipe_dict['ms_active'] = ms_path
pipe_dict['SDM_name'] = ms_path[:-3] # Cutoff '.ms'
pipe_dict['pipepath'] = pipepath
return pipe_dict
if __name__ == '__main__':
import sys
pipe... |
'''
Update EVLA pipeline variables to the current system.
'''
def update_paths(pipe_dict, ms_path, pipepath):
pipe_dict['ms_active'] = ms_path
pipe_dict['SDM_name'] = ms_path[:-3] # Cutoff '.ms'
pipe_dict['pipepath'] = pipepath
return pipe_dict
if __name__ == '__main__':
import sys
pipe... | <commit_before>
'''
Update EVLA pipeline variables to the current system.
'''
def update_paths(pipe_dict, ms_path, pipepath):
pipe_dict['ms_active'] = ms_path
pipe_dict['SDM_name'] = ms_path[:-3] # Cutoff '.ms'
pipe_dict['pipepath'] = pipepath
return pipe_dict
if __name__ == '__main__':
impor... |
'''
Update EVLA pipeline variables to the current system.
'''
def update_paths(pipe_dict, ms_path, pipepath):
pipe_dict['ms_active'] = ms_path
pipe_dict['SDM_name'] = ms_path[:-3] # Cutoff '.ms'
pipe_dict['pipepath'] = pipepath
return pipe_dict
if __name__ == '__main__':
import sys
pipe... |
'''
Update EVLA pipeline variables to the current system.
'''
def update_paths(pipe_dict, ms_path, pipepath):
pipe_dict['ms_active'] = ms_path
pipe_dict['SDM_name'] = ms_path[:-3] # Cutoff '.ms'
pipe_dict['pipepath'] = pipepath
return pipe_dict
if __name__ == '__main__':
import sys
pipe... | <commit_before>
'''
Update EVLA pipeline variables to the current system.
'''
def update_paths(pipe_dict, ms_path, pipepath):
pipe_dict['ms_active'] = ms_path
pipe_dict['SDM_name'] = ms_path[:-3] # Cutoff '.ms'
pipe_dict['pipepath'] = pipepath
return pipe_dict
if __name__ == '__main__':
impor... |
cc08888a527dac321f88cbe9da27508aee62e51e | examples/lab/main.py | examples/lab/main.py | """
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
"""
import os
from jinja2 import FileSystemLoader
from notebook.base.handlers import IPythonHandler, FileFindHandler
from notebook.notebookapp import NotebookApp
from traitlets import Unicode
class ExampleHandler(IPy... | """
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
"""
import os
from jinja2 import FileSystemLoader
from notebook.base.handlers import IPythonHandler, FileFindHandler
from notebook.notebookapp import NotebookApp
from traitlets import Unicode
class ExampleHandler(IPy... | Enable terminals in the lab example | Enable terminals in the lab example
| Python | bsd-3-clause | eskirk/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,charnpreetsingh185/jupyterlab,eskirk/jupyterlab,charnpreetsingh... | """
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
"""
import os
from jinja2 import FileSystemLoader
from notebook.base.handlers import IPythonHandler, FileFindHandler
from notebook.notebookapp import NotebookApp
from traitlets import Unicode
class ExampleHandler(IPy... | """
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
"""
import os
from jinja2 import FileSystemLoader
from notebook.base.handlers import IPythonHandler, FileFindHandler
from notebook.notebookapp import NotebookApp
from traitlets import Unicode
class ExampleHandler(IPy... | <commit_before>"""
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
"""
import os
from jinja2 import FileSystemLoader
from notebook.base.handlers import IPythonHandler, FileFindHandler
from notebook.notebookapp import NotebookApp
from traitlets import Unicode
class Exa... | """
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
"""
import os
from jinja2 import FileSystemLoader
from notebook.base.handlers import IPythonHandler, FileFindHandler
from notebook.notebookapp import NotebookApp
from traitlets import Unicode
class ExampleHandler(IPy... | """
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
"""
import os
from jinja2 import FileSystemLoader
from notebook.base.handlers import IPythonHandler, FileFindHandler
from notebook.notebookapp import NotebookApp
from traitlets import Unicode
class ExampleHandler(IPy... | <commit_before>"""
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
"""
import os
from jinja2 import FileSystemLoader
from notebook.base.handlers import IPythonHandler, FileFindHandler
from notebook.notebookapp import NotebookApp
from traitlets import Unicode
class Exa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.