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
b44d34f8bc5264d495dc4c2176654b0bd53bfb8a
mistral/api/wsgi.py
mistral/api/wsgi.py
# Copyright 2015 - StackStorm, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2015 - StackStorm, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Remove transport from WSGI script
Remove transport from WSGI script The setup_app method no longer requires transport as input. Change-Id: I4caf397a48e30822d423c8cf7d40f2773f9aa951 Closes-Bug: 1443654
Python
apache-2.0
dennybaa/mistral,openstack/mistral,StackStorm/mistral,dennybaa/mistral,openstack/mistral,StackStorm/mistral
# Copyright 2015 - StackStorm, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2015 - StackStorm, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2015 - StackStorm, Inc. # # 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 app...
# Copyright 2015 - StackStorm, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2015 - StackStorm, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2015 - StackStorm, Inc. # # 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 app...
a16b51bb26761f8c4a30c06da4c711dac24ac3e0
mr/preprocessing.py
mr/preprocessing.py
import numpy as np from scipy.ndimage.filters import uniform_filter from scipy.ndimage.fourier import fourier_gaussian def bandpass(image, lshort, llong, threshold=1): """Convolve with a Gaussian to remove short-wavelength noise, and subtract out long-wavelength variations, retaining features of intermedi...
import numpy as np from scipy.ndimage.filters import uniform_filter from scipy.ndimage.fourier import fourier_gaussian import warnings first_run = True try: import pyfftw except ImportError: fftn = np.fft.fftn ifftn = np.fft.ifftn else: def _maybe_align(a): global planned if first_run:...
Add optional dependence on FFTW for faster bandpass
ENH: Add optional dependence on FFTW for faster bandpass
Python
bsd-3-clause
daniorerio/trackpy,daniorerio/trackpy
import numpy as np from scipy.ndimage.filters import uniform_filter from scipy.ndimage.fourier import fourier_gaussian def bandpass(image, lshort, llong, threshold=1): """Convolve with a Gaussian to remove short-wavelength noise, and subtract out long-wavelength variations, retaining features of intermedi...
import numpy as np from scipy.ndimage.filters import uniform_filter from scipy.ndimage.fourier import fourier_gaussian import warnings first_run = True try: import pyfftw except ImportError: fftn = np.fft.fftn ifftn = np.fft.ifftn else: def _maybe_align(a): global planned if first_run:...
<commit_before>import numpy as np from scipy.ndimage.filters import uniform_filter from scipy.ndimage.fourier import fourier_gaussian def bandpass(image, lshort, llong, threshold=1): """Convolve with a Gaussian to remove short-wavelength noise, and subtract out long-wavelength variations, retaining featur...
import numpy as np from scipy.ndimage.filters import uniform_filter from scipy.ndimage.fourier import fourier_gaussian import warnings first_run = True try: import pyfftw except ImportError: fftn = np.fft.fftn ifftn = np.fft.ifftn else: def _maybe_align(a): global planned if first_run:...
import numpy as np from scipy.ndimage.filters import uniform_filter from scipy.ndimage.fourier import fourier_gaussian def bandpass(image, lshort, llong, threshold=1): """Convolve with a Gaussian to remove short-wavelength noise, and subtract out long-wavelength variations, retaining features of intermedi...
<commit_before>import numpy as np from scipy.ndimage.filters import uniform_filter from scipy.ndimage.fourier import fourier_gaussian def bandpass(image, lshort, llong, threshold=1): """Convolve with a Gaussian to remove short-wavelength noise, and subtract out long-wavelength variations, retaining featur...
af05872aaf08a32ea7855b80153c0596835755bd
tests/integration/test_webui.py
tests/integration/test_webui.py
import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, { ...
import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://nginx' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, { 'pa...
Modify hostname for web integration tests
Modify hostname for web integration tests
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, { ...
import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://nginx' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, { 'pa...
<commit_before>import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, ...
import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://nginx' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, { 'pa...
import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, { ...
<commit_before>import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, ...
47b031db83f5cb90f786029a6ffbdb7a599145db
timepiece/context_processors.py
timepiece/context_processors.py
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
Apply active_entries fix from payroll-reports branch
Apply active_entries fix from payroll-reports branch
Python
mit
gaga3966/django-timepiece,josesanch/django-timepiece,BocuStudio/django-timepiece,dannybrowne86/django-timepiece,josesanch/django-timepiece,BocuStudio/django-timepiece,gaga3966/django-timepiece,BocuStudio/django-timepiece,arbitrahj/django-timepiece,caktus/django-timepiece,arbitrahj/django-timepiece,gaga3966/django-timep...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
<commit_before>from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) co...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) context = { ...
<commit_before>from django.conf import settings from timepiece import models as timepiece from timepiece.forms import QuickSearchForm def timepiece_settings(request): default_famfamfam_url = settings.STATIC_URL + 'images/icons/' famfamfam_url = getattr(settings, 'FAMFAMFAM_URL', default_famfamfam_url) co...
943e920603d5507a37c1b0c835c598972f0f2cff
github/models.py
github/models.py
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
Check github response before parsing
Check github response before parsing
Python
agpl-3.0
City-of-Helsinki/devheldev,City-of-Helsinki/devheldev,terotic/devheldev,terotic/devheldev,City-of-Helsinki/devheldev,terotic/devheldev
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
<commit_before>import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models...
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
<commit_before>import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models...
6dc019f3495a940340668fd8039b7911db6273b7
resdk/analysis/_register.py
resdk/analysis/_register.py
"""Patch ReSDK resources with analysis methods.""" from __future__ import absolute_import, division, print_function, unicode_literals from resdk.analysis.alignment import bowtie2, hisat2 from resdk.analysis.chip_seq import macs, rose2 from resdk.analysis.expressions import cuffnorm, cuffquant from resdk.analysis.plots...
"""Patch ReSDK resources with analysis methods.""" from __future__ import absolute_import, division, print_function, unicode_literals from resdk.analysis.alignment import bowtie2, hisat2 from resdk.analysis.chip_seq import macs, rose2 from resdk.analysis.expressions import cuffnorm, cuffquant from resdk.analysis.plots...
Fix import error caught by new version of isort (4.2.8)
Fix import error caught by new version of isort (4.2.8)
Python
apache-2.0
genialis/resolwe-bio-py
"""Patch ReSDK resources with analysis methods.""" from __future__ import absolute_import, division, print_function, unicode_literals from resdk.analysis.alignment import bowtie2, hisat2 from resdk.analysis.chip_seq import macs, rose2 from resdk.analysis.expressions import cuffnorm, cuffquant from resdk.analysis.plots...
"""Patch ReSDK resources with analysis methods.""" from __future__ import absolute_import, division, print_function, unicode_literals from resdk.analysis.alignment import bowtie2, hisat2 from resdk.analysis.chip_seq import macs, rose2 from resdk.analysis.expressions import cuffnorm, cuffquant from resdk.analysis.plots...
<commit_before>"""Patch ReSDK resources with analysis methods.""" from __future__ import absolute_import, division, print_function, unicode_literals from resdk.analysis.alignment import bowtie2, hisat2 from resdk.analysis.chip_seq import macs, rose2 from resdk.analysis.expressions import cuffnorm, cuffquant from resdk...
"""Patch ReSDK resources with analysis methods.""" from __future__ import absolute_import, division, print_function, unicode_literals from resdk.analysis.alignment import bowtie2, hisat2 from resdk.analysis.chip_seq import macs, rose2 from resdk.analysis.expressions import cuffnorm, cuffquant from resdk.analysis.plots...
"""Patch ReSDK resources with analysis methods.""" from __future__ import absolute_import, division, print_function, unicode_literals from resdk.analysis.alignment import bowtie2, hisat2 from resdk.analysis.chip_seq import macs, rose2 from resdk.analysis.expressions import cuffnorm, cuffquant from resdk.analysis.plots...
<commit_before>"""Patch ReSDK resources with analysis methods.""" from __future__ import absolute_import, division, print_function, unicode_literals from resdk.analysis.alignment import bowtie2, hisat2 from resdk.analysis.chip_seq import macs, rose2 from resdk.analysis.expressions import cuffnorm, cuffquant from resdk...
30da968a43434088a7839941118e30d26683679e
storm/tests/conftest.py
storm/tests/conftest.py
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import pytest from .common import INSTANCE, HOST from datadog_checks.dev import docker_run, get_here, run_command from datadog_checks.dev.conditions import CheckCommandOutput @pytest.fixture(scope='se...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import pytest from .common import INSTANCE, HOST from datadog_checks.dev import docker_run, get_here, run_command from datadog_checks.dev.conditions import CheckCommandOutput @pytest.fixture(scope='se...
Add the -v flag to work with linux nc
Add the -v flag to work with linux nc
Python
bsd-3-clause
DataDog/integrations-extras,DataDog/integrations-extras,DataDog/integrations-extras,DataDog/integrations-extras,DataDog/integrations-extras
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import pytest from .common import INSTANCE, HOST from datadog_checks.dev import docker_run, get_here, run_command from datadog_checks.dev.conditions import CheckCommandOutput @pytest.fixture(scope='se...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import pytest from .common import INSTANCE, HOST from datadog_checks.dev import docker_run, get_here, run_command from datadog_checks.dev.conditions import CheckCommandOutput @pytest.fixture(scope='se...
<commit_before># (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import pytest from .common import INSTANCE, HOST from datadog_checks.dev import docker_run, get_here, run_command from datadog_checks.dev.conditions import CheckCommandOutput @pytest.fi...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import pytest from .common import INSTANCE, HOST from datadog_checks.dev import docker_run, get_here, run_command from datadog_checks.dev.conditions import CheckCommandOutput @pytest.fixture(scope='se...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import pytest from .common import INSTANCE, HOST from datadog_checks.dev import docker_run, get_here, run_command from datadog_checks.dev.conditions import CheckCommandOutput @pytest.fixture(scope='se...
<commit_before># (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os import pytest from .common import INSTANCE, HOST from datadog_checks.dev import docker_run, get_here, run_command from datadog_checks.dev.conditions import CheckCommandOutput @pytest.fi...
fba4fdf426b0a29ca06deb67587c2bd804adb017
tbgxmlutils/xmlutils.py
tbgxmlutils/xmlutils.py
#!/usr/bin/env python from xml.dom import minidom import xml.etree.ElementTree as ET import xmltodict def add(k, parent=None, txt=None, attrs=None): if parent is None: handle = ET.Element(k) else: handle = ET.SubElement(parent, k) if txt: handle.text = unicode(txt) try: for k, v in attrs.iteritems...
#!/usr/bin/env python from xml.dom import minidom import lxml.etree as ET import xmltodict def add(k, parent=None, txt=None, attrs=None): if parent is None: handle = ET.Element(k) else: handle = ET.SubElement(parent, k) if txt: handle.text = unicode(txt) try: for k, v in attrs.iteritems(): handle....
Use lxml instead of elementtree.
Use lxml instead of elementtree.
Python
mit
Schwarzschild/TBGXMLUtils
#!/usr/bin/env python from xml.dom import minidom import xml.etree.ElementTree as ET import xmltodict def add(k, parent=None, txt=None, attrs=None): if parent is None: handle = ET.Element(k) else: handle = ET.SubElement(parent, k) if txt: handle.text = unicode(txt) try: for k, v in attrs.iteritems...
#!/usr/bin/env python from xml.dom import minidom import lxml.etree as ET import xmltodict def add(k, parent=None, txt=None, attrs=None): if parent is None: handle = ET.Element(k) else: handle = ET.SubElement(parent, k) if txt: handle.text = unicode(txt) try: for k, v in attrs.iteritems(): handle....
<commit_before>#!/usr/bin/env python from xml.dom import minidom import xml.etree.ElementTree as ET import xmltodict def add(k, parent=None, txt=None, attrs=None): if parent is None: handle = ET.Element(k) else: handle = ET.SubElement(parent, k) if txt: handle.text = unicode(txt) try: for k, v in ...
#!/usr/bin/env python from xml.dom import minidom import lxml.etree as ET import xmltodict def add(k, parent=None, txt=None, attrs=None): if parent is None: handle = ET.Element(k) else: handle = ET.SubElement(parent, k) if txt: handle.text = unicode(txt) try: for k, v in attrs.iteritems(): handle....
#!/usr/bin/env python from xml.dom import minidom import xml.etree.ElementTree as ET import xmltodict def add(k, parent=None, txt=None, attrs=None): if parent is None: handle = ET.Element(k) else: handle = ET.SubElement(parent, k) if txt: handle.text = unicode(txt) try: for k, v in attrs.iteritems...
<commit_before>#!/usr/bin/env python from xml.dom import minidom import xml.etree.ElementTree as ET import xmltodict def add(k, parent=None, txt=None, attrs=None): if parent is None: handle = ET.Element(k) else: handle = ET.SubElement(parent, k) if txt: handle.text = unicode(txt) try: for k, v in ...
ac3f56f4ed0826600b9adbbf8dfe3b99ce508ac6
migrations/versions/0334_broadcast_message_number.py
migrations/versions/0334_broadcast_message_number.py
""" Revision ID: 0334_broadcast_message_number Revises: 0333_service_broadcast_provider Create Date: 2020-12-04 15:06:22.544803 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0334_broadcast_message_number' down_revision = '0333_service_broadcast_provider' ...
""" Revision ID: 0334_broadcast_message_number Revises: 0333_service_broadcast_provider Create Date: 2020-12-04 15:06:22.544803 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0334_broadcast_message_number' down_revision = '0333_service_broadcast_provider' ...
Delete unneeded code form migration
Delete unneeded code form migration
Python
mit
alphagov/notifications-api,alphagov/notifications-api
""" Revision ID: 0334_broadcast_message_number Revises: 0333_service_broadcast_provider Create Date: 2020-12-04 15:06:22.544803 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0334_broadcast_message_number' down_revision = '0333_service_broadcast_provider' ...
""" Revision ID: 0334_broadcast_message_number Revises: 0333_service_broadcast_provider Create Date: 2020-12-04 15:06:22.544803 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0334_broadcast_message_number' down_revision = '0333_service_broadcast_provider' ...
<commit_before>""" Revision ID: 0334_broadcast_message_number Revises: 0333_service_broadcast_provider Create Date: 2020-12-04 15:06:22.544803 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0334_broadcast_message_number' down_revision = '0333_service_broadca...
""" Revision ID: 0334_broadcast_message_number Revises: 0333_service_broadcast_provider Create Date: 2020-12-04 15:06:22.544803 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0334_broadcast_message_number' down_revision = '0333_service_broadcast_provider' ...
""" Revision ID: 0334_broadcast_message_number Revises: 0333_service_broadcast_provider Create Date: 2020-12-04 15:06:22.544803 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0334_broadcast_message_number' down_revision = '0333_service_broadcast_provider' ...
<commit_before>""" Revision ID: 0334_broadcast_message_number Revises: 0333_service_broadcast_provider Create Date: 2020-12-04 15:06:22.544803 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0334_broadcast_message_number' down_revision = '0333_service_broadca...
6f3b0c997f7207279bf836edc94db1ac19d2ce1d
src/rabird/core/logging.py
src/rabird/core/logging.py
''' @date 2013-5-9 @author Hong-She Liang <[email protected]> ''' import sys import os # Import the global logging unit, not our logging . global_logging = __import__('logging') def load_default_config(): arguments = { 'level': None, 'filename': None, 'filemode'...
''' @date 2013-5-9 @author Hong-She Liang <[email protected]> ''' import sys import os # Import the global logging unit, not our logging . global_logging = __import__('logging') def load_default_config(): arguments = { 'level': None, 'filename': None, 'filemode'...
Use old style string format method to avoid formatting warning
Use old style string format method to avoid formatting warning
Python
apache-2.0
starofrainnight/rabird.core
''' @date 2013-5-9 @author Hong-She Liang <[email protected]> ''' import sys import os # Import the global logging unit, not our logging . global_logging = __import__('logging') def load_default_config(): arguments = { 'level': None, 'filename': None, 'filemode'...
''' @date 2013-5-9 @author Hong-She Liang <[email protected]> ''' import sys import os # Import the global logging unit, not our logging . global_logging = __import__('logging') def load_default_config(): arguments = { 'level': None, 'filename': None, 'filemode'...
<commit_before>''' @date 2013-5-9 @author Hong-She Liang <[email protected]> ''' import sys import os # Import the global logging unit, not our logging . global_logging = __import__('logging') def load_default_config(): arguments = { 'level': None, 'filename': None, ...
''' @date 2013-5-9 @author Hong-She Liang <[email protected]> ''' import sys import os # Import the global logging unit, not our logging . global_logging = __import__('logging') def load_default_config(): arguments = { 'level': None, 'filename': None, 'filemode'...
''' @date 2013-5-9 @author Hong-She Liang <[email protected]> ''' import sys import os # Import the global logging unit, not our logging . global_logging = __import__('logging') def load_default_config(): arguments = { 'level': None, 'filename': None, 'filemode'...
<commit_before>''' @date 2013-5-9 @author Hong-She Liang <[email protected]> ''' import sys import os # Import the global logging unit, not our logging . global_logging = __import__('logging') def load_default_config(): arguments = { 'level': None, 'filename': None, ...
26c96aaa57c745840944c2aea5613ff861bb717f
invocations/testing.py
invocations/testing.py
from invoke import ctask as task @task(help={ 'module': "Just runs tests/STRING.py.", 'runner': "Use STRING to run tests instead of 'spec'.", 'opts': "Extra flags for the test runner", 'pty': "Whether to run tests under a pseudo-tty", }) def test(c, module=None, runner=None, opts=None, pty=True): ...
import sys from invoke import ctask as task @task(help={ 'module': "Just runs tests/STRING.py.", 'runner': "Use STRING to run tests instead of 'spec'.", 'opts': "Extra flags for the test runner", 'pty': "Whether to run tests under a pseudo-tty", }) def test(c, module=None, runner=None, opts=None, pty...
Quit coverage task early if no coverage installed
Quit coverage task early if no coverage installed
Python
bsd-2-clause
singingwolfboy/invocations,pyinvoke/invocations,mrjmad/invocations
from invoke import ctask as task @task(help={ 'module': "Just runs tests/STRING.py.", 'runner': "Use STRING to run tests instead of 'spec'.", 'opts': "Extra flags for the test runner", 'pty': "Whether to run tests under a pseudo-tty", }) def test(c, module=None, runner=None, opts=None, pty=True): ...
import sys from invoke import ctask as task @task(help={ 'module': "Just runs tests/STRING.py.", 'runner': "Use STRING to run tests instead of 'spec'.", 'opts': "Extra flags for the test runner", 'pty': "Whether to run tests under a pseudo-tty", }) def test(c, module=None, runner=None, opts=None, pty...
<commit_before>from invoke import ctask as task @task(help={ 'module': "Just runs tests/STRING.py.", 'runner': "Use STRING to run tests instead of 'spec'.", 'opts': "Extra flags for the test runner", 'pty': "Whether to run tests under a pseudo-tty", }) def test(c, module=None, runner=None, opts=None, ...
import sys from invoke import ctask as task @task(help={ 'module': "Just runs tests/STRING.py.", 'runner': "Use STRING to run tests instead of 'spec'.", 'opts': "Extra flags for the test runner", 'pty': "Whether to run tests under a pseudo-tty", }) def test(c, module=None, runner=None, opts=None, pty...
from invoke import ctask as task @task(help={ 'module': "Just runs tests/STRING.py.", 'runner': "Use STRING to run tests instead of 'spec'.", 'opts': "Extra flags for the test runner", 'pty': "Whether to run tests under a pseudo-tty", }) def test(c, module=None, runner=None, opts=None, pty=True): ...
<commit_before>from invoke import ctask as task @task(help={ 'module': "Just runs tests/STRING.py.", 'runner': "Use STRING to run tests instead of 'spec'.", 'opts': "Extra flags for the test runner", 'pty': "Whether to run tests under a pseudo-tty", }) def test(c, module=None, runner=None, opts=None, ...
2de7427d06ff33bf8bdfe0424e07b3fb34621b07
shop/user/views.py
shop/user/views.py
# -*- coding: utf-8 -*- """User views.""" from flask import Blueprint, render_template from flask_login import login_required blueprint = Blueprint('user', __name__, url_prefix='/users', static_folder='../static') @blueprint.route('/') @login_required def members(): """List members.""" return render_template...
# -*- coding: utf-8 -*- """User views.""" from flask import Blueprint, render_template from flask_login import login_required blueprint = Blueprint( 'user', __name__, url_prefix='/users', static_folder='../static' ) @blueprint.route('/') @login_required def members(): """List members.""" return rende...
Clean up code a bit
Clean up code a bit
Python
bsd-3-clause
joeirimpan/shop,joeirimpan/shop,joeirimpan/shop
# -*- coding: utf-8 -*- """User views.""" from flask import Blueprint, render_template from flask_login import login_required blueprint = Blueprint('user', __name__, url_prefix='/users', static_folder='../static') @blueprint.route('/') @login_required def members(): """List members.""" return render_template...
# -*- coding: utf-8 -*- """User views.""" from flask import Blueprint, render_template from flask_login import login_required blueprint = Blueprint( 'user', __name__, url_prefix='/users', static_folder='../static' ) @blueprint.route('/') @login_required def members(): """List members.""" return rende...
<commit_before># -*- coding: utf-8 -*- """User views.""" from flask import Blueprint, render_template from flask_login import login_required blueprint = Blueprint('user', __name__, url_prefix='/users', static_folder='../static') @blueprint.route('/') @login_required def members(): """List members.""" return ...
# -*- coding: utf-8 -*- """User views.""" from flask import Blueprint, render_template from flask_login import login_required blueprint = Blueprint( 'user', __name__, url_prefix='/users', static_folder='../static' ) @blueprint.route('/') @login_required def members(): """List members.""" return rende...
# -*- coding: utf-8 -*- """User views.""" from flask import Blueprint, render_template from flask_login import login_required blueprint = Blueprint('user', __name__, url_prefix='/users', static_folder='../static') @blueprint.route('/') @login_required def members(): """List members.""" return render_template...
<commit_before># -*- coding: utf-8 -*- """User views.""" from flask import Blueprint, render_template from flask_login import login_required blueprint = Blueprint('user', __name__, url_prefix='/users', static_folder='../static') @blueprint.route('/') @login_required def members(): """List members.""" return ...
0d3b274d220a9bc229d3ed7c14b231b21d5c8299
dthm4kaiako/poet/settings.py
dthm4kaiako/poet/settings.py
"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 10
"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 25
Increase threshold for showing resource submissions
Increase threshold for showing resource submissions
Python
mit
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 10 Increase threshold for showing resource submissions
"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 25
<commit_before>"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 10 <commit_msg>Increase threshold for showing resource submissions<commit_after>
"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 25
"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 10 Increase threshold for showing resource submissions"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 25
<commit_before>"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 10 <commit_msg>Increase threshold for showing resource submissions<commit_after>"""Settings for POET application.""" NUM_RESOURCES_PER_FORM = 3 MINIMUM_SUBMISSIONS_PER_RESOURCE = 25
ff59a35d5ea90169e34d65bd9ec3a6177e1faebd
thinglang/execution/stack.py
thinglang/execution/stack.py
class StackFrame(object): def __init__(self, instance): self.instance = instance self.data = {} self.idx = 0 self.return_value = None def __setitem__(self, key, value): print('\tSET<{}> {}: {}'.format(self.idx, key, value)) self.data[key] = (self.idx, value) ...
class StackFrame(object): def __init__(self, instance): self.instance = instance self.data = {} self.idx = 0 self.return_value = None def __setitem__(self, key, value): print('\tSET<{}> {}: {}'.format(self.idx, key, value)) self.data[key] = (self.idx, value) ...
Add index assertion during segment exit and fix segment cleanup logic
Add index assertion during segment exit and fix segment cleanup logic
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
class StackFrame(object): def __init__(self, instance): self.instance = instance self.data = {} self.idx = 0 self.return_value = None def __setitem__(self, key, value): print('\tSET<{}> {}: {}'.format(self.idx, key, value)) self.data[key] = (self.idx, value) ...
class StackFrame(object): def __init__(self, instance): self.instance = instance self.data = {} self.idx = 0 self.return_value = None def __setitem__(self, key, value): print('\tSET<{}> {}: {}'.format(self.idx, key, value)) self.data[key] = (self.idx, value) ...
<commit_before>class StackFrame(object): def __init__(self, instance): self.instance = instance self.data = {} self.idx = 0 self.return_value = None def __setitem__(self, key, value): print('\tSET<{}> {}: {}'.format(self.idx, key, value)) self.data[key] = (self....
class StackFrame(object): def __init__(self, instance): self.instance = instance self.data = {} self.idx = 0 self.return_value = None def __setitem__(self, key, value): print('\tSET<{}> {}: {}'.format(self.idx, key, value)) self.data[key] = (self.idx, value) ...
class StackFrame(object): def __init__(self, instance): self.instance = instance self.data = {} self.idx = 0 self.return_value = None def __setitem__(self, key, value): print('\tSET<{}> {}: {}'.format(self.idx, key, value)) self.data[key] = (self.idx, value) ...
<commit_before>class StackFrame(object): def __init__(self, instance): self.instance = instance self.data = {} self.idx = 0 self.return_value = None def __setitem__(self, key, value): print('\tSET<{}> {}: {}'.format(self.idx, key, value)) self.data[key] = (self....
f024e340a6a443bb765b67bbdb811fa44fd3d19b
tests/test_resources.py
tests/test_resources.py
from flask import json from helper import TestCase from models import db, Major class StudentsTestCase(TestCase): def setUp(self): super(StudentsTestCase, self).setUp() with self.appx.app_context(): db.session.add(Major(id=1, university_id=1, name='Major1')) db.session.ad...
from flask import json from helper import TestCase from models import db, Major, Student class StudentsTestCase(TestCase): def setUp(self): super(StudentsTestCase, self).setUp() with self.appx.app_context(): db.session.add(Major(id=1, university_id=1, name='Major1')) db.s...
Improve testing of student patching
Improve testing of student patching
Python
agpl-3.0
SCUEvals/scuevals-api,SCUEvals/scuevals-api
from flask import json from helper import TestCase from models import db, Major class StudentsTestCase(TestCase): def setUp(self): super(StudentsTestCase, self).setUp() with self.appx.app_context(): db.session.add(Major(id=1, university_id=1, name='Major1')) db.session.ad...
from flask import json from helper import TestCase from models import db, Major, Student class StudentsTestCase(TestCase): def setUp(self): super(StudentsTestCase, self).setUp() with self.appx.app_context(): db.session.add(Major(id=1, university_id=1, name='Major1')) db.s...
<commit_before>from flask import json from helper import TestCase from models import db, Major class StudentsTestCase(TestCase): def setUp(self): super(StudentsTestCase, self).setUp() with self.appx.app_context(): db.session.add(Major(id=1, university_id=1, name='Major1')) ...
from flask import json from helper import TestCase from models import db, Major, Student class StudentsTestCase(TestCase): def setUp(self): super(StudentsTestCase, self).setUp() with self.appx.app_context(): db.session.add(Major(id=1, university_id=1, name='Major1')) db.s...
from flask import json from helper import TestCase from models import db, Major class StudentsTestCase(TestCase): def setUp(self): super(StudentsTestCase, self).setUp() with self.appx.app_context(): db.session.add(Major(id=1, university_id=1, name='Major1')) db.session.ad...
<commit_before>from flask import json from helper import TestCase from models import db, Major class StudentsTestCase(TestCase): def setUp(self): super(StudentsTestCase, self).setUp() with self.appx.app_context(): db.session.add(Major(id=1, university_id=1, name='Major1')) ...
938043259eefdec21994489d68b1cf737618ba34
test/test_conversion.py
test/test_conversion.py
import unittest from src import conversion class TestNotationConverter(unittest.TestCase): """Tests for NotationConverter class""" def test_alg_search_good_input_a5(self): """Input with 'a5'""" actual_result = main.TileLine('w').line expected_result = ' ' self.assertEqual(...
"""Tests for conversion module""" import unittest from src import conversion class TestNotationConverter(unittest.TestCase): """Tests for NotationConverter class""" def test_alg_search_good_input_a5(self): """Input with 'a5'""" n_con = conversion.NotationConverter() actual_result = n_c...
Add tests for NotationConverter methods
Add tests for NotationConverter methods
Python
mit
blairck/chess_notation
import unittest from src import conversion class TestNotationConverter(unittest.TestCase): """Tests for NotationConverter class""" def test_alg_search_good_input_a5(self): """Input with 'a5'""" actual_result = main.TileLine('w').line expected_result = ' ' self.assertEqual(...
"""Tests for conversion module""" import unittest from src import conversion class TestNotationConverter(unittest.TestCase): """Tests for NotationConverter class""" def test_alg_search_good_input_a5(self): """Input with 'a5'""" n_con = conversion.NotationConverter() actual_result = n_c...
<commit_before>import unittest from src import conversion class TestNotationConverter(unittest.TestCase): """Tests for NotationConverter class""" def test_alg_search_good_input_a5(self): """Input with 'a5'""" actual_result = main.TileLine('w').line expected_result = ' ' se...
"""Tests for conversion module""" import unittest from src import conversion class TestNotationConverter(unittest.TestCase): """Tests for NotationConverter class""" def test_alg_search_good_input_a5(self): """Input with 'a5'""" n_con = conversion.NotationConverter() actual_result = n_c...
import unittest from src import conversion class TestNotationConverter(unittest.TestCase): """Tests for NotationConverter class""" def test_alg_search_good_input_a5(self): """Input with 'a5'""" actual_result = main.TileLine('w').line expected_result = ' ' self.assertEqual(...
<commit_before>import unittest from src import conversion class TestNotationConverter(unittest.TestCase): """Tests for NotationConverter class""" def test_alg_search_good_input_a5(self): """Input with 'a5'""" actual_result = main.TileLine('w').line expected_result = ' ' se...
b6cfa50e127d3f74247ab148219ef6336e445cca
InvenTree/InvenTree/ready.py
InvenTree/InvenTree/ready.py
import sys def canAppAccessDatabase(): """ Returns True if the apps.py file can access database records. There are some circumstances where we don't want the ready function in apps.py to touch the database """ # If any of the following management commands are being executed, # prevent cu...
import sys def canAppAccessDatabase(): """ Returns True if the apps.py file can access database records. There are some circumstances where we don't want the ready function in apps.py to touch the database """ # If any of the following management commands are being executed, # prevent cu...
Allow data operations to run for 'test'
Allow data operations to run for 'test'
Python
mit
inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree
import sys def canAppAccessDatabase(): """ Returns True if the apps.py file can access database records. There are some circumstances where we don't want the ready function in apps.py to touch the database """ # If any of the following management commands are being executed, # prevent cu...
import sys def canAppAccessDatabase(): """ Returns True if the apps.py file can access database records. There are some circumstances where we don't want the ready function in apps.py to touch the database """ # If any of the following management commands are being executed, # prevent cu...
<commit_before>import sys def canAppAccessDatabase(): """ Returns True if the apps.py file can access database records. There are some circumstances where we don't want the ready function in apps.py to touch the database """ # If any of the following management commands are being executed, ...
import sys def canAppAccessDatabase(): """ Returns True if the apps.py file can access database records. There are some circumstances where we don't want the ready function in apps.py to touch the database """ # If any of the following management commands are being executed, # prevent cu...
import sys def canAppAccessDatabase(): """ Returns True if the apps.py file can access database records. There are some circumstances where we don't want the ready function in apps.py to touch the database """ # If any of the following management commands are being executed, # prevent cu...
<commit_before>import sys def canAppAccessDatabase(): """ Returns True if the apps.py file can access database records. There are some circumstances where we don't want the ready function in apps.py to touch the database """ # If any of the following management commands are being executed, ...
fef28556bc4d105feb44345782c632b8d3befa3f
server/acre/settings/dev.py
server/acre/settings/dev.py
from .base import * import os DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.environ['RDS_DB_NAME'], 'HOST': os.environ['RDS_HOSTNAME'], 'PORT': os.environ['RDS_PORT'], 'USER': os.environ['RDS_USERNAME'], 'PASSWORD': os.envi...
from .base import * import os DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.environ['RDS_DB_NAME'], 'HOST': os.environ['RDS_HOSTNAME'], 'PORT': os.environ['RDS_PORT'], 'USER': os.environ['RDS_USERNAME'], 'PASSWORD': os.envi...
Add acre.one to allowed host
Add acre.one to allowed host
Python
mit
yizhang7210/Acre,yizhang7210/Acre,yizhang7210/Acre,yizhang7210/Acre
from .base import * import os DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.environ['RDS_DB_NAME'], 'HOST': os.environ['RDS_HOSTNAME'], 'PORT': os.environ['RDS_PORT'], 'USER': os.environ['RDS_USERNAME'], 'PASSWORD': os.envi...
from .base import * import os DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.environ['RDS_DB_NAME'], 'HOST': os.environ['RDS_HOSTNAME'], 'PORT': os.environ['RDS_PORT'], 'USER': os.environ['RDS_USERNAME'], 'PASSWORD': os.envi...
<commit_before>from .base import * import os DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.environ['RDS_DB_NAME'], 'HOST': os.environ['RDS_HOSTNAME'], 'PORT': os.environ['RDS_PORT'], 'USER': os.environ['RDS_USERNAME'], 'PAS...
from .base import * import os DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.environ['RDS_DB_NAME'], 'HOST': os.environ['RDS_HOSTNAME'], 'PORT': os.environ['RDS_PORT'], 'USER': os.environ['RDS_USERNAME'], 'PASSWORD': os.envi...
from .base import * import os DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.environ['RDS_DB_NAME'], 'HOST': os.environ['RDS_HOSTNAME'], 'PORT': os.environ['RDS_PORT'], 'USER': os.environ['RDS_USERNAME'], 'PASSWORD': os.envi...
<commit_before>from .base import * import os DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.environ['RDS_DB_NAME'], 'HOST': os.environ['RDS_HOSTNAME'], 'PORT': os.environ['RDS_PORT'], 'USER': os.environ['RDS_USERNAME'], 'PAS...
1636fe834830ebb6644d17f908f893a3c2a41e33
tests/test_sentences.py
tests/test_sentences.py
# import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 1 ("This is a simple ##@command-2## sentence. This one too.", ["This is a simple ##@command-2## sentence", "This one too"]), # 2 ("This is not a test in one go. openSUSE is not written with a capital ...
# import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 0 - a single simple sentence ("This is a simple sentence.", ["This is a simple sentence"]), # 1 - two simple sentences ("This is a simple ##@command-2## sentence. This one is too.", ["This is a si...
Expand the sentence segmentation tests a little()
Expand the sentence segmentation tests a little()
Python
lgpl-2.1
sknorr/suse-doc-style-checker,sknorr/suse-doc-style-checker,sknorr/suse-doc-style-checker
# import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 1 ("This is a simple ##@command-2## sentence. This one too.", ["This is a simple ##@command-2## sentence", "This one too"]), # 2 ("This is not a test in one go. openSUSE is not written with a capital ...
# import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 0 - a single simple sentence ("This is a simple sentence.", ["This is a simple sentence"]), # 1 - two simple sentences ("This is a simple ##@command-2## sentence. This one is too.", ["This is a si...
<commit_before># import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 1 ("This is a simple ##@command-2## sentence. This one too.", ["This is a simple ##@command-2## sentence", "This one too"]), # 2 ("This is not a test in one go. openSUSE is not written ...
# import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 0 - a single simple sentence ("This is a simple sentence.", ["This is a simple sentence"]), # 1 - two simple sentences ("This is a simple ##@command-2## sentence. This one is too.", ["This is a si...
# import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 1 ("This is a simple ##@command-2## sentence. This one too.", ["This is a simple ##@command-2## sentence", "This one too"]), # 2 ("This is not a test in one go. openSUSE is not written with a capital ...
<commit_before># import pytest from sdsc import sentencesegmenter @pytest.mark.parametrize("sentence,expected", ( # 1 ("This is a simple ##@command-2## sentence. This one too.", ["This is a simple ##@command-2## sentence", "This one too"]), # 2 ("This is not a test in one go. openSUSE is not written ...
dd7513f4146679d11aff6d528f11927131dc692f
feder/monitorings/factories.py
feder/monitorings/factories.py
from .models import Monitoring from feder.users.factories import UserFactory import factory class MonitoringFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'monitoring-%04d' % n) user = factory.SubFactory(UserFactory) class Meta: model = Monitoring django_get...
from .models import Monitoring from feder.users.factories import UserFactory import factory class MonitoringFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'monitoring-%04d' % n) user = factory.SubFactory(UserFactory) description = factory.Sequence(lambda n: 'description no.%...
Add description and template to MonitoringFactory
Add description and template to MonitoringFactory
Python
mit
watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder
from .models import Monitoring from feder.users.factories import UserFactory import factory class MonitoringFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'monitoring-%04d' % n) user = factory.SubFactory(UserFactory) class Meta: model = Monitoring django_get...
from .models import Monitoring from feder.users.factories import UserFactory import factory class MonitoringFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'monitoring-%04d' % n) user = factory.SubFactory(UserFactory) description = factory.Sequence(lambda n: 'description no.%...
<commit_before>from .models import Monitoring from feder.users.factories import UserFactory import factory class MonitoringFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'monitoring-%04d' % n) user = factory.SubFactory(UserFactory) class Meta: model = Monitoring ...
from .models import Monitoring from feder.users.factories import UserFactory import factory class MonitoringFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'monitoring-%04d' % n) user = factory.SubFactory(UserFactory) description = factory.Sequence(lambda n: 'description no.%...
from .models import Monitoring from feder.users.factories import UserFactory import factory class MonitoringFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'monitoring-%04d' % n) user = factory.SubFactory(UserFactory) class Meta: model = Monitoring django_get...
<commit_before>from .models import Monitoring from feder.users.factories import UserFactory import factory class MonitoringFactory(factory.django.DjangoModelFactory): name = factory.Sequence(lambda n: 'monitoring-%04d' % n) user = factory.SubFactory(UserFactory) class Meta: model = Monitoring ...
b17e39436bde57558c1a9d6e70330a51dd1d0d19
website/addons/osffiles/utils.py
website/addons/osffiles/utils.py
from website.addons.osffiles.exceptions import FileNotFoundError def get_versions(filename, node): """Return file versions for a :class:`NodeFile`. :raises: FileNotFoundError if file does not exists for the node. """ try: return node.files_versions[filename.replace('.', '_')] except KeyEr...
from website.addons.osffiles.exceptions import FileNotFoundError def get_versions(filename, node): """Return IDs for a file's version records. :param str filename: The name of the file. :param Node node: The node which has the requested file. :return: List of ids (strings) for :class:`NodeFile` recor...
Clarify documentation for get_versions and get_latest_version_number.
Clarify documentation for get_versions and get_latest_version_number.
Python
apache-2.0
bdyetton/prettychart,Johnetordoff/osf.io,caneruguz/osf.io,ZobairAlijan/osf.io,brandonPurvis/osf.io,arpitar/osf.io,GageGaskins/osf.io,DanielSBrown/osf.io,brianjgeiger/osf.io,fabianvf/osf.io,caseyrygt/osf.io,dplorimer/osf,MerlinZhang/osf.io,zkraime/osf.io,zkraime/osf.io,hmoco/osf.io,lamdnhan/osf.io,cosenal/osf.io,lyndsys...
from website.addons.osffiles.exceptions import FileNotFoundError def get_versions(filename, node): """Return file versions for a :class:`NodeFile`. :raises: FileNotFoundError if file does not exists for the node. """ try: return node.files_versions[filename.replace('.', '_')] except KeyEr...
from website.addons.osffiles.exceptions import FileNotFoundError def get_versions(filename, node): """Return IDs for a file's version records. :param str filename: The name of the file. :param Node node: The node which has the requested file. :return: List of ids (strings) for :class:`NodeFile` recor...
<commit_before>from website.addons.osffiles.exceptions import FileNotFoundError def get_versions(filename, node): """Return file versions for a :class:`NodeFile`. :raises: FileNotFoundError if file does not exists for the node. """ try: return node.files_versions[filename.replace('.', '_')] ...
from website.addons.osffiles.exceptions import FileNotFoundError def get_versions(filename, node): """Return IDs for a file's version records. :param str filename: The name of the file. :param Node node: The node which has the requested file. :return: List of ids (strings) for :class:`NodeFile` recor...
from website.addons.osffiles.exceptions import FileNotFoundError def get_versions(filename, node): """Return file versions for a :class:`NodeFile`. :raises: FileNotFoundError if file does not exists for the node. """ try: return node.files_versions[filename.replace('.', '_')] except KeyEr...
<commit_before>from website.addons.osffiles.exceptions import FileNotFoundError def get_versions(filename, node): """Return file versions for a :class:`NodeFile`. :raises: FileNotFoundError if file does not exists for the node. """ try: return node.files_versions[filename.replace('.', '_')] ...
bcb8084cc5e84a6417d4e8580005b5f7cf614005
giturlparse/platforms/bitbucket.py
giturlparse/platforms/bitbucket.py
# Imports from .base import BasePlatform class BitbucketPlatform(BasePlatform): PATTERNS = { 'https': r'https://(?P<_user>.+)@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git', 'ssh': r'git@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git' } FORMATS = { 'https': r'https://%(owner)s@%(doma...
# Imports from .base import BasePlatform class BitbucketPlatform(BasePlatform): PATTERNS = { 'https': r'https://(?P<_user>.+)@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git', 'ssh': r'git@(?P<domain>.+):(?P<owner>.+)/(?P<repo>.+).git' } FORMATS = { 'https': r'https://%(owner)s@%(doma...
Fix bug in BitBucket's SSH url
Fix bug in BitBucket's SSH url
Python
apache-2.0
FriendCode/giturlparse.py,yakky/giturlparse.py,yakky/giturlparse
# Imports from .base import BasePlatform class BitbucketPlatform(BasePlatform): PATTERNS = { 'https': r'https://(?P<_user>.+)@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git', 'ssh': r'git@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git' } FORMATS = { 'https': r'https://%(owner)s@%(doma...
# Imports from .base import BasePlatform class BitbucketPlatform(BasePlatform): PATTERNS = { 'https': r'https://(?P<_user>.+)@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git', 'ssh': r'git@(?P<domain>.+):(?P<owner>.+)/(?P<repo>.+).git' } FORMATS = { 'https': r'https://%(owner)s@%(doma...
<commit_before># Imports from .base import BasePlatform class BitbucketPlatform(BasePlatform): PATTERNS = { 'https': r'https://(?P<_user>.+)@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git', 'ssh': r'git@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git' } FORMATS = { 'https': r'https://%...
# Imports from .base import BasePlatform class BitbucketPlatform(BasePlatform): PATTERNS = { 'https': r'https://(?P<_user>.+)@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git', 'ssh': r'git@(?P<domain>.+):(?P<owner>.+)/(?P<repo>.+).git' } FORMATS = { 'https': r'https://%(owner)s@%(doma...
# Imports from .base import BasePlatform class BitbucketPlatform(BasePlatform): PATTERNS = { 'https': r'https://(?P<_user>.+)@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git', 'ssh': r'git@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git' } FORMATS = { 'https': r'https://%(owner)s@%(doma...
<commit_before># Imports from .base import BasePlatform class BitbucketPlatform(BasePlatform): PATTERNS = { 'https': r'https://(?P<_user>.+)@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git', 'ssh': r'git@(?P<domain>.+)/(?P<owner>.+)/(?P<repo>.+).git' } FORMATS = { 'https': r'https://%...
78665865038cf676290fb1058bd2194e4c506869
__init__.py
__init__.py
_VERSION = 'CVS' _TEMP_DIR = '.SloppyCell' import logging logging.basicConfig() logger = logging.getLogger('__init__') # Check for debugging option. I tried using optparse for this, but ran into # issues with ipython and mpirun, both of which pollute sys.argv. import sys for arg in sys.argv: if arg.startswith('--...
_VERSION = 'CVS' _TEMP_DIR = '.SloppyCell' import logging logging.basicConfig() logger = logging.getLogger('__init__') # Check for debugging option. I tried using optparse for this, but ran into # issues with ipython and mpirun, both of which pollute sys.argv. import sys for arg in sys.argv: if arg.startswith('--...
Fix for annoying pypar directory change
Fix for annoying pypar directory change
Python
bsd-3-clause
GutenkunstLab/SloppyCell,GutenkunstLab/SloppyCell
_VERSION = 'CVS' _TEMP_DIR = '.SloppyCell' import logging logging.basicConfig() logger = logging.getLogger('__init__') # Check for debugging option. I tried using optparse for this, but ran into # issues with ipython and mpirun, both of which pollute sys.argv. import sys for arg in sys.argv: if arg.startswith('--...
_VERSION = 'CVS' _TEMP_DIR = '.SloppyCell' import logging logging.basicConfig() logger = logging.getLogger('__init__') # Check for debugging option. I tried using optparse for this, but ran into # issues with ipython and mpirun, both of which pollute sys.argv. import sys for arg in sys.argv: if arg.startswith('--...
<commit_before>_VERSION = 'CVS' _TEMP_DIR = '.SloppyCell' import logging logging.basicConfig() logger = logging.getLogger('__init__') # Check for debugging option. I tried using optparse for this, but ran into # issues with ipython and mpirun, both of which pollute sys.argv. import sys for arg in sys.argv: if arg...
_VERSION = 'CVS' _TEMP_DIR = '.SloppyCell' import logging logging.basicConfig() logger = logging.getLogger('__init__') # Check for debugging option. I tried using optparse for this, but ran into # issues with ipython and mpirun, both of which pollute sys.argv. import sys for arg in sys.argv: if arg.startswith('--...
_VERSION = 'CVS' _TEMP_DIR = '.SloppyCell' import logging logging.basicConfig() logger = logging.getLogger('__init__') # Check for debugging option. I tried using optparse for this, but ran into # issues with ipython and mpirun, both of which pollute sys.argv. import sys for arg in sys.argv: if arg.startswith('--...
<commit_before>_VERSION = 'CVS' _TEMP_DIR = '.SloppyCell' import logging logging.basicConfig() logger = logging.getLogger('__init__') # Check for debugging option. I tried using optparse for this, but ran into # issues with ipython and mpirun, both of which pollute sys.argv. import sys for arg in sys.argv: if arg...
0f9418eed089938e0094f40cc15682ef59e041a1
__init__.py
__init__.py
# -*- coding: utf8 -*- import default_settings from flask.ext.plugins import Plugin from flask import current_app as app from pybossa_gravatar.gravatar import Gravatar from pybossa.model.user import User from sqlalchemy import event __plugin__ = "PyBossaGravatar" __version__ = "0.1.0" gravatar = Gravatar() class P...
# -*- coding: utf8 -*- import default_settings from flask.ext.plugins import Plugin from flask import current_app as app from flask import redirect from pybossa_gravatar.gravatar import Gravatar from pybossa.model.user import User from sqlalchemy import event from flask.ext.login import current_user __plugin__ = "PyB...
Add URL rule to set Gravatar for current user
Add URL rule to set Gravatar for current user
Python
bsd-3-clause
alexandermendes/pybossa-gravatar
# -*- coding: utf8 -*- import default_settings from flask.ext.plugins import Plugin from flask import current_app as app from pybossa_gravatar.gravatar import Gravatar from pybossa.model.user import User from sqlalchemy import event __plugin__ = "PyBossaGravatar" __version__ = "0.1.0" gravatar = Gravatar() class P...
# -*- coding: utf8 -*- import default_settings from flask.ext.plugins import Plugin from flask import current_app as app from flask import redirect from pybossa_gravatar.gravatar import Gravatar from pybossa.model.user import User from sqlalchemy import event from flask.ext.login import current_user __plugin__ = "PyB...
<commit_before># -*- coding: utf8 -*- import default_settings from flask.ext.plugins import Plugin from flask import current_app as app from pybossa_gravatar.gravatar import Gravatar from pybossa.model.user import User from sqlalchemy import event __plugin__ = "PyBossaGravatar" __version__ = "0.1.0" gravatar = Grava...
# -*- coding: utf8 -*- import default_settings from flask.ext.plugins import Plugin from flask import current_app as app from flask import redirect from pybossa_gravatar.gravatar import Gravatar from pybossa.model.user import User from sqlalchemy import event from flask.ext.login import current_user __plugin__ = "PyB...
# -*- coding: utf8 -*- import default_settings from flask.ext.plugins import Plugin from flask import current_app as app from pybossa_gravatar.gravatar import Gravatar from pybossa.model.user import User from sqlalchemy import event __plugin__ = "PyBossaGravatar" __version__ = "0.1.0" gravatar = Gravatar() class P...
<commit_before># -*- coding: utf8 -*- import default_settings from flask.ext.plugins import Plugin from flask import current_app as app from pybossa_gravatar.gravatar import Gravatar from pybossa.model.user import User from sqlalchemy import event __plugin__ = "PyBossaGravatar" __version__ = "0.1.0" gravatar = Grava...
8d8863fe178b085c6ce7500996f9c2d2c8f159f6
umibukela/csv_export.py
umibukela/csv_export.py
from collections import OrderedDict def form_questions(form): d = OrderedDict() children = form['children'] for child in children: if 'pathstr' in child and 'control' not in child: d.update({child['pathstr']: ''}) elif 'children' in child: for minor in child['childr...
from collections import OrderedDict def form_questions(form): d = OrderedDict() children = form['children'] for child in children: if 'pathstr' in child and 'control' not in child and child['type'] != 'group': d.update({child['pathstr']: ''}) elif 'children' in child: ...
Make sure correct type is excluded
Make sure correct type is excluded
Python
mit
Code4SA/umibukela,Code4SA/umibukela,Code4SA/umibukela,Code4SA/umibukela
from collections import OrderedDict def form_questions(form): d = OrderedDict() children = form['children'] for child in children: if 'pathstr' in child and 'control' not in child: d.update({child['pathstr']: ''}) elif 'children' in child: for minor in child['childr...
from collections import OrderedDict def form_questions(form): d = OrderedDict() children = form['children'] for child in children: if 'pathstr' in child and 'control' not in child and child['type'] != 'group': d.update({child['pathstr']: ''}) elif 'children' in child: ...
<commit_before>from collections import OrderedDict def form_questions(form): d = OrderedDict() children = form['children'] for child in children: if 'pathstr' in child and 'control' not in child: d.update({child['pathstr']: ''}) elif 'children' in child: for minor i...
from collections import OrderedDict def form_questions(form): d = OrderedDict() children = form['children'] for child in children: if 'pathstr' in child and 'control' not in child and child['type'] != 'group': d.update({child['pathstr']: ''}) elif 'children' in child: ...
from collections import OrderedDict def form_questions(form): d = OrderedDict() children = form['children'] for child in children: if 'pathstr' in child and 'control' not in child: d.update({child['pathstr']: ''}) elif 'children' in child: for minor in child['childr...
<commit_before>from collections import OrderedDict def form_questions(form): d = OrderedDict() children = form['children'] for child in children: if 'pathstr' in child and 'control' not in child: d.update({child['pathstr']: ''}) elif 'children' in child: for minor i...
6086b970e6c37ca4f343291a35bbb9e533109c1c
flask_wiki/backend/routes.py
flask_wiki/backend/routes.py
from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView api.add_resource(PageView, '/pages-list', endpoint='pages-list')
from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView, PageDetail api.add_resource(PageView, '/pages-list', endpoint='pages-list') api.add_resource(PageDetail, '/pages/<slug>', endpoint='page-detail')
Support for page-detail url added.
Support for page-detail url added.
Python
bsd-2-clause
gcavalcante8808/flask-wiki,gcavalcante8808/flask-wiki,gcavalcante8808/flask-wiki
from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView api.add_resource(PageView, '/pages-list', endpoint='pages-list')Support for page-detail url added.
from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView, PageDetail api.add_resource(PageView, '/pages-list', endpoint='pages-list') api.add_resource(PageDetail, '/pages/<slug>', endpoint='page-detail')
<commit_before>from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView api.add_resource(PageView, '/pages-list', endpoint='pages-list')<commit_msg>Support for page-detail url added.<commit_after>
from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView, PageDetail api.add_resource(PageView, '/pages-list', endpoint='pages-list') api.add_resource(PageDetail, '/pages/<slug>', endpoint='page-detail')
from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView api.add_resource(PageView, '/pages-list', endpoint='pages-list')Support for page-detail url added.from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView, PageDetail api.add_resource(PageView, '/p...
<commit_before>from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView api.add_resource(PageView, '/pages-list', endpoint='pages-list')<commit_msg>Support for page-detail url added.<commit_after>from flask_wiki.backend.backend import api from flask_wiki.backend.views import PageView, P...
76a2248ffe8c64b15a6f7d307b6d7c726e97165c
alerts/cloudtrail_logging_disabled.py
alerts/cloudtrail_logging_disabled.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers [email protected] fro...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers [email protected] fro...
Send Cloudtrail logging disabled alert to MOC
Send Cloudtrail logging disabled alert to MOC
Python
mpl-2.0
mozilla/MozDef,Phrozyn/MozDef,ameihm0912/MozDef,gdestuynder/MozDef,ameihm0912/MozDef,mpurzynski/MozDef,mozilla/MozDef,gdestuynder/MozDef,jeffbryner/MozDef,jeffbryner/MozDef,mpurzynski/MozDef,mpurzynski/MozDef,Phrozyn/MozDef,jeffbryner/MozDef,ameihm0912/MozDef,mozilla/MozDef,ameihm0912/MozDef,jeffbryner/MozDef,gdestuynd...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers [email protected] fro...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers [email protected] fro...
<commit_before>#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers bmyers@m...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers [email protected] fro...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers [email protected] fro...
<commit_before>#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers bmyers@m...
680f9e27ddef3be13b025cffd2041e7fece35f64
pygraphc/similarity/pysmJaroWinkler.py
pygraphc/similarity/pysmJaroWinkler.py
import py_stringmatching from itertools import combinations from time import time jw = py_stringmatching.JaroWinkler() start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1.log' with open(log_file, 'r') as f: lines = f.readlines() log_length = len(lines) for l...
Add Jaro-Winkler distance based on py_stringmatching
Add Jaro-Winkler distance based on py_stringmatching
Python
mit
studiawan/pygraphc
Add Jaro-Winkler distance based on py_stringmatching
import py_stringmatching from itertools import combinations from time import time jw = py_stringmatching.JaroWinkler() start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1.log' with open(log_file, 'r') as f: lines = f.readlines() log_length = len(lines) for l...
<commit_before><commit_msg>Add Jaro-Winkler distance based on py_stringmatching<commit_after>
import py_stringmatching from itertools import combinations from time import time jw = py_stringmatching.JaroWinkler() start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1.log' with open(log_file, 'r') as f: lines = f.readlines() log_length = len(lines) for l...
Add Jaro-Winkler distance based on py_stringmatchingimport py_stringmatching from itertools import combinations from time import time jw = py_stringmatching.JaroWinkler() start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1.log' with open(log_file, 'r') as f: l...
<commit_before><commit_msg>Add Jaro-Winkler distance based on py_stringmatching<commit_after>import py_stringmatching from itertools import combinations from time import time jw = py_stringmatching.JaroWinkler() start = time() log_file = '/home/hs32832011/Git/labeled-authlog/dataset/Hofstede2014/dataset1_perday/Dec 1....
6099451fe088fe74945bbeedeeee66896bd7ff3d
voctocore/lib/sources/__init__.py
voctocore/lib/sources/__init__.py
import logging from lib.config import Config from lib.sources.decklinkavsource import DeckLinkAVSource from lib.sources.imgvsource import ImgVSource from lib.sources.tcpavsource import TCPAVSource from lib.sources.testsource import TestSource from lib.sources.videoloopsource import VideoLoopSource log = logging.getLo...
import logging from lib.config import Config from lib.sources.decklinkavsource import DeckLinkAVSource from lib.sources.imgvsource import ImgVSource from lib.sources.tcpavsource import TCPAVSource from lib.sources.testsource import TestSource from lib.sources.videoloopsource import VideoLoopSource log = logging.getLo...
Use test sources as the default in configuration (and improve warning message, when falling back to)
Use test sources as the default in configuration (and improve warning message, when falling back to)
Python
mit
voc/voctomix,voc/voctomix
import logging from lib.config import Config from lib.sources.decklinkavsource import DeckLinkAVSource from lib.sources.imgvsource import ImgVSource from lib.sources.tcpavsource import TCPAVSource from lib.sources.testsource import TestSource from lib.sources.videoloopsource import VideoLoopSource log = logging.getLo...
import logging from lib.config import Config from lib.sources.decklinkavsource import DeckLinkAVSource from lib.sources.imgvsource import ImgVSource from lib.sources.tcpavsource import TCPAVSource from lib.sources.testsource import TestSource from lib.sources.videoloopsource import VideoLoopSource log = logging.getLo...
<commit_before>import logging from lib.config import Config from lib.sources.decklinkavsource import DeckLinkAVSource from lib.sources.imgvsource import ImgVSource from lib.sources.tcpavsource import TCPAVSource from lib.sources.testsource import TestSource from lib.sources.videoloopsource import VideoLoopSource log ...
import logging from lib.config import Config from lib.sources.decklinkavsource import DeckLinkAVSource from lib.sources.imgvsource import ImgVSource from lib.sources.tcpavsource import TCPAVSource from lib.sources.testsource import TestSource from lib.sources.videoloopsource import VideoLoopSource log = logging.getLo...
import logging from lib.config import Config from lib.sources.decklinkavsource import DeckLinkAVSource from lib.sources.imgvsource import ImgVSource from lib.sources.tcpavsource import TCPAVSource from lib.sources.testsource import TestSource from lib.sources.videoloopsource import VideoLoopSource log = logging.getLo...
<commit_before>import logging from lib.config import Config from lib.sources.decklinkavsource import DeckLinkAVSource from lib.sources.imgvsource import ImgVSource from lib.sources.tcpavsource import TCPAVSource from lib.sources.testsource import TestSource from lib.sources.videoloopsource import VideoLoopSource log ...
3d9d1b10149655030d172de38f9caeb5906d093c
source/lucidity/__init__.py
source/lucidity/__init__.py
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from .template import Template
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import os import uuid import imp from .template import Template def discover_templates(paths=None, recursive=True): '''Search *paths* for mount points and load templates from them. *paths* should be a li...
Add helper method to load templates from disk.
Add helper method to load templates from disk.
Python
apache-2.0
4degrees/lucidity,nebukadhezer/lucidity,BigRoy/lucidity
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from .template import Template Add helper method to load templates from disk.
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import os import uuid import imp from .template import Template def discover_templates(paths=None, recursive=True): '''Search *paths* for mount points and load templates from them. *paths* should be a li...
<commit_before># :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from .template import Template <commit_msg>Add helper method to load templates from disk.<commit_after>
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import os import uuid import imp from .template import Template def discover_templates(paths=None, recursive=True): '''Search *paths* for mount points and load templates from them. *paths* should be a li...
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from .template import Template Add helper method to load templates from disk.# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import os import uuid import imp...
<commit_before># :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from .template import Template <commit_msg>Add helper method to load templates from disk.<commit_after># :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICEN...
74eb0a324acd75f43aa4efa731c7fc289c5987dd
medium/combination-sum-iii/python/combination-sum-iii.py
medium/combination-sum-iii/python/combination-sum-iii.py
class Solution(object): def combinationSum3(self, k, n): """ :type k: int :type n: int :rtype: List[List[int]] """ # Use recursion to resolve the problem # The algorithm complexity is high due to it has to iterate from one # for each call given k, n. ...
Resolve Combination Sum III with recursion
Resolve Combination Sum III with recursion
Python
apache-2.0
shuquan/leetcode
Resolve Combination Sum III with recursion
class Solution(object): def combinationSum3(self, k, n): """ :type k: int :type n: int :rtype: List[List[int]] """ # Use recursion to resolve the problem # The algorithm complexity is high due to it has to iterate from one # for each call given k, n. ...
<commit_before><commit_msg>Resolve Combination Sum III with recursion<commit_after>
class Solution(object): def combinationSum3(self, k, n): """ :type k: int :type n: int :rtype: List[List[int]] """ # Use recursion to resolve the problem # The algorithm complexity is high due to it has to iterate from one # for each call given k, n. ...
Resolve Combination Sum III with recursionclass Solution(object): def combinationSum3(self, k, n): """ :type k: int :type n: int :rtype: List[List[int]] """ # Use recursion to resolve the problem # The algorithm complexity is high due to it has to iterate fro...
<commit_before><commit_msg>Resolve Combination Sum III with recursion<commit_after>class Solution(object): def combinationSum3(self, k, n): """ :type k: int :type n: int :rtype: List[List[int]] """ # Use recursion to resolve the problem # The algorithm comple...
b4d3bae4223671ddda05e864fcd34bd71e188f05
tangled/web/exc.py
tangled/web/exc.py
import datetime import html from webob.exc import HTTPInternalServerError class ConfigurationError(Exception): """Exception used to indicate a configuration error.""" class DebugHTTPInternalServerError(HTTPInternalServerError): """For use in debug mode, mainly for showing tracebacks.""" body_templat...
import datetime import html from webob.exc import HTTPInternalServerError class ConfigurationError(Exception): """Exception used to indicate a configuration error.""" class DebugHTTPInternalServerError(HTTPInternalServerError): """For use in debug mode, mainly for showing tracebacks.""" body_templat...
Add a hack so weird chars don't cause issues
Add a hack so weird chars don't cause issues In DebugHTTPInternalServerError.__init__. Should probably figure out the underlying cause. Or don't inherit from HTTPInternalServerError.
Python
mit
TangledWeb/tangled.web
import datetime import html from webob.exc import HTTPInternalServerError class ConfigurationError(Exception): """Exception used to indicate a configuration error.""" class DebugHTTPInternalServerError(HTTPInternalServerError): """For use in debug mode, mainly for showing tracebacks.""" body_templat...
import datetime import html from webob.exc import HTTPInternalServerError class ConfigurationError(Exception): """Exception used to indicate a configuration error.""" class DebugHTTPInternalServerError(HTTPInternalServerError): """For use in debug mode, mainly for showing tracebacks.""" body_templat...
<commit_before>import datetime import html from webob.exc import HTTPInternalServerError class ConfigurationError(Exception): """Exception used to indicate a configuration error.""" class DebugHTTPInternalServerError(HTTPInternalServerError): """For use in debug mode, mainly for showing tracebacks.""" ...
import datetime import html from webob.exc import HTTPInternalServerError class ConfigurationError(Exception): """Exception used to indicate a configuration error.""" class DebugHTTPInternalServerError(HTTPInternalServerError): """For use in debug mode, mainly for showing tracebacks.""" body_templat...
import datetime import html from webob.exc import HTTPInternalServerError class ConfigurationError(Exception): """Exception used to indicate a configuration error.""" class DebugHTTPInternalServerError(HTTPInternalServerError): """For use in debug mode, mainly for showing tracebacks.""" body_templat...
<commit_before>import datetime import html from webob.exc import HTTPInternalServerError class ConfigurationError(Exception): """Exception used to indicate a configuration error.""" class DebugHTTPInternalServerError(HTTPInternalServerError): """For use in debug mode, mainly for showing tracebacks.""" ...
0e2e30382def1f911987ca22fce5adc6c6b73fb6
airship/__init__.py
airship/__init__.py
import os import json from flask import Flask, render_template def channels_json(station, escaped=False): channels = [{"name": channel} for channel in station.channels()] jsonbody = json.dumps(channels) if escaped: jsonbody = jsonbody.replace("</", "<\\/") return jsonbody def make_airship(s...
import os import json from flask import Flask, render_template def jsonate(obj, escaped): jsonbody = json.dumps(obj) if escaped: jsonbody = jsonbody.replace("</", "<\\/") return jsonbody def channels_json(station, escaped=False): channels = [{"name": channel} for channel in station.channels...
Fix the grefs route in the airship server
Fix the grefs route in the airship server
Python
mit
richo/airship,richo/airship,richo/airship
import os import json from flask import Flask, render_template def channels_json(station, escaped=False): channels = [{"name": channel} for channel in station.channels()] jsonbody = json.dumps(channels) if escaped: jsonbody = jsonbody.replace("</", "<\\/") return jsonbody def make_airship(s...
import os import json from flask import Flask, render_template def jsonate(obj, escaped): jsonbody = json.dumps(obj) if escaped: jsonbody = jsonbody.replace("</", "<\\/") return jsonbody def channels_json(station, escaped=False): channels = [{"name": channel} for channel in station.channels...
<commit_before>import os import json from flask import Flask, render_template def channels_json(station, escaped=False): channels = [{"name": channel} for channel in station.channels()] jsonbody = json.dumps(channels) if escaped: jsonbody = jsonbody.replace("</", "<\\/") return jsonbody def...
import os import json from flask import Flask, render_template def jsonate(obj, escaped): jsonbody = json.dumps(obj) if escaped: jsonbody = jsonbody.replace("</", "<\\/") return jsonbody def channels_json(station, escaped=False): channels = [{"name": channel} for channel in station.channels...
import os import json from flask import Flask, render_template def channels_json(station, escaped=False): channels = [{"name": channel} for channel in station.channels()] jsonbody = json.dumps(channels) if escaped: jsonbody = jsonbody.replace("</", "<\\/") return jsonbody def make_airship(s...
<commit_before>import os import json from flask import Flask, render_template def channels_json(station, escaped=False): channels = [{"name": channel} for channel in station.channels()] jsonbody = json.dumps(channels) if escaped: jsonbody = jsonbody.replace("</", "<\\/") return jsonbody def...
6f83b42ae9aaf9cd23bc8d15b66157a75bbc3aed
util/createCollector.py
util/createCollector.py
import os import sys import subprocesses THIS_SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) fuzzManagerPath = os.path.abspath(os.path.join(THIS_SCRIPT_DIRECTORY, os.pardir, os.pardir, 'FuzzManager')) if not os.path.exists(fuzzManagerPath): print "Please check out Lithium and FuzzManager side-by-si...
import os import sys THIS_SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) fuzzManagerPath = os.path.abspath(os.path.join(THIS_SCRIPT_DIRECTORY, os.pardir, os.pardir, 'FuzzManager')) if not os.path.exists(fuzzManagerPath): print "Please check out Lithium and FuzzManager side-by-side with funfuzz. Li...
Use the signature (cache) directory specified in .fuzzmanagerconf
Use the signature (cache) directory specified in .fuzzmanagerconf
Python
mpl-2.0
nth10sd/funfuzz,MozillaSecurity/funfuzz,MozillaSecurity/funfuzz,MozillaSecurity/funfuzz,nth10sd/funfuzz,nth10sd/funfuzz
import os import sys import subprocesses THIS_SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) fuzzManagerPath = os.path.abspath(os.path.join(THIS_SCRIPT_DIRECTORY, os.pardir, os.pardir, 'FuzzManager')) if not os.path.exists(fuzzManagerPath): print "Please check out Lithium and FuzzManager side-by-si...
import os import sys THIS_SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) fuzzManagerPath = os.path.abspath(os.path.join(THIS_SCRIPT_DIRECTORY, os.pardir, os.pardir, 'FuzzManager')) if not os.path.exists(fuzzManagerPath): print "Please check out Lithium and FuzzManager side-by-side with funfuzz. Li...
<commit_before>import os import sys import subprocesses THIS_SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) fuzzManagerPath = os.path.abspath(os.path.join(THIS_SCRIPT_DIRECTORY, os.pardir, os.pardir, 'FuzzManager')) if not os.path.exists(fuzzManagerPath): print "Please check out Lithium and FuzzMan...
import os import sys THIS_SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) fuzzManagerPath = os.path.abspath(os.path.join(THIS_SCRIPT_DIRECTORY, os.pardir, os.pardir, 'FuzzManager')) if not os.path.exists(fuzzManagerPath): print "Please check out Lithium and FuzzManager side-by-side with funfuzz. Li...
import os import sys import subprocesses THIS_SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) fuzzManagerPath = os.path.abspath(os.path.join(THIS_SCRIPT_DIRECTORY, os.pardir, os.pardir, 'FuzzManager')) if not os.path.exists(fuzzManagerPath): print "Please check out Lithium and FuzzManager side-by-si...
<commit_before>import os import sys import subprocesses THIS_SCRIPT_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) fuzzManagerPath = os.path.abspath(os.path.join(THIS_SCRIPT_DIRECTORY, os.pardir, os.pardir, 'FuzzManager')) if not os.path.exists(fuzzManagerPath): print "Please check out Lithium and FuzzMan...
28add39cbd964d9a26ff8f12c1ee3668b765c7a7
perforce/p4login.py
perforce/p4login.py
#!/usr/bin/env python3 """Script to automate logging into Perforce. Use P4API to log in to the server. """ import P4 def main(): """Log in to the Perforce server.""" # Yep, pretty much that easy. p4 = P4.P4() p4.connect() p4.run_login() if __name__ == "__main__": main()
#!/usr/bin/env python """Script to automate logging into Perforce.""" import subprocess import sys def main(): """Log in to the Perforce server.""" # Yep, pretty much that easy. result = subprocess.check_output(['p4', 'set', '-q', 'P4PASSWD']) passwd = result.strip().split('=')[1] proc = subproce...
Use p4 cli instead of p4 api
Use p4 cli instead of p4 api
Python
bsd-3-clause
nlfiedler/devscripts,nlfiedler/devscripts
#!/usr/bin/env python3 """Script to automate logging into Perforce. Use P4API to log in to the server. """ import P4 def main(): """Log in to the Perforce server.""" # Yep, pretty much that easy. p4 = P4.P4() p4.connect() p4.run_login() if __name__ == "__main__": main() Use p4 cli instead...
#!/usr/bin/env python """Script to automate logging into Perforce.""" import subprocess import sys def main(): """Log in to the Perforce server.""" # Yep, pretty much that easy. result = subprocess.check_output(['p4', 'set', '-q', 'P4PASSWD']) passwd = result.strip().split('=')[1] proc = subproce...
<commit_before>#!/usr/bin/env python3 """Script to automate logging into Perforce. Use P4API to log in to the server. """ import P4 def main(): """Log in to the Perforce server.""" # Yep, pretty much that easy. p4 = P4.P4() p4.connect() p4.run_login() if __name__ == "__main__": main() <co...
#!/usr/bin/env python """Script to automate logging into Perforce.""" import subprocess import sys def main(): """Log in to the Perforce server.""" # Yep, pretty much that easy. result = subprocess.check_output(['p4', 'set', '-q', 'P4PASSWD']) passwd = result.strip().split('=')[1] proc = subproce...
#!/usr/bin/env python3 """Script to automate logging into Perforce. Use P4API to log in to the server. """ import P4 def main(): """Log in to the Perforce server.""" # Yep, pretty much that easy. p4 = P4.P4() p4.connect() p4.run_login() if __name__ == "__main__": main() Use p4 cli instead...
<commit_before>#!/usr/bin/env python3 """Script to automate logging into Perforce. Use P4API to log in to the server. """ import P4 def main(): """Log in to the Perforce server.""" # Yep, pretty much that easy. p4 = P4.P4() p4.connect() p4.run_login() if __name__ == "__main__": main() <co...
ad42da9cb3c944f5bd5e953f947a0be96a4b8e17
astropy/samp/tests/test_hub_proxy.py
astropy/samp/tests/test_hub_proxy.py
from astropy.samp import conf from astropy.samp.hub import SAMPHubServer from astropy.samp.hub_proxy import SAMPHubProxy def setup_module(module): conf.use_internet = False class TestHubProxy: def setup_method(self, method): self.hub = SAMPHubServer(web_profile=False, mode='multiple', pool_size=1)...
from astropy.samp import conf from astropy.samp.hub import SAMPHubServer from astropy.samp.hub_proxy import SAMPHubProxy def setup_module(module): conf.use_internet = False class TestHubProxy: def setup_method(self, method): self.hub = SAMPHubServer(web_profile=False, mode='multiple', pool_size=1)...
Replace `tmpdir` with `tmp_path` in `samp` tests
Replace `tmpdir` with `tmp_path` in `samp` tests
Python
bsd-3-clause
pllim/astropy,mhvk/astropy,lpsinger/astropy,lpsinger/astropy,mhvk/astropy,larrybradley/astropy,pllim/astropy,lpsinger/astropy,lpsinger/astropy,lpsinger/astropy,astropy/astropy,pllim/astropy,astropy/astropy,larrybradley/astropy,pllim/astropy,astropy/astropy,mhvk/astropy,larrybradley/astropy,larrybradley/astropy,astropy/...
from astropy.samp import conf from astropy.samp.hub import SAMPHubServer from astropy.samp.hub_proxy import SAMPHubProxy def setup_module(module): conf.use_internet = False class TestHubProxy: def setup_method(self, method): self.hub = SAMPHubServer(web_profile=False, mode='multiple', pool_size=1)...
from astropy.samp import conf from astropy.samp.hub import SAMPHubServer from astropy.samp.hub_proxy import SAMPHubProxy def setup_module(module): conf.use_internet = False class TestHubProxy: def setup_method(self, method): self.hub = SAMPHubServer(web_profile=False, mode='multiple', pool_size=1)...
<commit_before>from astropy.samp import conf from astropy.samp.hub import SAMPHubServer from astropy.samp.hub_proxy import SAMPHubProxy def setup_module(module): conf.use_internet = False class TestHubProxy: def setup_method(self, method): self.hub = SAMPHubServer(web_profile=False, mode='multiple...
from astropy.samp import conf from astropy.samp.hub import SAMPHubServer from astropy.samp.hub_proxy import SAMPHubProxy def setup_module(module): conf.use_internet = False class TestHubProxy: def setup_method(self, method): self.hub = SAMPHubServer(web_profile=False, mode='multiple', pool_size=1)...
from astropy.samp import conf from astropy.samp.hub import SAMPHubServer from astropy.samp.hub_proxy import SAMPHubProxy def setup_module(module): conf.use_internet = False class TestHubProxy: def setup_method(self, method): self.hub = SAMPHubServer(web_profile=False, mode='multiple', pool_size=1)...
<commit_before>from astropy.samp import conf from astropy.samp.hub import SAMPHubServer from astropy.samp.hub_proxy import SAMPHubProxy def setup_module(module): conf.use_internet = False class TestHubProxy: def setup_method(self, method): self.hub = SAMPHubServer(web_profile=False, mode='multiple...
b4a92b80d2cfe316d89dbecdf1026486d5288fe0
simulator-perfect.py
simulator-perfect.py
#!/usr/bin/env python3 import timer import sys import utils def simulate(): # A set of files already in the storage seen = set() # The size of the all uploads combined (deduplicated or not) total_in = 0 # The size of the data sent to the service data_in = 0 tmr = timer.Timer() for (...
#!/usr/bin/env python3 import timer import sys import utils def simulate(): # A set of files already in the storage seen = set() # The size of the all uploads combined (deduplicated or not) total_in = 0 # The size of the data sent to the service data_in = 0 tmr = timer.Timer() for (...
Make perfect simulator print data after each upload
Make perfect simulator print data after each upload
Python
apache-2.0
sjakthol/dedup-simulator,sjakthol/dedup-simulator
#!/usr/bin/env python3 import timer import sys import utils def simulate(): # A set of files already in the storage seen = set() # The size of the all uploads combined (deduplicated or not) total_in = 0 # The size of the data sent to the service data_in = 0 tmr = timer.Timer() for (...
#!/usr/bin/env python3 import timer import sys import utils def simulate(): # A set of files already in the storage seen = set() # The size of the all uploads combined (deduplicated or not) total_in = 0 # The size of the data sent to the service data_in = 0 tmr = timer.Timer() for (...
<commit_before>#!/usr/bin/env python3 import timer import sys import utils def simulate(): # A set of files already in the storage seen = set() # The size of the all uploads combined (deduplicated or not) total_in = 0 # The size of the data sent to the service data_in = 0 tmr = timer.Ti...
#!/usr/bin/env python3 import timer import sys import utils def simulate(): # A set of files already in the storage seen = set() # The size of the all uploads combined (deduplicated or not) total_in = 0 # The size of the data sent to the service data_in = 0 tmr = timer.Timer() for (...
#!/usr/bin/env python3 import timer import sys import utils def simulate(): # A set of files already in the storage seen = set() # The size of the all uploads combined (deduplicated or not) total_in = 0 # The size of the data sent to the service data_in = 0 tmr = timer.Timer() for (...
<commit_before>#!/usr/bin/env python3 import timer import sys import utils def simulate(): # A set of files already in the storage seen = set() # The size of the all uploads combined (deduplicated or not) total_in = 0 # The size of the data sent to the service data_in = 0 tmr = timer.Ti...
1a871cf3bf1fd40342e490599361d57017cdcc65
backend/breach/tests/test_strategy.py
backend/breach/tests/test_strategy.py
from mock import patch from breach.tests.base import RuptureTestCase from breach.strategy import Strategy class StrategyTestCase(RuptureTestCase): @patch('breach.strategy.Sniffer') def test_first_round(self, Sniffer): strategy0 = Strategy(self.victim) work0 = strategy0.get_work() sel...
from mock import patch from breach.tests.base import RuptureTestCase from breach.strategy import Strategy class StrategyTestCase(RuptureTestCase): @patch('breach.strategy.Sniffer') def test_first_round(self, Sniffer): strategy0 = Strategy(self.victim) work0 = strategy0.get_work() sel...
Update first round test, create huffman based on knownalphabet
Update first round test, create huffman based on knownalphabet
Python
mit
dionyziz/rupture,dimriou/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimriou/rupture,dimriou/rupture,dimriou/rupture,dimriou/rupture...
from mock import patch from breach.tests.base import RuptureTestCase from breach.strategy import Strategy class StrategyTestCase(RuptureTestCase): @patch('breach.strategy.Sniffer') def test_first_round(self, Sniffer): strategy0 = Strategy(self.victim) work0 = strategy0.get_work() sel...
from mock import patch from breach.tests.base import RuptureTestCase from breach.strategy import Strategy class StrategyTestCase(RuptureTestCase): @patch('breach.strategy.Sniffer') def test_first_round(self, Sniffer): strategy0 = Strategy(self.victim) work0 = strategy0.get_work() sel...
<commit_before>from mock import patch from breach.tests.base import RuptureTestCase from breach.strategy import Strategy class StrategyTestCase(RuptureTestCase): @patch('breach.strategy.Sniffer') def test_first_round(self, Sniffer): strategy0 = Strategy(self.victim) work0 = strategy0.get_wor...
from mock import patch from breach.tests.base import RuptureTestCase from breach.strategy import Strategy class StrategyTestCase(RuptureTestCase): @patch('breach.strategy.Sniffer') def test_first_round(self, Sniffer): strategy0 = Strategy(self.victim) work0 = strategy0.get_work() sel...
from mock import patch from breach.tests.base import RuptureTestCase from breach.strategy import Strategy class StrategyTestCase(RuptureTestCase): @patch('breach.strategy.Sniffer') def test_first_round(self, Sniffer): strategy0 = Strategy(self.victim) work0 = strategy0.get_work() sel...
<commit_before>from mock import patch from breach.tests.base import RuptureTestCase from breach.strategy import Strategy class StrategyTestCase(RuptureTestCase): @patch('breach.strategy.Sniffer') def test_first_round(self, Sniffer): strategy0 = Strategy(self.victim) work0 = strategy0.get_wor...
91b01e37897ea20f6486118e4dd595439f81006b
ktane/Model/Modules/WiresModule.py
ktane/Model/Modules/WiresModule.py
from enum import Enum from .AbstractModule import AbstractModule, ModuleState class WireColors(Enum): MISSING = 'missing' BLACK = 'black' RED = 'red' WHITE = 'white' BLUE = 'blue' YELLOW = 'yellow' def get_correct_wire(sequence, boolpar): wires_count = get_wires_count(sequence) def ge...
from enum import Enum from .AbstractModule import AbstractModule, ModuleState class WireColors(Enum): MISSING = 'missing' BLACK = 'black' RED = 'red' WHITE = 'white' BLUE = 'blue' YELLOW = 'yellow' def get_correct_wire(sequence, boolpar): wires_count = get_wires_count(sequence) def ge...
Implement Wires helper method get_nth_wire_position
Implement Wires helper method get_nth_wire_position
Python
mit
hanzikl/ktane-controller
from enum import Enum from .AbstractModule import AbstractModule, ModuleState class WireColors(Enum): MISSING = 'missing' BLACK = 'black' RED = 'red' WHITE = 'white' BLUE = 'blue' YELLOW = 'yellow' def get_correct_wire(sequence, boolpar): wires_count = get_wires_count(sequence) def ge...
from enum import Enum from .AbstractModule import AbstractModule, ModuleState class WireColors(Enum): MISSING = 'missing' BLACK = 'black' RED = 'red' WHITE = 'white' BLUE = 'blue' YELLOW = 'yellow' def get_correct_wire(sequence, boolpar): wires_count = get_wires_count(sequence) def ge...
<commit_before>from enum import Enum from .AbstractModule import AbstractModule, ModuleState class WireColors(Enum): MISSING = 'missing' BLACK = 'black' RED = 'red' WHITE = 'white' BLUE = 'blue' YELLOW = 'yellow' def get_correct_wire(sequence, boolpar): wires_count = get_wires_count(seq...
from enum import Enum from .AbstractModule import AbstractModule, ModuleState class WireColors(Enum): MISSING = 'missing' BLACK = 'black' RED = 'red' WHITE = 'white' BLUE = 'blue' YELLOW = 'yellow' def get_correct_wire(sequence, boolpar): wires_count = get_wires_count(sequence) def ge...
from enum import Enum from .AbstractModule import AbstractModule, ModuleState class WireColors(Enum): MISSING = 'missing' BLACK = 'black' RED = 'red' WHITE = 'white' BLUE = 'blue' YELLOW = 'yellow' def get_correct_wire(sequence, boolpar): wires_count = get_wires_count(sequence) def ge...
<commit_before>from enum import Enum from .AbstractModule import AbstractModule, ModuleState class WireColors(Enum): MISSING = 'missing' BLACK = 'black' RED = 'red' WHITE = 'white' BLUE = 'blue' YELLOW = 'yellow' def get_correct_wire(sequence, boolpar): wires_count = get_wires_count(seq...
d8d77d4dd98d9287be8a98f0024e5f458bef2b66
tests/test_time.py
tests/test_time.py
from immobilus import immobilus from immobilus.logic import _datetime_to_utc_timestamp from datetime import datetime from time import time def test_time_function(): dt = datetime(1970, 1, 1) assert _datetime_to_utc_timestamp(dt) == 0.0 assert type(_datetime_to_utc_timestamp(dt)) is float assert time...
from immobilus import immobilus from immobilus.logic import _datetime_to_utc_timestamp from datetime import datetime from time import time def test_time_function(): dt = datetime(1970, 1, 1) timestamp = _datetime_to_utc_timestamp(dt) assert timestamp == 0.0 assert type(timestamp) is float assert...
Tidy test - reuse timestamp
Tidy test - reuse timestamp
Python
apache-2.0
pokidovea/immobilus
from immobilus import immobilus from immobilus.logic import _datetime_to_utc_timestamp from datetime import datetime from time import time def test_time_function(): dt = datetime(1970, 1, 1) assert _datetime_to_utc_timestamp(dt) == 0.0 assert type(_datetime_to_utc_timestamp(dt)) is float assert time...
from immobilus import immobilus from immobilus.logic import _datetime_to_utc_timestamp from datetime import datetime from time import time def test_time_function(): dt = datetime(1970, 1, 1) timestamp = _datetime_to_utc_timestamp(dt) assert timestamp == 0.0 assert type(timestamp) is float assert...
<commit_before>from immobilus import immobilus from immobilus.logic import _datetime_to_utc_timestamp from datetime import datetime from time import time def test_time_function(): dt = datetime(1970, 1, 1) assert _datetime_to_utc_timestamp(dt) == 0.0 assert type(_datetime_to_utc_timestamp(dt)) is float ...
from immobilus import immobilus from immobilus.logic import _datetime_to_utc_timestamp from datetime import datetime from time import time def test_time_function(): dt = datetime(1970, 1, 1) timestamp = _datetime_to_utc_timestamp(dt) assert timestamp == 0.0 assert type(timestamp) is float assert...
from immobilus import immobilus from immobilus.logic import _datetime_to_utc_timestamp from datetime import datetime from time import time def test_time_function(): dt = datetime(1970, 1, 1) assert _datetime_to_utc_timestamp(dt) == 0.0 assert type(_datetime_to_utc_timestamp(dt)) is float assert time...
<commit_before>from immobilus import immobilus from immobilus.logic import _datetime_to_utc_timestamp from datetime import datetime from time import time def test_time_function(): dt = datetime(1970, 1, 1) assert _datetime_to_utc_timestamp(dt) == 0.0 assert type(_datetime_to_utc_timestamp(dt)) is float ...
a9f55a57559a6647c451d38893624be4109be23b
Spiders.py
Spiders.py
''' Created on 2 сент. 2016 г. @author: garet ''' class BaseSpider(): def __init__(self): pass def AddUrls(self, urls): pass def Routing(self, url): pass def SaveCache(self, url, data=None): pass def GetCache(self, url): pass ...
''' Created on 2 сент. 2016 г. @author: garet ''' import queue import sqlite3 class BaseSpider(): def __init__(self): pass def AddUrls(self, urls): pass def Routing(self, url): pass def SaveCache(self, url, data=None): pass def GetCa...
Add SqliteCache for html raw data. Add QueueUrls for list urls.
Add SqliteCache for html raw data. Add QueueUrls for list urls.
Python
bsd-3-clause
SaltusVita/ReoGrab
''' Created on 2 сент. 2016 г. @author: garet ''' class BaseSpider(): def __init__(self): pass def AddUrls(self, urls): pass def Routing(self, url): pass def SaveCache(self, url, data=None): pass def GetCache(self, url): pass ...
''' Created on 2 сент. 2016 г. @author: garet ''' import queue import sqlite3 class BaseSpider(): def __init__(self): pass def AddUrls(self, urls): pass def Routing(self, url): pass def SaveCache(self, url, data=None): pass def GetCa...
<commit_before>''' Created on 2 сент. 2016 г. @author: garet ''' class BaseSpider(): def __init__(self): pass def AddUrls(self, urls): pass def Routing(self, url): pass def SaveCache(self, url, data=None): pass def GetCache(self, url):...
''' Created on 2 сент. 2016 г. @author: garet ''' import queue import sqlite3 class BaseSpider(): def __init__(self): pass def AddUrls(self, urls): pass def Routing(self, url): pass def SaveCache(self, url, data=None): pass def GetCa...
''' Created on 2 сент. 2016 г. @author: garet ''' class BaseSpider(): def __init__(self): pass def AddUrls(self, urls): pass def Routing(self, url): pass def SaveCache(self, url, data=None): pass def GetCache(self, url): pass ...
<commit_before>''' Created on 2 сент. 2016 г. @author: garet ''' class BaseSpider(): def __init__(self): pass def AddUrls(self, urls): pass def Routing(self, url): pass def SaveCache(self, url, data=None): pass def GetCache(self, url):...
20eb711953a8981e7b73b59613018514157e352a
spyder_terminal/__init__.py
spyder_terminal/__init__.py
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
Set development version number to v0.3.0.dev0
Set development version number to v0.3.0.dev0
Python
mit
spyder-ide/spyder-terminal,andfoy/spyder-terminal,spyder-ide/spyder-terminal,andfoy/spyder-terminal,spyder-ide/spyder-terminal,andfoy/spyder-terminal,spyder-ide/spyder-terminal
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
<commit_before># -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ---------------------------------------------------------------------------...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Spyder Te...
<commit_before># -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ---------------------------------------------------------------------------...
d28bbd597ddbcbf516f490b5bc0511adb63a4be7
utils/autogen/config.py
utils/autogen/config.py
INPUT_DECL_PATHS = [ "../../target/device/libio/export" # "../../../pia-sdk-repo/iolib/arduino/arduiPIA.h" ] AUTOGEN_TEST = 1 if AUTOGEN_TEST == 1: INPUT_DECL_PATHS = [ "./testSuite/" ] VERSION = '0.0.1' TARGET = 'galileo' OUTPUT_COMP_PATH = '../../target/companion/lib/b...
INPUT_DECL_PATHS = [ "../../target/device/libio/export" # "../../../pia-sdk-repo/iolib/arduino/arduiPIA.h" ] AUTOGEN_TEST = 0 if AUTOGEN_TEST == 1: INPUT_DECL_PATHS = [ "./testSuite/" ] VERSION = '0.0.1' TARGET = 'galileo' OUTPUT_COMP_PATH = '../../target/companion/lib/b...
Set default AUTOGEN_TEST to 0
Set default AUTOGEN_TEST to 0
Python
bsd-3-clause
ilc-opensource/io-js,ilc-opensource/io-js,ilc-opensource/io-js,ilc-opensource/io-js,ilc-opensource/io-js
INPUT_DECL_PATHS = [ "../../target/device/libio/export" # "../../../pia-sdk-repo/iolib/arduino/arduiPIA.h" ] AUTOGEN_TEST = 1 if AUTOGEN_TEST == 1: INPUT_DECL_PATHS = [ "./testSuite/" ] VERSION = '0.0.1' TARGET = 'galileo' OUTPUT_COMP_PATH = '../../target/companion/lib/b...
INPUT_DECL_PATHS = [ "../../target/device/libio/export" # "../../../pia-sdk-repo/iolib/arduino/arduiPIA.h" ] AUTOGEN_TEST = 0 if AUTOGEN_TEST == 1: INPUT_DECL_PATHS = [ "./testSuite/" ] VERSION = '0.0.1' TARGET = 'galileo' OUTPUT_COMP_PATH = '../../target/companion/lib/b...
<commit_before>INPUT_DECL_PATHS = [ "../../target/device/libio/export" # "../../../pia-sdk-repo/iolib/arduino/arduiPIA.h" ] AUTOGEN_TEST = 1 if AUTOGEN_TEST == 1: INPUT_DECL_PATHS = [ "./testSuite/" ] VERSION = '0.0.1' TARGET = 'galileo' OUTPUT_COMP_PATH = '../../target/...
INPUT_DECL_PATHS = [ "../../target/device/libio/export" # "../../../pia-sdk-repo/iolib/arduino/arduiPIA.h" ] AUTOGEN_TEST = 0 if AUTOGEN_TEST == 1: INPUT_DECL_PATHS = [ "./testSuite/" ] VERSION = '0.0.1' TARGET = 'galileo' OUTPUT_COMP_PATH = '../../target/companion/lib/b...
INPUT_DECL_PATHS = [ "../../target/device/libio/export" # "../../../pia-sdk-repo/iolib/arduino/arduiPIA.h" ] AUTOGEN_TEST = 1 if AUTOGEN_TEST == 1: INPUT_DECL_PATHS = [ "./testSuite/" ] VERSION = '0.0.1' TARGET = 'galileo' OUTPUT_COMP_PATH = '../../target/companion/lib/b...
<commit_before>INPUT_DECL_PATHS = [ "../../target/device/libio/export" # "../../../pia-sdk-repo/iolib/arduino/arduiPIA.h" ] AUTOGEN_TEST = 1 if AUTOGEN_TEST == 1: INPUT_DECL_PATHS = [ "./testSuite/" ] VERSION = '0.0.1' TARGET = 'galileo' OUTPUT_COMP_PATH = '../../target/...
caf18b1cd8923e6d070d2652f9969dabba50e81b
lotteryResult.py
lotteryResult.py
#!/usr/bin/env python import sys import json import requests import hashlib def hashToNumber(txhash,total): result = long(txhash, 16) % total return result def getBlocktxs(blockhash, number, total, startnum): url = "https://blockexplorer.com/api/block/" + blockhash params = dict() resp = requests.get...
#!/usr/bin/env python import sys import json import requests def hashToNumber(txhash, total): result = long(txhash, 16) % total return result def getBlocktxs(blockhash, number, total, startnum): url = "https://blockexplorer.com/api/block/" + blockhash params = dict() resp = requests.get(url=ur...
Format code with pep8 and add timeout to requests
Format code with pep8 and add timeout to requests
Python
mit
planetcoder/readerLottery
#!/usr/bin/env python import sys import json import requests import hashlib def hashToNumber(txhash,total): result = long(txhash, 16) % total return result def getBlocktxs(blockhash, number, total, startnum): url = "https://blockexplorer.com/api/block/" + blockhash params = dict() resp = requests.get...
#!/usr/bin/env python import sys import json import requests def hashToNumber(txhash, total): result = long(txhash, 16) % total return result def getBlocktxs(blockhash, number, total, startnum): url = "https://blockexplorer.com/api/block/" + blockhash params = dict() resp = requests.get(url=ur...
<commit_before>#!/usr/bin/env python import sys import json import requests import hashlib def hashToNumber(txhash,total): result = long(txhash, 16) % total return result def getBlocktxs(blockhash, number, total, startnum): url = "https://blockexplorer.com/api/block/" + blockhash params = dict() resp...
#!/usr/bin/env python import sys import json import requests def hashToNumber(txhash, total): result = long(txhash, 16) % total return result def getBlocktxs(blockhash, number, total, startnum): url = "https://blockexplorer.com/api/block/" + blockhash params = dict() resp = requests.get(url=ur...
#!/usr/bin/env python import sys import json import requests import hashlib def hashToNumber(txhash,total): result = long(txhash, 16) % total return result def getBlocktxs(blockhash, number, total, startnum): url = "https://blockexplorer.com/api/block/" + blockhash params = dict() resp = requests.get...
<commit_before>#!/usr/bin/env python import sys import json import requests import hashlib def hashToNumber(txhash,total): result = long(txhash, 16) % total return result def getBlocktxs(blockhash, number, total, startnum): url = "https://blockexplorer.com/api/block/" + blockhash params = dict() resp...
5ec99974a6611cc5993bf56f3f0f4e299a89e29d
txircd/modules/cmd_pass.py
txircd/modules/cmd_pass.py
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user.sendMessage(ir...
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user.sendMessage(ir...
Add the function (not class) to actions as is now required
Add the function (not class) to actions as is now required
Python
bsd-3-clause
DesertBus/txircd,Heufneutje/txircd,ElementalAlchemist/txircd
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user.sendMessage(ir...
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user.sendMessage(ir...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user...
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user.sendMessage(ir...
from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user.sendMessage(ir...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command, Module class PassCommand(Command, Module): def onUse(self, user, params): if user.registered == 0: user.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if not params: user...
1dd681517fd1831f3990caa043ea8220f5d1bb90
app/app.py
app/app.py
#!/usr/bin/env python3.5 import os,time,asyncio,json from datetime import datetime from aiohttp import web import logging;logging.basicConfig(level=logging.INFO) from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from models import * from tools.con...
#!/usr/bin/env python3.5 import os,time,asyncio,json from datetime import datetime from aiohttp import web import logging;logging.basicConfig(level=logging.INFO) from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from models import * from tools.con...
Change Template() to Template.init() in init function
Change Template() to Template.init() in init function
Python
mit
free-free/pyblog,free-free/pyblog,free-free/pyblog,free-free/pyblog
#!/usr/bin/env python3.5 import os,time,asyncio,json from datetime import datetime from aiohttp import web import logging;logging.basicConfig(level=logging.INFO) from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from models import * from tools.con...
#!/usr/bin/env python3.5 import os,time,asyncio,json from datetime import datetime from aiohttp import web import logging;logging.basicConfig(level=logging.INFO) from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from models import * from tools.con...
<commit_before>#!/usr/bin/env python3.5 import os,time,asyncio,json from datetime import datetime from aiohttp import web import logging;logging.basicConfig(level=logging.INFO) from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from models import * f...
#!/usr/bin/env python3.5 import os,time,asyncio,json from datetime import datetime from aiohttp import web import logging;logging.basicConfig(level=logging.INFO) from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from models import * from tools.con...
#!/usr/bin/env python3.5 import os,time,asyncio,json from datetime import datetime from aiohttp import web import logging;logging.basicConfig(level=logging.INFO) from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from models import * from tools.con...
<commit_before>#!/usr/bin/env python3.5 import os,time,asyncio,json from datetime import datetime from aiohttp import web import logging;logging.basicConfig(level=logging.INFO) from tools.log import Log from tools.httptools import Middleware,Route from tools.template import Template from models import * f...
178474ceb7227313d039666db3c235c2ee18251e
astropy/tests/image_tests.py
astropy/tests/image_tests.py
import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-10-24T12:38:34.134556/{mpl_version}/" IMAGE_REFERENCE_DIR = (ROOT.format(server='data.astropy.org', mpl_version=MPL_VERSION[:3] + '.x') +...
import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ # The developer versions of the form 3.1.x+... contain changes that will only # be included in the 3.2.x release, so we update this here. if MPL_VERSION[:3] == '3.1' and '+' in MPL_V...
Use 3.2.x reference images for developer version of Matplotlib
Use 3.2.x reference images for developer version of Matplotlib
Python
bsd-3-clause
pllim/astropy,StuartLittlefair/astropy,mhvk/astropy,stargaser/astropy,stargaser/astropy,mhvk/astropy,mhvk/astropy,saimn/astropy,aleksandr-bakanov/astropy,astropy/astropy,lpsinger/astropy,dhomeier/astropy,aleksandr-bakanov/astropy,MSeifert04/astropy,StuartLittlefair/astropy,saimn/astropy,bsipocz/astropy,dhomeier/astropy...
import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-10-24T12:38:34.134556/{mpl_version}/" IMAGE_REFERENCE_DIR = (ROOT.format(server='data.astropy.org', mpl_version=MPL_VERSION[:3] + '.x') +...
import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ # The developer versions of the form 3.1.x+... contain changes that will only # be included in the 3.2.x release, so we update this here. if MPL_VERSION[:3] == '3.1' and '+' in MPL_V...
<commit_before>import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-10-24T12:38:34.134556/{mpl_version}/" IMAGE_REFERENCE_DIR = (ROOT.format(server='data.astropy.org', mpl_version=MPL_VERSIO...
import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ # The developer versions of the form 3.1.x+... contain changes that will only # be included in the 3.2.x release, so we update this here. if MPL_VERSION[:3] == '3.1' and '+' in MPL_V...
import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-10-24T12:38:34.134556/{mpl_version}/" IMAGE_REFERENCE_DIR = (ROOT.format(server='data.astropy.org', mpl_version=MPL_VERSION[:3] + '.x') +...
<commit_before>import matplotlib from matplotlib import pyplot as plt from astropy.utils.decorators import wraps MPL_VERSION = matplotlib.__version__ ROOT = "http://{server}/testing/astropy/2018-10-24T12:38:34.134556/{mpl_version}/" IMAGE_REFERENCE_DIR = (ROOT.format(server='data.astropy.org', mpl_version=MPL_VERSIO...
ee43ade86df9eb30455e6026671776b1e5be01e5
pyservice/common.py
pyservice/common.py
DEFAULT_CONFIG = { "protocol": "json", "timeout": 2, "strict": True } def scrub_output(context, whitelist, strict=True): r = context.get("response", None) if r is None: context["response"] = {} return if not strict: return context["response"] = {r[k] for k in whitel...
DEFAULT_CONFIG = { "protocol": "json", "timeout": 2, "strict": True } def scrub_output(context, whitelist, strict=True): r = context.get("response", None) if r is None: context["response"] = {} return if not strict: return context["response"] = {k: r[k] for k in whi...
Fix bug in scrub_output where response was creating set, not dict
Fix bug in scrub_output where response was creating set, not dict
Python
mit
numberoverzero/pyservice
DEFAULT_CONFIG = { "protocol": "json", "timeout": 2, "strict": True } def scrub_output(context, whitelist, strict=True): r = context.get("response", None) if r is None: context["response"] = {} return if not strict: return context["response"] = {r[k] for k in whitel...
DEFAULT_CONFIG = { "protocol": "json", "timeout": 2, "strict": True } def scrub_output(context, whitelist, strict=True): r = context.get("response", None) if r is None: context["response"] = {} return if not strict: return context["response"] = {k: r[k] for k in whi...
<commit_before>DEFAULT_CONFIG = { "protocol": "json", "timeout": 2, "strict": True } def scrub_output(context, whitelist, strict=True): r = context.get("response", None) if r is None: context["response"] = {} return if not strict: return context["response"] = {r[k] ...
DEFAULT_CONFIG = { "protocol": "json", "timeout": 2, "strict": True } def scrub_output(context, whitelist, strict=True): r = context.get("response", None) if r is None: context["response"] = {} return if not strict: return context["response"] = {k: r[k] for k in whi...
DEFAULT_CONFIG = { "protocol": "json", "timeout": 2, "strict": True } def scrub_output(context, whitelist, strict=True): r = context.get("response", None) if r is None: context["response"] = {} return if not strict: return context["response"] = {r[k] for k in whitel...
<commit_before>DEFAULT_CONFIG = { "protocol": "json", "timeout": 2, "strict": True } def scrub_output(context, whitelist, strict=True): r = context.get("response", None) if r is None: context["response"] = {} return if not strict: return context["response"] = {r[k] ...
41a83c6742f0e688dad5a98761c0f0415c77bac9
outgoing_mail.py
outgoing_mail.py
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <[email protected]> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = '"EventBot" <[email protected]>' def send(to, template_name, values): path = os.path.join(os.path.dirname(__file__), 'emai...
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <[email protected]> # from google.appengine.api import mail from google.appengine.ext.webapp import template from google.appengine.api import memcache from datetime import datetime import os from_address = '"EventBot" <[email protected]>' email_interval = 10 d...
Use memcache to rate-limit outgoing emails.
Use memcache to rate-limit outgoing emails.
Python
mit
eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <[email protected]> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = '"EventBot" <[email protected]>' def send(to, template_name, values): path = os.path.join(os.path.dirname(__file__), 'emai...
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <[email protected]> # from google.appengine.api import mail from google.appengine.ext.webapp import template from google.appengine.api import memcache from datetime import datetime import os from_address = '"EventBot" <[email protected]>' email_interval = 10 d...
<commit_before>#!/usr/bin/env python # # Copyright 2010 Eric Entzel <[email protected]> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = '"EventBot" <[email protected]>' def send(to, template_name, values): path = os.path.join(os.path.dirname(_...
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <[email protected]> # from google.appengine.api import mail from google.appengine.ext.webapp import template from google.appengine.api import memcache from datetime import datetime import os from_address = '"EventBot" <[email protected]>' email_interval = 10 d...
#!/usr/bin/env python # # Copyright 2010 Eric Entzel <[email protected]> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = '"EventBot" <[email protected]>' def send(to, template_name, values): path = os.path.join(os.path.dirname(__file__), 'emai...
<commit_before>#!/usr/bin/env python # # Copyright 2010 Eric Entzel <[email protected]> # from google.appengine.api import mail from google.appengine.ext.webapp import template import os from_address = '"EventBot" <[email protected]>' def send(to, template_name, values): path = os.path.join(os.path.dirname(_...
0fdda1366b3657614ee76707e617af255634d50b
moa/device/__init__.py
moa/device/__init__.py
from moa.base import MoaBase class Device(MoaBase): ''' By default, the device does not support multi-threading. ''' _activated_set = None def __init__(self, **kwargs): super(Device, self).__init__(**kwargs) self._activated_set = set() def activate(self, identifier, **kwargs): ...
from moa.base import MoaBase class Device(MoaBase): ''' By default, the device does not support multi-threading. ''' _activated_set = None def __init__(self, **kwargs): super(Device, self).__init__(**kwargs) self._activated_set = set() def activate(self, identifier, **kwargs): ...
Fix device activation remove exception.
Fix device activation remove exception.
Python
mit
matham/moa
from moa.base import MoaBase class Device(MoaBase): ''' By default, the device does not support multi-threading. ''' _activated_set = None def __init__(self, **kwargs): super(Device, self).__init__(**kwargs) self._activated_set = set() def activate(self, identifier, **kwargs): ...
from moa.base import MoaBase class Device(MoaBase): ''' By default, the device does not support multi-threading. ''' _activated_set = None def __init__(self, **kwargs): super(Device, self).__init__(**kwargs) self._activated_set = set() def activate(self, identifier, **kwargs): ...
<commit_before> from moa.base import MoaBase class Device(MoaBase): ''' By default, the device does not support multi-threading. ''' _activated_set = None def __init__(self, **kwargs): super(Device, self).__init__(**kwargs) self._activated_set = set() def activate(self, identifi...
from moa.base import MoaBase class Device(MoaBase): ''' By default, the device does not support multi-threading. ''' _activated_set = None def __init__(self, **kwargs): super(Device, self).__init__(**kwargs) self._activated_set = set() def activate(self, identifier, **kwargs): ...
from moa.base import MoaBase class Device(MoaBase): ''' By default, the device does not support multi-threading. ''' _activated_set = None def __init__(self, **kwargs): super(Device, self).__init__(**kwargs) self._activated_set = set() def activate(self, identifier, **kwargs): ...
<commit_before> from moa.base import MoaBase class Device(MoaBase): ''' By default, the device does not support multi-threading. ''' _activated_set = None def __init__(self, **kwargs): super(Device, self).__init__(**kwargs) self._activated_set = set() def activate(self, identifi...
cf7b2bb0569431e97cc316dc41924c78806af5a9
drivers/vnfm/gvnfm/gvnfmadapter/driver/pub/config/config.py
drivers/vnfm/gvnfm/gvnfmadapter/driver/pub/config/config.py
# Copyright 2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
Add code framework of gvnfm-driver
Add code framework of gvnfm-driver Change-Id: Ibb0dd98a73860f538599328b718040df5f3f7007 Issue-Id: NFVO-132 Signed-off-by: fujinhua <[email protected]>
Python
apache-2.0
open-o/nfvo,open-o/nfvo,open-o/nfvo,open-o/nfvo,open-o/nfvo
# Copyright 2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
<commit_before># Copyright 2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Copyright 2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
<commit_before># Copyright 2017 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
c4c71dd65675f904c34a0d86a80d5abe7bafdbb1
txircd/modules/cmd_user.py
txircd/modules/cmd_user.py
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user.sendMessage(ir...
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def processParams(self, u...
Update the USER command to take advantage of core capabilities as well
Update the USER command to take advantage of core capabilities as well
Python
bsd-3-clause
ElementalAlchemist/txircd,Heufneutje/txircd,DesertBus/txircd
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user.sendMessage(ir...
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def processParams(self, u...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user...
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def processParams(self, u...
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user.sendMessage(ir...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user...
2a980eee73fb79b191126c9ec1c41963dcaf1d9c
aim/db/migration/alembic_migrations/versions/f0c056954eee_sg_rule_remote_group_id.py
aim/db/migration/alembic_migrations/versions/f0c056954eee_sg_rule_remote_group_id.py
# Copyright 2017 Cisco, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
# Copyright 2020 Cisco, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
Fix date in DB migration
Fix date in DB migration
Python
apache-2.0
noironetworks/aci-integration-module,noironetworks/aci-integration-module
# Copyright 2017 Cisco, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
# Copyright 2020 Cisco, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
<commit_before># Copyright 2017 Cisco, Inc. # # 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 applicabl...
# Copyright 2020 Cisco, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
# Copyright 2017 Cisco, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
<commit_before># Copyright 2017 Cisco, Inc. # # 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 applicabl...
42062493738a166ddc029d111024b17ffa5cda5f
dataviva/apps/scholar/upload_file.py
dataviva/apps/scholar/upload_file.py
class uploadfile(): def __init__(self, name, type=None, size=None, not_allowed_msg=''): self.name = name self.type = type self.size = size self.not_allowed_msg = not_allowed_msg self.url = "data/%s" % name self.delete_url = "delete/%s" % name self.delete_type...
class UploadFile(): def __init__(self, name, type=None, size=None, not_allowed_msg=''): self.name = name self.type = type self.size = size self.not_allowed_msg = not_allowed_msg self.url = "data/%s" % name self.delete_url = "delete/%s" % name self.delete_type...
Update class name to camelcase pattern.
Update class name to camelcase pattern.
Python
mit
DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site
class uploadfile(): def __init__(self, name, type=None, size=None, not_allowed_msg=''): self.name = name self.type = type self.size = size self.not_allowed_msg = not_allowed_msg self.url = "data/%s" % name self.delete_url = "delete/%s" % name self.delete_type...
class UploadFile(): def __init__(self, name, type=None, size=None, not_allowed_msg=''): self.name = name self.type = type self.size = size self.not_allowed_msg = not_allowed_msg self.url = "data/%s" % name self.delete_url = "delete/%s" % name self.delete_type...
<commit_before>class uploadfile(): def __init__(self, name, type=None, size=None, not_allowed_msg=''): self.name = name self.type = type self.size = size self.not_allowed_msg = not_allowed_msg self.url = "data/%s" % name self.delete_url = "delete/%s" % name s...
class UploadFile(): def __init__(self, name, type=None, size=None, not_allowed_msg=''): self.name = name self.type = type self.size = size self.not_allowed_msg = not_allowed_msg self.url = "data/%s" % name self.delete_url = "delete/%s" % name self.delete_type...
class uploadfile(): def __init__(self, name, type=None, size=None, not_allowed_msg=''): self.name = name self.type = type self.size = size self.not_allowed_msg = not_allowed_msg self.url = "data/%s" % name self.delete_url = "delete/%s" % name self.delete_type...
<commit_before>class uploadfile(): def __init__(self, name, type=None, size=None, not_allowed_msg=''): self.name = name self.type = type self.size = size self.not_allowed_msg = not_allowed_msg self.url = "data/%s" % name self.delete_url = "delete/%s" % name s...
2c082afb4024cafb530ffab6a62cc6602e75e092
stock_request_picking_type/models/stock_request_order.py
stock_request_picking_type/models/stock_request_order.py
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
Synchronize Picking Type and Warehouse
[IMP] Synchronize Picking Type and Warehouse [IMP] User write()
Python
agpl-3.0
Vauxoo/stock-logistics-warehouse,Vauxoo/stock-logistics-warehouse,Vauxoo/stock-logistics-warehouse
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
<commit_before># Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.e...
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
# Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picki...
<commit_before># Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from odoo import api, fields, models class StockRequestOrder(models.Model): _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.e...
be0a078aa004470a450dddfa5a8e770b2e0ad97c
disk/datadog_checks/disk/__init__.py
disk/datadog_checks/disk/__init__.py
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ from .disk import Disk all = [ '__version__', 'Disk' ]
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ # NOQA F401 from .disk import Disk # NOQA F401 all = [ '__version__', 'Disk' ]
Fix flake8 issues and ignore unused
[Disk] Fix flake8 issues and ignore unused
Python
bsd-3-clause
DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core,DataDog/integrations-core
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ from .disk import Disk all = [ '__version__', 'Disk' ] [Disk] Fix flake8 issues and ignore unused
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ # NOQA F401 from .disk import Disk # NOQA F401 all = [ '__version__', 'Disk' ]
<commit_before># (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ from .disk import Disk all = [ '__version__', 'Disk' ] <commit_msg>[Disk] Fix flake8 issues and ignore unused<commit_after>
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ # NOQA F401 from .disk import Disk # NOQA F401 all = [ '__version__', 'Disk' ]
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ from .disk import Disk all = [ '__version__', 'Disk' ] [Disk] Fix flake8 issues and ignore unused# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD...
<commit_before># (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ from .disk import Disk all = [ '__version__', 'Disk' ] <commit_msg>[Disk] Fix flake8 issues and ignore unused<commit_after># (C) Datadog, Inc. 2018 # All rights...
a4f41648cd0318694d551b067309539df475c2d7
tests/test_function_calls.py
tests/test_function_calls.py
from thinglang.runner import run def test_function_calls(): assert run(""" thing Program does start number n = 1 number m = 2 Output.write("before n=", n, " m=", m) self.say_hello() Output.write("after n=", n, " m=", m) does say_hello number n = 3 O...
from thinglang.runner import run def test_zero_arg_function_calls(): assert run(""" thing Program does start number n = 1 number m = 2 Output.write("before n=", n, " m=", m) self.say_hello() Output.write("after n=", n, " m=", m) does say_hello number n = 3 ...
Test for method argument calls
Test for method argument calls
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
from thinglang.runner import run def test_function_calls(): assert run(""" thing Program does start number n = 1 number m = 2 Output.write("before n=", n, " m=", m) self.say_hello() Output.write("after n=", n, " m=", m) does say_hello number n = 3 O...
from thinglang.runner import run def test_zero_arg_function_calls(): assert run(""" thing Program does start number n = 1 number m = 2 Output.write("before n=", n, " m=", m) self.say_hello() Output.write("after n=", n, " m=", m) does say_hello number n = 3 ...
<commit_before>from thinglang.runner import run def test_function_calls(): assert run(""" thing Program does start number n = 1 number m = 2 Output.write("before n=", n, " m=", m) self.say_hello() Output.write("after n=", n, " m=", m) does say_hello number ...
from thinglang.runner import run def test_zero_arg_function_calls(): assert run(""" thing Program does start number n = 1 number m = 2 Output.write("before n=", n, " m=", m) self.say_hello() Output.write("after n=", n, " m=", m) does say_hello number n = 3 ...
from thinglang.runner import run def test_function_calls(): assert run(""" thing Program does start number n = 1 number m = 2 Output.write("before n=", n, " m=", m) self.say_hello() Output.write("after n=", n, " m=", m) does say_hello number n = 3 O...
<commit_before>from thinglang.runner import run def test_function_calls(): assert run(""" thing Program does start number n = 1 number m = 2 Output.write("before n=", n, " m=", m) self.say_hello() Output.write("after n=", n, " m=", m) does say_hello number ...
ebbc68da19755097b2131d60bc9757ecb4dc6d4c
bundles/auth/models/token.py
bundles/auth/models/token.py
import hashlib import random import string from ext.aboard.model import * def set_value(token): """Randomly create and return a value.""" value = str(token.user) + "_" + str(token.timestamp) len_rand = random.randint(20, 40) to_pick = string.digits + string.ascii_letters + \ "_-+^$" fo...
import hashlib import random import string from ext.aboard.model import * class Token(Model): """A token model.""" id = None user = Integer() timestamp = Integer() value = String(pkey=True) def __init__(self, user=None, timestamp=None): value = None if user and t...
Use the Model constructor to generate a default value
[user] Use the Model constructor to generate a default value
Python
bsd-3-clause
v-legoff/pa-poc2,v-legoff/pa-poc2
import hashlib import random import string from ext.aboard.model import * def set_value(token): """Randomly create and return a value.""" value = str(token.user) + "_" + str(token.timestamp) len_rand = random.randint(20, 40) to_pick = string.digits + string.ascii_letters + \ "_-+^$" fo...
import hashlib import random import string from ext.aboard.model import * class Token(Model): """A token model.""" id = None user = Integer() timestamp = Integer() value = String(pkey=True) def __init__(self, user=None, timestamp=None): value = None if user and t...
<commit_before>import hashlib import random import string from ext.aboard.model import * def set_value(token): """Randomly create and return a value.""" value = str(token.user) + "_" + str(token.timestamp) len_rand = random.randint(20, 40) to_pick = string.digits + string.ascii_letters + \ ...
import hashlib import random import string from ext.aboard.model import * class Token(Model): """A token model.""" id = None user = Integer() timestamp = Integer() value = String(pkey=True) def __init__(self, user=None, timestamp=None): value = None if user and t...
import hashlib import random import string from ext.aboard.model import * def set_value(token): """Randomly create and return a value.""" value = str(token.user) + "_" + str(token.timestamp) len_rand = random.randint(20, 40) to_pick = string.digits + string.ascii_letters + \ "_-+^$" fo...
<commit_before>import hashlib import random import string from ext.aboard.model import * def set_value(token): """Randomly create and return a value.""" value = str(token.user) + "_" + str(token.timestamp) len_rand = random.randint(20, 40) to_pick = string.digits + string.ascii_letters + \ ...
1b40a51e371d10cc37f4d8f8c7557dbc741d690f
butterfly/ImageLayer/HDF5.py
butterfly/ImageLayer/HDF5.py
from Datasource import Datasource import numpy as np import h5py class HDF5(Datasource): pass @classmethod def load_tile(ds, query): Sk,Sj,Si = query.all_scales path = query.OUTPUT.INFO.PATH.VALUE (K0,J0,I0),(K1,J1,I1) = query.source_bounds with h5py.File(path) as fd: ...
from Datasource import Datasource import numpy as np import h5py class HDF5(Datasource): pass @classmethod def load_tile(ds, query): Sk,Sj,Si = query.all_scales path = query.OUTPUT.INFO.PATH.VALUE z0,y0,x0 = query.index_zyx*query.blocksize z1,y1,x1 = query.index_zyx*query.bl...
Fix loading a whole tile into memory.
Fix loading a whole tile into memory.
Python
mit
Rhoana/butterfly,Rhoana/butterfly,Rhoana/butterfly2,Rhoana/butterfly,Rhoana/butterfly
from Datasource import Datasource import numpy as np import h5py class HDF5(Datasource): pass @classmethod def load_tile(ds, query): Sk,Sj,Si = query.all_scales path = query.OUTPUT.INFO.PATH.VALUE (K0,J0,I0),(K1,J1,I1) = query.source_bounds with h5py.File(path) as fd: ...
from Datasource import Datasource import numpy as np import h5py class HDF5(Datasource): pass @classmethod def load_tile(ds, query): Sk,Sj,Si = query.all_scales path = query.OUTPUT.INFO.PATH.VALUE z0,y0,x0 = query.index_zyx*query.blocksize z1,y1,x1 = query.index_zyx*query.bl...
<commit_before>from Datasource import Datasource import numpy as np import h5py class HDF5(Datasource): pass @classmethod def load_tile(ds, query): Sk,Sj,Si = query.all_scales path = query.OUTPUT.INFO.PATH.VALUE (K0,J0,I0),(K1,J1,I1) = query.source_bounds with h5py.File(pat...
from Datasource import Datasource import numpy as np import h5py class HDF5(Datasource): pass @classmethod def load_tile(ds, query): Sk,Sj,Si = query.all_scales path = query.OUTPUT.INFO.PATH.VALUE z0,y0,x0 = query.index_zyx*query.blocksize z1,y1,x1 = query.index_zyx*query.bl...
from Datasource import Datasource import numpy as np import h5py class HDF5(Datasource): pass @classmethod def load_tile(ds, query): Sk,Sj,Si = query.all_scales path = query.OUTPUT.INFO.PATH.VALUE (K0,J0,I0),(K1,J1,I1) = query.source_bounds with h5py.File(path) as fd: ...
<commit_before>from Datasource import Datasource import numpy as np import h5py class HDF5(Datasource): pass @classmethod def load_tile(ds, query): Sk,Sj,Si = query.all_scales path = query.OUTPUT.INFO.PATH.VALUE (K0,J0,I0),(K1,J1,I1) = query.source_bounds with h5py.File(pat...
78c5580d349d6bec0715a36c13437177a726f7ad
tests/test_isim.py
tests/test_isim.py
import pytest def test_isim(): import os import shutil import tempfile import yaml from fusesoc.edatools import get_edatool from edalize_common import compare_files, files, param_gen, tests_dir, vpi (parameters, args) = param_gen(['plusarg', 'vlogdefine', 'vlogparam']) work_root = tem...
import pytest def test_isim(): import os import shutil from edalize_common import compare_files, setup_backend, tests_dir ref_dir = os.path.join(tests_dir, __name__) paramtypes = ['plusarg', 'vlogdefine', 'vlogparam'] name = 'test_isim_0' tool = 'isim' tool_optio...
Reduce code duplication in isim test
Reduce code duplication in isim test
Python
bsd-2-clause
olofk/fusesoc,olofk/fusesoc,lowRISC/fusesoc,lowRISC/fusesoc
import pytest def test_isim(): import os import shutil import tempfile import yaml from fusesoc.edatools import get_edatool from edalize_common import compare_files, files, param_gen, tests_dir, vpi (parameters, args) = param_gen(['plusarg', 'vlogdefine', 'vlogparam']) work_root = tem...
import pytest def test_isim(): import os import shutil from edalize_common import compare_files, setup_backend, tests_dir ref_dir = os.path.join(tests_dir, __name__) paramtypes = ['plusarg', 'vlogdefine', 'vlogparam'] name = 'test_isim_0' tool = 'isim' tool_optio...
<commit_before>import pytest def test_isim(): import os import shutil import tempfile import yaml from fusesoc.edatools import get_edatool from edalize_common import compare_files, files, param_gen, tests_dir, vpi (parameters, args) = param_gen(['plusarg', 'vlogdefine', 'vlogparam']) ...
import pytest def test_isim(): import os import shutil from edalize_common import compare_files, setup_backend, tests_dir ref_dir = os.path.join(tests_dir, __name__) paramtypes = ['plusarg', 'vlogdefine', 'vlogparam'] name = 'test_isim_0' tool = 'isim' tool_optio...
import pytest def test_isim(): import os import shutil import tempfile import yaml from fusesoc.edatools import get_edatool from edalize_common import compare_files, files, param_gen, tests_dir, vpi (parameters, args) = param_gen(['plusarg', 'vlogdefine', 'vlogparam']) work_root = tem...
<commit_before>import pytest def test_isim(): import os import shutil import tempfile import yaml from fusesoc.edatools import get_edatool from edalize_common import compare_files, files, param_gen, tests_dir, vpi (parameters, args) = param_gen(['plusarg', 'vlogdefine', 'vlogparam']) ...
1e60c603321729c71895ac5dc19adc669cce4a72
tests/udev_test.py
tests/udev_test.py
#!/usr/bin/python import unittest import mock class UdevTest(unittest.TestCase): def setUp(self): import blivet.udev blivet.udev.os = mock.Mock() blivet.udev.log = mock.Mock() def test_udev_get_device(self): import blivet.udev devices = blivet.udev.global_udev.list_de...
#!/usr/bin/python import unittest import mock class UdevTest(unittest.TestCase): def setUp(self): import blivet.udev self._blivet_os = blivet.udev.os self._blivet_log = blivet.udev.log self._blivet_util = blivet.udev.util blivet.udev.os = mock.Mock() blivet.udev.lo...
Clean up mocking done by udev tests when finished.
Clean up mocking done by udev tests when finished.
Python
lgpl-2.1
dwlehman/blivet,rvykydal/blivet,AdamWill/blivet,rhinstaller/blivet,vpodzime/blivet,AdamWill/blivet,vojtechtrefny/blivet,vojtechtrefny/blivet,vpodzime/blivet,rvykydal/blivet,rhinstaller/blivet,dwlehman/blivet,jkonecny12/blivet,jkonecny12/blivet
#!/usr/bin/python import unittest import mock class UdevTest(unittest.TestCase): def setUp(self): import blivet.udev blivet.udev.os = mock.Mock() blivet.udev.log = mock.Mock() def test_udev_get_device(self): import blivet.udev devices = blivet.udev.global_udev.list_de...
#!/usr/bin/python import unittest import mock class UdevTest(unittest.TestCase): def setUp(self): import blivet.udev self._blivet_os = blivet.udev.os self._blivet_log = blivet.udev.log self._blivet_util = blivet.udev.util blivet.udev.os = mock.Mock() blivet.udev.lo...
<commit_before>#!/usr/bin/python import unittest import mock class UdevTest(unittest.TestCase): def setUp(self): import blivet.udev blivet.udev.os = mock.Mock() blivet.udev.log = mock.Mock() def test_udev_get_device(self): import blivet.udev devices = blivet.udev.glob...
#!/usr/bin/python import unittest import mock class UdevTest(unittest.TestCase): def setUp(self): import blivet.udev self._blivet_os = blivet.udev.os self._blivet_log = blivet.udev.log self._blivet_util = blivet.udev.util blivet.udev.os = mock.Mock() blivet.udev.lo...
#!/usr/bin/python import unittest import mock class UdevTest(unittest.TestCase): def setUp(self): import blivet.udev blivet.udev.os = mock.Mock() blivet.udev.log = mock.Mock() def test_udev_get_device(self): import blivet.udev devices = blivet.udev.global_udev.list_de...
<commit_before>#!/usr/bin/python import unittest import mock class UdevTest(unittest.TestCase): def setUp(self): import blivet.udev blivet.udev.os = mock.Mock() blivet.udev.log = mock.Mock() def test_udev_get_device(self): import blivet.udev devices = blivet.udev.glob...
c3029a3796437add90cdd6c0033be70fe5766a3a
mapit/middleware/__init__.py
mapit/middleware/__init__.py
import re from .view_error import * class JSONPMiddleware(object): def process_response(self, request, response): # If the response is a redirect, the callback will be dealt # on the next request: if response.status_code == 302: return response else: if requ...
import re from .view_error import * class JSONPMiddleware(object): def process_response(self, request, response): # If the response is a redirect, the callback will be dealt # on the next request: if response.status_code == 302: return response else: cb = re...
Include typeof check in JSONP callback response.
Include typeof check in JSONP callback response. This is more robust, and helps against attacks such as Rosetta Flash: https://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
Python
agpl-3.0
opencorato/mapit,chris48s/mapit,opencorato/mapit,Code4SA/mapit,Code4SA/mapit,opencorato/mapit,Code4SA/mapit,chris48s/mapit,chris48s/mapit
import re from .view_error import * class JSONPMiddleware(object): def process_response(self, request, response): # If the response is a redirect, the callback will be dealt # on the next request: if response.status_code == 302: return response else: if requ...
import re from .view_error import * class JSONPMiddleware(object): def process_response(self, request, response): # If the response is a redirect, the callback will be dealt # on the next request: if response.status_code == 302: return response else: cb = re...
<commit_before>import re from .view_error import * class JSONPMiddleware(object): def process_response(self, request, response): # If the response is a redirect, the callback will be dealt # on the next request: if response.status_code == 302: return response else: ...
import re from .view_error import * class JSONPMiddleware(object): def process_response(self, request, response): # If the response is a redirect, the callback will be dealt # on the next request: if response.status_code == 302: return response else: cb = re...
import re from .view_error import * class JSONPMiddleware(object): def process_response(self, request, response): # If the response is a redirect, the callback will be dealt # on the next request: if response.status_code == 302: return response else: if requ...
<commit_before>import re from .view_error import * class JSONPMiddleware(object): def process_response(self, request, response): # If the response is a redirect, the callback will be dealt # on the next request: if response.status_code == 302: return response else: ...
9c2075f13e2aa8ff7a5c4644208e8de17ebefbab
finding-geodesic-basins-with-scipy.py
finding-geodesic-basins-with-scipy.py
# IPython log file import numpy as np from scipy import sparse from skimage import graph from skimage.graph import _mcp image = np.array([[1, 1, 2, 2], [2, 1, 1, 3], [3, 2, 1, 2], [2, 2, 2, 1]]) mcp = graph.MCP_Geometric(image) destinations = [[0, 0], [3, 3]] costs, traceback = mcp.find_costs(destinations) offsets = ...
# IPython log file # See https://stackoverflow.com/questions/62135639/mcp-geometrics-for-calculating-marketsheds/62144556 import numpy as np from scipy import sparse from skimage import graph from skimage.graph import _mcp image = np.array([[1, 1, 2, 2], [2, 1, 1, 3], [3, 2, 1, 2], [2, 2, 2, 1]]) mcp = graph.MCP_Geom...
Add link to SO question
Add link to SO question
Python
bsd-3-clause
jni/useful-histories
# IPython log file import numpy as np from scipy import sparse from skimage import graph from skimage.graph import _mcp image = np.array([[1, 1, 2, 2], [2, 1, 1, 3], [3, 2, 1, 2], [2, 2, 2, 1]]) mcp = graph.MCP_Geometric(image) destinations = [[0, 0], [3, 3]] costs, traceback = mcp.find_costs(destinations) offsets = ...
# IPython log file # See https://stackoverflow.com/questions/62135639/mcp-geometrics-for-calculating-marketsheds/62144556 import numpy as np from scipy import sparse from skimage import graph from skimage.graph import _mcp image = np.array([[1, 1, 2, 2], [2, 1, 1, 3], [3, 2, 1, 2], [2, 2, 2, 1]]) mcp = graph.MCP_Geom...
<commit_before># IPython log file import numpy as np from scipy import sparse from skimage import graph from skimage.graph import _mcp image = np.array([[1, 1, 2, 2], [2, 1, 1, 3], [3, 2, 1, 2], [2, 2, 2, 1]]) mcp = graph.MCP_Geometric(image) destinations = [[0, 0], [3, 3]] costs, traceback = mcp.find_costs(destinati...
# IPython log file # See https://stackoverflow.com/questions/62135639/mcp-geometrics-for-calculating-marketsheds/62144556 import numpy as np from scipy import sparse from skimage import graph from skimage.graph import _mcp image = np.array([[1, 1, 2, 2], [2, 1, 1, 3], [3, 2, 1, 2], [2, 2, 2, 1]]) mcp = graph.MCP_Geom...
# IPython log file import numpy as np from scipy import sparse from skimage import graph from skimage.graph import _mcp image = np.array([[1, 1, 2, 2], [2, 1, 1, 3], [3, 2, 1, 2], [2, 2, 2, 1]]) mcp = graph.MCP_Geometric(image) destinations = [[0, 0], [3, 3]] costs, traceback = mcp.find_costs(destinations) offsets = ...
<commit_before># IPython log file import numpy as np from scipy import sparse from skimage import graph from skimage.graph import _mcp image = np.array([[1, 1, 2, 2], [2, 1, 1, 3], [3, 2, 1, 2], [2, 2, 2, 1]]) mcp = graph.MCP_Geometric(image) destinations = [[0, 0], [3, 3]] costs, traceback = mcp.find_costs(destinati...
897b637ca9de93b7107cd6d6ab76ed0cb485aba9
classifiers/ppmc.py
classifiers/ppmc.py
__author__ = 'sharvey' from classifiers import Classifier from corpus.mysql.reddit import RedditMySQLCorpus from ppm import Trie class RedditPPM(Classifier): corpus = None trie = None user = None reddit = None order = 5 def __init__(self, corpus): self.corpus = corpus def train(...
__author__ = 'sharvey' from classifiers import Classifier from corpus.mysql.reddit import RedditMySQLCorpus from ppm import Trie class RedditPPM(Classifier): corpus = None trie = None user = None reddit = None order = 5 def __init__(self, corpus): self.corpus = corpus def train(...
Add field for test result return
Add field for test result return
Python
mit
worldwise001/stylometry
__author__ = 'sharvey' from classifiers import Classifier from corpus.mysql.reddit import RedditMySQLCorpus from ppm import Trie class RedditPPM(Classifier): corpus = None trie = None user = None reddit = None order = 5 def __init__(self, corpus): self.corpus = corpus def train(...
__author__ = 'sharvey' from classifiers import Classifier from corpus.mysql.reddit import RedditMySQLCorpus from ppm import Trie class RedditPPM(Classifier): corpus = None trie = None user = None reddit = None order = 5 def __init__(self, corpus): self.corpus = corpus def train(...
<commit_before>__author__ = 'sharvey' from classifiers import Classifier from corpus.mysql.reddit import RedditMySQLCorpus from ppm import Trie class RedditPPM(Classifier): corpus = None trie = None user = None reddit = None order = 5 def __init__(self, corpus): self.corpus = corpus ...
__author__ = 'sharvey' from classifiers import Classifier from corpus.mysql.reddit import RedditMySQLCorpus from ppm import Trie class RedditPPM(Classifier): corpus = None trie = None user = None reddit = None order = 5 def __init__(self, corpus): self.corpus = corpus def train(...
__author__ = 'sharvey' from classifiers import Classifier from corpus.mysql.reddit import RedditMySQLCorpus from ppm import Trie class RedditPPM(Classifier): corpus = None trie = None user = None reddit = None order = 5 def __init__(self, corpus): self.corpus = corpus def train(...
<commit_before>__author__ = 'sharvey' from classifiers import Classifier from corpus.mysql.reddit import RedditMySQLCorpus from ppm import Trie class RedditPPM(Classifier): corpus = None trie = None user = None reddit = None order = 5 def __init__(self, corpus): self.corpus = corpus ...
10be9375fb201d7a271babb81ac25c22c70f219b
template.py
template.py
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010, Luis Pedro Coelho <[email protected]> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software witho...
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010, Luis Pedro Coelho <[email protected]> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software withou...
Remove spaces at the end of lines.
Remove spaces at the end of lines.
Python
mit
luispedro/waldo,luispedro/waldo
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010, Luis Pedro Coelho <[email protected]> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software witho...
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010, Luis Pedro Coelho <[email protected]> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software withou...
<commit_before># -*- coding: utf-8 -*- # Copyright (C) 2009-2010, Luis Pedro Coelho <[email protected]> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the...
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010, Luis Pedro Coelho <[email protected]> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software withou...
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010, Luis Pedro Coelho <[email protected]> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software witho...
<commit_before># -*- coding: utf-8 -*- # Copyright (C) 2009-2010, Luis Pedro Coelho <[email protected]> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the...
19634d62f5a9b2c1aa9f867c247f46ed7f19ac07
openstack_dashboard/views.py
openstack_dashboard/views.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # 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 # # ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # 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 # # ...
Fix issues with importing the Login form
Fix issues with importing the Login form The Login form lives in openstack_auth.forms and should be directly imported from that file. Change-Id: I42808530024bebb01604adbf4828769812856bf3 Closes-Bug: #1332149 (cherry picked from commit 345ccc9d503e6e55fe46d7813958c0081cc1cffe)
Python
apache-2.0
rickerc/horizon_audit,rickerc/horizon_audit,rickerc/horizon_audit
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # 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 # # ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # 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 # # ...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # 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/L...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # 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 # # ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # 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 # # ...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # 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/L...
552caa1d1fefcc48107eae02091aaca4a39123b4
src/zeit/content/cp/field.py
src/zeit/content/cp/field.py
import zc.form.field import zope.schema.interfaces class DynamicCombination(zc.form.field.Combination): def __init__(self, type_field, type_interface, **kw): self.type_field = type_field self.type_field.__name__ = "combination_00" self.fields = (type_field,) self.type_interface = ...
import zc.form.field import zc.form.interfaces import zope.schema.interfaces class DynamicCombination(zc.form.field.Combination): def __init__(self, type_field, type_interface, **kw): self.type_field = type_field self.type_field.__name__ = "combination_00" self.fields = (type_field,) ...
Support sequences with value_type other than combination
TMS-227: Support sequences with value_type other than combination
Python
bsd-3-clause
ZeitOnline/zeit.content.cp,ZeitOnline/zeit.content.cp
import zc.form.field import zope.schema.interfaces class DynamicCombination(zc.form.field.Combination): def __init__(self, type_field, type_interface, **kw): self.type_field = type_field self.type_field.__name__ = "combination_00" self.fields = (type_field,) self.type_interface = ...
import zc.form.field import zc.form.interfaces import zope.schema.interfaces class DynamicCombination(zc.form.field.Combination): def __init__(self, type_field, type_interface, **kw): self.type_field = type_field self.type_field.__name__ = "combination_00" self.fields = (type_field,) ...
<commit_before>import zc.form.field import zope.schema.interfaces class DynamicCombination(zc.form.field.Combination): def __init__(self, type_field, type_interface, **kw): self.type_field = type_field self.type_field.__name__ = "combination_00" self.fields = (type_field,) self.ty...
import zc.form.field import zc.form.interfaces import zope.schema.interfaces class DynamicCombination(zc.form.field.Combination): def __init__(self, type_field, type_interface, **kw): self.type_field = type_field self.type_field.__name__ = "combination_00" self.fields = (type_field,) ...
import zc.form.field import zope.schema.interfaces class DynamicCombination(zc.form.field.Combination): def __init__(self, type_field, type_interface, **kw): self.type_field = type_field self.type_field.__name__ = "combination_00" self.fields = (type_field,) self.type_interface = ...
<commit_before>import zc.form.field import zope.schema.interfaces class DynamicCombination(zc.form.field.Combination): def __init__(self, type_field, type_interface, **kw): self.type_field = type_field self.type_field.__name__ = "combination_00" self.fields = (type_field,) self.ty...
0b4097394fd05da204624d1c6093176feb158bb1
ajaxuploader/backends/thumbnail.py
ajaxuploader/backends/thumbnail.py
import os from sorl.thumbnail import get_thumbnail from ajaxuploader.backends.local import LocalUploadBackend class ThumbnailUploadBackend(LocalUploadBackend): def __init__(self, dimension): self._dimension = dimension def upload_complete(self, request, filename): thumbnail = get_thumbna...
import os from django.conf import settings from sorl.thumbnail import get_thumbnail from ajaxuploader.backends.local import LocalUploadBackend class ThumbnailUploadBackend(LocalUploadBackend): DIMENSION = "100x100" def upload_complete(self, request, filename): thumbnail = get_thumbnail(self._path, s...
Use dimension as a constant, so we keep same interface for all backends; also returns full path to the place where image was saved
Use dimension as a constant, so we keep same interface for all backends; also returns full path to the place where image was saved
Python
bsd-3-clause
OnlyInAmerica/django-ajax-uploader,derek-adair/django-ajax-uploader,derek-adair/django-ajax-uploader,skoczen/django-ajax-uploader,brilliant-org/django-ajax-uploader,derek-adair/django-ajax-uploader,brilliant-org/django-ajax-uploader,skoczen/django-ajax-uploader,OnlyInAmerica/django-ajax-uploader,brilliant-org/django-aj...
import os from sorl.thumbnail import get_thumbnail from ajaxuploader.backends.local import LocalUploadBackend class ThumbnailUploadBackend(LocalUploadBackend): def __init__(self, dimension): self._dimension = dimension def upload_complete(self, request, filename): thumbnail = get_thumbna...
import os from django.conf import settings from sorl.thumbnail import get_thumbnail from ajaxuploader.backends.local import LocalUploadBackend class ThumbnailUploadBackend(LocalUploadBackend): DIMENSION = "100x100" def upload_complete(self, request, filename): thumbnail = get_thumbnail(self._path, s...
<commit_before>import os from sorl.thumbnail import get_thumbnail from ajaxuploader.backends.local import LocalUploadBackend class ThumbnailUploadBackend(LocalUploadBackend): def __init__(self, dimension): self._dimension = dimension def upload_complete(self, request, filename): thumbnai...
import os from django.conf import settings from sorl.thumbnail import get_thumbnail from ajaxuploader.backends.local import LocalUploadBackend class ThumbnailUploadBackend(LocalUploadBackend): DIMENSION = "100x100" def upload_complete(self, request, filename): thumbnail = get_thumbnail(self._path, s...
import os from sorl.thumbnail import get_thumbnail from ajaxuploader.backends.local import LocalUploadBackend class ThumbnailUploadBackend(LocalUploadBackend): def __init__(self, dimension): self._dimension = dimension def upload_complete(self, request, filename): thumbnail = get_thumbna...
<commit_before>import os from sorl.thumbnail import get_thumbnail from ajaxuploader.backends.local import LocalUploadBackend class ThumbnailUploadBackend(LocalUploadBackend): def __init__(self, dimension): self._dimension = dimension def upload_complete(self, request, filename): thumbnai...
a3c4f151a9a44aae3528492d4a00a1815c52cda6
website_membership_contact_visibility/models/res_partner.py
website_membership_contact_visibility/models/res_partner.py
# -*- coding: utf-8 -*- # © 2016 Michael Viriyananda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agp from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' website_membership_published = fields.Boolean( string='Visible In The Website', copy=F...
# -*- coding: utf-8 -*- # © 2016 Michael Viriyananda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agp from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' website_membership_published = fields.Boolean( string='Visible Contact Info On The Website', ...
Change the label of "website_membership_published" into "Visible Contact Info On The Website"
Change the label of "website_membership_published" into "Visible Contact Info On The Website"
Python
agpl-3.0
open-synergy/vertical-association
# -*- coding: utf-8 -*- # © 2016 Michael Viriyananda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agp from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' website_membership_published = fields.Boolean( string='Visible In The Website', copy=F...
# -*- coding: utf-8 -*- # © 2016 Michael Viriyananda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agp from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' website_membership_published = fields.Boolean( string='Visible Contact Info On The Website', ...
<commit_before># -*- coding: utf-8 -*- # © 2016 Michael Viriyananda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agp from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' website_membership_published = fields.Boolean( string='Visible In The Website',...
# -*- coding: utf-8 -*- # © 2016 Michael Viriyananda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agp from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' website_membership_published = fields.Boolean( string='Visible Contact Info On The Website', ...
# -*- coding: utf-8 -*- # © 2016 Michael Viriyananda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agp from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' website_membership_published = fields.Boolean( string='Visible In The Website', copy=F...
<commit_before># -*- coding: utf-8 -*- # © 2016 Michael Viriyananda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agp from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' website_membership_published = fields.Boolean( string='Visible In The Website',...
477faabee7fc674f8ce0c04663b9eff3943e83fa
trac/versioncontrol/web_ui/__init__.py
trac/versioncontrol/web_ui/__init__.py
from trac.versioncontrol.web_ui.browser import * from trac.versioncontrol.web_ui.changeset import * from trac.versioncontrol.web_ui.log import *
from trac.versioncontrol.web_ui.browser import * from trac.versioncontrol.web_ui.changeset import * from trac.versioncontrol.web_ui.log import *
Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file)
Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file) git-svn-id: f68c6b3b1dcd5d00a2560c384475aaef3bc99487@2214 af82e41b-90c4-0310-8c96-b1721e28e2e2
Python
bsd-3-clause
moreati/trac-gitsvn,exocad/exotrac,dokipen/trac,dafrito/trac-mirror,exocad/exotrac,dokipen/trac,exocad/exotrac,dafrito/trac-mirror,moreati/trac-gitsvn,dafrito/trac-mirror,dokipen/trac,moreati/trac-gitsvn,dafrito/trac-mirror,moreati/trac-gitsvn,exocad/exotrac
from trac.versioncontrol.web_ui.browser import * from trac.versioncontrol.web_ui.changeset import * from trac.versioncontrol.web_ui.log import * Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file...
from trac.versioncontrol.web_ui.browser import * from trac.versioncontrol.web_ui.changeset import * from trac.versioncontrol.web_ui.log import *
<commit_before>from trac.versioncontrol.web_ui.browser import * from trac.versioncontrol.web_ui.changeset import * from trac.versioncontrol.web_ui.log import * <commit_msg>Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar....
from trac.versioncontrol.web_ui.browser import * from trac.versioncontrol.web_ui.changeset import * from trac.versioncontrol.web_ui.log import *
from trac.versioncontrol.web_ui.browser import * from trac.versioncontrol.web_ui.changeset import * from trac.versioncontrol.web_ui.log import * Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar.gz have CRLFs for this file...
<commit_before>from trac.versioncontrol.web_ui.browser import * from trac.versioncontrol.web_ui.changeset import * from trac.versioncontrol.web_ui.log import * <commit_msg>Add missing `svn:eol-style : native` prop, which prevented making clean patches against the early 0.9b1 archives (now both the .zip and the .tar....
b56c2063dbb8ea6145048eb8a74bfd2693b2b6f4
app.py
app.py
#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route("/ping") def hello(): return "pong" if __name__ == "__main__": app.run()
#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route("/ping") def hello(): return "pong" # Returns larger sample JSON from http://json.org/example.html to exercise performance with larger payloads @app.route("/bigger") def big_response(): return '''{ "glossary": { "title":...
Add bigger response payload option of 512B
Add bigger response payload option of 512B
Python
apache-2.0
svanoort/python-client-benchmarks,svanoort/python-client-benchmarks
#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route("/ping") def hello(): return "pong" if __name__ == "__main__": app.run()Add bigger response payload option of 512B
#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route("/ping") def hello(): return "pong" # Returns larger sample JSON from http://json.org/example.html to exercise performance with larger payloads @app.route("/bigger") def big_response(): return '''{ "glossary": { "title":...
<commit_before>#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route("/ping") def hello(): return "pong" if __name__ == "__main__": app.run()<commit_msg>Add bigger response payload option of 512B<commit_after>
#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route("/ping") def hello(): return "pong" # Returns larger sample JSON from http://json.org/example.html to exercise performance with larger payloads @app.route("/bigger") def big_response(): return '''{ "glossary": { "title":...
#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route("/ping") def hello(): return "pong" if __name__ == "__main__": app.run()Add bigger response payload option of 512B#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route("/ping") def hello(): return "pon...
<commit_before>#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route("/ping") def hello(): return "pong" if __name__ == "__main__": app.run()<commit_msg>Add bigger response payload option of 512B<commit_after>#!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.ro...
d7cb9bdd63b381b81bf89c5e3c1cc3031c5928d9
run.py
run.py
""" Entry point for running the sqmpy application standalone """ import os from gevent import monkey monkey.patch_all() from sqmpy.factory import create_app # This line added to support heroku deployment port = int(os.environ.get("PORT", 3000)) app = create_app('../config.py') app.run(host='0.0.0.0', port=port, ...
""" Entry point for running the sqmpy application standalone """ import os from gevent import monkey monkey.patch_all() from sqmpy.factory import create_app # This line added to support heroku deployment port = int(os.environ.get("PORT", 3000)) # Workaround for passing ssh options to underlying library. Since we want...
Add comments and more gitignore
Add comments and more gitignore
Python
bsd-3-clause
mehdisadeghi/sqmpy,mehdisadeghi/sqmpy,mehdisadeghi/sqmpy,simphony/sqmpy,simphony/sqmpy,simphony/sqmpy
""" Entry point for running the sqmpy application standalone """ import os from gevent import monkey monkey.patch_all() from sqmpy.factory import create_app # This line added to support heroku deployment port = int(os.environ.get("PORT", 3000)) app = create_app('../config.py') app.run(host='0.0.0.0', port=port, ...
""" Entry point for running the sqmpy application standalone """ import os from gevent import monkey monkey.patch_all() from sqmpy.factory import create_app # This line added to support heroku deployment port = int(os.environ.get("PORT", 3000)) # Workaround for passing ssh options to underlying library. Since we want...
<commit_before>""" Entry point for running the sqmpy application standalone """ import os from gevent import monkey monkey.patch_all() from sqmpy.factory import create_app # This line added to support heroku deployment port = int(os.environ.get("PORT", 3000)) app = create_app('../config.py') app.run(host='0.0.0.0', p...
""" Entry point for running the sqmpy application standalone """ import os from gevent import monkey monkey.patch_all() from sqmpy.factory import create_app # This line added to support heroku deployment port = int(os.environ.get("PORT", 3000)) # Workaround for passing ssh options to underlying library. Since we want...
""" Entry point for running the sqmpy application standalone """ import os from gevent import monkey monkey.patch_all() from sqmpy.factory import create_app # This line added to support heroku deployment port = int(os.environ.get("PORT", 3000)) app = create_app('../config.py') app.run(host='0.0.0.0', port=port, ...
<commit_before>""" Entry point for running the sqmpy application standalone """ import os from gevent import monkey monkey.patch_all() from sqmpy.factory import create_app # This line added to support heroku deployment port = int(os.environ.get("PORT", 3000)) app = create_app('../config.py') app.run(host='0.0.0.0', p...
1f16d194ba78ec8ef50959dc37833ed8d5348c38
tests/ssh_parameters_test.py
tests/ssh_parameters_test.py
#!/usr/bin/env python # -*- coding: utf8 -*- from app.protocols import ssh def ssh_parameters_test(): ss = ssh(hostname = '127.0.0.1', port = 22, username='user', password='password') assert(ss.hostname and ss.port, ss.username and ss.password)
#!/usr/bin/env python # -*- coding: utf8 -*- from app.protocols import ssh def ssh_parameters_test(): ss = ssh(hostname = '127.0.0.1', port = 22, username='user', password='password') assert(ss.hostname and ss.port and ss.username and ss.password)
Fix typo in ssh test
Fix typo in ssh test
Python
mit
rbagrov/xana
#!/usr/bin/env python # -*- coding: utf8 -*- from app.protocols import ssh def ssh_parameters_test(): ss = ssh(hostname = '127.0.0.1', port = 22, username='user', password='password') assert(ss.hostname and ss.port, ss.username and ss.password) Fix typo in ssh test
#!/usr/bin/env python # -*- coding: utf8 -*- from app.protocols import ssh def ssh_parameters_test(): ss = ssh(hostname = '127.0.0.1', port = 22, username='user', password='password') assert(ss.hostname and ss.port and ss.username and ss.password)
<commit_before>#!/usr/bin/env python # -*- coding: utf8 -*- from app.protocols import ssh def ssh_parameters_test(): ss = ssh(hostname = '127.0.0.1', port = 22, username='user', password='password') assert(ss.hostname and ss.port, ss.username and ss.password) <commit_msg>Fix typo in ssh test<commit_after>
#!/usr/bin/env python # -*- coding: utf8 -*- from app.protocols import ssh def ssh_parameters_test(): ss = ssh(hostname = '127.0.0.1', port = 22, username='user', password='password') assert(ss.hostname and ss.port and ss.username and ss.password)
#!/usr/bin/env python # -*- coding: utf8 -*- from app.protocols import ssh def ssh_parameters_test(): ss = ssh(hostname = '127.0.0.1', port = 22, username='user', password='password') assert(ss.hostname and ss.port, ss.username and ss.password) Fix typo in ssh test#!/usr/bin/env python # -*- coding: utf8 -*- ...
<commit_before>#!/usr/bin/env python # -*- coding: utf8 -*- from app.protocols import ssh def ssh_parameters_test(): ss = ssh(hostname = '127.0.0.1', port = 22, username='user', password='password') assert(ss.hostname and ss.port, ss.username and ss.password) <commit_msg>Fix typo in ssh test<commit_after>#!/u...
ca758b2813ae77b795c4318d7d5566cd47ab0ec7
postgres/operations.py
postgres/operations.py
from django.db.migrations.operations.base import Operation from django.db import connection from psycopg2.extras import register_composite class LoadSQLFromScript(Operation): def __init__(self, filename): self.filename = filename @property def reversible(self): return False def state...
from django.db.migrations.operations.base import Operation from django.db import connection from psycopg2.extras import register_composite from .fields.composite import composite_type_created class LoadSQLFromScript(Operation): def __init__(self, filename): self.filename = filename @property def...
Send a signal after creation of composite field.
Send a signal after creation of composite field.
Python
bsd-3-clause
wlanslovenija/django-postgres
from django.db.migrations.operations.base import Operation from django.db import connection from psycopg2.extras import register_composite class LoadSQLFromScript(Operation): def __init__(self, filename): self.filename = filename @property def reversible(self): return False def state...
from django.db.migrations.operations.base import Operation from django.db import connection from psycopg2.extras import register_composite from .fields.composite import composite_type_created class LoadSQLFromScript(Operation): def __init__(self, filename): self.filename = filename @property def...
<commit_before>from django.db.migrations.operations.base import Operation from django.db import connection from psycopg2.extras import register_composite class LoadSQLFromScript(Operation): def __init__(self, filename): self.filename = filename @property def reversible(self): return False...
from django.db.migrations.operations.base import Operation from django.db import connection from psycopg2.extras import register_composite from .fields.composite import composite_type_created class LoadSQLFromScript(Operation): def __init__(self, filename): self.filename = filename @property def...
from django.db.migrations.operations.base import Operation from django.db import connection from psycopg2.extras import register_composite class LoadSQLFromScript(Operation): def __init__(self, filename): self.filename = filename @property def reversible(self): return False def state...
<commit_before>from django.db.migrations.operations.base import Operation from django.db import connection from psycopg2.extras import register_composite class LoadSQLFromScript(Operation): def __init__(self, filename): self.filename = filename @property def reversible(self): return False...
7f51b7a74df8e2c8d6756b8c3e95f7fbf47b291b
hashbrown/utils.py
hashbrown/utils.py
from django.conf import settings from .models import Switch def is_active(label, user=None): defaults = getattr(settings, 'HASHBROWN_SWITCH_DEFAULTS', {}) globally_active = defaults[label].get( 'globally_active', False) if label in defaults else False description = defaults[label].get( ...
from django.conf import settings from .models import Switch SETTINGS_KEY = 'HASHBROWN_SWITCH_DEFAULTS' def is_active(label, user=None): defaults = getattr(settings, SETTINGS_KEY, {}) globally_active = defaults[label].get( 'globally_active', False) if label in defaults else False descri...
Use a constant for the 'HASHBROWN_SWITCH_DEFAULTS' settings key so it is easier to re-use.
Use a constant for the 'HASHBROWN_SWITCH_DEFAULTS' settings key so it is easier to re-use.
Python
bsd-2-clause
potatolondon/django-hashbrown
from django.conf import settings from .models import Switch def is_active(label, user=None): defaults = getattr(settings, 'HASHBROWN_SWITCH_DEFAULTS', {}) globally_active = defaults[label].get( 'globally_active', False) if label in defaults else False description = defaults[label].get( ...
from django.conf import settings from .models import Switch SETTINGS_KEY = 'HASHBROWN_SWITCH_DEFAULTS' def is_active(label, user=None): defaults = getattr(settings, SETTINGS_KEY, {}) globally_active = defaults[label].get( 'globally_active', False) if label in defaults else False descri...
<commit_before>from django.conf import settings from .models import Switch def is_active(label, user=None): defaults = getattr(settings, 'HASHBROWN_SWITCH_DEFAULTS', {}) globally_active = defaults[label].get( 'globally_active', False) if label in defaults else False description = default...
from django.conf import settings from .models import Switch SETTINGS_KEY = 'HASHBROWN_SWITCH_DEFAULTS' def is_active(label, user=None): defaults = getattr(settings, SETTINGS_KEY, {}) globally_active = defaults[label].get( 'globally_active', False) if label in defaults else False descri...
from django.conf import settings from .models import Switch def is_active(label, user=None): defaults = getattr(settings, 'HASHBROWN_SWITCH_DEFAULTS', {}) globally_active = defaults[label].get( 'globally_active', False) if label in defaults else False description = defaults[label].get( ...
<commit_before>from django.conf import settings from .models import Switch def is_active(label, user=None): defaults = getattr(settings, 'HASHBROWN_SWITCH_DEFAULTS', {}) globally_active = defaults[label].get( 'globally_active', False) if label in defaults else False description = default...
df57b55c8ffa2a1948d7442d041415a3f19bbca0
python/Cloudbot/bbm.py
python/Cloudbot/bbm.py
from cloudbot import hook @hook.command("bbmstaff") def bbmStaff(text, message, chan): if chan in ("#bbm-bots", "#bbm-dev", "#bbm-packs", "#builtbrokenmodding", "#builtbroken"): message("Owners: Dmodoomsirius, DarkGuardsman"); message("textureArtist: Morton0000"); message("Developers: Snow...
from cloudbot import hook bbmChannels = ["#bbm-bots","#bbm-dev","#builtbroken","#builtbrokenmodding","#bbm-packs","#icbm","#artillects "] @hook.command("bbmstaff") def bbmStaff(text, message, chan): if any(x in chan for x in bbmChannels): message("Owners: Dmodoomsirius, DarkGuardsman"); #m...
Update and add more commands.
Update and add more commands.
Python
unknown
dmodoomsirius/DmodCode,dmodoomsirius/DmodCode,dsirius/DmodCode,dmodoomsirius/DmodCode,dsirius/DmodCode,dsirius/DmodCode
from cloudbot import hook @hook.command("bbmstaff") def bbmStaff(text, message, chan): if chan in ("#bbm-bots", "#bbm-dev", "#bbm-packs", "#builtbrokenmodding", "#builtbroken"): message("Owners: Dmodoomsirius, DarkGuardsman"); message("textureArtist: Morton0000"); message("Developers: Snow...
from cloudbot import hook bbmChannels = ["#bbm-bots","#bbm-dev","#builtbroken","#builtbrokenmodding","#bbm-packs","#icbm","#artillects "] @hook.command("bbmstaff") def bbmStaff(text, message, chan): if any(x in chan for x in bbmChannels): message("Owners: Dmodoomsirius, DarkGuardsman"); #m...
<commit_before>from cloudbot import hook @hook.command("bbmstaff") def bbmStaff(text, message, chan): if chan in ("#bbm-bots", "#bbm-dev", "#bbm-packs", "#builtbrokenmodding", "#builtbroken"): message("Owners: Dmodoomsirius, DarkGuardsman"); message("textureArtist: Morton0000"); message("D...
from cloudbot import hook bbmChannels = ["#bbm-bots","#bbm-dev","#builtbroken","#builtbrokenmodding","#bbm-packs","#icbm","#artillects "] @hook.command("bbmstaff") def bbmStaff(text, message, chan): if any(x in chan for x in bbmChannels): message("Owners: Dmodoomsirius, DarkGuardsman"); #m...
from cloudbot import hook @hook.command("bbmstaff") def bbmStaff(text, message, chan): if chan in ("#bbm-bots", "#bbm-dev", "#bbm-packs", "#builtbrokenmodding", "#builtbroken"): message("Owners: Dmodoomsirius, DarkGuardsman"); message("textureArtist: Morton0000"); message("Developers: Snow...
<commit_before>from cloudbot import hook @hook.command("bbmstaff") def bbmStaff(text, message, chan): if chan in ("#bbm-bots", "#bbm-dev", "#bbm-packs", "#builtbrokenmodding", "#builtbroken"): message("Owners: Dmodoomsirius, DarkGuardsman"); message("textureArtist: Morton0000"); message("D...
a30be93bf4aeef78158898c07252fd29e0303a57
frigg/authentication/models.py
frigg/authentication/models.py
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
Fix update permission on user
Fix update permission on user Only run it when user is created, not when it they are saved
Python
mit
frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
<commit_before># -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): ...
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
# -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): try: ...
<commit_before># -*- coding: utf8 -*- from django.contrib.auth.models import AbstractUser from django.utils.functional import cached_property from social.apps.django_app.default.models import UserSocialAuth from frigg.helpers import github class User(AbstractUser): @cached_property def github_token(self): ...
43f647f691f6c279d8e126c8e62e05af81baff38
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+".ms" pipe_dict['pipepath'] = pipepath return pipe_dict if __name__ == '__main__': import sys pipe_var_file = st...
''' 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+".ms" pipe_dict['pipepath'] = pipepath return pipe_dict if __name__ == '__main__': import sys pipe_var_file = st...
Change cmd line args to reflect change to CASA
Change cmd line args to reflect change to CASA
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+".ms" pipe_dict['pipepath'] = pipepath return pipe_dict if __name__ == '__main__': import sys pipe_var_file = st...
''' 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+".ms" pipe_dict['pipepath'] = pipepath return pipe_dict if __name__ == '__main__': import sys pipe_var_file = st...
<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+".ms" pipe_dict['pipepath'] = pipepath return pipe_dict if __name__ == '__main__': import sys pip...
''' 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+".ms" pipe_dict['pipepath'] = pipepath return pipe_dict if __name__ == '__main__': import sys pipe_var_file = st...
''' 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+".ms" pipe_dict['pipepath'] = pipepath return pipe_dict if __name__ == '__main__': import sys pipe_var_file = st...
<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+".ms" pipe_dict['pipepath'] = pipepath return pipe_dict if __name__ == '__main__': import sys pip...
411175d40b449a793528920c3745ca831f6f55e0
debug_toolbar/panels/version.py
debug_toolbar/panels/version.py
import sys import django from django.conf import settings from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import DebugPanel class VersionDebugPanel(DebugPanel): """ Panel that displays the Django version. """ name = 'Version' template = 'debug_toolbar/panels/ver...
import sys import django from django.conf import settings from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import DebugPanel class VersionDebugPanel(DebugPanel): """ Panel that displays the Django version. """ name = 'Version' template = 'debug_toolbar/panels/ver...
Convert settings.INSTALLED_APPS to list before concatenating django.
Convert settings.INSTALLED_APPS to list before concatenating django. According to the Django documentation settings.INSTALLED_APPS is a tuple. To go for sure that only list + list are concatenated, settings.INSTALLED_APPS is converted to list type before adding ['django'].
Python
bsd-3-clause
stored/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,megcunningham/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,spookylukey/django-debug-toolbar,Endika/django-debug-toolbar,ChristosChristofidis/django-debug-toolbar,sidja/django-debug-toolbar,peap/django-debug-toolbar,ivelum/django-deb...
import sys import django from django.conf import settings from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import DebugPanel class VersionDebugPanel(DebugPanel): """ Panel that displays the Django version. """ name = 'Version' template = 'debug_toolbar/panels/ver...
import sys import django from django.conf import settings from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import DebugPanel class VersionDebugPanel(DebugPanel): """ Panel that displays the Django version. """ name = 'Version' template = 'debug_toolbar/panels/ver...
<commit_before>import sys import django from django.conf import settings from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import DebugPanel class VersionDebugPanel(DebugPanel): """ Panel that displays the Django version. """ name = 'Version' template = 'debug_too...
import sys import django from django.conf import settings from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import DebugPanel class VersionDebugPanel(DebugPanel): """ Panel that displays the Django version. """ name = 'Version' template = 'debug_toolbar/panels/ver...
import sys import django from django.conf import settings from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import DebugPanel class VersionDebugPanel(DebugPanel): """ Panel that displays the Django version. """ name = 'Version' template = 'debug_toolbar/panels/ver...
<commit_before>import sys import django from django.conf import settings from django.utils.translation import ugettext_lazy as _ from debug_toolbar.panels import DebugPanel class VersionDebugPanel(DebugPanel): """ Panel that displays the Django version. """ name = 'Version' template = 'debug_too...
373fd6e9332ca225c1939b5bba675161bdec3596
bika/lims/upgrade/__init__.py
bika/lims/upgrade/__init__.py
# see https://gist.github.com/malthe/704910 import imp import sys def create_modules(module_path): path = "" module = None for element in module_path.split('.'): path += element try: module = __import__(path) except ImportError: new = imp.new_module(path) ...
# see https://gist.github.com/malthe/704910 import imp import sys def create_modules(module_path): path = "" module = None for element in module_path.split('.'): path += element try: module = __import__(path) except ImportError: new = imp.new_module(path) ...
Add return False to be sure all works as expected
Add return False to be sure all works as expected
Python
agpl-3.0
labsanmartin/Bika-LIMS,labsanmartin/Bika-LIMS,veroc/Bika-LIMS,labsanmartin/Bika-LIMS,veroc/Bika-LIMS,veroc/Bika-LIMS,rockfruit/bika.lims,rockfruit/bika.lims
# see https://gist.github.com/malthe/704910 import imp import sys def create_modules(module_path): path = "" module = None for element in module_path.split('.'): path += element try: module = __import__(path) except ImportError: new = imp.new_module(path) ...
# see https://gist.github.com/malthe/704910 import imp import sys def create_modules(module_path): path = "" module = None for element in module_path.split('.'): path += element try: module = __import__(path) except ImportError: new = imp.new_module(path) ...
<commit_before># see https://gist.github.com/malthe/704910 import imp import sys def create_modules(module_path): path = "" module = None for element in module_path.split('.'): path += element try: module = __import__(path) except ImportError: new = imp.new...
# see https://gist.github.com/malthe/704910 import imp import sys def create_modules(module_path): path = "" module = None for element in module_path.split('.'): path += element try: module = __import__(path) except ImportError: new = imp.new_module(path) ...
# see https://gist.github.com/malthe/704910 import imp import sys def create_modules(module_path): path = "" module = None for element in module_path.split('.'): path += element try: module = __import__(path) except ImportError: new = imp.new_module(path) ...
<commit_before># see https://gist.github.com/malthe/704910 import imp import sys def create_modules(module_path): path = "" module = None for element in module_path.split('.'): path += element try: module = __import__(path) except ImportError: new = imp.new...
6168ce884a1234910bace1a026402a21501b499c
buildbot_travis/steps/base.py
buildbot_travis/steps/base.py
from buildbot.process import buildstep from buildbot.process.buildstep import SUCCESS, FAILURE, EXCEPTION from buildbot.process.properties import Properties from twisted.internet import defer from ..travisyml import TravisYml class ConfigurableStep(buildstep.LoggingBuildStep): """ Base class for a step whic...
from buildbot.process import buildstep from buildbot.process.buildstep import SUCCESS, FAILURE, EXCEPTION from buildbot.process.properties import Properties from twisted.internet import defer from ..travisyml import TravisYml class ConfigurableStep(buildstep.LoggingBuildStep): """ Base class for a step whic...
Save .travis.yml into build properties
Save .travis.yml into build properties
Python
unknown
tardyp/buildbot_travis,isotoma/buildbot_travis,tardyp/buildbot_travis,buildbot/buildbot_travis,buildbot/buildbot_travis,isotoma/buildbot_travis,tardyp/buildbot_travis,tardyp/buildbot_travis,buildbot/buildbot_travis
from buildbot.process import buildstep from buildbot.process.buildstep import SUCCESS, FAILURE, EXCEPTION from buildbot.process.properties import Properties from twisted.internet import defer from ..travisyml import TravisYml class ConfigurableStep(buildstep.LoggingBuildStep): """ Base class for a step whic...
from buildbot.process import buildstep from buildbot.process.buildstep import SUCCESS, FAILURE, EXCEPTION from buildbot.process.properties import Properties from twisted.internet import defer from ..travisyml import TravisYml class ConfigurableStep(buildstep.LoggingBuildStep): """ Base class for a step whic...
<commit_before>from buildbot.process import buildstep from buildbot.process.buildstep import SUCCESS, FAILURE, EXCEPTION from buildbot.process.properties import Properties from twisted.internet import defer from ..travisyml import TravisYml class ConfigurableStep(buildstep.LoggingBuildStep): """ Base class ...
from buildbot.process import buildstep from buildbot.process.buildstep import SUCCESS, FAILURE, EXCEPTION from buildbot.process.properties import Properties from twisted.internet import defer from ..travisyml import TravisYml class ConfigurableStep(buildstep.LoggingBuildStep): """ Base class for a step whic...
from buildbot.process import buildstep from buildbot.process.buildstep import SUCCESS, FAILURE, EXCEPTION from buildbot.process.properties import Properties from twisted.internet import defer from ..travisyml import TravisYml class ConfigurableStep(buildstep.LoggingBuildStep): """ Base class for a step whic...
<commit_before>from buildbot.process import buildstep from buildbot.process.buildstep import SUCCESS, FAILURE, EXCEPTION from buildbot.process.properties import Properties from twisted.internet import defer from ..travisyml import TravisYml class ConfigurableStep(buildstep.LoggingBuildStep): """ Base class ...
7debde34bd1c5fd903edf4428aa89060da6de037
promgen/celery.py
promgen/celery.py
from __future__ import absolute_import, unicode_literals import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promgen.settings') app = Celery('promgen') # Using a string here means the worker don't have to serialize # ...
from __future__ import absolute_import, unicode_literals import logging import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promgen.settings') logger = logging.getLogger(__name__) app = Celery('promgen') # Using a s...
Swap print for logging statement
Swap print for logging statement
Python
mit
kfdm/promgen,kfdm/promgen,kfdm/promgen,kfdm/promgen
from __future__ import absolute_import, unicode_literals import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promgen.settings') app = Celery('promgen') # Using a string here means the worker don't have to serialize # ...
from __future__ import absolute_import, unicode_literals import logging import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promgen.settings') logger = logging.getLogger(__name__) app = Celery('promgen') # Using a s...
<commit_before>from __future__ import absolute_import, unicode_literals import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promgen.settings') app = Celery('promgen') # Using a string here means the worker don't have ...
from __future__ import absolute_import, unicode_literals import logging import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promgen.settings') logger = logging.getLogger(__name__) app = Celery('promgen') # Using a s...
from __future__ import absolute_import, unicode_literals import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promgen.settings') app = Celery('promgen') # Using a string here means the worker don't have to serialize # ...
<commit_before>from __future__ import absolute_import, unicode_literals import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promgen.settings') app = Celery('promgen') # Using a string here means the worker don't have ...
dbfa6398ae84d6920181a750f1447fd1b9a9c521
tests/test_packet.py
tests/test_packet.py
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Tests for Packet. """ import os import json import pytest from laniakea.core.providers.packet import...
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Tests for Packet. """ import os import json import pytest from laniakea.core.providers.packet import...
Disable dummy Packet test temporarily
Disable dummy Packet test temporarily
Python
mpl-2.0
nth10sd/laniakea,MozillaSecurity/laniakea,MozillaSecurity/laniakea,nth10sd/laniakea
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Tests for Packet. """ import os import json import pytest from laniakea.core.providers.packet import...
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Tests for Packet. """ import os import json import pytest from laniakea.core.providers.packet import...
<commit_before># coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Tests for Packet. """ import os import json import pytest from laniakea.core.provider...
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Tests for Packet. """ import os import json import pytest from laniakea.core.providers.packet import...
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Tests for Packet. """ import os import json import pytest from laniakea.core.providers.packet import...
<commit_before># coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Tests for Packet. """ import os import json import pytest from laniakea.core.provider...
1239623e7e23d7c51e864f715c0908ef2c0d2765
tests/test_reduce.py
tests/test_reduce.py
import mr_streams as ms import unittest # :::: auxilary functions :::: def sum_reduction(x,y): return x + y class TestMisc(unittest.TestCase): def test_sum_reduce(self): _ = ms.stream([1,2,3,4,5]).reduce(sum_reduction) assert _ is 15 def test_reduce_with_one_element(self): _ = ms...
import mr_streams as ms import unittest # :::: auxilary functions :::: def sum_reduction(x,y): return x + y class TestMisc(unittest.TestCase): def test_sum_reduce(self): _ = ms.stream([1,2,3,4,5]).reduce(sum_reduction) assert _ is 15 def test_initializer(self): _ = ms.stream([1])...
Refactor reduce to handle edge-case streams of length 0 and 1.
Refactor reduce to handle edge-case streams of length 0 and 1.
Python
mit
caffeine-potent/Streamer-Datastructure
import mr_streams as ms import unittest # :::: auxilary functions :::: def sum_reduction(x,y): return x + y class TestMisc(unittest.TestCase): def test_sum_reduce(self): _ = ms.stream([1,2,3,4,5]).reduce(sum_reduction) assert _ is 15 def test_reduce_with_one_element(self): _ = ms...
import mr_streams as ms import unittest # :::: auxilary functions :::: def sum_reduction(x,y): return x + y class TestMisc(unittest.TestCase): def test_sum_reduce(self): _ = ms.stream([1,2,3,4,5]).reduce(sum_reduction) assert _ is 15 def test_initializer(self): _ = ms.stream([1])...
<commit_before>import mr_streams as ms import unittest # :::: auxilary functions :::: def sum_reduction(x,y): return x + y class TestMisc(unittest.TestCase): def test_sum_reduce(self): _ = ms.stream([1,2,3,4,5]).reduce(sum_reduction) assert _ is 15 def test_reduce_with_one_element(self):...
import mr_streams as ms import unittest # :::: auxilary functions :::: def sum_reduction(x,y): return x + y class TestMisc(unittest.TestCase): def test_sum_reduce(self): _ = ms.stream([1,2,3,4,5]).reduce(sum_reduction) assert _ is 15 def test_initializer(self): _ = ms.stream([1])...
import mr_streams as ms import unittest # :::: auxilary functions :::: def sum_reduction(x,y): return x + y class TestMisc(unittest.TestCase): def test_sum_reduce(self): _ = ms.stream([1,2,3,4,5]).reduce(sum_reduction) assert _ is 15 def test_reduce_with_one_element(self): _ = ms...
<commit_before>import mr_streams as ms import unittest # :::: auxilary functions :::: def sum_reduction(x,y): return x + y class TestMisc(unittest.TestCase): def test_sum_reduce(self): _ = ms.stream([1,2,3,4,5]).reduce(sum_reduction) assert _ is 15 def test_reduce_with_one_element(self):...
9a97b9df87f06268ab1075726835da95f4852052
romanesco/format/tree/nested_to_vtktree.py
romanesco/format/tree/nested_to_vtktree.py
from romanesco.format import dict_to_vtkarrays, dict_to_vtkrow import vtk vtk_builder = vtk.vtkMutableDirectedGraph() node_fields = input["node_fields"] edge_fields = input["edge_fields"] dict_to_vtkarrays(input["node_data"], node_fields, vtk_builder.GetVertexData()) if "children" in input and len(input["children"]) >...
from romanesco.format import dict_to_vtkarrays, dict_to_vtkrow import vtk vtk_builder = vtk.vtkMutableDirectedGraph() node_fields = input["node_fields"] edge_fields = input["edge_fields"] dict_to_vtkarrays(input["node_data"], node_fields, vtk_builder.GetVertexData()) if "children" in input and len(input["children"]) >...
Revert "tolerate missing edge data"
Revert "tolerate missing edge data" This reverts commit 93f1f6b24b7e8e61dbbfebe500048db752bc9fed.
Python
apache-2.0
Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,girder/girder_worker,girder/girder_worker,girder/girder_worker
from romanesco.format import dict_to_vtkarrays, dict_to_vtkrow import vtk vtk_builder = vtk.vtkMutableDirectedGraph() node_fields = input["node_fields"] edge_fields = input["edge_fields"] dict_to_vtkarrays(input["node_data"], node_fields, vtk_builder.GetVertexData()) if "children" in input and len(input["children"]) >...
from romanesco.format import dict_to_vtkarrays, dict_to_vtkrow import vtk vtk_builder = vtk.vtkMutableDirectedGraph() node_fields = input["node_fields"] edge_fields = input["edge_fields"] dict_to_vtkarrays(input["node_data"], node_fields, vtk_builder.GetVertexData()) if "children" in input and len(input["children"]) >...
<commit_before>from romanesco.format import dict_to_vtkarrays, dict_to_vtkrow import vtk vtk_builder = vtk.vtkMutableDirectedGraph() node_fields = input["node_fields"] edge_fields = input["edge_fields"] dict_to_vtkarrays(input["node_data"], node_fields, vtk_builder.GetVertexData()) if "children" in input and len(input...
from romanesco.format import dict_to_vtkarrays, dict_to_vtkrow import vtk vtk_builder = vtk.vtkMutableDirectedGraph() node_fields = input["node_fields"] edge_fields = input["edge_fields"] dict_to_vtkarrays(input["node_data"], node_fields, vtk_builder.GetVertexData()) if "children" in input and len(input["children"]) >...
from romanesco.format import dict_to_vtkarrays, dict_to_vtkrow import vtk vtk_builder = vtk.vtkMutableDirectedGraph() node_fields = input["node_fields"] edge_fields = input["edge_fields"] dict_to_vtkarrays(input["node_data"], node_fields, vtk_builder.GetVertexData()) if "children" in input and len(input["children"]) >...
<commit_before>from romanesco.format import dict_to_vtkarrays, dict_to_vtkrow import vtk vtk_builder = vtk.vtkMutableDirectedGraph() node_fields = input["node_fields"] edge_fields = input["edge_fields"] dict_to_vtkarrays(input["node_data"], node_fields, vtk_builder.GetVertexData()) if "children" in input and len(input...
5e6e784a5b54f4ac6d1e7841a46772e5aaac9c2d
getpaid/backends/paymill/__init__.py
getpaid/backends/paymill/__init__.py
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from getpaid.backends import PaymentProcessorBase class PaymentProcessor(PaymentProcessorBase): BACKEND = 'getpaid.backends.paymill' BACKEND_NAME = _('Paymill') BACKEND_ACCEPTED_CURRENCY = ('EUR', 'CZK', 'D...
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from getpaid.backends import PaymentProcessorBase class PaymentProcessor(PaymentProcessorBase): BACKEND = 'getpaid.backends.paymill' BACKEND_NAME = _('Paymill') BACKEND_ACCEPTED_CURRENCY = ('EUR', 'CZK', 'D...
Add USD to supported currencies in Paymill backend
Add USD to supported currencies in Paymill backend USD was not listed as a supported currency in the init file. This was causing 403 Forbidden errors which were hard to debug, because the Paymill backend simply didn't show up in the payment form and the only error was about unsupported backend.
Python
mit
anih/django-getpaid,glowka/django-getpaid,pawciobiel/django-getpaid,mionch/django-getpaid,dekoza/django-getpaid,dekoza/django-getpaid,mionch/django-getpaid,glowka/django-getpaid,nielsonsantana/django-getpaid,anih/django-getpaid,cypreess/django-getpaid,kamilglod/django-getpaid,pawciobiel/django-getpaid,cypreess/django-g...
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from getpaid.backends import PaymentProcessorBase class PaymentProcessor(PaymentProcessorBase): BACKEND = 'getpaid.backends.paymill' BACKEND_NAME = _('Paymill') BACKEND_ACCEPTED_CURRENCY = ('EUR', 'CZK', 'D...
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from getpaid.backends import PaymentProcessorBase class PaymentProcessor(PaymentProcessorBase): BACKEND = 'getpaid.backends.paymill' BACKEND_NAME = _('Paymill') BACKEND_ACCEPTED_CURRENCY = ('EUR', 'CZK', 'D...
<commit_before>from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from getpaid.backends import PaymentProcessorBase class PaymentProcessor(PaymentProcessorBase): BACKEND = 'getpaid.backends.paymill' BACKEND_NAME = _('Paymill') BACKEND_ACCEPTED_CURRENCY = ('...
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from getpaid.backends import PaymentProcessorBase class PaymentProcessor(PaymentProcessorBase): BACKEND = 'getpaid.backends.paymill' BACKEND_NAME = _('Paymill') BACKEND_ACCEPTED_CURRENCY = ('EUR', 'CZK', 'D...
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from getpaid.backends import PaymentProcessorBase class PaymentProcessor(PaymentProcessorBase): BACKEND = 'getpaid.backends.paymill' BACKEND_NAME = _('Paymill') BACKEND_ACCEPTED_CURRENCY = ('EUR', 'CZK', 'D...
<commit_before>from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from getpaid.backends import PaymentProcessorBase class PaymentProcessor(PaymentProcessorBase): BACKEND = 'getpaid.backends.paymill' BACKEND_NAME = _('Paymill') BACKEND_ACCEPTED_CURRENCY = ('...
b005d0b5eae4328e1482d0571f4dbc7164fef21f
app/eve_api/__init__.py
app/eve_api/__init__.py
VERSION = (0, 1) # Dynamically calculate the version based on VERSION tuple if len(VERSION)>2 and VERSION[2] is not None: str_version = "%d.%d_%s" % VERSION[:3] else: str_version = "%d.%d" % VERSION[:2] __version__ = str_version
Add versioning information to eve_api
Add versioning information to eve_api
Python
bsd-3-clause
nikdoof/test-auth
Add versioning information to eve_api
VERSION = (0, 1) # Dynamically calculate the version based on VERSION tuple if len(VERSION)>2 and VERSION[2] is not None: str_version = "%d.%d_%s" % VERSION[:3] else: str_version = "%d.%d" % VERSION[:2] __version__ = str_version
<commit_before><commit_msg>Add versioning information to eve_api<commit_after>
VERSION = (0, 1) # Dynamically calculate the version based on VERSION tuple if len(VERSION)>2 and VERSION[2] is not None: str_version = "%d.%d_%s" % VERSION[:3] else: str_version = "%d.%d" % VERSION[:2] __version__ = str_version
Add versioning information to eve_apiVERSION = (0, 1) # Dynamically calculate the version based on VERSION tuple if len(VERSION)>2 and VERSION[2] is not None: str_version = "%d.%d_%s" % VERSION[:3] else: str_version = "%d.%d" % VERSION[:2] __version__ = str_version
<commit_before><commit_msg>Add versioning information to eve_api<commit_after>VERSION = (0, 1) # Dynamically calculate the version based on VERSION tuple if len(VERSION)>2 and VERSION[2] is not None: str_version = "%d.%d_%s" % VERSION[:3] else: str_version = "%d.%d" % VERSION[:2] __version__ = str_version
47831156874d31dcf9b8b61118399cb5ac77632c
PyFVCOM/__init__.py
PyFVCOM/__init__.py
""" The FVCOM Python toolbox (PyFvcom) """ __version__ = '1.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import numpy so we have it across the board. import numpy as n...
""" The FVCOM Python toolbox (PyFvcom) """ __version__ = '1.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import numpy so we have it across the board. import numpy as n...
Remove the (dodgy) function to convert from an image to data.
Remove the (dodgy) function to convert from an image to data.
Python
mit
pwcazenave/PyFVCOM
""" The FVCOM Python toolbox (PyFvcom) """ __version__ = '1.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import numpy so we have it across the board. import numpy as n...
""" The FVCOM Python toolbox (PyFvcom) """ __version__ = '1.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import numpy so we have it across the board. import numpy as n...
<commit_before>""" The FVCOM Python toolbox (PyFvcom) """ __version__ = '1.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import numpy so we have it across the board. im...
""" The FVCOM Python toolbox (PyFvcom) """ __version__ = '1.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import numpy so we have it across the board. import numpy as n...
""" The FVCOM Python toolbox (PyFvcom) """ __version__ = '1.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import numpy so we have it across the board. import numpy as n...
<commit_before>""" The FVCOM Python toolbox (PyFvcom) """ __version__ = '1.2' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import numpy so we have it across the board. im...
9c40a87c5f7d261550c860a69e2679feda53d884
demo_app/demo_app/settings_test.py
demo_app/demo_app/settings_test.py
# -*- coding: utf-8 -*- import warnings from .settings import * # noqa: F403,F401 # Handle system warning as log messages warnings.simplefilter("once") for handler in LOGGING.get("handlers", []): LOGGING["handlers"][handler]["level"] = "CRITICAL" for logger in LOGGING.get("loggers", []): LOGGING["loggers"]...
# -*- coding: utf-8 -*- import warnings from .settings import * # noqa: F403,F401 # Handle system warning as log messages warnings.simplefilter("once") for handler in LOGGING.get("handlers", []): LOGGING["handlers"][handler]["level"] = "CRITICAL" for logger in LOGGING.get("loggers", []): LOGGING["loggers"]...
Unify and simplify for tests.
Unify and simplify for tests.
Python
apache-2.0
pivotal-energy-solutions/django-datatable-view,pivotal-energy-solutions/django-datatable-view,pivotal-energy-solutions/django-datatable-view
# -*- coding: utf-8 -*- import warnings from .settings import * # noqa: F403,F401 # Handle system warning as log messages warnings.simplefilter("once") for handler in LOGGING.get("handlers", []): LOGGING["handlers"][handler]["level"] = "CRITICAL" for logger in LOGGING.get("loggers", []): LOGGING["loggers"]...
# -*- coding: utf-8 -*- import warnings from .settings import * # noqa: F403,F401 # Handle system warning as log messages warnings.simplefilter("once") for handler in LOGGING.get("handlers", []): LOGGING["handlers"][handler]["level"] = "CRITICAL" for logger in LOGGING.get("loggers", []): LOGGING["loggers"]...
<commit_before># -*- coding: utf-8 -*- import warnings from .settings import * # noqa: F403,F401 # Handle system warning as log messages warnings.simplefilter("once") for handler in LOGGING.get("handlers", []): LOGGING["handlers"][handler]["level"] = "CRITICAL" for logger in LOGGING.get("loggers", []): LOG...
# -*- coding: utf-8 -*- import warnings from .settings import * # noqa: F403,F401 # Handle system warning as log messages warnings.simplefilter("once") for handler in LOGGING.get("handlers", []): LOGGING["handlers"][handler]["level"] = "CRITICAL" for logger in LOGGING.get("loggers", []): LOGGING["loggers"]...
# -*- coding: utf-8 -*- import warnings from .settings import * # noqa: F403,F401 # Handle system warning as log messages warnings.simplefilter("once") for handler in LOGGING.get("handlers", []): LOGGING["handlers"][handler]["level"] = "CRITICAL" for logger in LOGGING.get("loggers", []): LOGGING["loggers"]...
<commit_before># -*- coding: utf-8 -*- import warnings from .settings import * # noqa: F403,F401 # Handle system warning as log messages warnings.simplefilter("once") for handler in LOGGING.get("handlers", []): LOGGING["handlers"][handler]["level"] = "CRITICAL" for logger in LOGGING.get("loggers", []): LOG...
751f40ef23250cf9fad1374359393588edee477a
back/blog/models/base.py
back/blog/models/base.py
from sqlalchemy.ext.declarative import declared_attr from blog.lib.database import db class ModelMixin(object): """A base mixin for all models.""" @declared_attr def __tablename__(cls): return cls.__name__.lower() def __str__(self): return '<{} (id={})>'.format(self.__class__.__name_...
from sqlalchemy.ext.declarative import declared_attr from blog.lib.database import db class ModelMixin(object): """A base mixin for all models.""" @declared_attr def __tablename__(cls): return cls.__name__.lower() def __str__(self): return '<{} (id={})>'.format(self.__class__.__name_...
Return "id" key to front instead of "id_".
Return "id" key to front instead of "id_".
Python
mit
astex/living-with-django,astex/living-with-django,astex/living-with-django
from sqlalchemy.ext.declarative import declared_attr from blog.lib.database import db class ModelMixin(object): """A base mixin for all models.""" @declared_attr def __tablename__(cls): return cls.__name__.lower() def __str__(self): return '<{} (id={})>'.format(self.__class__.__name_...
from sqlalchemy.ext.declarative import declared_attr from blog.lib.database import db class ModelMixin(object): """A base mixin for all models.""" @declared_attr def __tablename__(cls): return cls.__name__.lower() def __str__(self): return '<{} (id={})>'.format(self.__class__.__name_...
<commit_before>from sqlalchemy.ext.declarative import declared_attr from blog.lib.database import db class ModelMixin(object): """A base mixin for all models.""" @declared_attr def __tablename__(cls): return cls.__name__.lower() def __str__(self): return '<{} (id={})>'.format(self.__...
from sqlalchemy.ext.declarative import declared_attr from blog.lib.database import db class ModelMixin(object): """A base mixin for all models.""" @declared_attr def __tablename__(cls): return cls.__name__.lower() def __str__(self): return '<{} (id={})>'.format(self.__class__.__name_...
from sqlalchemy.ext.declarative import declared_attr from blog.lib.database import db class ModelMixin(object): """A base mixin for all models.""" @declared_attr def __tablename__(cls): return cls.__name__.lower() def __str__(self): return '<{} (id={})>'.format(self.__class__.__name_...
<commit_before>from sqlalchemy.ext.declarative import declared_attr from blog.lib.database import db class ModelMixin(object): """A base mixin for all models.""" @declared_attr def __tablename__(cls): return cls.__name__.lower() def __str__(self): return '<{} (id={})>'.format(self.__...
564d54c377bf6a8c16cae3681934cc7ba5007c76
bundledApps/wailEndpoint.py
bundledApps/wailEndpoint.py
import tornado.ioloop import tornado.web import requests host = 'localhost' waybackPort = '8080' archiveConfigFile = '/Applications/WAIL.app/config/archive.json' class MainHandler(tornado.web.RequestHandler): def get(self): iwa = isWaybackAccessible() print iwa self.write(iwa) def make_ap...
import tornado.ioloop import tornado.web import requests host = 'localhost' waybackPort = '8080' # Use a separate JSON file that only queries the local WAIL instance for MemGator archiveConfigFile = '/Applications/WAIL.app/config/archive.json' class MainHandler(tornado.web.RequestHandler): def get(self): ...
Add comment to justify separate JSON file existence
Add comment to justify separate JSON file existence
Python
mit
machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail,machawk1/wail
import tornado.ioloop import tornado.web import requests host = 'localhost' waybackPort = '8080' archiveConfigFile = '/Applications/WAIL.app/config/archive.json' class MainHandler(tornado.web.RequestHandler): def get(self): iwa = isWaybackAccessible() print iwa self.write(iwa) def make_ap...
import tornado.ioloop import tornado.web import requests host = 'localhost' waybackPort = '8080' # Use a separate JSON file that only queries the local WAIL instance for MemGator archiveConfigFile = '/Applications/WAIL.app/config/archive.json' class MainHandler(tornado.web.RequestHandler): def get(self): ...
<commit_before>import tornado.ioloop import tornado.web import requests host = 'localhost' waybackPort = '8080' archiveConfigFile = '/Applications/WAIL.app/config/archive.json' class MainHandler(tornado.web.RequestHandler): def get(self): iwa = isWaybackAccessible() print iwa self.write(iw...
import tornado.ioloop import tornado.web import requests host = 'localhost' waybackPort = '8080' # Use a separate JSON file that only queries the local WAIL instance for MemGator archiveConfigFile = '/Applications/WAIL.app/config/archive.json' class MainHandler(tornado.web.RequestHandler): def get(self): ...
import tornado.ioloop import tornado.web import requests host = 'localhost' waybackPort = '8080' archiveConfigFile = '/Applications/WAIL.app/config/archive.json' class MainHandler(tornado.web.RequestHandler): def get(self): iwa = isWaybackAccessible() print iwa self.write(iwa) def make_ap...
<commit_before>import tornado.ioloop import tornado.web import requests host = 'localhost' waybackPort = '8080' archiveConfigFile = '/Applications/WAIL.app/config/archive.json' class MainHandler(tornado.web.RequestHandler): def get(self): iwa = isWaybackAccessible() print iwa self.write(iw...
b32f4955665b8618a9623f6898a15d4da40dc58e
dxtbx/command_line/print_header.py
dxtbx/command_line/print_header.py
def print_header(): import sys from dxtbx.format.Registry import Registry # this will do the lookup for every frame - this is strictly not needed # if all frames are from the same instrument for arg in sys.argv[1:]: format = Registry.find(arg) i = format(arg) print 'Bea...
def print_header(): import sys from dxtbx.format.Registry import Registry # this will do the lookup for every frame - this is strictly not needed # if all frames are from the same instrument for arg in sys.argv[1:]: format = Registry.find(arg) print 'Using header reader: %s' % ...
Print the Format class used
Print the Format class used
Python
bsd-3-clause
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
def print_header(): import sys from dxtbx.format.Registry import Registry # this will do the lookup for every frame - this is strictly not needed # if all frames are from the same instrument for arg in sys.argv[1:]: format = Registry.find(arg) i = format(arg) print 'Bea...
def print_header(): import sys from dxtbx.format.Registry import Registry # this will do the lookup for every frame - this is strictly not needed # if all frames are from the same instrument for arg in sys.argv[1:]: format = Registry.find(arg) print 'Using header reader: %s' % ...
<commit_before>def print_header(): import sys from dxtbx.format.Registry import Registry # this will do the lookup for every frame - this is strictly not needed # if all frames are from the same instrument for arg in sys.argv[1:]: format = Registry.find(arg) i = format(arg) ...
def print_header(): import sys from dxtbx.format.Registry import Registry # this will do the lookup for every frame - this is strictly not needed # if all frames are from the same instrument for arg in sys.argv[1:]: format = Registry.find(arg) print 'Using header reader: %s' % ...
def print_header(): import sys from dxtbx.format.Registry import Registry # this will do the lookup for every frame - this is strictly not needed # if all frames are from the same instrument for arg in sys.argv[1:]: format = Registry.find(arg) i = format(arg) print 'Bea...
<commit_before>def print_header(): import sys from dxtbx.format.Registry import Registry # this will do the lookup for every frame - this is strictly not needed # if all frames are from the same instrument for arg in sys.argv[1:]: format = Registry.find(arg) i = format(arg) ...
c790055fa7e6810703599bc0124507133b8a55fc
crispy_forms/compatibility.py
crispy_forms/compatibility.py
import sys try: basestring except: basestring = str # Python3 PY2 = sys.version_info[0] == 2 if not PY2: text_type = str binary_type = bytes string_types = (str,) integer_types = (int,) else: text_type = unicode binary_type = str string_types = basestring integer_types = (int, ...
import sys try: basestring except: basestring = str # Python3 PY2 = sys.version_info[0] == 2 if not PY2: text_type = str binary_type = bytes string_types = (str,) integer_types = (int,) else: text_type = unicode binary_type = str string_types = basestring integer_types = (int, ...
Fix lru_cache import as memoize
Fix lru_cache import as memoize Thanks to @jcomeauictx for the heads up
Python
mit
scuml/django-crispy-forms,VishvajitP/django-crispy-forms,saydulk/django-crispy-forms,alanwj/django-crispy-forms,schrd/django-crispy-forms,bouttier/django-crispy-forms,smirolo/django-crispy-forms,saydulk/django-crispy-forms,IanLee1521/django-crispy-forms,zixan/django-crispy-forms,Stranger6667/django-crispy-forms,RamezIs...
import sys try: basestring except: basestring = str # Python3 PY2 = sys.version_info[0] == 2 if not PY2: text_type = str binary_type = bytes string_types = (str,) integer_types = (int,) else: text_type = unicode binary_type = str string_types = basestring integer_types = (int, ...
import sys try: basestring except: basestring = str # Python3 PY2 = sys.version_info[0] == 2 if not PY2: text_type = str binary_type = bytes string_types = (str,) integer_types = (int,) else: text_type = unicode binary_type = str string_types = basestring integer_types = (int, ...
<commit_before>import sys try: basestring except: basestring = str # Python3 PY2 = sys.version_info[0] == 2 if not PY2: text_type = str binary_type = bytes string_types = (str,) integer_types = (int,) else: text_type = unicode binary_type = str string_types = basestring integer...
import sys try: basestring except: basestring = str # Python3 PY2 = sys.version_info[0] == 2 if not PY2: text_type = str binary_type = bytes string_types = (str,) integer_types = (int,) else: text_type = unicode binary_type = str string_types = basestring integer_types = (int, ...
import sys try: basestring except: basestring = str # Python3 PY2 = sys.version_info[0] == 2 if not PY2: text_type = str binary_type = bytes string_types = (str,) integer_types = (int,) else: text_type = unicode binary_type = str string_types = basestring integer_types = (int, ...
<commit_before>import sys try: basestring except: basestring = str # Python3 PY2 = sys.version_info[0] == 2 if not PY2: text_type = str binary_type = bytes string_types = (str,) integer_types = (int,) else: text_type = unicode binary_type = str string_types = basestring integer...
3a18c25ef019a9a54475419bfabc4b6e2776df9c
lib/unsubscribe.py
lib/unsubscribe.py
from lxml.html import fromstring as lxml_from_string from unidecode import unidecode UNSUBSCRIBE_MARKERS = [ # English "unsub", "blacklist", "opt-out", "opt out", # French "desinscription", "desinscrire", "desabonner", "desabonnement", "ne souhaitez plus", "ne plus recevoir", "cesser de recevoir" ] def...
from lxml.html import fromstring as lxml_from_string from unidecode import unidecode UNSUBSCRIBE_MARKERS = [ # English "unsub", "blacklist", "opt-out", "opt out", "removealert", "removeme", # French "desinscription", "desinscrire", "desabonner", "desabonnement", "ne souhaitez plus", "ne plus recevoir", "c...
Fix a bug with uppercase links
Fix a bug with uppercase links
Python
mit
sylvinus/reclaim-my-gmail-inbox
from lxml.html import fromstring as lxml_from_string from unidecode import unidecode UNSUBSCRIBE_MARKERS = [ # English "unsub", "blacklist", "opt-out", "opt out", # French "desinscription", "desinscrire", "desabonner", "desabonnement", "ne souhaitez plus", "ne plus recevoir", "cesser de recevoir" ] def...
from lxml.html import fromstring as lxml_from_string from unidecode import unidecode UNSUBSCRIBE_MARKERS = [ # English "unsub", "blacklist", "opt-out", "opt out", "removealert", "removeme", # French "desinscription", "desinscrire", "desabonner", "desabonnement", "ne souhaitez plus", "ne plus recevoir", "c...
<commit_before>from lxml.html import fromstring as lxml_from_string from unidecode import unidecode UNSUBSCRIBE_MARKERS = [ # English "unsub", "blacklist", "opt-out", "opt out", # French "desinscription", "desinscrire", "desabonner", "desabonnement", "ne souhaitez plus", "ne plus recevoir", "cesser de rec...
from lxml.html import fromstring as lxml_from_string from unidecode import unidecode UNSUBSCRIBE_MARKERS = [ # English "unsub", "blacklist", "opt-out", "opt out", "removealert", "removeme", # French "desinscription", "desinscrire", "desabonner", "desabonnement", "ne souhaitez plus", "ne plus recevoir", "c...
from lxml.html import fromstring as lxml_from_string from unidecode import unidecode UNSUBSCRIBE_MARKERS = [ # English "unsub", "blacklist", "opt-out", "opt out", # French "desinscription", "desinscrire", "desabonner", "desabonnement", "ne souhaitez plus", "ne plus recevoir", "cesser de recevoir" ] def...
<commit_before>from lxml.html import fromstring as lxml_from_string from unidecode import unidecode UNSUBSCRIBE_MARKERS = [ # English "unsub", "blacklist", "opt-out", "opt out", # French "desinscription", "desinscrire", "desabonner", "desabonnement", "ne souhaitez plus", "ne plus recevoir", "cesser de rec...
a9405eaf838842688262689d665f30ae3cebfdea
django_migration_linter/cache.py
django_migration_linter/cache.py
import os import pickle class Cache(dict): def __init__(self, django_folder, database, cache_path): self.filename = os.path.join( cache_path, "{}_{}.pickle".format(django_folder.replace(os.sep, "_"), database), ) if not os.path.exists(os.path.dirname(self.filename)...
import os import pickle class Cache(dict): def __init__(self, django_folder, database, cache_path): self.filename = os.path.join( cache_path, "{}_{}.pickle".format(str(django_folder).replace(os.sep, "_"), database), ) if not os.path.exists(os.path.dirname(self.file...
Support `Path` type for `project_root_path`
feat: Support `Path` type for `project_root_path` Django has switched to using pathlib.Path in startproject. This adds support for these in the project root path config option.
Python
apache-2.0
3YOURMIND/django-migration-linter
import os import pickle class Cache(dict): def __init__(self, django_folder, database, cache_path): self.filename = os.path.join( cache_path, "{}_{}.pickle".format(django_folder.replace(os.sep, "_"), database), ) if not os.path.exists(os.path.dirname(self.filename)...
import os import pickle class Cache(dict): def __init__(self, django_folder, database, cache_path): self.filename = os.path.join( cache_path, "{}_{}.pickle".format(str(django_folder).replace(os.sep, "_"), database), ) if not os.path.exists(os.path.dirname(self.file...
<commit_before>import os import pickle class Cache(dict): def __init__(self, django_folder, database, cache_path): self.filename = os.path.join( cache_path, "{}_{}.pickle".format(django_folder.replace(os.sep, "_"), database), ) if not os.path.exists(os.path.dirname...
import os import pickle class Cache(dict): def __init__(self, django_folder, database, cache_path): self.filename = os.path.join( cache_path, "{}_{}.pickle".format(str(django_folder).replace(os.sep, "_"), database), ) if not os.path.exists(os.path.dirname(self.file...
import os import pickle class Cache(dict): def __init__(self, django_folder, database, cache_path): self.filename = os.path.join( cache_path, "{}_{}.pickle".format(django_folder.replace(os.sep, "_"), database), ) if not os.path.exists(os.path.dirname(self.filename)...
<commit_before>import os import pickle class Cache(dict): def __init__(self, django_folder, database, cache_path): self.filename = os.path.join( cache_path, "{}_{}.pickle".format(django_folder.replace(os.sep, "_"), database), ) if not os.path.exists(os.path.dirname...
593e826b24d83997a5be450be1401e16ec17c07c
application.py
application.py
#!/usr/bin/env python from __future__ import print_function import os from flask.ext.script import Manager, Server from flask.ext.migrate import Migrate, MigrateCommand from app import create_app, db application = create_app(os.getenv('DM_ENVIRONMENT') or 'development') manager = Manager(application) manager.add_...
#!/usr/bin/env python from __future__ import print_function import os from dmutils import init_manager from flask.ext.migrate import Migrate, MigrateCommand from app import create_app, db application = create_app(os.getenv('DM_ENVIRONMENT') or 'development') manager = init_manager(application, 5000, ['./json_sche...
Use new dmutils init_manager to set up reload on schema changes
Use new dmutils init_manager to set up reload on schema changes
Python
mit
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
#!/usr/bin/env python from __future__ import print_function import os from flask.ext.script import Manager, Server from flask.ext.migrate import Migrate, MigrateCommand from app import create_app, db application = create_app(os.getenv('DM_ENVIRONMENT') or 'development') manager = Manager(application) manager.add_...
#!/usr/bin/env python from __future__ import print_function import os from dmutils import init_manager from flask.ext.migrate import Migrate, MigrateCommand from app import create_app, db application = create_app(os.getenv('DM_ENVIRONMENT') or 'development') manager = init_manager(application, 5000, ['./json_sche...
<commit_before>#!/usr/bin/env python from __future__ import print_function import os from flask.ext.script import Manager, Server from flask.ext.migrate import Migrate, MigrateCommand from app import create_app, db application = create_app(os.getenv('DM_ENVIRONMENT') or 'development') manager = Manager(applicatio...
#!/usr/bin/env python from __future__ import print_function import os from dmutils import init_manager from flask.ext.migrate import Migrate, MigrateCommand from app import create_app, db application = create_app(os.getenv('DM_ENVIRONMENT') or 'development') manager = init_manager(application, 5000, ['./json_sche...
#!/usr/bin/env python from __future__ import print_function import os from flask.ext.script import Manager, Server from flask.ext.migrate import Migrate, MigrateCommand from app import create_app, db application = create_app(os.getenv('DM_ENVIRONMENT') or 'development') manager = Manager(application) manager.add_...
<commit_before>#!/usr/bin/env python from __future__ import print_function import os from flask.ext.script import Manager, Server from flask.ext.migrate import Migrate, MigrateCommand from app import create_app, db application = create_app(os.getenv('DM_ENVIRONMENT') or 'development') manager = Manager(applicatio...
39603bde90ebad7e0d70e41403a9a971867dcbac
backend/breach/views.py
backend/breach/views.py
from django.shortcuts import render from django.http import HttpResponse def get_work(request): return HttpResponse('Not implemented') def work_completed(request): return HttpResponse('Not implemented')
from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt def get_work(request): return HttpResponse('Not implemented') @csrf_exempt def work_completed(request): return HttpResponse('Not implemented')
Allow POST request to work_completed view
Allow POST request to work_completed view
Python
mit
esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimriou/rupture,dion...
from django.shortcuts import render from django.http import HttpResponse def get_work(request): return HttpResponse('Not implemented') def work_completed(request): return HttpResponse('Not implemented') Allow POST request to work_completed view
from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt def get_work(request): return HttpResponse('Not implemented') @csrf_exempt def work_completed(request): return HttpResponse('Not implemented')
<commit_before>from django.shortcuts import render from django.http import HttpResponse def get_work(request): return HttpResponse('Not implemented') def work_completed(request): return HttpResponse('Not implemented') <commit_msg>Allow POST request to work_completed view<commit_after>
from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt def get_work(request): return HttpResponse('Not implemented') @csrf_exempt def work_completed(request): return HttpResponse('Not implemented')
from django.shortcuts import render from django.http import HttpResponse def get_work(request): return HttpResponse('Not implemented') def work_completed(request): return HttpResponse('Not implemented') Allow POST request to work_completed viewfrom django.http import HttpResponse from django.views.decorators....
<commit_before>from django.shortcuts import render from django.http import HttpResponse def get_work(request): return HttpResponse('Not implemented') def work_completed(request): return HttpResponse('Not implemented') <commit_msg>Allow POST request to work_completed view<commit_after>from django.http import H...
a633fd37a4d795e7b565254ef10aaa0f2ad77f31
vcontrol/rest/machines/shutdown.py
vcontrol/rest/machines/shutdown.py
from ..helpers import get_allowed import subprocess import web class ShutdownMachineR: """ This endpoint is for shutting down a running machine. """ allow_origin, rest_url = get_allowed.get_allowed() def GET(self, machine): web.header('Access-Control-Allow-Origin', self.allow_origin) ...
from ..helpers import get_allowed import subprocess import web class ShutdownMachineR: """ This endpoint is for shutting down a running machine. """ allow_origin, rest_url = get_allowed.get_allowed() def GET(self, machine): try: web.header('Access-Control-Allow-Origin', self....
Put the web.header function in a try/except block
Put the web.header function in a try/except block
Python
apache-2.0
cglewis/vcontrol,CyberReboot/vcontrol,CyberReboot/vcontrol,cglewis/vcontrol,CyberReboot/vcontrol,cglewis/vcontrol
from ..helpers import get_allowed import subprocess import web class ShutdownMachineR: """ This endpoint is for shutting down a running machine. """ allow_origin, rest_url = get_allowed.get_allowed() def GET(self, machine): web.header('Access-Control-Allow-Origin', self.allow_origin) ...
from ..helpers import get_allowed import subprocess import web class ShutdownMachineR: """ This endpoint is for shutting down a running machine. """ allow_origin, rest_url = get_allowed.get_allowed() def GET(self, machine): try: web.header('Access-Control-Allow-Origin', self....
<commit_before>from ..helpers import get_allowed import subprocess import web class ShutdownMachineR: """ This endpoint is for shutting down a running machine. """ allow_origin, rest_url = get_allowed.get_allowed() def GET(self, machine): web.header('Access-Control-Allow-Origin', self.allo...
from ..helpers import get_allowed import subprocess import web class ShutdownMachineR: """ This endpoint is for shutting down a running machine. """ allow_origin, rest_url = get_allowed.get_allowed() def GET(self, machine): try: web.header('Access-Control-Allow-Origin', self....
from ..helpers import get_allowed import subprocess import web class ShutdownMachineR: """ This endpoint is for shutting down a running machine. """ allow_origin, rest_url = get_allowed.get_allowed() def GET(self, machine): web.header('Access-Control-Allow-Origin', self.allow_origin) ...
<commit_before>from ..helpers import get_allowed import subprocess import web class ShutdownMachineR: """ This endpoint is for shutting down a running machine. """ allow_origin, rest_url = get_allowed.get_allowed() def GET(self, machine): web.header('Access-Control-Allow-Origin', self.allo...
633c3a356a0ed88c00fbb1a5c972171de2255890
dinosaurs/transaction/database.py
dinosaurs/transaction/database.py
from peewee import * db = SqliteDatabase('emails.db') class Transaction(Model): cost = FloatField() address = CharField() tempPass = CharField() domain = CharField(index=True) email = CharField(primary_key=True, unique=True) is_complete = BooleanField(default=False, index=True) class Met...
from datetime import datetime from peewee import * from dinosaurs import settings from dinosaurs.transaction.coin import generate_address db = SqliteDatabase(settings.database) class Transaction(Model): cost = FloatField() address = CharField() started = DateField() tempPass = CharField() doma...
Update what a transaction is
Update what a transaction is
Python
mit
chrisseto/dinosaurs.sexy,chrisseto/dinosaurs.sexy
from peewee import * db = SqliteDatabase('emails.db') class Transaction(Model): cost = FloatField() address = CharField() tempPass = CharField() domain = CharField(index=True) email = CharField(primary_key=True, unique=True) is_complete = BooleanField(default=False, index=True) class Met...
from datetime import datetime from peewee import * from dinosaurs import settings from dinosaurs.transaction.coin import generate_address db = SqliteDatabase(settings.database) class Transaction(Model): cost = FloatField() address = CharField() started = DateField() tempPass = CharField() doma...
<commit_before>from peewee import * db = SqliteDatabase('emails.db') class Transaction(Model): cost = FloatField() address = CharField() tempPass = CharField() domain = CharField(index=True) email = CharField(primary_key=True, unique=True) is_complete = BooleanField(default=False, index=True)...
from datetime import datetime from peewee import * from dinosaurs import settings from dinosaurs.transaction.coin import generate_address db = SqliteDatabase(settings.database) class Transaction(Model): cost = FloatField() address = CharField() started = DateField() tempPass = CharField() doma...
from peewee import * db = SqliteDatabase('emails.db') class Transaction(Model): cost = FloatField() address = CharField() tempPass = CharField() domain = CharField(index=True) email = CharField(primary_key=True, unique=True) is_complete = BooleanField(default=False, index=True) class Met...
<commit_before>from peewee import * db = SqliteDatabase('emails.db') class Transaction(Model): cost = FloatField() address = CharField() tempPass = CharField() domain = CharField(index=True) email = CharField(primary_key=True, unique=True) is_complete = BooleanField(default=False, index=True)...
820ddf412d09f10977b4bec525d478cc55fe443b
math/prime_test.py
math/prime_test.py
''' prime_test(n) returns a True if n is a prime number else it returns False ''' def prime_test(n): if n <= 1: return False if n==2 or n==3: return True if n%2==0 or n%3==0: return False j = 5 while(j*j <= n): if n%(j)==0 or n%(j+2)==0: return False ...
''' prime_test(n) returns a True if n is a prime number else it returns False ''' def prime_test(n): if n <= 1: return False if n==2 or n==3: return True if n%2==0 or n%3==0: return False j = 5 while(j*j <= n): if n%(j)==0 or n%(j+2)==0: return False ...
Change the return type to boolean
Change the return type to boolean
Python
mit
amaozhao/algorithms,keon/algorithms
''' prime_test(n) returns a True if n is a prime number else it returns False ''' def prime_test(n): if n <= 1: return False if n==2 or n==3: return True if n%2==0 or n%3==0: return False j = 5 while(j*j <= n): if n%(j)==0 or n%(j+2)==0: return False ...
''' prime_test(n) returns a True if n is a prime number else it returns False ''' def prime_test(n): if n <= 1: return False if n==2 or n==3: return True if n%2==0 or n%3==0: return False j = 5 while(j*j <= n): if n%(j)==0 or n%(j+2)==0: return False ...
<commit_before>''' prime_test(n) returns a True if n is a prime number else it returns False ''' def prime_test(n): if n <= 1: return False if n==2 or n==3: return True if n%2==0 or n%3==0: return False j = 5 while(j*j <= n): if n%(j)==0 or n%(j+2)==0: r...
''' prime_test(n) returns a True if n is a prime number else it returns False ''' def prime_test(n): if n <= 1: return False if n==2 or n==3: return True if n%2==0 or n%3==0: return False j = 5 while(j*j <= n): if n%(j)==0 or n%(j+2)==0: return False ...
''' prime_test(n) returns a True if n is a prime number else it returns False ''' def prime_test(n): if n <= 1: return False if n==2 or n==3: return True if n%2==0 or n%3==0: return False j = 5 while(j*j <= n): if n%(j)==0 or n%(j+2)==0: return False ...
<commit_before>''' prime_test(n) returns a True if n is a prime number else it returns False ''' def prime_test(n): if n <= 1: return False if n==2 or n==3: return True if n%2==0 or n%3==0: return False j = 5 while(j*j <= n): if n%(j)==0 or n%(j+2)==0: r...