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
5e0e0e792ca36b7a6daea3931e5333d5d6f28281
pygout/cmdline.py
pygout/cmdline.py
import sys def main(argv=sys.argv): raise NotImplementedError
import sys import argparse import pygments.styles from pygout.application import find_apps class _ListStyles(argparse.Action): def __call__(self, parser, namespace, values, option_string): styles = sorted(pygments.styles.get_all_styles()) parser.exit(0, '\n'.join(styles) + '\n') class _ListApp...
Add argument parsing for 'pygout' command
Add argument parsing for 'pygout' command
Python
bsd-3-clause
alanbriolat/PygOut
import sys def main(argv=sys.argv): raise NotImplementedError Add argument parsing for 'pygout' command
import sys import argparse import pygments.styles from pygout.application import find_apps class _ListStyles(argparse.Action): def __call__(self, parser, namespace, values, option_string): styles = sorted(pygments.styles.get_all_styles()) parser.exit(0, '\n'.join(styles) + '\n') class _ListApp...
<commit_before>import sys def main(argv=sys.argv): raise NotImplementedError <commit_msg>Add argument parsing for 'pygout' command<commit_after>
import sys import argparse import pygments.styles from pygout.application import find_apps class _ListStyles(argparse.Action): def __call__(self, parser, namespace, values, option_string): styles = sorted(pygments.styles.get_all_styles()) parser.exit(0, '\n'.join(styles) + '\n') class _ListApp...
import sys def main(argv=sys.argv): raise NotImplementedError Add argument parsing for 'pygout' commandimport sys import argparse import pygments.styles from pygout.application import find_apps class _ListStyles(argparse.Action): def __call__(self, parser, namespace, values, option_string): styles...
<commit_before>import sys def main(argv=sys.argv): raise NotImplementedError <commit_msg>Add argument parsing for 'pygout' command<commit_after>import sys import argparse import pygments.styles from pygout.application import find_apps class _ListStyles(argparse.Action): def __call__(self, parser, namespac...
95a2d0bb226d57c3aa6977d5d1ce78b014e21e1e
harvest/jobresource.py
harvest/jobresource.py
import json from restless.dj import DjangoResource from restless.resources import skip_prepare from django.conf.urls import patterns, url from harvest.models import Job from harvest.jobstatemachine import JobStatemachine from borg_utils.jobintervals import Triggered class JobResource(DjangoResource): def is_a...
import json from restless.dj import DjangoResource from restless.resources import skip_prepare from django.conf.urls import patterns, url from harvest.models import Job from harvest.jobstatemachine import JobStatemachine from borg_utils.jobintervals import Triggered class JobResource(DjangoResource): def is_a...
Enable authentication for rest api
Enable authentication for rest api
Python
bsd-3-clause
rockychen-dpaw/borgcollector,rockychen-dpaw/borgcollector,parksandwildlife/borgcollector,rockychen-dpaw/borgcollector,parksandwildlife/borgcollector,parksandwildlife/borgcollector
import json from restless.dj import DjangoResource from restless.resources import skip_prepare from django.conf.urls import patterns, url from harvest.models import Job from harvest.jobstatemachine import JobStatemachine from borg_utils.jobintervals import Triggered class JobResource(DjangoResource): def is_a...
import json from restless.dj import DjangoResource from restless.resources import skip_prepare from django.conf.urls import patterns, url from harvest.models import Job from harvest.jobstatemachine import JobStatemachine from borg_utils.jobintervals import Triggered class JobResource(DjangoResource): def is_a...
<commit_before>import json from restless.dj import DjangoResource from restless.resources import skip_prepare from django.conf.urls import patterns, url from harvest.models import Job from harvest.jobstatemachine import JobStatemachine from borg_utils.jobintervals import Triggered class JobResource(DjangoResource...
import json from restless.dj import DjangoResource from restless.resources import skip_prepare from django.conf.urls import patterns, url from harvest.models import Job from harvest.jobstatemachine import JobStatemachine from borg_utils.jobintervals import Triggered class JobResource(DjangoResource): def is_a...
import json from restless.dj import DjangoResource from restless.resources import skip_prepare from django.conf.urls import patterns, url from harvest.models import Job from harvest.jobstatemachine import JobStatemachine from borg_utils.jobintervals import Triggered class JobResource(DjangoResource): def is_a...
<commit_before>import json from restless.dj import DjangoResource from restless.resources import skip_prepare from django.conf.urls import patterns, url from harvest.models import Job from harvest.jobstatemachine import JobStatemachine from borg_utils.jobintervals import Triggered class JobResource(DjangoResource...
76b47fec3b24410f875db96b3404c47d4c3634cb
sheepdog_tables/__init__.py
sheepdog_tables/__init__.py
__version__ = '1.2.0' try: from django.conf import settings getattr(settings, 'dummy_attr', 'dummy_value') _LOAD_PACKAGES = True except: # Just running sdist, we think _LOAD_PACKAGES = False if _LOAD_PACKAGES: from mixins import (TablesMixin, EditTablesMixin, FilteredListView, ...
__version__ = '1.2.0' try: from django.conf import settings getattr(settings, 'dummy_attr', 'dummy_value') _LOAD_PACKAGES = True except: # Just running sdist, we think _LOAD_PACKAGES = False if _LOAD_PACKAGES: from mixins import TablesMixin, EditTablesMixin, FilteredListView from column im...
Fix import error after removal of old csv table mixin
Fix import error after removal of old csv table mixin
Python
bsd-3-clause
SheepDogInc/sheepdog_tables,SheepDogInc/sheepdog_tables
__version__ = '1.2.0' try: from django.conf import settings getattr(settings, 'dummy_attr', 'dummy_value') _LOAD_PACKAGES = True except: # Just running sdist, we think _LOAD_PACKAGES = False if _LOAD_PACKAGES: from mixins import (TablesMixin, EditTablesMixin, FilteredListView, ...
__version__ = '1.2.0' try: from django.conf import settings getattr(settings, 'dummy_attr', 'dummy_value') _LOAD_PACKAGES = True except: # Just running sdist, we think _LOAD_PACKAGES = False if _LOAD_PACKAGES: from mixins import TablesMixin, EditTablesMixin, FilteredListView from column im...
<commit_before>__version__ = '1.2.0' try: from django.conf import settings getattr(settings, 'dummy_attr', 'dummy_value') _LOAD_PACKAGES = True except: # Just running sdist, we think _LOAD_PACKAGES = False if _LOAD_PACKAGES: from mixins import (TablesMixin, EditTablesMixin, FilteredListView, ...
__version__ = '1.2.0' try: from django.conf import settings getattr(settings, 'dummy_attr', 'dummy_value') _LOAD_PACKAGES = True except: # Just running sdist, we think _LOAD_PACKAGES = False if _LOAD_PACKAGES: from mixins import TablesMixin, EditTablesMixin, FilteredListView from column im...
__version__ = '1.2.0' try: from django.conf import settings getattr(settings, 'dummy_attr', 'dummy_value') _LOAD_PACKAGES = True except: # Just running sdist, we think _LOAD_PACKAGES = False if _LOAD_PACKAGES: from mixins import (TablesMixin, EditTablesMixin, FilteredListView, ...
<commit_before>__version__ = '1.2.0' try: from django.conf import settings getattr(settings, 'dummy_attr', 'dummy_value') _LOAD_PACKAGES = True except: # Just running sdist, we think _LOAD_PACKAGES = False if _LOAD_PACKAGES: from mixins import (TablesMixin, EditTablesMixin, FilteredListView, ...
660cd7526c1aad6632446b1af5ae286b5383b52c
tests/commands/load/test_load_cnv_report_cmd.py
tests/commands/load/test_load_cnv_report_cmd.py
# -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report_path) run...
# -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report_path) run...
Fix code style issues with Black
Fix code style issues with Black
Python
bsd-3-clause
Clinical-Genomics/scout,Clinical-Genomics/scout,Clinical-Genomics/scout
# -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report_path) run...
# -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report_path) run...
<commit_before># -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report...
# -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report_path) run...
# -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report_path) run...
<commit_before># -*- coding: utf-8 -*- import os from scout.demo import cnv_report_path from scout.commands import cli def test_load_cnv_report(mock_app, case_obj): """Testing the load delivery report cli command""" # Make sure the path to delivery report is a valid path assert os.path.isfile(cnv_report...
638ff83c99264fc8336b0a60e39400cafbcc643e
manage.py
manage.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.autoreload from tornado.options import parse_command_line, define, options define('port', default=8888) define('template_path', default='templates') define('PROJECT_PATH', default=os.path.join( os.pat...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.autoreload from tornado.options import parse_command_line, define, options define('port', default=8888) define('template_path', default='templates') define('PROJECT_PATH', default=os.path.join( os.pat...
Add autoreload on settings default true
Add autoreload on settings default true
Python
mit
mlgruby/mining,seagoat/mining,seagoat/mining,avelino/mining,mlgruby/mining,jgabriellima/mining,mining/mining,chrisdamba/mining,mining/mining,mlgruby/mining,jgabriellima/mining,AndrzejR/mining,chrisdamba/mining,avelino/mining,AndrzejR/mining
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.autoreload from tornado.options import parse_command_line, define, options define('port', default=8888) define('template_path', default='templates') define('PROJECT_PATH', default=os.path.join( os.pat...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.autoreload from tornado.options import parse_command_line, define, options define('port', default=8888) define('template_path', default='templates') define('PROJECT_PATH', default=os.path.join( os.pat...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.autoreload from tornado.options import parse_command_line, define, options define('port', default=8888) define('template_path', default='templates') define('PROJECT_PATH', default=os.path.j...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.autoreload from tornado.options import parse_command_line, define, options define('port', default=8888) define('template_path', default='templates') define('PROJECT_PATH', default=os.path.join( os.pat...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.autoreload from tornado.options import parse_command_line, define, options define('port', default=8888) define('template_path', default='templates') define('PROJECT_PATH', default=os.path.join( os.pat...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import tornado.ioloop import tornado.web import tornado.autoreload from tornado.options import parse_command_line, define, options define('port', default=8888) define('template_path', default='templates') define('PROJECT_PATH', default=os.path.j...
51c5e4e1e670f52584c157330a9a3b910be92d57
runtests.py
runtests.py
#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites', # for sitema...
#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites', # for sitema...
Add SITE_ID to test settings since contrib.sites is in INSTALLED_APPS.
Add SITE_ID to test settings since contrib.sites is in INSTALLED_APPS.
Python
mit
simonluijk/django-localeurl,jmagnusson/django-localeurl
#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites', # for sitema...
#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites', # for sitema...
<commit_before>#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites...
#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites', # for sitema...
#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites', # for sitema...
<commit_before>#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites...
94e68ff420ecb07ad830e213b38863bf34b7f85c
autocomplete_light/urls.py
autocomplete_light/urls.py
""" An url to AutocompleteView. autocomplete_light_autocomplete Given a 'autocomplete' argument with the name of the autocomplete, this url routes to AutocompleteView. autocomplete_light_registry Renders the autocomplete registry, good for debugging, requires being authenticated as superuser. """ from...
""" An url to AutocompleteView. autocomplete_light_autocomplete Given a 'autocomplete' argument with the name of the autocomplete, this url routes to AutocompleteView. autocomplete_light_registry Renders the autocomplete registry, good for debugging, requires being authenticated as superuser. """ from...
Fix Django 1.9 import error
Fix Django 1.9 import error
Python
mit
shubhamdipt/django-autocomplete-light,luzfcb/django-autocomplete-light,shubhamdipt/django-autocomplete-light,dsanders11/django-autocomplete-light,Perkville/django-autocomplete-light,Perkville/django-autocomplete-light,Eraldo/django-autocomplete-light,luzfcb/django-autocomplete-light,yourlabs/django-autocomplete-light,d...
""" An url to AutocompleteView. autocomplete_light_autocomplete Given a 'autocomplete' argument with the name of the autocomplete, this url routes to AutocompleteView. autocomplete_light_registry Renders the autocomplete registry, good for debugging, requires being authenticated as superuser. """ from...
""" An url to AutocompleteView. autocomplete_light_autocomplete Given a 'autocomplete' argument with the name of the autocomplete, this url routes to AutocompleteView. autocomplete_light_registry Renders the autocomplete registry, good for debugging, requires being authenticated as superuser. """ from...
<commit_before>""" An url to AutocompleteView. autocomplete_light_autocomplete Given a 'autocomplete' argument with the name of the autocomplete, this url routes to AutocompleteView. autocomplete_light_registry Renders the autocomplete registry, good for debugging, requires being authenticated as supe...
""" An url to AutocompleteView. autocomplete_light_autocomplete Given a 'autocomplete' argument with the name of the autocomplete, this url routes to AutocompleteView. autocomplete_light_registry Renders the autocomplete registry, good for debugging, requires being authenticated as superuser. """ from...
""" An url to AutocompleteView. autocomplete_light_autocomplete Given a 'autocomplete' argument with the name of the autocomplete, this url routes to AutocompleteView. autocomplete_light_registry Renders the autocomplete registry, good for debugging, requires being authenticated as superuser. """ from...
<commit_before>""" An url to AutocompleteView. autocomplete_light_autocomplete Given a 'autocomplete' argument with the name of the autocomplete, this url routes to AutocompleteView. autocomplete_light_registry Renders the autocomplete registry, good for debugging, requires being authenticated as supe...
7e8823b59e7a41430fd5f7aad5481c3a9903b4ba
test/test_editor.py
test/test_editor.py
# -*- coding: utf-8 -*- """ This is a simple test script to that is meant to be run by Travis CI to ensure everything works properly foreach bindings on each supported python version (3.2, 3.3, 3.4). It runs a QApplication and shows a QPythonCodeEdit for 500ms. """ import sys from PyQt4 import QtCore, QtGui from pyqod...
# -*- coding: utf-8 -*- """ This is a simple test script to that is meant to be run by Travis CI to ensure everything works properly foreach bindings on each supported python version (3.2, 3.3, 3.4). It runs a QApplication and shows a QPythonCodeEdit for 500ms. """ import sys from PyQt4 import QtCore, QtGui from pyqod...
Fix test, editor instance is required
Fix test, editor instance is required
Python
mit
pyQode/pyqode.python,mmolero/pyqode.python,zwadar/pyqode.python,pyQode/pyqode.python
# -*- coding: utf-8 -*- """ This is a simple test script to that is meant to be run by Travis CI to ensure everything works properly foreach bindings on each supported python version (3.2, 3.3, 3.4). It runs a QApplication and shows a QPythonCodeEdit for 500ms. """ import sys from PyQt4 import QtCore, QtGui from pyqod...
# -*- coding: utf-8 -*- """ This is a simple test script to that is meant to be run by Travis CI to ensure everything works properly foreach bindings on each supported python version (3.2, 3.3, 3.4). It runs a QApplication and shows a QPythonCodeEdit for 500ms. """ import sys from PyQt4 import QtCore, QtGui from pyqod...
<commit_before># -*- coding: utf-8 -*- """ This is a simple test script to that is meant to be run by Travis CI to ensure everything works properly foreach bindings on each supported python version (3.2, 3.3, 3.4). It runs a QApplication and shows a QPythonCodeEdit for 500ms. """ import sys from PyQt4 import QtCore, Q...
# -*- coding: utf-8 -*- """ This is a simple test script to that is meant to be run by Travis CI to ensure everything works properly foreach bindings on each supported python version (3.2, 3.3, 3.4). It runs a QApplication and shows a QPythonCodeEdit for 500ms. """ import sys from PyQt4 import QtCore, QtGui from pyqod...
# -*- coding: utf-8 -*- """ This is a simple test script to that is meant to be run by Travis CI to ensure everything works properly foreach bindings on each supported python version (3.2, 3.3, 3.4). It runs a QApplication and shows a QPythonCodeEdit for 500ms. """ import sys from PyQt4 import QtCore, QtGui from pyqod...
<commit_before># -*- coding: utf-8 -*- """ This is a simple test script to that is meant to be run by Travis CI to ensure everything works properly foreach bindings on each supported python version (3.2, 3.3, 3.4). It runs a QApplication and shows a QPythonCodeEdit for 500ms. """ import sys from PyQt4 import QtCore, Q...
d18ff01e737155eca2cb6c765291e6239328b003
scipy/lib/_numpy_compat.py
scipy/lib/_numpy_compat.py
"""Functions copypasted from newer versions of numpy. """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.lib._version import NumpyVersion if NumpyVersion(np.__version__) > '1.7.0.dev': _assert_warns = np.testing.assert_warns else: def _assert_...
"""Functions copypasted from newer versions of numpy. """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.lib._version import NumpyVersion if NumpyVersion(np.__version__) > '1.7.0.dev': _assert_warns = np.testing.assert_warns else: def _assert_...
Add a 'count_nonzero' function to use with numpy 1.5.1.
MAINT: Add a 'count_nonzero' function to use with numpy 1.5.1.
Python
bsd-3-clause
perimosocordiae/scipy,andyfaff/scipy,aman-iitj/scipy,jakevdp/scipy,dominicelse/scipy,zerothi/scipy,zxsted/scipy,matthewalbani/scipy,anielsen001/scipy,zxsted/scipy,WillieMaddox/scipy,endolith/scipy,cpaulik/scipy,anielsen001/scipy,woodscn/scipy,bkendzior/scipy,gef756/scipy,mdhaber/scipy,futurulus/scipy,Stefan-Endres/scip...
"""Functions copypasted from newer versions of numpy. """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.lib._version import NumpyVersion if NumpyVersion(np.__version__) > '1.7.0.dev': _assert_warns = np.testing.assert_warns else: def _assert_...
"""Functions copypasted from newer versions of numpy. """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.lib._version import NumpyVersion if NumpyVersion(np.__version__) > '1.7.0.dev': _assert_warns = np.testing.assert_warns else: def _assert_...
<commit_before>"""Functions copypasted from newer versions of numpy. """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.lib._version import NumpyVersion if NumpyVersion(np.__version__) > '1.7.0.dev': _assert_warns = np.testing.assert_warns else: ...
"""Functions copypasted from newer versions of numpy. """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.lib._version import NumpyVersion if NumpyVersion(np.__version__) > '1.7.0.dev': _assert_warns = np.testing.assert_warns else: def _assert_...
"""Functions copypasted from newer versions of numpy. """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.lib._version import NumpyVersion if NumpyVersion(np.__version__) > '1.7.0.dev': _assert_warns = np.testing.assert_warns else: def _assert_...
<commit_before>"""Functions copypasted from newer versions of numpy. """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.lib._version import NumpyVersion if NumpyVersion(np.__version__) > '1.7.0.dev': _assert_warns = np.testing.assert_warns else: ...
be922ce28931c101a245aa4b5b0f74c31c23cc60
tests/test_group.py
tests/test_group.py
from unittest import TestCase class GroupTestCase(TestCase): def get_persons(self): pass
from unittest import TestCase from address_book import Person, Group class GroupTestCase(TestCase): def get_persons(self): john_person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'], ...
Test the ability to add and get all persons in the group
Test the ability to add and get all persons in the group
Python
mit
dizpers/python-address-book-assignment
from unittest import TestCase class GroupTestCase(TestCase): def get_persons(self): passTest the ability to add and get all persons in the group
from unittest import TestCase from address_book import Person, Group class GroupTestCase(TestCase): def get_persons(self): john_person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'], ...
<commit_before>from unittest import TestCase class GroupTestCase(TestCase): def get_persons(self): pass<commit_msg>Test the ability to add and get all persons in the group<commit_after>
from unittest import TestCase from address_book import Person, Group class GroupTestCase(TestCase): def get_persons(self): john_person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'], ...
from unittest import TestCase class GroupTestCase(TestCase): def get_persons(self): passTest the ability to add and get all persons in the groupfrom unittest import TestCase from address_book import Person, Group class GroupTestCase(TestCase): def get_persons(self): john_person = Person( ...
<commit_before>from unittest import TestCase class GroupTestCase(TestCase): def get_persons(self): pass<commit_msg>Test the ability to add and get all persons in the group<commit_after>from unittest import TestCase from address_book import Person, Group class GroupTestCase(TestCase): def get_pers...
be4d21b5486f3bba5a4d844015d3d35630ac7d03
udata/auth/forms.py
udata/auth/forms.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask_security.forms import RegisterForm from udata.forms import fields from udata.forms import validators class ExtendedRegisterForm(RegisterForm): first_name = fields.StringField( 'First Name', [validators.Required('First name is requ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask_security.forms import RegisterForm from udata.forms import fields from udata.forms import validators from udata.i18n import lazy_gettext as _ class ExtendedRegisterForm(RegisterForm): first_name = fields.StringField( _('First name'...
Apply i18n to First and Last name in registration form
Apply i18n to First and Last name in registration form
Python
agpl-3.0
etalab/udata,etalab/udata,etalab/udata,opendatateam/udata,opendatateam/udata,opendatateam/udata
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask_security.forms import RegisterForm from udata.forms import fields from udata.forms import validators class ExtendedRegisterForm(RegisterForm): first_name = fields.StringField( 'First Name', [validators.Required('First name is requ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask_security.forms import RegisterForm from udata.forms import fields from udata.forms import validators from udata.i18n import lazy_gettext as _ class ExtendedRegisterForm(RegisterForm): first_name = fields.StringField( _('First name'...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from flask_security.forms import RegisterForm from udata.forms import fields from udata.forms import validators class ExtendedRegisterForm(RegisterForm): first_name = fields.StringField( 'First Name', [validators.Required('Fir...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask_security.forms import RegisterForm from udata.forms import fields from udata.forms import validators from udata.i18n import lazy_gettext as _ class ExtendedRegisterForm(RegisterForm): first_name = fields.StringField( _('First name'...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask_security.forms import RegisterForm from udata.forms import fields from udata.forms import validators class ExtendedRegisterForm(RegisterForm): first_name = fields.StringField( 'First Name', [validators.Required('First name is requ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from flask_security.forms import RegisterForm from udata.forms import fields from udata.forms import validators class ExtendedRegisterForm(RegisterForm): first_name = fields.StringField( 'First Name', [validators.Required('Fir...
12728f6b924a3d45f78b3955cb9fcb563db6a81f
pida_abc_type.py
pida_abc_type.py
from abc import ABCMeta, abstractmethod class IdaTypes: __metaclass__ = ABCMeta @abstractmethod def decode(self, data): raise NotImplementedError() @abstractmethod def get_name(self): raise NotImplementedError() @abstractmethod def get_type(self): raise NotImplem...
from abc import ABCMeta, abstractmethod class IdaTypes: __metaclass__ = ABCMeta @abstractmethod def decode(self, data): raise NotImplementedError() @abstractmethod def get_type(self): raise NotImplementedError()
Delete abstract method get name
Delete abstract method get name
Python
mit
goodwinxp/ATFGenerator,goodwinxp/ATFGenerator,goodwinxp/ATFGenerator
from abc import ABCMeta, abstractmethod class IdaTypes: __metaclass__ = ABCMeta @abstractmethod def decode(self, data): raise NotImplementedError() @abstractmethod def get_name(self): raise NotImplementedError() @abstractmethod def get_type(self): raise NotImplem...
from abc import ABCMeta, abstractmethod class IdaTypes: __metaclass__ = ABCMeta @abstractmethod def decode(self, data): raise NotImplementedError() @abstractmethod def get_type(self): raise NotImplementedError()
<commit_before>from abc import ABCMeta, abstractmethod class IdaTypes: __metaclass__ = ABCMeta @abstractmethod def decode(self, data): raise NotImplementedError() @abstractmethod def get_name(self): raise NotImplementedError() @abstractmethod def get_type(self): ...
from abc import ABCMeta, abstractmethod class IdaTypes: __metaclass__ = ABCMeta @abstractmethod def decode(self, data): raise NotImplementedError() @abstractmethod def get_type(self): raise NotImplementedError()
from abc import ABCMeta, abstractmethod class IdaTypes: __metaclass__ = ABCMeta @abstractmethod def decode(self, data): raise NotImplementedError() @abstractmethod def get_name(self): raise NotImplementedError() @abstractmethod def get_type(self): raise NotImplem...
<commit_before>from abc import ABCMeta, abstractmethod class IdaTypes: __metaclass__ = ABCMeta @abstractmethod def decode(self, data): raise NotImplementedError() @abstractmethod def get_name(self): raise NotImplementedError() @abstractmethod def get_type(self): ...
e421a3cfd9ecfe05aa21b2b3da792f7ab824727d
experimental/db/remove_property.py
experimental/db/remove_property.py
""" Remove a property from the datastore. How to use: $ cd experimental/db/ $ PYTHONPATH=. remote_api_shell.py -s homeawesomation.appspot.com > import remove_property """ from google.appengine.api import namespace_manager from google.appengine.ext import db class Base(db.Expando): pass def remove(namespace, field):...
""" Remove a property from the datastore. How to use: $ cd experimental/db/ $ PYTHONPATH=. remote_api_shell.py -s homeawesomation.appspot.com > import remove_property """ from google.appengine.api import namespace_manager from google.appengine.ext import db class Base(db.Expando): pass def remove(namespace, field):...
Fix datastore delete field script.
Fix datastore delete field script.
Python
mit
tomwilkie/awesomation,tomwilkie/awesomation,tomwilkie/awesomation,tomwilkie/awesomation,tomwilkie/awesomation
""" Remove a property from the datastore. How to use: $ cd experimental/db/ $ PYTHONPATH=. remote_api_shell.py -s homeawesomation.appspot.com > import remove_property """ from google.appengine.api import namespace_manager from google.appengine.ext import db class Base(db.Expando): pass def remove(namespace, field):...
""" Remove a property from the datastore. How to use: $ cd experimental/db/ $ PYTHONPATH=. remote_api_shell.py -s homeawesomation.appspot.com > import remove_property """ from google.appengine.api import namespace_manager from google.appengine.ext import db class Base(db.Expando): pass def remove(namespace, field):...
<commit_before>""" Remove a property from the datastore. How to use: $ cd experimental/db/ $ PYTHONPATH=. remote_api_shell.py -s homeawesomation.appspot.com > import remove_property """ from google.appengine.api import namespace_manager from google.appengine.ext import db class Base(db.Expando): pass def remove(nam...
""" Remove a property from the datastore. How to use: $ cd experimental/db/ $ PYTHONPATH=. remote_api_shell.py -s homeawesomation.appspot.com > import remove_property """ from google.appengine.api import namespace_manager from google.appengine.ext import db class Base(db.Expando): pass def remove(namespace, field):...
""" Remove a property from the datastore. How to use: $ cd experimental/db/ $ PYTHONPATH=. remote_api_shell.py -s homeawesomation.appspot.com > import remove_property """ from google.appengine.api import namespace_manager from google.appengine.ext import db class Base(db.Expando): pass def remove(namespace, field):...
<commit_before>""" Remove a property from the datastore. How to use: $ cd experimental/db/ $ PYTHONPATH=. remote_api_shell.py -s homeawesomation.appspot.com > import remove_property """ from google.appengine.api import namespace_manager from google.appengine.ext import db class Base(db.Expando): pass def remove(nam...
5c95d23ff85a5db3c533679befd8aef4a85baf9d
speeches/search_indexes.py
speeches/search_indexes.py
import datetime from haystack import indexes from speeches.models import Speech class SpeechIndex(indexes.SearchIndex, indexes.Indexable): # Use a template here to include speaker name as well... TODO text = indexes.CharField(document=True, model_attr='text') # , use_template=True) title = indexes.CharFiel...
import datetime from haystack import indexes from speeches.models import Speech class SpeechIndex(indexes.SearchIndex, indexes.Indexable): # Use a template here to include speaker name as well... TODO text = indexes.CharField(document=True, model_attr='text') # , use_template=True) title = indexes.CharFiel...
Allow a null start date in search index.
Allow a null start date in search index.
Python
agpl-3.0
opencorato/sayit,opencorato/sayit,opencorato/sayit,opencorato/sayit
import datetime from haystack import indexes from speeches.models import Speech class SpeechIndex(indexes.SearchIndex, indexes.Indexable): # Use a template here to include speaker name as well... TODO text = indexes.CharField(document=True, model_attr='text') # , use_template=True) title = indexes.CharFiel...
import datetime from haystack import indexes from speeches.models import Speech class SpeechIndex(indexes.SearchIndex, indexes.Indexable): # Use a template here to include speaker name as well... TODO text = indexes.CharField(document=True, model_attr='text') # , use_template=True) title = indexes.CharFiel...
<commit_before>import datetime from haystack import indexes from speeches.models import Speech class SpeechIndex(indexes.SearchIndex, indexes.Indexable): # Use a template here to include speaker name as well... TODO text = indexes.CharField(document=True, model_attr='text') # , use_template=True) title = i...
import datetime from haystack import indexes from speeches.models import Speech class SpeechIndex(indexes.SearchIndex, indexes.Indexable): # Use a template here to include speaker name as well... TODO text = indexes.CharField(document=True, model_attr='text') # , use_template=True) title = indexes.CharFiel...
import datetime from haystack import indexes from speeches.models import Speech class SpeechIndex(indexes.SearchIndex, indexes.Indexable): # Use a template here to include speaker name as well... TODO text = indexes.CharField(document=True, model_attr='text') # , use_template=True) title = indexes.CharFiel...
<commit_before>import datetime from haystack import indexes from speeches.models import Speech class SpeechIndex(indexes.SearchIndex, indexes.Indexable): # Use a template here to include speaker name as well... TODO text = indexes.CharField(document=True, model_attr='text') # , use_template=True) title = i...
1fac10d27f00322e34c3b89527c32b1dcb02decd
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an inte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an inte...
Support Stylus blocks in Vue single-file components
Support Stylus blocks in Vue single-file components
Python
mit
jackbrewer/SublimeLinter-contrib-stylint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an inte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an inte...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """P...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an inte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an inte...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """This module exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """P...
33b5e210ffc32f9f7b3764e1f6f3d54e1f040783
changes/flow.py
changes/flow.py
import logging from plumbum import local, CommandNotFound from changes.changelog import generate_changelog from changes.packaging import build_package, install_package, upload_package, install_from_pypi from changes.vcs import tag_and_push, commit_version_change from changes.verification import run_tests from changes...
import logging import click from changes.changelog import generate_changelog from changes.config import project_config, store_settings from changes.packaging import build_distributions, install_package, upload_package, install_from_pypi from changes.vcs import tag_and_push, commit_version_change, create_github_releas...
Add github releases to publishing
Add github releases to publishing
Python
mit
goldsborough/changes
import logging from plumbum import local, CommandNotFound from changes.changelog import generate_changelog from changes.packaging import build_package, install_package, upload_package, install_from_pypi from changes.vcs import tag_and_push, commit_version_change from changes.verification import run_tests from changes...
import logging import click from changes.changelog import generate_changelog from changes.config import project_config, store_settings from changes.packaging import build_distributions, install_package, upload_package, install_from_pypi from changes.vcs import tag_and_push, commit_version_change, create_github_releas...
<commit_before>import logging from plumbum import local, CommandNotFound from changes.changelog import generate_changelog from changes.packaging import build_package, install_package, upload_package, install_from_pypi from changes.vcs import tag_and_push, commit_version_change from changes.verification import run_tes...
import logging import click from changes.changelog import generate_changelog from changes.config import project_config, store_settings from changes.packaging import build_distributions, install_package, upload_package, install_from_pypi from changes.vcs import tag_and_push, commit_version_change, create_github_releas...
import logging from plumbum import local, CommandNotFound from changes.changelog import generate_changelog from changes.packaging import build_package, install_package, upload_package, install_from_pypi from changes.vcs import tag_and_push, commit_version_change from changes.verification import run_tests from changes...
<commit_before>import logging from plumbum import local, CommandNotFound from changes.changelog import generate_changelog from changes.packaging import build_package, install_package, upload_package, install_from_pypi from changes.vcs import tag_and_push, commit_version_change from changes.verification import run_tes...
6418eb4cb76a00372552b3e06b71f42c520ada7b
ci/TimeUtils.py
ci/TimeUtils.py
# Copyright 2016 Battelle Energy Alliance, LLC # # 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 agr...
# Copyright 2016 Battelle Energy Alliance, LLC # # 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 agr...
Use microseconds in event sort string.
Use microseconds in event sort string. This helps javascript sorting even when two events happen in the same second.
Python
apache-2.0
brianmoose/civet,idaholab/civet,idaholab/civet,idaholab/civet,idaholab/civet,brianmoose/civet,brianmoose/civet,brianmoose/civet
# Copyright 2016 Battelle Energy Alliance, LLC # # 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 agr...
# Copyright 2016 Battelle Energy Alliance, LLC # # 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 agr...
<commit_before> # Copyright 2016 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# Copyright 2016 Battelle Energy Alliance, LLC # # 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 agr...
# Copyright 2016 Battelle Energy Alliance, LLC # # 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 agr...
<commit_before> # Copyright 2016 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
bca298cc9942005f3ab6c74359a52a4c410a5231
manage.py
manage.py
from flask.ext.script import Manager from flask.ext.alembic import ManageMigrations import os from starter import app, db from starter.users.models import user_datastore manager = Manager(app) manager.add_command("migrate", ManageMigrations()) @manager.command def add_admin(email, password): user = user_datast...
from flask.ext.script import Manager from flask.ext.alembic import ManageMigrations import os from starter import app, db from starter.users.models import user_datastore manager = Manager(app) manager.add_command("migrate", ManageMigrations()) @manager.command def add_admin(email, password): user = user_datast...
Update config file with updated project name
Update config file with updated project name
Python
mit
litnimax/flask-starter,andrewsnowden/flask-starter,wenxer/flask-starter,andrewsnowden/flask-starter,litnimax/flask-starter,litnimax/flask-starter,wenxer/flask-starter,andrewsnowden/flask-starter,wenxer/flask-starter
from flask.ext.script import Manager from flask.ext.alembic import ManageMigrations import os from starter import app, db from starter.users.models import user_datastore manager = Manager(app) manager.add_command("migrate", ManageMigrations()) @manager.command def add_admin(email, password): user = user_datast...
from flask.ext.script import Manager from flask.ext.alembic import ManageMigrations import os from starter import app, db from starter.users.models import user_datastore manager = Manager(app) manager.add_command("migrate", ManageMigrations()) @manager.command def add_admin(email, password): user = user_datast...
<commit_before>from flask.ext.script import Manager from flask.ext.alembic import ManageMigrations import os from starter import app, db from starter.users.models import user_datastore manager = Manager(app) manager.add_command("migrate", ManageMigrations()) @manager.command def add_admin(email, password): use...
from flask.ext.script import Manager from flask.ext.alembic import ManageMigrations import os from starter import app, db from starter.users.models import user_datastore manager = Manager(app) manager.add_command("migrate", ManageMigrations()) @manager.command def add_admin(email, password): user = user_datast...
from flask.ext.script import Manager from flask.ext.alembic import ManageMigrations import os from starter import app, db from starter.users.models import user_datastore manager = Manager(app) manager.add_command("migrate", ManageMigrations()) @manager.command def add_admin(email, password): user = user_datast...
<commit_before>from flask.ext.script import Manager from flask.ext.alembic import ManageMigrations import os from starter import app, db from starter.users.models import user_datastore manager = Manager(app) manager.add_command("migrate", ManageMigrations()) @manager.command def add_admin(email, password): use...
6aec2246389934bca253a2fcd18f3ac24525c670
molvs/utils.py
molvs/utils.py
# -*- coding: utf-8 -*- """ molvs.utils ~~~~~~~~~~~ This module contains miscellaneous utility functions. :copyright: Copyright 2014 by Matt Swain. :license: MIT, see LICENSE file for more details. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division impor...
# -*- coding: utf-8 -*- """ molvs.utils ~~~~~~~~~~~ This module contains miscellaneous utility functions. :copyright: Copyright 2014 by Matt Swain. :license: MIT, see LICENSE file for more details. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division impor...
Fix izip import for python3
Fix izip import for python3
Python
mit
mcs07/MolVS
# -*- coding: utf-8 -*- """ molvs.utils ~~~~~~~~~~~ This module contains miscellaneous utility functions. :copyright: Copyright 2014 by Matt Swain. :license: MIT, see LICENSE file for more details. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division impor...
# -*- coding: utf-8 -*- """ molvs.utils ~~~~~~~~~~~ This module contains miscellaneous utility functions. :copyright: Copyright 2014 by Matt Swain. :license: MIT, see LICENSE file for more details. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division impor...
<commit_before># -*- coding: utf-8 -*- """ molvs.utils ~~~~~~~~~~~ This module contains miscellaneous utility functions. :copyright: Copyright 2014 by Matt Swain. :license: MIT, see LICENSE file for more details. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import...
# -*- coding: utf-8 -*- """ molvs.utils ~~~~~~~~~~~ This module contains miscellaneous utility functions. :copyright: Copyright 2014 by Matt Swain. :license: MIT, see LICENSE file for more details. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division impor...
# -*- coding: utf-8 -*- """ molvs.utils ~~~~~~~~~~~ This module contains miscellaneous utility functions. :copyright: Copyright 2014 by Matt Swain. :license: MIT, see LICENSE file for more details. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division impor...
<commit_before># -*- coding: utf-8 -*- """ molvs.utils ~~~~~~~~~~~ This module contains miscellaneous utility functions. :copyright: Copyright 2014 by Matt Swain. :license: MIT, see LICENSE file for more details. """ from __future__ import print_function from __future__ import unicode_literals from __future__ import...
d99ad3de00ec8bb9b3a36de5f50bd4f48a08cbb1
test/acceptance/test_cli_vital.py
test/acceptance/test_cli_vital.py
import unittest from pathlib import Path import subprocess class TestVintDoNotDiedWhenLintingVital(unittest.TestCase): def assertVintStillAlive(self, cmd): try: got_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, ...
import unittest from pathlib import Path import subprocess class TestVintDoNotDiedWhenLintingVital(unittest.TestCase): def assertVintStillAlive(self, cmd): try: got_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, ...
Fix false-negative test caused by using fallbacked assertNotRegex
Fix false-negative test caused by using fallbacked assertNotRegex
Python
mit
Kuniwak/vint,RianFuro/vint,Kuniwak/vint,RianFuro/vint
import unittest from pathlib import Path import subprocess class TestVintDoNotDiedWhenLintingVital(unittest.TestCase): def assertVintStillAlive(self, cmd): try: got_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, ...
import unittest from pathlib import Path import subprocess class TestVintDoNotDiedWhenLintingVital(unittest.TestCase): def assertVintStillAlive(self, cmd): try: got_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, ...
<commit_before>import unittest from pathlib import Path import subprocess class TestVintDoNotDiedWhenLintingVital(unittest.TestCase): def assertVintStillAlive(self, cmd): try: got_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, ...
import unittest from pathlib import Path import subprocess class TestVintDoNotDiedWhenLintingVital(unittest.TestCase): def assertVintStillAlive(self, cmd): try: got_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, ...
import unittest from pathlib import Path import subprocess class TestVintDoNotDiedWhenLintingVital(unittest.TestCase): def assertVintStillAlive(self, cmd): try: got_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, ...
<commit_before>import unittest from pathlib import Path import subprocess class TestVintDoNotDiedWhenLintingVital(unittest.TestCase): def assertVintStillAlive(self, cmd): try: got_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, ...
57fbdb0f3856b91f55ef8e230044a1f60b46f14d
bioshareX/serializers.py
bioshareX/serializers.py
from bioshareX.models import ShareLog, Share, Tag, ShareStats from rest_framework import serializers from django.contrib.auth.models import User from django.core.urlresolvers import reverse class UserSerializer(serializers.ModelSerializer): class Meta: fields=('first_name','last_name','email','username','id...
from bioshareX.models import ShareLog, Share, Tag, ShareStats from rest_framework import serializers from django.contrib.auth.models import User from django.core.urlresolvers import reverse class UserSerializer(serializers.ModelSerializer): class Meta: fields=('first_name','last_name','email','username','id...
Fix url attribute on share serializer :)
Fix url attribute on share serializer :)
Python
mit
amschaal/bioshare,amschaal/bioshare,amschaal/bioshare,amschaal/bioshare,amschaal/bioshare
from bioshareX.models import ShareLog, Share, Tag, ShareStats from rest_framework import serializers from django.contrib.auth.models import User from django.core.urlresolvers import reverse class UserSerializer(serializers.ModelSerializer): class Meta: fields=('first_name','last_name','email','username','id...
from bioshareX.models import ShareLog, Share, Tag, ShareStats from rest_framework import serializers from django.contrib.auth.models import User from django.core.urlresolvers import reverse class UserSerializer(serializers.ModelSerializer): class Meta: fields=('first_name','last_name','email','username','id...
<commit_before>from bioshareX.models import ShareLog, Share, Tag, ShareStats from rest_framework import serializers from django.contrib.auth.models import User from django.core.urlresolvers import reverse class UserSerializer(serializers.ModelSerializer): class Meta: fields=('first_name','last_name','email'...
from bioshareX.models import ShareLog, Share, Tag, ShareStats from rest_framework import serializers from django.contrib.auth.models import User from django.core.urlresolvers import reverse class UserSerializer(serializers.ModelSerializer): class Meta: fields=('first_name','last_name','email','username','id...
from bioshareX.models import ShareLog, Share, Tag, ShareStats from rest_framework import serializers from django.contrib.auth.models import User from django.core.urlresolvers import reverse class UserSerializer(serializers.ModelSerializer): class Meta: fields=('first_name','last_name','email','username','id...
<commit_before>from bioshareX.models import ShareLog, Share, Tag, ShareStats from rest_framework import serializers from django.contrib.auth.models import User from django.core.urlresolvers import reverse class UserSerializer(serializers.ModelSerializer): class Meta: fields=('first_name','last_name','email'...
ba722635f13350c4b1e04aeab0838c923deb1985
feeds/middlewares.py
feeds/middlewares.py
import logging from scrapy.spidermiddlewares.httperror import HttpError logger = logging.getLogger(__name__) class FeedsHttpErrorMiddleware: @classmethod def from_crawler(cls, crawler): return cls() def process_spider_exception(self, response, exception, spider): if isinstance(exceptio...
import logging from scrapy.spidermiddlewares.httperror import HttpError logger = logging.getLogger(__name__) class FeedsHttpErrorMiddleware: @classmethod def from_crawler(cls, crawler): return cls() def process_spider_exception(self, response, exception, spider): if isinstance(exceptio...
Use log level info for HTTP statuses 500, 502, 503, 504.
Use log level info for HTTP statuses 500, 502, 503, 504. These status codes are usually induced by overloaded sites, updates, short downtimes, etc. and are not that relevant.
Python
agpl-3.0
Lukas0907/feeds,Lukas0907/feeds,nblock/feeds,nblock/feeds
import logging from scrapy.spidermiddlewares.httperror import HttpError logger = logging.getLogger(__name__) class FeedsHttpErrorMiddleware: @classmethod def from_crawler(cls, crawler): return cls() def process_spider_exception(self, response, exception, spider): if isinstance(exceptio...
import logging from scrapy.spidermiddlewares.httperror import HttpError logger = logging.getLogger(__name__) class FeedsHttpErrorMiddleware: @classmethod def from_crawler(cls, crawler): return cls() def process_spider_exception(self, response, exception, spider): if isinstance(exceptio...
<commit_before>import logging from scrapy.spidermiddlewares.httperror import HttpError logger = logging.getLogger(__name__) class FeedsHttpErrorMiddleware: @classmethod def from_crawler(cls, crawler): return cls() def process_spider_exception(self, response, exception, spider): if isin...
import logging from scrapy.spidermiddlewares.httperror import HttpError logger = logging.getLogger(__name__) class FeedsHttpErrorMiddleware: @classmethod def from_crawler(cls, crawler): return cls() def process_spider_exception(self, response, exception, spider): if isinstance(exceptio...
import logging from scrapy.spidermiddlewares.httperror import HttpError logger = logging.getLogger(__name__) class FeedsHttpErrorMiddleware: @classmethod def from_crawler(cls, crawler): return cls() def process_spider_exception(self, response, exception, spider): if isinstance(exceptio...
<commit_before>import logging from scrapy.spidermiddlewares.httperror import HttpError logger = logging.getLogger(__name__) class FeedsHttpErrorMiddleware: @classmethod def from_crawler(cls, crawler): return cls() def process_spider_exception(self, response, exception, spider): if isin...
150dad224dd985762714b73e9a91d084efb11e06
ob_pipelines/sample.py
ob_pipelines/sample.py
import os from luigi import Parameter from ob_airtable import get_record_by_name, get_record AIRTABLE_EXPT_TABLE = 'Genomics%20Expt' AIRTABLE_SAMPLE_TABLE = 'Genomics%20Sample' S3_BUCKET = os.environ.get('S3_BUCKET') def get_samples(expt_id): expt = get_record_by_name(expt_id, AIRTABLE_EXPT_TABLE) sample_k...
import os from luigi import Parameter from ob_airtable import AirtableClient AIRTABLE_EXPT_TABLE = 'Genomics%20Expt' AIRTABLE_SAMPLE_TABLE = 'Genomics%20Sample' S3_BUCKET = os.environ.get('S3_BUCKET') client = AirtableClient() def get_samples(expt_id): expt = client.get_record_by_name(expt_id, AIRTABLE_EXPT_TA...
Update to match changes in ob-airtable
Update to match changes in ob-airtable
Python
apache-2.0
outlierbio/ob-pipelines,outlierbio/ob-pipelines,outlierbio/ob-pipelines
import os from luigi import Parameter from ob_airtable import get_record_by_name, get_record AIRTABLE_EXPT_TABLE = 'Genomics%20Expt' AIRTABLE_SAMPLE_TABLE = 'Genomics%20Sample' S3_BUCKET = os.environ.get('S3_BUCKET') def get_samples(expt_id): expt = get_record_by_name(expt_id, AIRTABLE_EXPT_TABLE) sample_k...
import os from luigi import Parameter from ob_airtable import AirtableClient AIRTABLE_EXPT_TABLE = 'Genomics%20Expt' AIRTABLE_SAMPLE_TABLE = 'Genomics%20Sample' S3_BUCKET = os.environ.get('S3_BUCKET') client = AirtableClient() def get_samples(expt_id): expt = client.get_record_by_name(expt_id, AIRTABLE_EXPT_TA...
<commit_before>import os from luigi import Parameter from ob_airtable import get_record_by_name, get_record AIRTABLE_EXPT_TABLE = 'Genomics%20Expt' AIRTABLE_SAMPLE_TABLE = 'Genomics%20Sample' S3_BUCKET = os.environ.get('S3_BUCKET') def get_samples(expt_id): expt = get_record_by_name(expt_id, AIRTABLE_EXPT_TABL...
import os from luigi import Parameter from ob_airtable import AirtableClient AIRTABLE_EXPT_TABLE = 'Genomics%20Expt' AIRTABLE_SAMPLE_TABLE = 'Genomics%20Sample' S3_BUCKET = os.environ.get('S3_BUCKET') client = AirtableClient() def get_samples(expt_id): expt = client.get_record_by_name(expt_id, AIRTABLE_EXPT_TA...
import os from luigi import Parameter from ob_airtable import get_record_by_name, get_record AIRTABLE_EXPT_TABLE = 'Genomics%20Expt' AIRTABLE_SAMPLE_TABLE = 'Genomics%20Sample' S3_BUCKET = os.environ.get('S3_BUCKET') def get_samples(expt_id): expt = get_record_by_name(expt_id, AIRTABLE_EXPT_TABLE) sample_k...
<commit_before>import os from luigi import Parameter from ob_airtable import get_record_by_name, get_record AIRTABLE_EXPT_TABLE = 'Genomics%20Expt' AIRTABLE_SAMPLE_TABLE = 'Genomics%20Sample' S3_BUCKET = os.environ.get('S3_BUCKET') def get_samples(expt_id): expt = get_record_by_name(expt_id, AIRTABLE_EXPT_TABL...
af10bb6acd0a7f4f68d71662eca648ef51eba1c4
src/lib/db/redismanager.py
src/lib/db/redismanager.py
import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized_message = pick...
import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized_message = pick...
Fix object serialization and deserialization in Redis Manager module.
Fix object serialization and deserialization in Redis Manager module.
Python
mit
edonosotti/wechat-bot-skeleton-python
import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized_message = pick...
import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized_message = pick...
<commit_before>import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized...
import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized_message = pick...
import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized_message = pick...
<commit_before>import redis import pickle from .idatabasemanager import IDatabaseManager class RedisManager(IDatabaseManager): KEY_MESSAGE_QUEUE = 'message_queue' def __init__(self, redis_url): self.connection = redis.Redis.from_url(redis_url) def queue_message(self, message): serialized...
fbbef3b57f115fa7adc291c80459cd04e7c4e877
config.py
config.py
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = 'secret' class DevelopmentConfig(Config): DEBUG = True class ProductionConfig(Config): DEBUG = False class TestingConfig(Config): DEBUG = True config = { 'development': DevelopmentConfig, 'testing': Testin...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = 'secret' class DevelopmentConfig(Config): WTF_CSRF_ENABLED = False DEBUG = True class ProductionConfig(Config): DEBUG = False class TestingConfig(Config): WTF_CSRF_ENABLED = False DEBUG = True conf...
Disable CSRF in testing and development mode
Disable CSRF in testing and development mode
Python
mit
JoshuaOndieki/buckylist,JoshuaOndieki/buckylist
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = 'secret' class DevelopmentConfig(Config): DEBUG = True class ProductionConfig(Config): DEBUG = False class TestingConfig(Config): DEBUG = True config = { 'development': DevelopmentConfig, 'testing': Testin...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = 'secret' class DevelopmentConfig(Config): WTF_CSRF_ENABLED = False DEBUG = True class ProductionConfig(Config): DEBUG = False class TestingConfig(Config): WTF_CSRF_ENABLED = False DEBUG = True conf...
<commit_before>import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = 'secret' class DevelopmentConfig(Config): DEBUG = True class ProductionConfig(Config): DEBUG = False class TestingConfig(Config): DEBUG = True config = { 'development': DevelopmentConfig, 't...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = 'secret' class DevelopmentConfig(Config): WTF_CSRF_ENABLED = False DEBUG = True class ProductionConfig(Config): DEBUG = False class TestingConfig(Config): WTF_CSRF_ENABLED = False DEBUG = True conf...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = 'secret' class DevelopmentConfig(Config): DEBUG = True class ProductionConfig(Config): DEBUG = False class TestingConfig(Config): DEBUG = True config = { 'development': DevelopmentConfig, 'testing': Testin...
<commit_before>import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = 'secret' class DevelopmentConfig(Config): DEBUG = True class ProductionConfig(Config): DEBUG = False class TestingConfig(Config): DEBUG = True config = { 'development': DevelopmentConfig, 't...
78a157d25018a9ed858d4b3b89ee565e6ae9a44c
backend/integrations/tasks.py
backend/integrations/tasks.py
from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func(*args, **kwarg...
from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func(*args, **kwarg...
Fix slack 'invalid attachments' error message
Fix slack 'invalid attachments' error message
Python
mit
patrick91/pycon,patrick91/pycon
from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func(*args, **kwarg...
from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func(*args, **kwarg...
<commit_before>from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func...
from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func(*args, **kwarg...
from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func(*args, **kwarg...
<commit_before>from functools import wraps from celery import shared_task from django.conf import settings from integrations import slack def switchable_task(func): @wraps(func) def wrapper(*args, **kwargs): if settings.USE_SCHEDULER: return func.delay(*args, **kwargs) return func...
c973068ada6fa5039a289719c852f06fe786c8fa
bucketeer/test/test_commit.py
bucketeer/test/test_commit.py
import unittest import boto from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket existing_bucket = 'bucket.exists' def setUp(self): # Create a bucket with one file connection = boto.connect_s3() bucket = connection.create_bucket(existing_bucket) return ...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' def setUp(self): # Create a bucket to test on existing bucket connection = boto.connect_s3() bucket = c...
Add create test file dir to setUp and tearDown
Add create test file dir to setUp and tearDown May need to revisit and identify best place to put such a directory.
Python
mit
mgarbacz/bucketeer
import unittest import boto from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket existing_bucket = 'bucket.exists' def setUp(self): # Create a bucket with one file connection = boto.connect_s3() bucket = connection.create_bucket(existing_bucket) return ...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' def setUp(self): # Create a bucket to test on existing bucket connection = boto.connect_s3() bucket = c...
<commit_before>import unittest import boto from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket existing_bucket = 'bucket.exists' def setUp(self): # Create a bucket with one file connection = boto.connect_s3() bucket = connection.create_bucket(existing_bucket)...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' def setUp(self): # Create a bucket to test on existing bucket connection = boto.connect_s3() bucket = c...
import unittest import boto from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket existing_bucket = 'bucket.exists' def setUp(self): # Create a bucket with one file connection = boto.connect_s3() bucket = connection.create_bucket(existing_bucket) return ...
<commit_before>import unittest import boto from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket existing_bucket = 'bucket.exists' def setUp(self): # Create a bucket with one file connection = boto.connect_s3() bucket = connection.create_bucket(existing_bucket)...
ede7a27ca8862bdd1b9b0b7a113b80d055492ae1
debexpo/config/__init__.py
debexpo/config/__init__.py
import os.path import pylons from paste.deploy import appconfig def easy_app_init(ini_path): ini_path = os.path.abspath(ini_path) assert os.path.exists(ini_path) # Initialize Pylons app conf = appconfig('config:' + ini_path) import debexpo.config.environment pylons.config = debexpo.config.env...
Add a simple app initialization function since paster shell is busted
Add a simple app initialization function since paster shell is busted
Python
mit
jonnylamb/debexpo,jadonk/debexpo,jonnylamb/debexpo,jonnylamb/debexpo,swvist/Debexpo,jadonk/debexpo,swvist/Debexpo,swvist/Debexpo,jadonk/debexpo
Add a simple app initialization function since paster shell is busted
import os.path import pylons from paste.deploy import appconfig def easy_app_init(ini_path): ini_path = os.path.abspath(ini_path) assert os.path.exists(ini_path) # Initialize Pylons app conf = appconfig('config:' + ini_path) import debexpo.config.environment pylons.config = debexpo.config.env...
<commit_before><commit_msg>Add a simple app initialization function since paster shell is busted<commit_after>
import os.path import pylons from paste.deploy import appconfig def easy_app_init(ini_path): ini_path = os.path.abspath(ini_path) assert os.path.exists(ini_path) # Initialize Pylons app conf = appconfig('config:' + ini_path) import debexpo.config.environment pylons.config = debexpo.config.env...
Add a simple app initialization function since paster shell is bustedimport os.path import pylons from paste.deploy import appconfig def easy_app_init(ini_path): ini_path = os.path.abspath(ini_path) assert os.path.exists(ini_path) # Initialize Pylons app conf = appconfig('config:' + ini_path) imp...
<commit_before><commit_msg>Add a simple app initialization function since paster shell is busted<commit_after>import os.path import pylons from paste.deploy import appconfig def easy_app_init(ini_path): ini_path = os.path.abspath(ini_path) assert os.path.exists(ini_path) # Initialize Pylons app conf ...
d2ac548441523e2ed4d0ac824e5972ae48be3b19
packages/Python/lldbsuite/test/lang/swift/closure_shortcuts/TestClosureShortcuts.py
packages/Python/lldbsuite/test/lang/swift/closure_shortcuts/TestClosureShortcuts.py
# TestAccelerateSIMD.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTR...
# TestClosureShortcuts.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CON...
Fix typo and run everywhere.
Fix typo and run everywhere.
Python
apache-2.0
apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb
# TestAccelerateSIMD.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTR...
# TestClosureShortcuts.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CON...
<commit_before># TestAccelerateSIMD.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://...
# TestClosureShortcuts.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CON...
# TestAccelerateSIMD.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTR...
<commit_before># TestAccelerateSIMD.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://...
0dcc2a5865ed31618f63e9b152501cf8fbc201ac
doorman/main.py
doorman/main.py
import argparse import os from doorman import Doorman parser = argparse.ArgumentParser(description='Doorman keeps your secret things') parser.add_argument('-s', '--secret', action="store_true", dest="status", help='Hide all secret things') parser.add_argument('-u', '--unsecret', action="store_false", dest="status", he...
import argparse import os from doorman import Doorman DEFAULT_CONFIG_PATH = os.path.join(os.path.expanduser("~"), ".doormanrc") DEFAULT_CONFIG = """[secrets] test_secret = [files] test_secret = """ if not os.path.exists(DEFAULT_CONFIG_PATH): with open(DEFAULT_CONFIG_PATH, "w") as f: f.write(DEFAULT_CONFI...
Add default parameter and default config
Add default parameter and default config
Python
mit
halitalptekin/doorman
import argparse import os from doorman import Doorman parser = argparse.ArgumentParser(description='Doorman keeps your secret things') parser.add_argument('-s', '--secret', action="store_true", dest="status", help='Hide all secret things') parser.add_argument('-u', '--unsecret', action="store_false", dest="status", he...
import argparse import os from doorman import Doorman DEFAULT_CONFIG_PATH = os.path.join(os.path.expanduser("~"), ".doormanrc") DEFAULT_CONFIG = """[secrets] test_secret = [files] test_secret = """ if not os.path.exists(DEFAULT_CONFIG_PATH): with open(DEFAULT_CONFIG_PATH, "w") as f: f.write(DEFAULT_CONFI...
<commit_before>import argparse import os from doorman import Doorman parser = argparse.ArgumentParser(description='Doorman keeps your secret things') parser.add_argument('-s', '--secret', action="store_true", dest="status", help='Hide all secret things') parser.add_argument('-u', '--unsecret', action="store_false", de...
import argparse import os from doorman import Doorman DEFAULT_CONFIG_PATH = os.path.join(os.path.expanduser("~"), ".doormanrc") DEFAULT_CONFIG = """[secrets] test_secret = [files] test_secret = """ if not os.path.exists(DEFAULT_CONFIG_PATH): with open(DEFAULT_CONFIG_PATH, "w") as f: f.write(DEFAULT_CONFI...
import argparse import os from doorman import Doorman parser = argparse.ArgumentParser(description='Doorman keeps your secret things') parser.add_argument('-s', '--secret', action="store_true", dest="status", help='Hide all secret things') parser.add_argument('-u', '--unsecret', action="store_false", dest="status", he...
<commit_before>import argparse import os from doorman import Doorman parser = argparse.ArgumentParser(description='Doorman keeps your secret things') parser.add_argument('-s', '--secret', action="store_true", dest="status", help='Hide all secret things') parser.add_argument('-u', '--unsecret', action="store_false", de...
a8ac03e3a556230e9318daee1dd80f77502d76c2
examples/threads.py
examples/threads.py
import guv guv.monkey_patch() from guv import gyield, sleep import threading import greenlet greenlet_ids = {} def debug(i): print('{} greenlet_ids: {}'.format(i, greenlet_ids)) def f(): greenlet_ids[1] = greenlet.getcurrent() debug(2) print('t: 1') gyield() print('t: 2') gyield() ...
import guv guv.monkey_patch() from guv import gyield, patcher import threading import greenlet threading_orig = patcher.original('threading') greenlet_ids = {} def check_thread(): current = threading_orig.current_thread() assert type(current) is threading_orig._MainThread def debug(i): print('{} gre...
Add check to ensure that we're in the same OS thread
Add check to ensure that we're in the same OS thread
Python
mit
veegee/guv,veegee/guv
import guv guv.monkey_patch() from guv import gyield, sleep import threading import greenlet greenlet_ids = {} def debug(i): print('{} greenlet_ids: {}'.format(i, greenlet_ids)) def f(): greenlet_ids[1] = greenlet.getcurrent() debug(2) print('t: 1') gyield() print('t: 2') gyield() ...
import guv guv.monkey_patch() from guv import gyield, patcher import threading import greenlet threading_orig = patcher.original('threading') greenlet_ids = {} def check_thread(): current = threading_orig.current_thread() assert type(current) is threading_orig._MainThread def debug(i): print('{} gre...
<commit_before>import guv guv.monkey_patch() from guv import gyield, sleep import threading import greenlet greenlet_ids = {} def debug(i): print('{} greenlet_ids: {}'.format(i, greenlet_ids)) def f(): greenlet_ids[1] = greenlet.getcurrent() debug(2) print('t: 1') gyield() print('t: 2') ...
import guv guv.monkey_patch() from guv import gyield, patcher import threading import greenlet threading_orig = patcher.original('threading') greenlet_ids = {} def check_thread(): current = threading_orig.current_thread() assert type(current) is threading_orig._MainThread def debug(i): print('{} gre...
import guv guv.monkey_patch() from guv import gyield, sleep import threading import greenlet greenlet_ids = {} def debug(i): print('{} greenlet_ids: {}'.format(i, greenlet_ids)) def f(): greenlet_ids[1] = greenlet.getcurrent() debug(2) print('t: 1') gyield() print('t: 2') gyield() ...
<commit_before>import guv guv.monkey_patch() from guv import gyield, sleep import threading import greenlet greenlet_ids = {} def debug(i): print('{} greenlet_ids: {}'.format(i, greenlet_ids)) def f(): greenlet_ids[1] = greenlet.getcurrent() debug(2) print('t: 1') gyield() print('t: 2') ...
7fb46bc6fc2c5783569f869bf4855d1ed3709ccb
elmo/moon_tracker/forms.py
elmo/moon_tracker/forms.py
from django import forms class BatchMoonScanForm(forms.Form): data = forms.CharField( widget=forms.Textarea(attrs={'class':'form-control monospace'}), )
from django import forms import csv from io import StringIO class BatchMoonScanForm(forms.Form): data = forms.CharField( widget=forms.Textarea(attrs={'class':'form-control monospace'}), ) def clean(self): cleaned_data = super(BatchMoonScanForm, self).clean() raw = StringIO(cleaned...
Add clean method for batch submission form.
Add clean method for batch submission form.
Python
mit
StephenSwat/eve_lunar_mining_organiser,StephenSwat/eve_lunar_mining_organiser
from django import forms class BatchMoonScanForm(forms.Form): data = forms.CharField( widget=forms.Textarea(attrs={'class':'form-control monospace'}), ) Add clean method for batch submission form.
from django import forms import csv from io import StringIO class BatchMoonScanForm(forms.Form): data = forms.CharField( widget=forms.Textarea(attrs={'class':'form-control monospace'}), ) def clean(self): cleaned_data = super(BatchMoonScanForm, self).clean() raw = StringIO(cleaned...
<commit_before>from django import forms class BatchMoonScanForm(forms.Form): data = forms.CharField( widget=forms.Textarea(attrs={'class':'form-control monospace'}), ) <commit_msg>Add clean method for batch submission form.<commit_after>
from django import forms import csv from io import StringIO class BatchMoonScanForm(forms.Form): data = forms.CharField( widget=forms.Textarea(attrs={'class':'form-control monospace'}), ) def clean(self): cleaned_data = super(BatchMoonScanForm, self).clean() raw = StringIO(cleaned...
from django import forms class BatchMoonScanForm(forms.Form): data = forms.CharField( widget=forms.Textarea(attrs={'class':'form-control monospace'}), ) Add clean method for batch submission form.from django import forms import csv from io import StringIO class BatchMoonScanForm(forms.Form): data...
<commit_before>from django import forms class BatchMoonScanForm(forms.Form): data = forms.CharField( widget=forms.Textarea(attrs={'class':'form-control monospace'}), ) <commit_msg>Add clean method for batch submission form.<commit_after>from django import forms import csv from io import StringIO clas...
f4d7f7207cff82c38d6973dbef717bfc50345b32
models.py
models.py
from django.db import models class FandomHierarchy(models.Model): name = models.CharField(max_length=100) parent = models.ForeignKey('self') class Image(models.Model): pixel_width = models.IntegerField() pixel_height = models.IntegerField() name = models.CharField(max_length=100) fandoms = models.ManyToManyFie...
from django.db import models class FandomHierarchy(models.Model): name = models.CharField(max_length=100) parent = models.ForeignKey('self') def __unicode__(self): return "Fandom tree node %s" % self.name class Image(models.Model): pixel_width = models.IntegerField() pixel_height = models.IntegerField() name...
Add __unicode__ methods to model
Add __unicode__ methods to model
Python
bsd-3-clause
willmurnane/store
from django.db import models class FandomHierarchy(models.Model): name = models.CharField(max_length=100) parent = models.ForeignKey('self') class Image(models.Model): pixel_width = models.IntegerField() pixel_height = models.IntegerField() name = models.CharField(max_length=100) fandoms = models.ManyToManyFie...
from django.db import models class FandomHierarchy(models.Model): name = models.CharField(max_length=100) parent = models.ForeignKey('self') def __unicode__(self): return "Fandom tree node %s" % self.name class Image(models.Model): pixel_width = models.IntegerField() pixel_height = models.IntegerField() name...
<commit_before>from django.db import models class FandomHierarchy(models.Model): name = models.CharField(max_length=100) parent = models.ForeignKey('self') class Image(models.Model): pixel_width = models.IntegerField() pixel_height = models.IntegerField() name = models.CharField(max_length=100) fandoms = model...
from django.db import models class FandomHierarchy(models.Model): name = models.CharField(max_length=100) parent = models.ForeignKey('self') def __unicode__(self): return "Fandom tree node %s" % self.name class Image(models.Model): pixel_width = models.IntegerField() pixel_height = models.IntegerField() name...
from django.db import models class FandomHierarchy(models.Model): name = models.CharField(max_length=100) parent = models.ForeignKey('self') class Image(models.Model): pixel_width = models.IntegerField() pixel_height = models.IntegerField() name = models.CharField(max_length=100) fandoms = models.ManyToManyFie...
<commit_before>from django.db import models class FandomHierarchy(models.Model): name = models.CharField(max_length=100) parent = models.ForeignKey('self') class Image(models.Model): pixel_width = models.IntegerField() pixel_height = models.IntegerField() name = models.CharField(max_length=100) fandoms = model...
ce291ba622ae27e0bdb448fee26b37c9af4ffeb0
example/urls.py
example/urls.py
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^comments/', include('fluent_comments.urls')), u...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin from django.views.generic import RedirectView admin.autodiscover() urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^comme...
Fix running the example project with Django 1.5
Fix running the example project with Django 1.5
Python
apache-2.0
BangorUniversity/django-fluent-comments,PetrDlouhy/django-fluent-comments,mgpyh/django-fluent-comments,Afnarel/django-fluent-comments,django-fluent/django-fluent-comments,BangorUniversity/django-fluent-comments,PetrDlouhy/django-fluent-comments,BangorUniversity/django-fluent-comments,Afnarel/django-fluent-comments,djan...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^comments/', include('fluent_comments.urls')), u...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin from django.views.generic import RedirectView admin.autodiscover() urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^comme...
<commit_before>from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^comments/', include('fluent_comments...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin from django.views.generic import RedirectView admin.autodiscover() urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^comme...
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^comments/', include('fluent_comments.urls')), u...
<commit_before>from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^comments/', include('fluent_comments...
71cc08178729c81d1af75e3ad5cf637f658e68b1
comet/plugins/eventprinter.py
comet/plugins/eventprinter.py
# Comet VOEvent Broker. # Example event handler: print an event. import lxml.etree as ElementTree from zope.interface import implementer from twisted.plugin import IPlugin from comet.icomet import IHandler # Event handlers must implement IPlugin and IHandler. @implementer(IPlugin, IHandler) class EventPrinter(object)...
# Comet VOEvent Broker. # Example event handler: print an event. import lxml.etree as ElementTree from zope.interface import implementer from twisted.plugin import IPlugin from comet.icomet import IHandler # Event handlers must implement IPlugin and IHandler. @implementer(IPlugin, IHandler) class EventPrinter(object)...
Convert to unicode for printing.
Convert to unicode for printing.
Python
bsd-2-clause
jdswinbank/Comet,jdswinbank/Comet
# Comet VOEvent Broker. # Example event handler: print an event. import lxml.etree as ElementTree from zope.interface import implementer from twisted.plugin import IPlugin from comet.icomet import IHandler # Event handlers must implement IPlugin and IHandler. @implementer(IPlugin, IHandler) class EventPrinter(object)...
# Comet VOEvent Broker. # Example event handler: print an event. import lxml.etree as ElementTree from zope.interface import implementer from twisted.plugin import IPlugin from comet.icomet import IHandler # Event handlers must implement IPlugin and IHandler. @implementer(IPlugin, IHandler) class EventPrinter(object)...
<commit_before># Comet VOEvent Broker. # Example event handler: print an event. import lxml.etree as ElementTree from zope.interface import implementer from twisted.plugin import IPlugin from comet.icomet import IHandler # Event handlers must implement IPlugin and IHandler. @implementer(IPlugin, IHandler) class Event...
# Comet VOEvent Broker. # Example event handler: print an event. import lxml.etree as ElementTree from zope.interface import implementer from twisted.plugin import IPlugin from comet.icomet import IHandler # Event handlers must implement IPlugin and IHandler. @implementer(IPlugin, IHandler) class EventPrinter(object)...
# Comet VOEvent Broker. # Example event handler: print an event. import lxml.etree as ElementTree from zope.interface import implementer from twisted.plugin import IPlugin from comet.icomet import IHandler # Event handlers must implement IPlugin and IHandler. @implementer(IPlugin, IHandler) class EventPrinter(object)...
<commit_before># Comet VOEvent Broker. # Example event handler: print an event. import lxml.etree as ElementTree from zope.interface import implementer from twisted.plugin import IPlugin from comet.icomet import IHandler # Event handlers must implement IPlugin and IHandler. @implementer(IPlugin, IHandler) class Event...
fc2d03b5ec8de233b61994b26d27214ada719d33
humanize/__init__.py
humanize/__init__.py
VERSION = (0,5,1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', 'naturalsize', 'activate', '...
__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['__version__', 'VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', '...
Add common __version__, same as VERSION
Add common __version__, same as VERSION
Python
mit
jmoiron/humanize,jmoiron/humanize
VERSION = (0,5,1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', 'naturalsize', 'activate', '...
__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['__version__', 'VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', '...
<commit_before>VERSION = (0,5,1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', 'naturalsize', ...
__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['__version__', 'VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', '...
VERSION = (0,5,1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', 'naturalsize', 'activate', '...
<commit_before>VERSION = (0,5,1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', 'naturalsize', ...
877a8fc9989644312b18c5eeeb6552f84350c182
timed/redmine/admin.py
timed/redmine/admin.py
from django.contrib import admin from timed.projects.admin import ProjectAdmin from timed.projects.models import Project from timed_adfinis.redmine.models import RedmineProject admin.site.unregister(Project) class RedmineProjectInline(admin.StackedInline): model = RedmineProject @admin.register(Project) class...
from django.contrib import admin from timed.projects.admin import ProjectAdmin from timed.projects.models import Project from timed_adfinis.redmine.models import RedmineProject from timed_adfinis.subscription.admin import SubscriptionProjectInline admin.site.unregister(Project) class RedmineProjectInline(admin.Stac...
Add support subscriptions for parity with SSA portal
Add support subscriptions for parity with SSA portal These includes: * customer password * subscription and packages * orders * import from timescout
Python
agpl-3.0
adfinis-sygroup/timed-backend,adfinis-sygroup/timed-backend,adfinis-sygroup/timed-backend
from django.contrib import admin from timed.projects.admin import ProjectAdmin from timed.projects.models import Project from timed_adfinis.redmine.models import RedmineProject admin.site.unregister(Project) class RedmineProjectInline(admin.StackedInline): model = RedmineProject @admin.register(Project) class...
from django.contrib import admin from timed.projects.admin import ProjectAdmin from timed.projects.models import Project from timed_adfinis.redmine.models import RedmineProject from timed_adfinis.subscription.admin import SubscriptionProjectInline admin.site.unregister(Project) class RedmineProjectInline(admin.Stac...
<commit_before>from django.contrib import admin from timed.projects.admin import ProjectAdmin from timed.projects.models import Project from timed_adfinis.redmine.models import RedmineProject admin.site.unregister(Project) class RedmineProjectInline(admin.StackedInline): model = RedmineProject @admin.register...
from django.contrib import admin from timed.projects.admin import ProjectAdmin from timed.projects.models import Project from timed_adfinis.redmine.models import RedmineProject from timed_adfinis.subscription.admin import SubscriptionProjectInline admin.site.unregister(Project) class RedmineProjectInline(admin.Stac...
from django.contrib import admin from timed.projects.admin import ProjectAdmin from timed.projects.models import Project from timed_adfinis.redmine.models import RedmineProject admin.site.unregister(Project) class RedmineProjectInline(admin.StackedInline): model = RedmineProject @admin.register(Project) class...
<commit_before>from django.contrib import admin from timed.projects.admin import ProjectAdmin from timed.projects.models import Project from timed_adfinis.redmine.models import RedmineProject admin.site.unregister(Project) class RedmineProjectInline(admin.StackedInline): model = RedmineProject @admin.register...
59fef68bee92c45438a87336c92bce031de21139
tests/test_utils.py
tests/test_utils.py
from datetime import timedelta from jose import utils class TestUtils: def test_total_seconds(self): td = timedelta(seconds=5) assert utils.timedelta_total_seconds(td) == 5 def test_long_to_base64(self): assert utils.long_to_base64(0xDEADBEEF) == b'3q2-7w'
from datetime import timedelta from jose import utils class TestUtils: def test_total_seconds(self): td = timedelta(seconds=5) assert utils.timedelta_total_seconds(td) == 5 def test_long_to_base64(self): assert utils.long_to_base64(0xDEADBEEF) == b'3q2-7w' assert utils.lon...
Add test for size parameter of long_to_base64.
Add test for size parameter of long_to_base64.
Python
mit
mpdavis/python-jose
from datetime import timedelta from jose import utils class TestUtils: def test_total_seconds(self): td = timedelta(seconds=5) assert utils.timedelta_total_seconds(td) == 5 def test_long_to_base64(self): assert utils.long_to_base64(0xDEADBEEF) == b'3q2-7w' Add test for size parame...
from datetime import timedelta from jose import utils class TestUtils: def test_total_seconds(self): td = timedelta(seconds=5) assert utils.timedelta_total_seconds(td) == 5 def test_long_to_base64(self): assert utils.long_to_base64(0xDEADBEEF) == b'3q2-7w' assert utils.lon...
<commit_before> from datetime import timedelta from jose import utils class TestUtils: def test_total_seconds(self): td = timedelta(seconds=5) assert utils.timedelta_total_seconds(td) == 5 def test_long_to_base64(self): assert utils.long_to_base64(0xDEADBEEF) == b'3q2-7w' <commit_m...
from datetime import timedelta from jose import utils class TestUtils: def test_total_seconds(self): td = timedelta(seconds=5) assert utils.timedelta_total_seconds(td) == 5 def test_long_to_base64(self): assert utils.long_to_base64(0xDEADBEEF) == b'3q2-7w' assert utils.lon...
from datetime import timedelta from jose import utils class TestUtils: def test_total_seconds(self): td = timedelta(seconds=5) assert utils.timedelta_total_seconds(td) == 5 def test_long_to_base64(self): assert utils.long_to_base64(0xDEADBEEF) == b'3q2-7w' Add test for size parame...
<commit_before> from datetime import timedelta from jose import utils class TestUtils: def test_total_seconds(self): td = timedelta(seconds=5) assert utils.timedelta_total_seconds(td) == 5 def test_long_to_base64(self): assert utils.long_to_base64(0xDEADBEEF) == b'3q2-7w' <commit_m...
554cedb2113f57799f0c62b42d6ff1b317c6100a
ingestors/support/image.py
ingestors/support/image.py
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from PIL import Image from PIL.Image import DecompressionBombWarning from ingestors.exc import ProcessingException class ImageSupport(object): """Provides helpers for image extraction.""" def parse_image(self, data...
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from PIL import Image from PIL.Image import DecompressionBombError as DBE from PIL.Image import DecompressionBombWarning as DBW from ingestors.exc import ProcessingException class ImageSupport(object): """Provides helpe...
Handle decompression bomb errors as well as warnings.
Handle decompression bomb errors as well as warnings.
Python
mit
alephdata/ingestors
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from PIL import Image from PIL.Image import DecompressionBombWarning from ingestors.exc import ProcessingException class ImageSupport(object): """Provides helpers for image extraction.""" def parse_image(self, data...
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from PIL import Image from PIL.Image import DecompressionBombError as DBE from PIL.Image import DecompressionBombWarning as DBW from ingestors.exc import ProcessingException class ImageSupport(object): """Provides helpe...
<commit_before>try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from PIL import Image from PIL.Image import DecompressionBombWarning from ingestors.exc import ProcessingException class ImageSupport(object): """Provides helpers for image extraction.""" def parse_i...
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from PIL import Image from PIL.Image import DecompressionBombError as DBE from PIL.Image import DecompressionBombWarning as DBW from ingestors.exc import ProcessingException class ImageSupport(object): """Provides helpe...
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from PIL import Image from PIL.Image import DecompressionBombWarning from ingestors.exc import ProcessingException class ImageSupport(object): """Provides helpers for image extraction.""" def parse_image(self, data...
<commit_before>try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from PIL import Image from PIL.Image import DecompressionBombWarning from ingestors.exc import ProcessingException class ImageSupport(object): """Provides helpers for image extraction.""" def parse_i...
4117b767f48678542797d811cc1a8ea75f37c714
saleor/account/migrations/0040_auto_20200415_0443.py
saleor/account/migrations/0040_auto_20200415_0443.py
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.filter( c...
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.filter( c...
Remove unused permission from db
Remove unused permission from db
Python
bsd-3-clause
mociepka/saleor,mociepka/saleor,mociepka/saleor
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.filter( c...
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.filter( c...
<commit_before># Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.fi...
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.filter( c...
# Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.filter( c...
<commit_before># Generated by Django 3.0.5 on 2020-04-15 09:43 from django.db import migrations def change_extension_permission_to_plugin_permission(apps, schema_editor): permission = apps.get_model("auth", "Permission") users = apps.get_model("account", "User") plugin_permission = permission.objects.fi...
bf97ea6e188175cb452fd1534356fc205d1434f7
hiscore/__init__.py
hiscore/__init__.py
__author__ = 'Abraham Othman' __copyright__ = 'Copyright 2014, Abraham Othman' __version__ = '1.0' __maintainer__ = 'Abraham Othman' __email__ = 'aothman@cs.cmu.edu' from .engine import create, HiScoreEngine, Point from .errors import MonotoneError, MonotoneBoundsError, ScoreCreationError
__author__ = 'Abraham Othman' __copyright__ = 'Copyright 2014, Abraham Othman' __version__ = '1.0.0' __maintainer__ = 'Abraham Othman' __email__ = 'aothman@cs.cmu.edu' from .engine import create, HiScoreEngine, Point from .errors import MonotoneError, MonotoneBoundsError, ScoreCreationError
Change versioning to be PEP compatible
Change versioning to be PEP compatible
Python
bsd-3-clause
aothman/hiscore
__author__ = 'Abraham Othman' __copyright__ = 'Copyright 2014, Abraham Othman' __version__ = '1.0' __maintainer__ = 'Abraham Othman' __email__ = 'aothman@cs.cmu.edu' from .engine import create, HiScoreEngine, Point from .errors import MonotoneError, MonotoneBoundsError, ScoreCreationErrorChange versioning to be PEP c...
__author__ = 'Abraham Othman' __copyright__ = 'Copyright 2014, Abraham Othman' __version__ = '1.0.0' __maintainer__ = 'Abraham Othman' __email__ = 'aothman@cs.cmu.edu' from .engine import create, HiScoreEngine, Point from .errors import MonotoneError, MonotoneBoundsError, ScoreCreationError
<commit_before>__author__ = 'Abraham Othman' __copyright__ = 'Copyright 2014, Abraham Othman' __version__ = '1.0' __maintainer__ = 'Abraham Othman' __email__ = 'aothman@cs.cmu.edu' from .engine import create, HiScoreEngine, Point from .errors import MonotoneError, MonotoneBoundsError, ScoreCreationError<commit_msg>Ch...
__author__ = 'Abraham Othman' __copyright__ = 'Copyright 2014, Abraham Othman' __version__ = '1.0.0' __maintainer__ = 'Abraham Othman' __email__ = 'aothman@cs.cmu.edu' from .engine import create, HiScoreEngine, Point from .errors import MonotoneError, MonotoneBoundsError, ScoreCreationError
__author__ = 'Abraham Othman' __copyright__ = 'Copyright 2014, Abraham Othman' __version__ = '1.0' __maintainer__ = 'Abraham Othman' __email__ = 'aothman@cs.cmu.edu' from .engine import create, HiScoreEngine, Point from .errors import MonotoneError, MonotoneBoundsError, ScoreCreationErrorChange versioning to be PEP c...
<commit_before>__author__ = 'Abraham Othman' __copyright__ = 'Copyright 2014, Abraham Othman' __version__ = '1.0' __maintainer__ = 'Abraham Othman' __email__ = 'aothman@cs.cmu.edu' from .engine import create, HiScoreEngine, Point from .errors import MonotoneError, MonotoneBoundsError, ScoreCreationError<commit_msg>Ch...
080101d59490ca5f5b0b1208a9a11663cdfaf7a7
results/views.py
results/views.py
# Create your views here.
# Create your views here. from django.shortcuts import render_to_response from django.template import RequestContext from libs.parser import Parser import os, settings from plots.models import Md5Log, BenchmarkLogs, MachineInfo, RtAverage, RtMoss, RtBldg391, RtM35, RtSphflake, RtWorld, RtStar def show_result(request, ...
Add show_result view that extracts data from the database for the file, and sends it on to the result.html template
Add show_result view that extracts data from the database for the file, and sends it on to the result.html template
Python
bsd-2-clause
ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark,ankeshanand/benchmark
# Create your views here. Add show_result view that extracts data from the database for the file, and sends it on to the result.html template
# Create your views here. from django.shortcuts import render_to_response from django.template import RequestContext from libs.parser import Parser import os, settings from plots.models import Md5Log, BenchmarkLogs, MachineInfo, RtAverage, RtMoss, RtBldg391, RtM35, RtSphflake, RtWorld, RtStar def show_result(request, ...
<commit_before># Create your views here. <commit_msg>Add show_result view that extracts data from the database for the file, and sends it on to the result.html template<commit_after>
# Create your views here. from django.shortcuts import render_to_response from django.template import RequestContext from libs.parser import Parser import os, settings from plots.models import Md5Log, BenchmarkLogs, MachineInfo, RtAverage, RtMoss, RtBldg391, RtM35, RtSphflake, RtWorld, RtStar def show_result(request, ...
# Create your views here. Add show_result view that extracts data from the database for the file, and sends it on to the result.html template# Create your views here. from django.shortcuts import render_to_response from django.template import RequestContext from libs.parser import Parser import os, settings from plots....
<commit_before># Create your views here. <commit_msg>Add show_result view that extracts data from the database for the file, and sends it on to the result.html template<commit_after># Create your views here. from django.shortcuts import render_to_response from django.template import RequestContext from libs.parser impo...
0827ea6ef23e87461bb936684bc61bcc1cb6b42f
spider.py
spider.py
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
Add XPath query to extract dataset name
Add XPath query to extract dataset name
Python
mit
MaxLikelihood/CODE
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
<commit_before>from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls =...
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls = ['http://data....
<commit_before>from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.selector import Selector from dataset import DatasetItem class DatasetSpider(CrawlSpider): name = 'dataset' allowed_domains = ['data.gc.ca/data/en'] start_urls =...
f8c61141e8466a408284f45ca331a2f6d87f9363
django_extensions/settings.py
django_extensions/settings.py
# -*- coding: utf-8 -*- import os from django.conf import settings BASE_DIR = os.path.dirname(os.path.realpath(__file__)) REPLACEMENTS = getattr(settings, 'EXTENSIONS_REPLACEMENTS', {}) DEFAULT_SQLITE_ENGINES = ( 'django.db.backends.sqlite3', 'django.db.backends.spatialite', ) DEFAULT_MYSQL_ENGINES = ( '...
# -*- coding: utf-8 -*- import os from django.conf import settings BASE_DIR = os.path.dirname(os.path.realpath(__file__)) REPLACEMENTS = getattr(settings, 'EXTENSIONS_REPLACEMENTS', {}) DEFAULT_SQLITE_ENGINES = ( 'django.db.backends.sqlite3', 'django.db.backends.spatialite', ) DEFAULT_MYSQL_ENGINES = ( '...
Add django-zero-downtime-migrations Postgres DB engine
Add django-zero-downtime-migrations Postgres DB engine From the repo: https://github.com/tbicr/django-pg-zero-downtime-migrations
Python
mit
django-extensions/django-extensions,django-extensions/django-extensions,django-extensions/django-extensions
# -*- coding: utf-8 -*- import os from django.conf import settings BASE_DIR = os.path.dirname(os.path.realpath(__file__)) REPLACEMENTS = getattr(settings, 'EXTENSIONS_REPLACEMENTS', {}) DEFAULT_SQLITE_ENGINES = ( 'django.db.backends.sqlite3', 'django.db.backends.spatialite', ) DEFAULT_MYSQL_ENGINES = ( '...
# -*- coding: utf-8 -*- import os from django.conf import settings BASE_DIR = os.path.dirname(os.path.realpath(__file__)) REPLACEMENTS = getattr(settings, 'EXTENSIONS_REPLACEMENTS', {}) DEFAULT_SQLITE_ENGINES = ( 'django.db.backends.sqlite3', 'django.db.backends.spatialite', ) DEFAULT_MYSQL_ENGINES = ( '...
<commit_before># -*- coding: utf-8 -*- import os from django.conf import settings BASE_DIR = os.path.dirname(os.path.realpath(__file__)) REPLACEMENTS = getattr(settings, 'EXTENSIONS_REPLACEMENTS', {}) DEFAULT_SQLITE_ENGINES = ( 'django.db.backends.sqlite3', 'django.db.backends.spatialite', ) DEFAULT_MYSQL_EN...
# -*- coding: utf-8 -*- import os from django.conf import settings BASE_DIR = os.path.dirname(os.path.realpath(__file__)) REPLACEMENTS = getattr(settings, 'EXTENSIONS_REPLACEMENTS', {}) DEFAULT_SQLITE_ENGINES = ( 'django.db.backends.sqlite3', 'django.db.backends.spatialite', ) DEFAULT_MYSQL_ENGINES = ( '...
# -*- coding: utf-8 -*- import os from django.conf import settings BASE_DIR = os.path.dirname(os.path.realpath(__file__)) REPLACEMENTS = getattr(settings, 'EXTENSIONS_REPLACEMENTS', {}) DEFAULT_SQLITE_ENGINES = ( 'django.db.backends.sqlite3', 'django.db.backends.spatialite', ) DEFAULT_MYSQL_ENGINES = ( '...
<commit_before># -*- coding: utf-8 -*- import os from django.conf import settings BASE_DIR = os.path.dirname(os.path.realpath(__file__)) REPLACEMENTS = getattr(settings, 'EXTENSIONS_REPLACEMENTS', {}) DEFAULT_SQLITE_ENGINES = ( 'django.db.backends.sqlite3', 'django.db.backends.spatialite', ) DEFAULT_MYSQL_EN...
1cb0b66476f9876f9d59c3c3049e2f00dd8b9dca
pycargr/cli.py
pycargr/cli.py
import csv from argparse import ArgumentParser from json import dumps from pycargr.model import to_dict from pycargr.parser import parse_car_page parser = ArgumentParser() parser.add_argument('car_ids', nargs='+') parser.add_argument('--output', choices=['csv', 'json', 'stdout'], default='stdout') def main(): a...
import csv from argparse import ArgumentParser from json import dumps from pycargr.model import to_dict from pycargr.parser import parse_car_page parser = ArgumentParser(description='CLI interface to interact with car.gr') parser.add_argument('car_ids', nargs='+') parser.add_argument('--output', choices=['csv', 'json...
Add scrape flag and pop html from output
Add scrape flag and pop html from output
Python
mit
Florents-Tselai/PyCarGr
import csv from argparse import ArgumentParser from json import dumps from pycargr.model import to_dict from pycargr.parser import parse_car_page parser = ArgumentParser() parser.add_argument('car_ids', nargs='+') parser.add_argument('--output', choices=['csv', 'json', 'stdout'], default='stdout') def main(): a...
import csv from argparse import ArgumentParser from json import dumps from pycargr.model import to_dict from pycargr.parser import parse_car_page parser = ArgumentParser(description='CLI interface to interact with car.gr') parser.add_argument('car_ids', nargs='+') parser.add_argument('--output', choices=['csv', 'json...
<commit_before>import csv from argparse import ArgumentParser from json import dumps from pycargr.model import to_dict from pycargr.parser import parse_car_page parser = ArgumentParser() parser.add_argument('car_ids', nargs='+') parser.add_argument('--output', choices=['csv', 'json', 'stdout'], default='stdout') de...
import csv from argparse import ArgumentParser from json import dumps from pycargr.model import to_dict from pycargr.parser import parse_car_page parser = ArgumentParser(description='CLI interface to interact with car.gr') parser.add_argument('car_ids', nargs='+') parser.add_argument('--output', choices=['csv', 'json...
import csv from argparse import ArgumentParser from json import dumps from pycargr.model import to_dict from pycargr.parser import parse_car_page parser = ArgumentParser() parser.add_argument('car_ids', nargs='+') parser.add_argument('--output', choices=['csv', 'json', 'stdout'], default='stdout') def main(): a...
<commit_before>import csv from argparse import ArgumentParser from json import dumps from pycargr.model import to_dict from pycargr.parser import parse_car_page parser = ArgumentParser() parser.add_argument('car_ids', nargs='+') parser.add_argument('--output', choices=['csv', 'json', 'stdout'], default='stdout') de...
e58c3de5e4537478299f9c9caff751e908bf569a
scripts/shell.py
scripts/shell.py
#!/usr/bin/python # -*- coding: utf-8 -*- """ Spawns an interactive Python shell. Usage: python pwb.py shell [args] If no arguments are given, the pywikibot library will not be loaded. The following parameters are supported: &params; """ # (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT lic...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Spawns an interactive Python shell. Usage: python pwb.py shell [args] If no arguments are given, the pywikibot library will not be loaded. The following parameters are supported: &params; """ # (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT lic...
Use args as one parameter
[FIX] Shell: Use args as one parameter Change-Id: If96eb33fb24e0e9c23e4bf9f20a65a48da5fc159
Python
mit
magul/pywikibot-core,hasteur/g13bot_tools_new,xZise/pywikibot-core,jayvdb/pywikibot-core,icyflame/batman,Darkdadaah/pywikibot-core,PersianWikipedia/pywikibot-core,happy5214/pywikibot-core,emijrp/pywikibot-core,npdoty/pywikibot,VcamX/pywikibot-core,h4ck3rm1k3/pywikibot-core,h4ck3rm1k3/pywikibot-core,magul/pywikibot-core...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Spawns an interactive Python shell. Usage: python pwb.py shell [args] If no arguments are given, the pywikibot library will not be loaded. The following parameters are supported: &params; """ # (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT lic...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Spawns an interactive Python shell. Usage: python pwb.py shell [args] If no arguments are given, the pywikibot library will not be loaded. The following parameters are supported: &params; """ # (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT lic...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- """ Spawns an interactive Python shell. Usage: python pwb.py shell [args] If no arguments are given, the pywikibot library will not be loaded. The following parameters are supported: &params; """ # (C) Pywikibot team, 2014 # # Distributed under the terms...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Spawns an interactive Python shell. Usage: python pwb.py shell [args] If no arguments are given, the pywikibot library will not be loaded. The following parameters are supported: &params; """ # (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT lic...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Spawns an interactive Python shell. Usage: python pwb.py shell [args] If no arguments are given, the pywikibot library will not be loaded. The following parameters are supported: &params; """ # (C) Pywikibot team, 2014 # # Distributed under the terms of the MIT lic...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- """ Spawns an interactive Python shell. Usage: python pwb.py shell [args] If no arguments are given, the pywikibot library will not be loaded. The following parameters are supported: &params; """ # (C) Pywikibot team, 2014 # # Distributed under the terms...
1ea9dd3cf9effc6f65d01a31acdbd39848492223
soco/__init__.py
soco/__init__.py
"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from .core import S...
"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from .core import S...
Set up for v0.26.0 release
Set up for v0.26.0 release
Python
mit
SoCo/SoCo,SoCo/SoCo
"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from .core import S...
"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from .core import S...
<commit_before>"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from...
"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from .core import S...
"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from .core import S...
<commit_before>"""SoCo (Sonos Controller) is a simple library to control Sonos speakers.""" # There is no need for all strings here to be unicode, and Py2 cannot import # modules with unicode names so do not use from __future__ import # unicode_literals # https://github.com/SoCo/SoCo/issues/98 # import logging from...
557f4129dc50acddd6c80d0a0679d8c82d5d9215
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Patrik,,, # Copyright (c) 2015 Patrik,,, # # License: MIT # """This module exports the Polylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Polylint(NodeLinter): """Provides an inte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Patrik,,, # Copyright (c) 2015 Patrik,,, # # License: MIT # """This module exports the Polylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Polylint(NodeLinter): """Provides an inte...
Use proper flag for single file error reporting
Use proper flag for single file error reporting "inputs-only" was changed to "no-recursion" before getting merged
Python
mit
nomego/SublimeLinter-contrib-polylint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Patrik,,, # Copyright (c) 2015 Patrik,,, # # License: MIT # """This module exports the Polylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Polylint(NodeLinter): """Provides an inte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Patrik,,, # Copyright (c) 2015 Patrik,,, # # License: MIT # """This module exports the Polylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Polylint(NodeLinter): """Provides an inte...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Patrik,,, # Copyright (c) 2015 Patrik,,, # # License: MIT # """This module exports the Polylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Polylint(NodeLinter): """P...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Patrik,,, # Copyright (c) 2015 Patrik,,, # # License: MIT # """This module exports the Polylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Polylint(NodeLinter): """Provides an inte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Patrik,,, # Copyright (c) 2015 Patrik,,, # # License: MIT # """This module exports the Polylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Polylint(NodeLinter): """Provides an inte...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Patrik,,, # Copyright (c) 2015 Patrik,,, # # License: MIT # """This module exports the Polylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Polylint(NodeLinter): """P...
53cca5180ec5ad04694ce28d0fc0d945004c33b3
src/unifind.py
src/unifind.py
class UnionFind: def __init__(self, it=None): self.uf = {} if it is None else {i : i for i in it} self.count = len(self.uf) def __iter__(self): return iter(self.uf.keys()) def __getitem__(self, key): return self.uf[key] def __setitem__(self, key, val): if key ...
class UnionFind: def __init__(self, it=None): self.uf = {} if it is None else {i : i for i in it} self.count = len(self.uf) def __iter__(self): return iter(self.uf.keys()) def __getitem__(self, key): return self.uf[key] def __setitem__(self, key, val): if key ...
Fix QuickFind: stop relying on keys being integers
Fix QuickFind: stop relying on keys being integers
Python
mit
all3fox/algos-py
class UnionFind: def __init__(self, it=None): self.uf = {} if it is None else {i : i for i in it} self.count = len(self.uf) def __iter__(self): return iter(self.uf.keys()) def __getitem__(self, key): return self.uf[key] def __setitem__(self, key, val): if key ...
class UnionFind: def __init__(self, it=None): self.uf = {} if it is None else {i : i for i in it} self.count = len(self.uf) def __iter__(self): return iter(self.uf.keys()) def __getitem__(self, key): return self.uf[key] def __setitem__(self, key, val): if key ...
<commit_before>class UnionFind: def __init__(self, it=None): self.uf = {} if it is None else {i : i for i in it} self.count = len(self.uf) def __iter__(self): return iter(self.uf.keys()) def __getitem__(self, key): return self.uf[key] def __setitem__(self, key, val): ...
class UnionFind: def __init__(self, it=None): self.uf = {} if it is None else {i : i for i in it} self.count = len(self.uf) def __iter__(self): return iter(self.uf.keys()) def __getitem__(self, key): return self.uf[key] def __setitem__(self, key, val): if key ...
class UnionFind: def __init__(self, it=None): self.uf = {} if it is None else {i : i for i in it} self.count = len(self.uf) def __iter__(self): return iter(self.uf.keys()) def __getitem__(self, key): return self.uf[key] def __setitem__(self, key, val): if key ...
<commit_before>class UnionFind: def __init__(self, it=None): self.uf = {} if it is None else {i : i for i in it} self.count = len(self.uf) def __iter__(self): return iter(self.uf.keys()) def __getitem__(self, key): return self.uf[key] def __setitem__(self, key, val): ...
56cde7a0a93a733e0f2958837f935b1446214168
tests/test_artefacts.py
tests/test_artefacts.py
import pytest from plumbium import artefacts def test_NiiGzImage_basename(): img = artefacts.NiiGzImage('foo.nii.gz') assert img.basename == 'foo' def test_NiiGzImage_bad_extension(): with pytest.raises(ValueError): img = artefacts.NiiGzImage('foo.nii.gx')
import pytest from plumbium import artefacts def test_Artefact_basename(): img = artefacts.Artefact('foo.nii.gz', '.nii.gz') assert img.basename == 'foo' def test_Artefact_repr(): img = artefacts.Artefact('foo.nii.gz', '.nii.gz') assert repr(img) == "Artefact('foo.nii.gz')" def test_NiiGzImage_bad...
Improve test coverage of artefact module
Improve test coverage of artefact module
Python
mit
jstutters/Plumbium
import pytest from plumbium import artefacts def test_NiiGzImage_basename(): img = artefacts.NiiGzImage('foo.nii.gz') assert img.basename == 'foo' def test_NiiGzImage_bad_extension(): with pytest.raises(ValueError): img = artefacts.NiiGzImage('foo.nii.gx') Improve test coverage of artefact modul...
import pytest from plumbium import artefacts def test_Artefact_basename(): img = artefacts.Artefact('foo.nii.gz', '.nii.gz') assert img.basename == 'foo' def test_Artefact_repr(): img = artefacts.Artefact('foo.nii.gz', '.nii.gz') assert repr(img) == "Artefact('foo.nii.gz')" def test_NiiGzImage_bad...
<commit_before>import pytest from plumbium import artefacts def test_NiiGzImage_basename(): img = artefacts.NiiGzImage('foo.nii.gz') assert img.basename == 'foo' def test_NiiGzImage_bad_extension(): with pytest.raises(ValueError): img = artefacts.NiiGzImage('foo.nii.gx') <commit_msg>Improve test...
import pytest from plumbium import artefacts def test_Artefact_basename(): img = artefacts.Artefact('foo.nii.gz', '.nii.gz') assert img.basename == 'foo' def test_Artefact_repr(): img = artefacts.Artefact('foo.nii.gz', '.nii.gz') assert repr(img) == "Artefact('foo.nii.gz')" def test_NiiGzImage_bad...
import pytest from plumbium import artefacts def test_NiiGzImage_basename(): img = artefacts.NiiGzImage('foo.nii.gz') assert img.basename == 'foo' def test_NiiGzImage_bad_extension(): with pytest.raises(ValueError): img = artefacts.NiiGzImage('foo.nii.gx') Improve test coverage of artefact modul...
<commit_before>import pytest from plumbium import artefacts def test_NiiGzImage_basename(): img = artefacts.NiiGzImage('foo.nii.gz') assert img.basename == 'foo' def test_NiiGzImage_bad_extension(): with pytest.raises(ValueError): img = artefacts.NiiGzImage('foo.nii.gx') <commit_msg>Improve test...
460bb04533b96e7812964553d9af0c5e25033f21
rxet/helper.py
rxet/helper.py
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0]
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0] def unpack_uint32(data, offset): return unpack("I", data[offset:offset+4])[0]
Add unpacking of uint32 at an offset
Add unpacking of uint32 at an offset
Python
mit
RenolY2/battalion-tools
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0]Add unpacking of uint32 at an offset
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0] def unpack_uint32(data, offset): return unpack("I", data[offset:offset+4])[0]
<commit_before>from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0]<commit_msg>Add unpacking of uint32 at an offset<commit_after>
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0] def unpack_uint32(data, offset): return unpack("I", data[offset:offset+4])[0]
from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0]Add unpacking of uint32 at an offsetfrom struct import unpack def read_uint32(fileobj): return unpack("I", fil...
<commit_before>from struct import unpack def read_uint32(fileobj): return unpack("I", fileobj.read(4))[0] # read int as a big endian number def read_uint32_BE(fileobj): return unpack(">I", fileobj.read(4))[0]<commit_msg>Add unpacking of uint32 at an offset<commit_after>from struct import unpack def read_ui...
71100d859689a975c6a9bcb06bd5ec8dedbcc876
preferences/views.py
preferences/views.py
from django.shortcuts import render from django.views.generic.edit import FormView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.forms import PreferencesForm class EmailRegistrationView(RegistrationView): form_class ...
from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import PersonFollow from opencivicdata.models.peopl...
Make view to handle saving and displaying of preferences form
Make view to handle saving and displaying of preferences form
Python
mit
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
from django.shortcuts import render from django.views.generic.edit import FormView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.forms import PreferencesForm class EmailRegistrationView(RegistrationView): form_class ...
from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import PersonFollow from opencivicdata.models.peopl...
<commit_before>from django.shortcuts import render from django.views.generic.edit import FormView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.forms import PreferencesForm class EmailRegistrationView(RegistrationView): ...
from django.shortcuts import render from django.db import transaction # from django.views.generic import TemplateView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.models import PersonFollow from opencivicdata.models.peopl...
from django.shortcuts import render from django.views.generic.edit import FormView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.forms import PreferencesForm class EmailRegistrationView(RegistrationView): form_class ...
<commit_before>from django.shortcuts import render from django.views.generic.edit import FormView from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView from preferences.forms import PreferencesForm class EmailRegistrationView(RegistrationView): ...
05d2230015e085cba408474539f997f7fecd2f91
tests/utils.py
tests/utils.py
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from os.path import abspath, dirname, join TEST_DIR = abspath(dirname(__file__)) def load_snippet(file_name): """Helper to fetch in the content of a test snippet.""" file_path = ...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from os.path import abspath, dirname, join TEST_DIR = abspath(dirname(__file__)) def load_snippet(file_name): """Helper to fetch in the content of a test snippet.""" file_path = ...
Load articles/snippets as binary strings
Load articles/snippets as binary strings
Python
bsd-2-clause
bookieio/breadability,bookieio/breadability
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from os.path import abspath, dirname, join TEST_DIR = abspath(dirname(__file__)) def load_snippet(file_name): """Helper to fetch in the content of a test snippet.""" file_path = ...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from os.path import abspath, dirname, join TEST_DIR = abspath(dirname(__file__)) def load_snippet(file_name): """Helper to fetch in the content of a test snippet.""" file_path = ...
<commit_before># -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from os.path import abspath, dirname, join TEST_DIR = abspath(dirname(__file__)) def load_snippet(file_name): """Helper to fetch in the content of a test snippet.""" ...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from os.path import abspath, dirname, join TEST_DIR = abspath(dirname(__file__)) def load_snippet(file_name): """Helper to fetch in the content of a test snippet.""" file_path = ...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from os.path import abspath, dirname, join TEST_DIR = abspath(dirname(__file__)) def load_snippet(file_name): """Helper to fetch in the content of a test snippet.""" file_path = ...
<commit_before># -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from os.path import abspath, dirname, join TEST_DIR = abspath(dirname(__file__)) def load_snippet(file_name): """Helper to fetch in the content of a test snippet.""" ...
b7e6e2d6665e5ec81bddcb77b33de6a2d2bc7807
users/views.py
users/views.py
from rest_framework import generics from django.contrib.auth.models import User from users.serializers import UserSerializer class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer class UserDetail(generics.RetrieveUpdateDestroyAPIView): queryset = Use...
from rest_framework import generics, permissions from django.contrib.auth.models import User from users.serializers import UserSerializer class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer class UserDetail(generics.RetrieveUpdateDestroyAPIView): p...
Add permission to edit user
Add permission to edit user
Python
mit
OscaRoa/api-cats
from rest_framework import generics from django.contrib.auth.models import User from users.serializers import UserSerializer class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer class UserDetail(generics.RetrieveUpdateDestroyAPIView): queryset = Use...
from rest_framework import generics, permissions from django.contrib.auth.models import User from users.serializers import UserSerializer class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer class UserDetail(generics.RetrieveUpdateDestroyAPIView): p...
<commit_before>from rest_framework import generics from django.contrib.auth.models import User from users.serializers import UserSerializer class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer class UserDetail(generics.RetrieveUpdateDestroyAPIView): ...
from rest_framework import generics, permissions from django.contrib.auth.models import User from users.serializers import UserSerializer class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer class UserDetail(generics.RetrieveUpdateDestroyAPIView): p...
from rest_framework import generics from django.contrib.auth.models import User from users.serializers import UserSerializer class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer class UserDetail(generics.RetrieveUpdateDestroyAPIView): queryset = Use...
<commit_before>from rest_framework import generics from django.contrib.auth.models import User from users.serializers import UserSerializer class UserList(generics.ListCreateAPIView): queryset = User.objects.all() serializer_class = UserSerializer class UserDetail(generics.RetrieveUpdateDestroyAPIView): ...
3d74cd5a02f1d5aefb98e4ef97a1ef458a6b79ea
IPython/zmq/__init__.py
IPython/zmq/__init__.py
#----------------------------------------------------------------------------- # Copyright (C) 2010 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as part of this software. #------------------------------------------------...
#----------------------------------------------------------------------------- # Copyright (C) 2010 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as part of this software. #------------------------------------------------...
Check for dev version of zmq per @minrk's request
Check for dev version of zmq per @minrk's request
Python
bsd-3-clause
ipython/ipython,ipython/ipython
#----------------------------------------------------------------------------- # Copyright (C) 2010 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as part of this software. #------------------------------------------------...
#----------------------------------------------------------------------------- # Copyright (C) 2010 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as part of this software. #------------------------------------------------...
<commit_before>#----------------------------------------------------------------------------- # Copyright (C) 2010 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as part of this software. #---------------------------------...
#----------------------------------------------------------------------------- # Copyright (C) 2010 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as part of this software. #------------------------------------------------...
#----------------------------------------------------------------------------- # Copyright (C) 2010 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as part of this software. #------------------------------------------------...
<commit_before>#----------------------------------------------------------------------------- # Copyright (C) 2010 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as part of this software. #---------------------------------...
5cf4cd8b457bf3c6fa7b4f46b1ed4dfd542e5139
scripts/lib/fontbuild/decomposeGlyph.py
scripts/lib/fontbuild/decomposeGlyph.py
def decomposeGlyph(glyph): """Moves the components of a glyph to its outline.""" font = glyph.getParent() for component in glyph.components: componentGlyph = font[component.baseGlyph] for contour in componentGlyph: contour = contour.copy() contour.move(component.offs...
def decomposeGlyph(glyph): """Moves the components of a glyph to its outline.""" font = glyph.getParent() for component in glyph.components: componentGlyph = font[component.baseGlyph] for contour in componentGlyph: contour = contour.copy() contour.scale(component.sca...
Move after scaling during decomposition.
Move after scaling during decomposition.
Python
apache-2.0
supriyantomaftuh/roboto,anthrotype/roboto,urandu/roboto,urandu/roboto,bowlofstew/roboto,googlefonts/roboto,moyogo/roboto,Cartman0/roboto,moyogo/roboto,Cartman0/roboto,supriyantomaftuh/roboto,googlefonts/roboto,anthrotype/roboto,bowlofstew/roboto
def decomposeGlyph(glyph): """Moves the components of a glyph to its outline.""" font = glyph.getParent() for component in glyph.components: componentGlyph = font[component.baseGlyph] for contour in componentGlyph: contour = contour.copy() contour.move(component.offs...
def decomposeGlyph(glyph): """Moves the components of a glyph to its outline.""" font = glyph.getParent() for component in glyph.components: componentGlyph = font[component.baseGlyph] for contour in componentGlyph: contour = contour.copy() contour.scale(component.sca...
<commit_before>def decomposeGlyph(glyph): """Moves the components of a glyph to its outline.""" font = glyph.getParent() for component in glyph.components: componentGlyph = font[component.baseGlyph] for contour in componentGlyph: contour = contour.copy() contour.move...
def decomposeGlyph(glyph): """Moves the components of a glyph to its outline.""" font = glyph.getParent() for component in glyph.components: componentGlyph = font[component.baseGlyph] for contour in componentGlyph: contour = contour.copy() contour.scale(component.sca...
def decomposeGlyph(glyph): """Moves the components of a glyph to its outline.""" font = glyph.getParent() for component in glyph.components: componentGlyph = font[component.baseGlyph] for contour in componentGlyph: contour = contour.copy() contour.move(component.offs...
<commit_before>def decomposeGlyph(glyph): """Moves the components of a glyph to its outline.""" font = glyph.getParent() for component in glyph.components: componentGlyph = font[component.baseGlyph] for contour in componentGlyph: contour = contour.copy() contour.move...
95dab3dbd10ed923c3d37d29efda6ab8ee971c61
plugin.py
plugin.py
import pre import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world import supybot.ircdb as ircdb from supybot.commands import * import supybot.irclib as irclib import supybot.ircmsgs as ircmsgs import supybot.plugins as plugins import supybot.ircutils as ircuti...
import pre import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world import supybot.ircdb as ircdb from supybot.commands import * import supybot.irclib as irclib import supybot.ircmsgs as ircmsgs import supybot.plugins as plugins import supybot.ircutils as ircuti...
Send PM to querying user (i think? bad docs.)
Send PM to querying user (i think? bad docs.)
Python
mit
bcowdery/supybot-predb-plugin
import pre import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world import supybot.ircdb as ircdb from supybot.commands import * import supybot.irclib as irclib import supybot.ircmsgs as ircmsgs import supybot.plugins as plugins import supybot.ircutils as ircuti...
import pre import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world import supybot.ircdb as ircdb from supybot.commands import * import supybot.irclib as irclib import supybot.ircmsgs as ircmsgs import supybot.plugins as plugins import supybot.ircutils as ircuti...
<commit_before>import pre import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world import supybot.ircdb as ircdb from supybot.commands import * import supybot.irclib as irclib import supybot.ircmsgs as ircmsgs import supybot.plugins as plugins import supybot.irc...
import pre import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world import supybot.ircdb as ircdb from supybot.commands import * import supybot.irclib as irclib import supybot.ircmsgs as ircmsgs import supybot.plugins as plugins import supybot.ircutils as ircuti...
import pre import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world import supybot.ircdb as ircdb from supybot.commands import * import supybot.irclib as irclib import supybot.ircmsgs as ircmsgs import supybot.plugins as plugins import supybot.ircutils as ircuti...
<commit_before>import pre import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world import supybot.ircdb as ircdb from supybot.commands import * import supybot.irclib as irclib import supybot.ircmsgs as ircmsgs import supybot.plugins as plugins import supybot.irc...
f41e46c0dd0b859cdcc88a2d3ae96fa01864445f
plugin.py
plugin.py
import os import sublime def plugin_loaded(): disable_native_php_package_completions() def disable_native_php_package_completions(): completions_file = os.path.join( sublime.packages_path(), 'PHP', 'PHP.sublime-completions' ) if not os.path.isfile(completions_file): ...
import os import sublime def plugin_loaded(): # disable_native_php_package_completions completions_file = os.path.join(sublime.packages_path(), 'PHP', 'PHP.sublime-completions') if not os.path.isfile(completions_file): os.makedirs(os.path.dirname(completions_file)) with open(completions_fil...
Remove fixes for sublime text backwards compatibility
Remove fixes for sublime text backwards compatibility I'm not working around sublime text issues anymore.
Python
bsd-3-clause
gerardroche/sublime-phpck
import os import sublime def plugin_loaded(): disable_native_php_package_completions() def disable_native_php_package_completions(): completions_file = os.path.join( sublime.packages_path(), 'PHP', 'PHP.sublime-completions' ) if not os.path.isfile(completions_file): ...
import os import sublime def plugin_loaded(): # disable_native_php_package_completions completions_file = os.path.join(sublime.packages_path(), 'PHP', 'PHP.sublime-completions') if not os.path.isfile(completions_file): os.makedirs(os.path.dirname(completions_file)) with open(completions_fil...
<commit_before>import os import sublime def plugin_loaded(): disable_native_php_package_completions() def disable_native_php_package_completions(): completions_file = os.path.join( sublime.packages_path(), 'PHP', 'PHP.sublime-completions' ) if not os.path.isfile(completions_...
import os import sublime def plugin_loaded(): # disable_native_php_package_completions completions_file = os.path.join(sublime.packages_path(), 'PHP', 'PHP.sublime-completions') if not os.path.isfile(completions_file): os.makedirs(os.path.dirname(completions_file)) with open(completions_fil...
import os import sublime def plugin_loaded(): disable_native_php_package_completions() def disable_native_php_package_completions(): completions_file = os.path.join( sublime.packages_path(), 'PHP', 'PHP.sublime-completions' ) if not os.path.isfile(completions_file): ...
<commit_before>import os import sublime def plugin_loaded(): disable_native_php_package_completions() def disable_native_php_package_completions(): completions_file = os.path.join( sublime.packages_path(), 'PHP', 'PHP.sublime-completions' ) if not os.path.isfile(completions_...
ab0e5da8c56817ed80552d94e02b7cec7b9d1a97
rmgpy/qm/__init__.py
rmgpy/qm/__init__.py
import os if not os.environ.get("RMG_workingDirectory"): import os.path message = "Please set your RMG_workingDirectory environment variable.\n" +\ "(eg. export RMG_workingDirectory=%s )" % \ os.path.abspath(os.path.join(os.path.dirname(__file__),'..')) raise Exception(message)
import os if not os.environ.get("RMG_workingDirectory"): import os.path message = "Please set your RMG_workingDirectory environment variable.\n" +\ "(eg. export RMG_workingDirectory=%s )" % \ os.path.abspath(os.path.join(os.path.dirname(__file__),'..','..')) raise Exception(message)
Change suggested RMG_workingDirectory path due to qm package move
Change suggested RMG_workingDirectory path due to qm package move
Python
mit
comocheng/RMG-Py,pierrelb/RMG-Py,enochd/RMG-Py,KEHANG/RMG-Py,nyee/RMG-Py,enochd/RMG-Py,nyee/RMG-Py,KEHANG/RMG-Py,nickvandewiele/RMG-Py,comocheng/RMG-Py,faribas/RMG-Py,chatelak/RMG-Py,pierrelb/RMG-Py,faribas/RMG-Py,chatelak/RMG-Py,nickvandewiele/RMG-Py
import os if not os.environ.get("RMG_workingDirectory"): import os.path message = "Please set your RMG_workingDirectory environment variable.\n" +\ "(eg. export RMG_workingDirectory=%s )" % \ os.path.abspath(os.path.join(os.path.dirname(__file__),'..')) raise Exception(message) Change sugges...
import os if not os.environ.get("RMG_workingDirectory"): import os.path message = "Please set your RMG_workingDirectory environment variable.\n" +\ "(eg. export RMG_workingDirectory=%s )" % \ os.path.abspath(os.path.join(os.path.dirname(__file__),'..','..')) raise Exception(message)
<commit_before>import os if not os.environ.get("RMG_workingDirectory"): import os.path message = "Please set your RMG_workingDirectory environment variable.\n" +\ "(eg. export RMG_workingDirectory=%s )" % \ os.path.abspath(os.path.join(os.path.dirname(__file__),'..')) raise Exception(message...
import os if not os.environ.get("RMG_workingDirectory"): import os.path message = "Please set your RMG_workingDirectory environment variable.\n" +\ "(eg. export RMG_workingDirectory=%s )" % \ os.path.abspath(os.path.join(os.path.dirname(__file__),'..','..')) raise Exception(message)
import os if not os.environ.get("RMG_workingDirectory"): import os.path message = "Please set your RMG_workingDirectory environment variable.\n" +\ "(eg. export RMG_workingDirectory=%s )" % \ os.path.abspath(os.path.join(os.path.dirname(__file__),'..')) raise Exception(message) Change sugges...
<commit_before>import os if not os.environ.get("RMG_workingDirectory"): import os.path message = "Please set your RMG_workingDirectory environment variable.\n" +\ "(eg. export RMG_workingDirectory=%s )" % \ os.path.abspath(os.path.join(os.path.dirname(__file__),'..')) raise Exception(message...
fe698148b69d90270b309bf63d1289522a120e86
salt/grains/extra.py
salt/grains/extra.py
import os def shell(): ''' Return the default shell to use on this system ''' # Provides: # shell return {'shell': os.environ.get('SHELL', '/bin/sh'}
import os def shell(): ''' Return the default shell to use on this system ''' # Provides: # shell return {'shell': os.environ.get('SHELL', '/bin/sh')}
Add missing parens that was causing an error
Add missing parens that was causing an error
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
import os def shell(): ''' Return the default shell to use on this system ''' # Provides: # shell return {'shell': os.environ.get('SHELL', '/bin/sh'} Add missing parens that was causing an error
import os def shell(): ''' Return the default shell to use on this system ''' # Provides: # shell return {'shell': os.environ.get('SHELL', '/bin/sh')}
<commit_before>import os def shell(): ''' Return the default shell to use on this system ''' # Provides: # shell return {'shell': os.environ.get('SHELL', '/bin/sh'} <commit_msg>Add missing parens that was causing an error<commit_after>
import os def shell(): ''' Return the default shell to use on this system ''' # Provides: # shell return {'shell': os.environ.get('SHELL', '/bin/sh')}
import os def shell(): ''' Return the default shell to use on this system ''' # Provides: # shell return {'shell': os.environ.get('SHELL', '/bin/sh'} Add missing parens that was causing an errorimport os def shell(): ''' Return the default shell to use on this system ''' # Pr...
<commit_before>import os def shell(): ''' Return the default shell to use on this system ''' # Provides: # shell return {'shell': os.environ.get('SHELL', '/bin/sh'} <commit_msg>Add missing parens that was causing an error<commit_after>import os def shell(): ''' Return the default she...
26e26e50ddd8b64fd3206788ef1defbf337698e5
app/urls.py
app/urls.py
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
Add ID support for subscription/ URLs.
Add ID support for subscription/ URLs.
Python
agpl-3.0
joyxu/kernelci-backend,joyxu/kernelci-backend,kernelci/kernelci-backend,joyxu/kernelci-backend,kernelci/kernelci-backend
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
<commit_before># Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This progra...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
<commit_before># Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This progra...
a54135deeb90ea8248a26c235843c9b8f16e1372
project/urls.py
project/urls.py
# Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view from django.conf import settings from django.conf.urls import ( include, url, ) from django.contrib import admin from django.http import ( HttpResponse, HttpResponseRedir...
# Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view from django.conf import settings from django.urls import ( include, path, ) from django.contrib import admin from django.http import ( HttpResponse, HttpResponseRedirect,...
Update to new URL dispatcher syntax
Update to new URL dispatcher syntax
Python
bsd-2-clause
dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api
# Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view from django.conf import settings from django.conf.urls import ( include, url, ) from django.contrib import admin from django.http import ( HttpResponse, HttpResponseRedir...
# Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view from django.conf import settings from django.urls import ( include, path, ) from django.contrib import admin from django.http import ( HttpResponse, HttpResponseRedirect,...
<commit_before># Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view from django.conf import settings from django.conf.urls import ( include, url, ) from django.contrib import admin from django.http import ( HttpResponse, Ht...
# Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view from django.conf import settings from django.urls import ( include, path, ) from django.contrib import admin from django.http import ( HttpResponse, HttpResponseRedirect,...
# Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view from django.conf import settings from django.conf.urls import ( include, url, ) from django.contrib import admin from django.http import ( HttpResponse, HttpResponseRedir...
<commit_before># Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view from django.conf import settings from django.conf.urls import ( include, url, ) from django.contrib import admin from django.http import ( HttpResponse, Ht...
ebfc7061f7515af3ec8b2f61bdbcf4a26c212095
src/clarifai_client.py
src/clarifai_client.py
from clarifai.rest import ClarifaiApp class Clarifai(): def __init__(self, api_id, api_secret): self.api_id = api_id self.api_secret = api_secret self.app = ClarifaiApp(self.api_id, self.api_secret) def test(self): res = self.app.tag_urls(['https://samples.clarifai.com/me...
from clarifai.rest import ClarifaiApp class Clarifai(): def __init__(self, api_id, api_secret): self.api_id = api_id self.api_secret = api_secret self.app = ClarifaiApp(self.api_id, self.api_secret) def test(self): res = self.app.tag_urls(['https://samples.clarifai.com/me...
Test on clarifai is working and returns the tags
Test on clarifai is working and returns the tags
Python
apache-2.0
rlokc/PyCVTagger
from clarifai.rest import ClarifaiApp class Clarifai(): def __init__(self, api_id, api_secret): self.api_id = api_id self.api_secret = api_secret self.app = ClarifaiApp(self.api_id, self.api_secret) def test(self): res = self.app.tag_urls(['https://samples.clarifai.com/me...
from clarifai.rest import ClarifaiApp class Clarifai(): def __init__(self, api_id, api_secret): self.api_id = api_id self.api_secret = api_secret self.app = ClarifaiApp(self.api_id, self.api_secret) def test(self): res = self.app.tag_urls(['https://samples.clarifai.com/me...
<commit_before>from clarifai.rest import ClarifaiApp class Clarifai(): def __init__(self, api_id, api_secret): self.api_id = api_id self.api_secret = api_secret self.app = ClarifaiApp(self.api_id, self.api_secret) def test(self): res = self.app.tag_urls(['https://samples....
from clarifai.rest import ClarifaiApp class Clarifai(): def __init__(self, api_id, api_secret): self.api_id = api_id self.api_secret = api_secret self.app = ClarifaiApp(self.api_id, self.api_secret) def test(self): res = self.app.tag_urls(['https://samples.clarifai.com/me...
from clarifai.rest import ClarifaiApp class Clarifai(): def __init__(self, api_id, api_secret): self.api_id = api_id self.api_secret = api_secret self.app = ClarifaiApp(self.api_id, self.api_secret) def test(self): res = self.app.tag_urls(['https://samples.clarifai.com/me...
<commit_before>from clarifai.rest import ClarifaiApp class Clarifai(): def __init__(self, api_id, api_secret): self.api_id = api_id self.api_secret = api_secret self.app = ClarifaiApp(self.api_id, self.api_secret) def test(self): res = self.app.tag_urls(['https://samples....
acb8d6e8cff9878a14b157d47072de415d12757b
src/endpoints/teams.py
src/endpoints/teams.py
from src.endpoints.base import Base class Teams(Base): endpoint = '/teams' def create_team(self, options=None): return self.client.post( self.endpoint, options ) def get_teams(self, query=None, options=None): query_string = self.build_query(query) return self.client.get( self.endpoint + query_s...
Add first batch of team endpoints
Add first batch of team endpoints
Python
mit
Vaelor/python-mattermost-driver
Add first batch of team endpoints
from src.endpoints.base import Base class Teams(Base): endpoint = '/teams' def create_team(self, options=None): return self.client.post( self.endpoint, options ) def get_teams(self, query=None, options=None): query_string = self.build_query(query) return self.client.get( self.endpoint + query_s...
<commit_before><commit_msg>Add first batch of team endpoints<commit_after>
from src.endpoints.base import Base class Teams(Base): endpoint = '/teams' def create_team(self, options=None): return self.client.post( self.endpoint, options ) def get_teams(self, query=None, options=None): query_string = self.build_query(query) return self.client.get( self.endpoint + query_s...
Add first batch of team endpointsfrom src.endpoints.base import Base class Teams(Base): endpoint = '/teams' def create_team(self, options=None): return self.client.post( self.endpoint, options ) def get_teams(self, query=None, options=None): query_string = self.build_query(query) return self.clien...
<commit_before><commit_msg>Add first batch of team endpoints<commit_after>from src.endpoints.base import Base class Teams(Base): endpoint = '/teams' def create_team(self, options=None): return self.client.post( self.endpoint, options ) def get_teams(self, query=None, options=None): query_string = sel...
51222dd65133159c1fe65a51e8f2ce237d40edef
geotrek/outdoor/forms.py
geotrek/outdoor/forms.py
from crispy_forms.layout import Div from geotrek.common.forms import CommonForm from geotrek.outdoor.models import Site class SiteForm(CommonForm): geomfields = ['geom'] fieldslayout = [ Div( 'structure', 'name', 'description', 'eid', ) ] ...
from crispy_forms.layout import Div from django import forms from geotrek.common.forms import CommonForm from geotrek.outdoor.models import Site, Practice, SitePractice class SiteForm(CommonForm): practices = forms.ModelMultipleChoiceField( queryset=Practice.objects.all(), widget=forms.CheckboxSel...
Add multiple choice of practices to Site form
Add multiple choice of practices to Site form
Python
bsd-2-clause
GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
from crispy_forms.layout import Div from geotrek.common.forms import CommonForm from geotrek.outdoor.models import Site class SiteForm(CommonForm): geomfields = ['geom'] fieldslayout = [ Div( 'structure', 'name', 'description', 'eid', ) ] ...
from crispy_forms.layout import Div from django import forms from geotrek.common.forms import CommonForm from geotrek.outdoor.models import Site, Practice, SitePractice class SiteForm(CommonForm): practices = forms.ModelMultipleChoiceField( queryset=Practice.objects.all(), widget=forms.CheckboxSel...
<commit_before>from crispy_forms.layout import Div from geotrek.common.forms import CommonForm from geotrek.outdoor.models import Site class SiteForm(CommonForm): geomfields = ['geom'] fieldslayout = [ Div( 'structure', 'name', 'description', 'eid', ...
from crispy_forms.layout import Div from django import forms from geotrek.common.forms import CommonForm from geotrek.outdoor.models import Site, Practice, SitePractice class SiteForm(CommonForm): practices = forms.ModelMultipleChoiceField( queryset=Practice.objects.all(), widget=forms.CheckboxSel...
from crispy_forms.layout import Div from geotrek.common.forms import CommonForm from geotrek.outdoor.models import Site class SiteForm(CommonForm): geomfields = ['geom'] fieldslayout = [ Div( 'structure', 'name', 'description', 'eid', ) ] ...
<commit_before>from crispy_forms.layout import Div from geotrek.common.forms import CommonForm from geotrek.outdoor.models import Site class SiteForm(CommonForm): geomfields = ['geom'] fieldslayout = [ Div( 'structure', 'name', 'description', 'eid', ...
424d8ed4b24afc8fc0c2e8e7fd9212091a5a0fcc
reddit_adzerk/adzerkads.py
reddit_adzerk/adzerkads.py
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: url_key = "adz...
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name.lower() in adzerk_test_srs: url_ke...
Check for test subreddits case insensitively.
Check for test subreddits case insensitively.
Python
bsd-3-clause
madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: url_key = "adz...
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name.lower() in adzerk_test_srs: url_ke...
<commit_before>from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: ...
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name.lower() in adzerk_test_srs: url_ke...
from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: url_key = "adz...
<commit_before>from urllib import quote from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: ...
e93789084c03b2a566835006d6d5adaee3d4bbe6
silk/globals.py
silk/globals.py
#!/usr/bin/env python __all__ = [] try: from silk.webdoc import css, html, node __all__.extend(('css', 'html', 'node')) except ImportError: pass try: from silk.webdb import ( AuthenticationError, BoolColumn, Column, DB, DataColumn, DateTimeColumn, FloatColumn, IntColumn, RecordError, ...
#!/usr/bin/env python __all__ = [] try: from silk.webdoc import css, html, node __all__ += ['css', 'html', 'node'] except ImportError: pass try: from silk.webdb import ( AuthenticationError, BoolColumn, Column, DB, DataColumn, DateTimeColumn, FloatColumn, IntColumn, RecordError, Refer...
Use += to modify __all__, to appease flake8
Use += to modify __all__, to appease flake8
Python
bsd-3-clause
orbnauticus/silk
#!/usr/bin/env python __all__ = [] try: from silk.webdoc import css, html, node __all__.extend(('css', 'html', 'node')) except ImportError: pass try: from silk.webdb import ( AuthenticationError, BoolColumn, Column, DB, DataColumn, DateTimeColumn, FloatColumn, IntColumn, RecordError, ...
#!/usr/bin/env python __all__ = [] try: from silk.webdoc import css, html, node __all__ += ['css', 'html', 'node'] except ImportError: pass try: from silk.webdb import ( AuthenticationError, BoolColumn, Column, DB, DataColumn, DateTimeColumn, FloatColumn, IntColumn, RecordError, Refer...
<commit_before>#!/usr/bin/env python __all__ = [] try: from silk.webdoc import css, html, node __all__.extend(('css', 'html', 'node')) except ImportError: pass try: from silk.webdb import ( AuthenticationError, BoolColumn, Column, DB, DataColumn, DateTimeColumn, FloatColumn, IntColumn...
#!/usr/bin/env python __all__ = [] try: from silk.webdoc import css, html, node __all__ += ['css', 'html', 'node'] except ImportError: pass try: from silk.webdb import ( AuthenticationError, BoolColumn, Column, DB, DataColumn, DateTimeColumn, FloatColumn, IntColumn, RecordError, Refer...
#!/usr/bin/env python __all__ = [] try: from silk.webdoc import css, html, node __all__.extend(('css', 'html', 'node')) except ImportError: pass try: from silk.webdb import ( AuthenticationError, BoolColumn, Column, DB, DataColumn, DateTimeColumn, FloatColumn, IntColumn, RecordError, ...
<commit_before>#!/usr/bin/env python __all__ = [] try: from silk.webdoc import css, html, node __all__.extend(('css', 'html', 'node')) except ImportError: pass try: from silk.webdb import ( AuthenticationError, BoolColumn, Column, DB, DataColumn, DateTimeColumn, FloatColumn, IntColumn...
0af35018fbdf2460d8890a7d7b4ad8246a3d121d
IPython/testing/__init__.py
IPython/testing/__init__.py
"""Testing support (tools to test IPython itself). """ #----------------------------------------------------------------------------- # Copyright (C) 2009-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this so...
"""Testing support (tools to test IPython itself). """ #----------------------------------------------------------------------------- # Copyright (C) 2009-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this so...
Allow any options to be passed through test function
Allow any options to be passed through test function
Python
bsd-3-clause
ipython/ipython,ipython/ipython
"""Testing support (tools to test IPython itself). """ #----------------------------------------------------------------------------- # Copyright (C) 2009-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this so...
"""Testing support (tools to test IPython itself). """ #----------------------------------------------------------------------------- # Copyright (C) 2009-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this so...
<commit_before>"""Testing support (tools to test IPython itself). """ #----------------------------------------------------------------------------- # Copyright (C) 2009-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as ...
"""Testing support (tools to test IPython itself). """ #----------------------------------------------------------------------------- # Copyright (C) 2009-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this so...
"""Testing support (tools to test IPython itself). """ #----------------------------------------------------------------------------- # Copyright (C) 2009-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this so...
<commit_before>"""Testing support (tools to test IPython itself). """ #----------------------------------------------------------------------------- # Copyright (C) 2009-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as ...
5ccadaae69f8011f16f7df7ae5711277931a94a8
tests/testall.py
tests/testall.py
#!/usr/bin/env python import unittest, os, sys try: import coverage coverage.erase() coverage.start() except ImportError: coverage = None my_dir = os.path.dirname(sys.argv[0]) if not my_dir: my_dir = os.getcwd() sys.argv.append('-v') suite_names = [f[:-3] for f in os.listdir(my_dir) if f.startswith('test') an...
#!/usr/bin/env python import unittest, os, sys for x in ['LANGUAGE', 'LANG']: if x in os.environ: del os.environ[x] try: import coverage coverage.erase() coverage.start() except ImportError: coverage = None my_dir = os.path.dirname(sys.argv[0]) if not my_dir: my_dir = os.getcwd() sys.argv.append('-v') suite_...
Clear $LANGUAGE before running tests
Clear $LANGUAGE before running tests
Python
lgpl-2.1
timdiels/0publish
#!/usr/bin/env python import unittest, os, sys try: import coverage coverage.erase() coverage.start() except ImportError: coverage = None my_dir = os.path.dirname(sys.argv[0]) if not my_dir: my_dir = os.getcwd() sys.argv.append('-v') suite_names = [f[:-3] for f in os.listdir(my_dir) if f.startswith('test') an...
#!/usr/bin/env python import unittest, os, sys for x in ['LANGUAGE', 'LANG']: if x in os.environ: del os.environ[x] try: import coverage coverage.erase() coverage.start() except ImportError: coverage = None my_dir = os.path.dirname(sys.argv[0]) if not my_dir: my_dir = os.getcwd() sys.argv.append('-v') suite_...
<commit_before>#!/usr/bin/env python import unittest, os, sys try: import coverage coverage.erase() coverage.start() except ImportError: coverage = None my_dir = os.path.dirname(sys.argv[0]) if not my_dir: my_dir = os.getcwd() sys.argv.append('-v') suite_names = [f[:-3] for f in os.listdir(my_dir) if f.starts...
#!/usr/bin/env python import unittest, os, sys for x in ['LANGUAGE', 'LANG']: if x in os.environ: del os.environ[x] try: import coverage coverage.erase() coverage.start() except ImportError: coverage = None my_dir = os.path.dirname(sys.argv[0]) if not my_dir: my_dir = os.getcwd() sys.argv.append('-v') suite_...
#!/usr/bin/env python import unittest, os, sys try: import coverage coverage.erase() coverage.start() except ImportError: coverage = None my_dir = os.path.dirname(sys.argv[0]) if not my_dir: my_dir = os.getcwd() sys.argv.append('-v') suite_names = [f[:-3] for f in os.listdir(my_dir) if f.startswith('test') an...
<commit_before>#!/usr/bin/env python import unittest, os, sys try: import coverage coverage.erase() coverage.start() except ImportError: coverage = None my_dir = os.path.dirname(sys.argv[0]) if not my_dir: my_dir = os.getcwd() sys.argv.append('-v') suite_names = [f[:-3] for f in os.listdir(my_dir) if f.starts...
76f6497389d2e6588d91fbd7c24d2f368592140b
tests/utils.py
tests/utils.py
import bottle import threading import time as _time def start_bottle_server(app, port, **kwargs): server_thread = ServerThread(app, port, kwargs) server_thread.daemon = True server_thread.start() _time.sleep(0.1) class ServerThread(threading.Thread): def __init__(self, app, port, server_kwargs): ...
import bottle import threading import socket import time as _time def start_bottle_server(app, port, **kwargs): server_thread = ServerThread(app, port, kwargs) server_thread.daemon = True server_thread.start() ok = False for i in range(10): try: conn = socket.create_connect...
Test server existence via a socket connection
Test server existence via a socket connection
Python
bsd-2-clause
p/webracer
import bottle import threading import time as _time def start_bottle_server(app, port, **kwargs): server_thread = ServerThread(app, port, kwargs) server_thread.daemon = True server_thread.start() _time.sleep(0.1) class ServerThread(threading.Thread): def __init__(self, app, port, server_kwargs): ...
import bottle import threading import socket import time as _time def start_bottle_server(app, port, **kwargs): server_thread = ServerThread(app, port, kwargs) server_thread.daemon = True server_thread.start() ok = False for i in range(10): try: conn = socket.create_connect...
<commit_before>import bottle import threading import time as _time def start_bottle_server(app, port, **kwargs): server_thread = ServerThread(app, port, kwargs) server_thread.daemon = True server_thread.start() _time.sleep(0.1) class ServerThread(threading.Thread): def __init__(self, app, port, se...
import bottle import threading import socket import time as _time def start_bottle_server(app, port, **kwargs): server_thread = ServerThread(app, port, kwargs) server_thread.daemon = True server_thread.start() ok = False for i in range(10): try: conn = socket.create_connect...
import bottle import threading import time as _time def start_bottle_server(app, port, **kwargs): server_thread = ServerThread(app, port, kwargs) server_thread.daemon = True server_thread.start() _time.sleep(0.1) class ServerThread(threading.Thread): def __init__(self, app, port, server_kwargs): ...
<commit_before>import bottle import threading import time as _time def start_bottle_server(app, port, **kwargs): server_thread = ServerThread(app, port, kwargs) server_thread.daemon = True server_thread.start() _time.sleep(0.1) class ServerThread(threading.Thread): def __init__(self, app, port, se...
dc786699618e6ebc1206080d9c0fdb697d519668
pydy/viz/server.py
pydy/viz/server.py
#!/usr/bin/env python import os import webbrowser import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler __all__ = ['run_server'] def run_server(port=8000,scene_file="Null"): #change dir to static first. os.chdir("static/") HandlerClass = SimpleHTTPRequestHandler ServerClass = ...
#!/usr/bin/env python import os import sys import webbrowser if sys.version_info < (3, 0): from SimpleHTTPServer import SimpleHTTPRequestHandler from BaseHTTPServer import HTTPServer else: from http.server import SimpleHTTPRequestHandler from http.server import HTTPServer __all__ = ['run_server'] d...
Fix HTTPServer imports with Python 3
Fix HTTPServer imports with Python 3
Python
bsd-3-clause
Shekharrajak/pydy,Shekharrajak/pydy,skidzo/pydy,skidzo/pydy,oliverlee/pydy,Shekharrajak/pydy,oliverlee/pydy,skidzo/pydy,skidzo/pydy,Shekharrajak/pydy,oliverlee/pydy
#!/usr/bin/env python import os import webbrowser import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler __all__ = ['run_server'] def run_server(port=8000,scene_file="Null"): #change dir to static first. os.chdir("static/") HandlerClass = SimpleHTTPRequestHandler ServerClass = ...
#!/usr/bin/env python import os import sys import webbrowser if sys.version_info < (3, 0): from SimpleHTTPServer import SimpleHTTPRequestHandler from BaseHTTPServer import HTTPServer else: from http.server import SimpleHTTPRequestHandler from http.server import HTTPServer __all__ = ['run_server'] d...
<commit_before>#!/usr/bin/env python import os import webbrowser import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler __all__ = ['run_server'] def run_server(port=8000,scene_file="Null"): #change dir to static first. os.chdir("static/") HandlerClass = SimpleHTTPRequestHandler ...
#!/usr/bin/env python import os import sys import webbrowser if sys.version_info < (3, 0): from SimpleHTTPServer import SimpleHTTPRequestHandler from BaseHTTPServer import HTTPServer else: from http.server import SimpleHTTPRequestHandler from http.server import HTTPServer __all__ = ['run_server'] d...
#!/usr/bin/env python import os import webbrowser import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler __all__ = ['run_server'] def run_server(port=8000,scene_file="Null"): #change dir to static first. os.chdir("static/") HandlerClass = SimpleHTTPRequestHandler ServerClass = ...
<commit_before>#!/usr/bin/env python import os import webbrowser import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler __all__ = ['run_server'] def run_server(port=8000,scene_file="Null"): #change dir to static first. os.chdir("static/") HandlerClass = SimpleHTTPRequestHandler ...
ac403cc68eac59c918ce83d48dc1beb98ddd3484
pystil/__init__.py
pystil/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. """ pystil - An elegant site web traffic analyzer """ from flask import Flask from logging import getLogger, INFO from pystil.log import get_default_handler ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. """ pystil - An elegant site web traffic analyzer """ from flask import Flask from logging import getLogger, INFO from pystil.log import get_default_handler ...
Use __file__ for static and templates
Use __file__ for static and templates
Python
bsd-3-clause
Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil,Kozea/pystil
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. """ pystil - An elegant site web traffic analyzer """ from flask import Flask from logging import getLogger, INFO from pystil.log import get_default_handler ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. """ pystil - An elegant site web traffic analyzer """ from flask import Flask from logging import getLogger, INFO from pystil.log import get_default_handler ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. """ pystil - An elegant site web traffic analyzer """ from flask import Flask from logging import getLogger, INFO from pystil.log import get_d...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. """ pystil - An elegant site web traffic analyzer """ from flask import Flask from logging import getLogger, INFO from pystil.log import get_default_handler ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. """ pystil - An elegant site web traffic analyzer """ from flask import Flask from logging import getLogger, INFO from pystil.log import get_default_handler ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. """ pystil - An elegant site web traffic analyzer """ from flask import Flask from logging import getLogger, INFO from pystil.log import get_d...
a973f489d265c0f4f5baa3357eaf5a772a825821
tweetstream.py
tweetstream.py
# -*- coding: utf-8 -*- import os from tweepy import Stream from tweepy import OAuthHandler from tweepy import API from tweepy.streaming import StreamListener from listener import Listener ckey = os.environ['CKEY'] consumer_secret = os.environ['CONSUMER_KEY'] access_token_key = os.environ['ACCESS_TOKEN_KEY'] access_to...
# -*- coding: utf-8 -*- import os from tweepy import Stream from tweepy import OAuthHandler from tweepy import API from tweepy.streaming import StreamListener from listener import Listener ckey = os.environ['CKEY'] consumer_secret = os.environ['CONSUMER_SECRET'] access_token_key = os.environ['ACCESS_TOKEN_KEY'] access...
Use the correct env variable name
Use the correct env variable name
Python
mit
robot-overlord/syriarightnow
# -*- coding: utf-8 -*- import os from tweepy import Stream from tweepy import OAuthHandler from tweepy import API from tweepy.streaming import StreamListener from listener import Listener ckey = os.environ['CKEY'] consumer_secret = os.environ['CONSUMER_KEY'] access_token_key = os.environ['ACCESS_TOKEN_KEY'] access_to...
# -*- coding: utf-8 -*- import os from tweepy import Stream from tweepy import OAuthHandler from tweepy import API from tweepy.streaming import StreamListener from listener import Listener ckey = os.environ['CKEY'] consumer_secret = os.environ['CONSUMER_SECRET'] access_token_key = os.environ['ACCESS_TOKEN_KEY'] access...
<commit_before># -*- coding: utf-8 -*- import os from tweepy import Stream from tweepy import OAuthHandler from tweepy import API from tweepy.streaming import StreamListener from listener import Listener ckey = os.environ['CKEY'] consumer_secret = os.environ['CONSUMER_KEY'] access_token_key = os.environ['ACCESS_TOKEN_...
# -*- coding: utf-8 -*- import os from tweepy import Stream from tweepy import OAuthHandler from tweepy import API from tweepy.streaming import StreamListener from listener import Listener ckey = os.environ['CKEY'] consumer_secret = os.environ['CONSUMER_SECRET'] access_token_key = os.environ['ACCESS_TOKEN_KEY'] access...
# -*- coding: utf-8 -*- import os from tweepy import Stream from tweepy import OAuthHandler from tweepy import API from tweepy.streaming import StreamListener from listener import Listener ckey = os.environ['CKEY'] consumer_secret = os.environ['CONSUMER_KEY'] access_token_key = os.environ['ACCESS_TOKEN_KEY'] access_to...
<commit_before># -*- coding: utf-8 -*- import os from tweepy import Stream from tweepy import OAuthHandler from tweepy import API from tweepy.streaming import StreamListener from listener import Listener ckey = os.environ['CKEY'] consumer_secret = os.environ['CONSUMER_KEY'] access_token_key = os.environ['ACCESS_TOKEN_...
a4efaef6474592229156d7c434679f98d0b5cbea
tests/test_R_transformer.py
tests/test_R_transformer.py
import pytest from spec2scl.transformers.R import RTransformer from transformer_test_case import TransformerTestCase class TestRTransformer(TransformerTestCase): def setup_method(self, method): self.t = RTransformer('', {}) @pytest.mark.parametrize(('spec'), [ ('"%{bindir}/R foo" stays'), ...
import pytest from spec2scl.transformers.R import RTransformer from transformer_test_case import TransformerTestCase class TestRTransformer(TransformerTestCase): def setup_method(self, method): self.t = RTransformer('', {}) @pytest.mark.parametrize(('spec'), [ ('"%{bindir}/R foo" stays'), ...
Fix the test method names :)
Fix the test method names :)
Python
mit
mbooth101/spec2scl,sclorg/spec2scl
import pytest from spec2scl.transformers.R import RTransformer from transformer_test_case import TransformerTestCase class TestRTransformer(TransformerTestCase): def setup_method(self, method): self.t = RTransformer('', {}) @pytest.mark.parametrize(('spec'), [ ('"%{bindir}/R foo" stays'), ...
import pytest from spec2scl.transformers.R import RTransformer from transformer_test_case import TransformerTestCase class TestRTransformer(TransformerTestCase): def setup_method(self, method): self.t = RTransformer('', {}) @pytest.mark.parametrize(('spec'), [ ('"%{bindir}/R foo" stays'), ...
<commit_before>import pytest from spec2scl.transformers.R import RTransformer from transformer_test_case import TransformerTestCase class TestRTransformer(TransformerTestCase): def setup_method(self, method): self.t = RTransformer('', {}) @pytest.mark.parametrize(('spec'), [ ('"%{bindir}/R f...
import pytest from spec2scl.transformers.R import RTransformer from transformer_test_case import TransformerTestCase class TestRTransformer(TransformerTestCase): def setup_method(self, method): self.t = RTransformer('', {}) @pytest.mark.parametrize(('spec'), [ ('"%{bindir}/R foo" stays'), ...
import pytest from spec2scl.transformers.R import RTransformer from transformer_test_case import TransformerTestCase class TestRTransformer(TransformerTestCase): def setup_method(self, method): self.t = RTransformer('', {}) @pytest.mark.parametrize(('spec'), [ ('"%{bindir}/R foo" stays'), ...
<commit_before>import pytest from spec2scl.transformers.R import RTransformer from transformer_test_case import TransformerTestCase class TestRTransformer(TransformerTestCase): def setup_method(self, method): self.t = RTransformer('', {}) @pytest.mark.parametrize(('spec'), [ ('"%{bindir}/R f...
a8bf783c99691d12acc9298a67b09a857bed755e
tests/test_oai_harvester.py
tests/test_oai_harvester.py
from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.linter import RawDocument from .utils import TEST_OAI_DOC class TestHarvester(OAIHarvester): base_url = '' long_name = 'Test' short_name = 'test' url = 'test' property_list = ['type', 'source', 'publisher', ...
from __future__ import unicode_literals import httpretty from scrapi.base import OAIHarvester from scrapi.linter import RawDocument from .utils import TEST_OAI_DOC class TestHarvester(OAIHarvester): base_url = '' long_name = 'Test' short_name = 'test' url = 'test' property_list = ['type', 'sour...
Add more robust test harvester harvest method with mocking
Add more robust test harvester harvest method with mocking
Python
apache-2.0
icereval/scrapi,mehanig/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,felliott/scrapi,alexgarciac/scrapi,ostwald/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi,mehanig/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi
from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.linter import RawDocument from .utils import TEST_OAI_DOC class TestHarvester(OAIHarvester): base_url = '' long_name = 'Test' short_name = 'test' url = 'test' property_list = ['type', 'source', 'publisher', ...
from __future__ import unicode_literals import httpretty from scrapi.base import OAIHarvester from scrapi.linter import RawDocument from .utils import TEST_OAI_DOC class TestHarvester(OAIHarvester): base_url = '' long_name = 'Test' short_name = 'test' url = 'test' property_list = ['type', 'sour...
<commit_before>from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.linter import RawDocument from .utils import TEST_OAI_DOC class TestHarvester(OAIHarvester): base_url = '' long_name = 'Test' short_name = 'test' url = 'test' property_list = ['type', 'source'...
from __future__ import unicode_literals import httpretty from scrapi.base import OAIHarvester from scrapi.linter import RawDocument from .utils import TEST_OAI_DOC class TestHarvester(OAIHarvester): base_url = '' long_name = 'Test' short_name = 'test' url = 'test' property_list = ['type', 'sour...
from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.linter import RawDocument from .utils import TEST_OAI_DOC class TestHarvester(OAIHarvester): base_url = '' long_name = 'Test' short_name = 'test' url = 'test' property_list = ['type', 'source', 'publisher', ...
<commit_before>from __future__ import unicode_literals from scrapi.base import OAIHarvester from scrapi.linter import RawDocument from .utils import TEST_OAI_DOC class TestHarvester(OAIHarvester): base_url = '' long_name = 'Test' short_name = 'test' url = 'test' property_list = ['type', 'source'...
d446a634cf2d903b8f7a7964210017065ffb9b9a
tests/test_xorshift_rand.py
tests/test_xorshift_rand.py
# Copyright 2014 Anonymous7 from Reddit, Julian Andrews # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from __future__ import absolute_import, division import collections import unittest from eval7 import xorshift_rand class XorshiftRandTe...
# Copyright 2014 Anonymous7 from Reddit, Julian Andrews # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from __future__ import absolute_import, division import collections import unittest from eval7 import xorshift_rand class XorshiftRandTe...
Increase delta to reduce chance of random failure
Increase delta to reduce chance of random failure Exact chance of failure is more trouble to calculate than I care to go to, but the the old chance of failure was likely somewhere in the 1-10% range. The purpose of the test is to detect meaningful non-uniformity, so false positives should be kept rare.
Python
mit
JulianAndrews/pyeval7,JulianAndrews/pyeval7
# Copyright 2014 Anonymous7 from Reddit, Julian Andrews # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from __future__ import absolute_import, division import collections import unittest from eval7 import xorshift_rand class XorshiftRandTe...
# Copyright 2014 Anonymous7 from Reddit, Julian Andrews # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from __future__ import absolute_import, division import collections import unittest from eval7 import xorshift_rand class XorshiftRandTe...
<commit_before># Copyright 2014 Anonymous7 from Reddit, Julian Andrews # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from __future__ import absolute_import, division import collections import unittest from eval7 import xorshift_rand class...
# Copyright 2014 Anonymous7 from Reddit, Julian Andrews # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from __future__ import absolute_import, division import collections import unittest from eval7 import xorshift_rand class XorshiftRandTe...
# Copyright 2014 Anonymous7 from Reddit, Julian Andrews # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from __future__ import absolute_import, division import collections import unittest from eval7 import xorshift_rand class XorshiftRandTe...
<commit_before># Copyright 2014 Anonymous7 from Reddit, Julian Andrews # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from __future__ import absolute_import, division import collections import unittest from eval7 import xorshift_rand class...
b7433c0d18a01a9e1340123f7c0423d1fdec04a3
sphinxdoc/urls.py
sphinxdoc/urls.py
# encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic import list_detail from sphinxdoc import models from sphinxdoc.views import ProjectSearchView project_info = { 'queryset': models.Project.objects.all().order_by('name'), 'te...
# encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic.list import ListView from sphinxdoc import models from sphinxdoc.views import ProjectSearchView urlpatterns = patterns('sphinxdoc.views', url( r'^$', ListView.as...
Change function-based generic view to class-based.
Change function-based generic view to class-based. As per their deprecation policy, Django 1.5 removed function-based generic views.
Python
mit
kamni/django-sphinxdoc
# encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic import list_detail from sphinxdoc import models from sphinxdoc.views import ProjectSearchView project_info = { 'queryset': models.Project.objects.all().order_by('name'), 'te...
# encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic.list import ListView from sphinxdoc import models from sphinxdoc.views import ProjectSearchView urlpatterns = patterns('sphinxdoc.views', url( r'^$', ListView.as...
<commit_before># encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic import list_detail from sphinxdoc import models from sphinxdoc.views import ProjectSearchView project_info = { 'queryset': models.Project.objects.all().order_by('...
# encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic.list import ListView from sphinxdoc import models from sphinxdoc.views import ProjectSearchView urlpatterns = patterns('sphinxdoc.views', url( r'^$', ListView.as...
# encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic import list_detail from sphinxdoc import models from sphinxdoc.views import ProjectSearchView project_info = { 'queryset': models.Project.objects.all().order_by('name'), 'te...
<commit_before># encoding: utf-8 """ URL conf for django-sphinxdoc. """ from django.conf.urls.defaults import patterns, url from django.views.generic import list_detail from sphinxdoc import models from sphinxdoc.views import ProjectSearchView project_info = { 'queryset': models.Project.objects.all().order_by('...
807c02f081dff8945f18f6017fa4bf1769c97513
spiral-maker01.py
spiral-maker01.py
import turtle import random from time import sleep turtle1 = turtle.Turtle() wn = turtle.Screen() wn.bgcolor("lightgreen") colors = ("blue","red","green","pink","gray") for s in range(5): x = 10 c = random.randint(0,len(colors)-1) turtle1.color(colors[c]) x_pos = random.randint(-300,300) y_pos = r...
import turtle import random from time import sleep turtle1 = turtle.Turtle() wn = turtle.Screen() wn.bgcolor("lightgreen") colors = ("blue","red","green","yellow","gray") for s in range(5): x = 10 c = random.randint(0,len(colors)-1) turtle1.color(colors[c]) x_pos = random.randint(-300,300) y_pos =...
Change colors because of contrast problems.
Change colors because of contrast problems.
Python
mit
erichmatt/turtle
import turtle import random from time import sleep turtle1 = turtle.Turtle() wn = turtle.Screen() wn.bgcolor("lightgreen") colors = ("blue","red","green","pink","gray") for s in range(5): x = 10 c = random.randint(0,len(colors)-1) turtle1.color(colors[c]) x_pos = random.randint(-300,300) y_pos = r...
import turtle import random from time import sleep turtle1 = turtle.Turtle() wn = turtle.Screen() wn.bgcolor("lightgreen") colors = ("blue","red","green","yellow","gray") for s in range(5): x = 10 c = random.randint(0,len(colors)-1) turtle1.color(colors[c]) x_pos = random.randint(-300,300) y_pos =...
<commit_before>import turtle import random from time import sleep turtle1 = turtle.Turtle() wn = turtle.Screen() wn.bgcolor("lightgreen") colors = ("blue","red","green","pink","gray") for s in range(5): x = 10 c = random.randint(0,len(colors)-1) turtle1.color(colors[c]) x_pos = random.randint(-300,300...
import turtle import random from time import sleep turtle1 = turtle.Turtle() wn = turtle.Screen() wn.bgcolor("lightgreen") colors = ("blue","red","green","yellow","gray") for s in range(5): x = 10 c = random.randint(0,len(colors)-1) turtle1.color(colors[c]) x_pos = random.randint(-300,300) y_pos =...
import turtle import random from time import sleep turtle1 = turtle.Turtle() wn = turtle.Screen() wn.bgcolor("lightgreen") colors = ("blue","red","green","pink","gray") for s in range(5): x = 10 c = random.randint(0,len(colors)-1) turtle1.color(colors[c]) x_pos = random.randint(-300,300) y_pos = r...
<commit_before>import turtle import random from time import sleep turtle1 = turtle.Turtle() wn = turtle.Screen() wn.bgcolor("lightgreen") colors = ("blue","red","green","pink","gray") for s in range(5): x = 10 c = random.randint(0,len(colors)-1) turtle1.color(colors[c]) x_pos = random.randint(-300,300...
31fc3b8c9fd2f0c7f10e14078fca2e7cd43ac4b1
lifelines/tests/__main__.py
lifelines/tests/__main__.py
import pytest if __name__ == '__main__': pytest.main("--pyargs lifelines.tests")
import sys import pytest if __name__ == '__main__': # Exit with correct code sys.exit(pytest.main("--pyargs lifelines.tests"))
Exit with correct error code after tests
Exit with correct error code after tests Signed-off-by: Jonas Kalderstam <35a2c6fae61f8077aab61faa4019722abf05093c@kalderstam.se>
Python
mit
wavelets/lifelines,jstoxrocky/lifelines,nerdless/lifelines,CamDavidsonPilon/lifelines
import pytest if __name__ == '__main__': pytest.main("--pyargs lifelines.tests") Exit with correct error code after tests Signed-off-by: Jonas Kalderstam <35a2c6fae61f8077aab61faa4019722abf05093c@kalderstam.se>
import sys import pytest if __name__ == '__main__': # Exit with correct code sys.exit(pytest.main("--pyargs lifelines.tests"))
<commit_before>import pytest if __name__ == '__main__': pytest.main("--pyargs lifelines.tests") <commit_msg>Exit with correct error code after tests Signed-off-by: Jonas Kalderstam <35a2c6fae61f8077aab61faa4019722abf05093c@kalderstam.se><commit_after>
import sys import pytest if __name__ == '__main__': # Exit with correct code sys.exit(pytest.main("--pyargs lifelines.tests"))
import pytest if __name__ == '__main__': pytest.main("--pyargs lifelines.tests") Exit with correct error code after tests Signed-off-by: Jonas Kalderstam <35a2c6fae61f8077aab61faa4019722abf05093c@kalderstam.se>import sys import pytest if __name__ == '__main__': # Exit with correct code sys.exit(pytest....
<commit_before>import pytest if __name__ == '__main__': pytest.main("--pyargs lifelines.tests") <commit_msg>Exit with correct error code after tests Signed-off-by: Jonas Kalderstam <35a2c6fae61f8077aab61faa4019722abf05093c@kalderstam.se><commit_after>import sys import pytest if __name__ == '__main__': # Ex...
98516d4fa4a7f56e5133377b228ac8c90aed74c9
magnum/tests/fake_policy.py
magnum/tests/fake_policy.py
# Copyright (c) 2012 OpenStack Foundation # # 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 t...
# Copyright (c) 2012 OpenStack Foundation # # 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 t...
Clean rc from unit tests
Clean rc from unit tests Magnum have removed the k8s rc apis, but have not removed it from policy.json. The patch (https://review.openstack.org/#/c/384064/) remove rc from etc/magnum/policy.json. And we should remove rc from tests/fake_policy.py. Change-Id: Ia98e1637f2e3a5919be3784322a55005970d4da8
Python
apache-2.0
openstack/magnum,ArchiFleKs/magnum,ArchiFleKs/magnum,openstack/magnum
# Copyright (c) 2012 OpenStack Foundation # # 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 t...
# Copyright (c) 2012 OpenStack Foundation # # 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 t...
<commit_before># Copyright (c) 2012 OpenStack Foundation # # 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 ...
# Copyright (c) 2012 OpenStack Foundation # # 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 t...
# Copyright (c) 2012 OpenStack Foundation # # 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 t...
<commit_before># Copyright (c) 2012 OpenStack Foundation # # 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 ...
08652630865a706126ac61420edb55298296d2eb
abilian/services/__init__.py
abilian/services/__init__.py
""" Modules that provide services. They are implemented as Flask extensions (see: http://flask.pocoo.org/docs/extensiondev/ ) """ __all__ = ['Service', 'ServiceState', 'audit_service', 'index_service', 'activity_service', 'auth_service'] from .base import Service, ServiceState # Homegrown extensions. fro...
""" Modules that provide services. They are implemented as Flask extensions (see: http://flask.pocoo.org/docs/extensiondev/ ) """ from flask import current_app from .base import Service, ServiceState # Homegrown extensions. from .audit import audit_service from .indexing import service as index_service from .conver...
Add a get_service convenience method.
Add a get_service convenience method.
Python
lgpl-2.1
abilian/abilian-core,abilian/abilian-core,abilian/abilian-core,abilian/abilian-core,abilian/abilian-core
""" Modules that provide services. They are implemented as Flask extensions (see: http://flask.pocoo.org/docs/extensiondev/ ) """ __all__ = ['Service', 'ServiceState', 'audit_service', 'index_service', 'activity_service', 'auth_service'] from .base import Service, ServiceState # Homegrown extensions. fro...
""" Modules that provide services. They are implemented as Flask extensions (see: http://flask.pocoo.org/docs/extensiondev/ ) """ from flask import current_app from .base import Service, ServiceState # Homegrown extensions. from .audit import audit_service from .indexing import service as index_service from .conver...
<commit_before>""" Modules that provide services. They are implemented as Flask extensions (see: http://flask.pocoo.org/docs/extensiondev/ ) """ __all__ = ['Service', 'ServiceState', 'audit_service', 'index_service', 'activity_service', 'auth_service'] from .base import Service, ServiceState # Homegrown ...
""" Modules that provide services. They are implemented as Flask extensions (see: http://flask.pocoo.org/docs/extensiondev/ ) """ from flask import current_app from .base import Service, ServiceState # Homegrown extensions. from .audit import audit_service from .indexing import service as index_service from .conver...
""" Modules that provide services. They are implemented as Flask extensions (see: http://flask.pocoo.org/docs/extensiondev/ ) """ __all__ = ['Service', 'ServiceState', 'audit_service', 'index_service', 'activity_service', 'auth_service'] from .base import Service, ServiceState # Homegrown extensions. fro...
<commit_before>""" Modules that provide services. They are implemented as Flask extensions (see: http://flask.pocoo.org/docs/extensiondev/ ) """ __all__ = ['Service', 'ServiceState', 'audit_service', 'index_service', 'activity_service', 'auth_service'] from .base import Service, ServiceState # Homegrown ...
0b9d3dbfca2fa54444e8d95b1c63ecf3e726ee5b
sso/middleware.py
sso/middleware.py
class IGBMiddleware(object): """ Middleware to detect the EVE IGB """ def process_request(self, request): request.is_igb = False request.is_igb_trusted = False if request.META.has_key('HTTP_EVE_TRUSTED'): request.is_igb = True if request.META.get('HTTP...
class IGBMiddleware(object): """ Middleware to detect the EVE IGB """ def process_request(self, request): request.is_igb = False request.is_igb_trusted = False header_map = [ ('HTTP_EVE_SERVERIP', 'eve_server_ip'), ('HTTP_EVE_CHARNAME', 'eve_charname')...
Expand the IGB Middleware to map headers into the request object
Expand the IGB Middleware to map headers into the request object
Python
bsd-3-clause
nikdoof/test-auth
class IGBMiddleware(object): """ Middleware to detect the EVE IGB """ def process_request(self, request): request.is_igb = False request.is_igb_trusted = False if request.META.has_key('HTTP_EVE_TRUSTED'): request.is_igb = True if request.META.get('HTTP...
class IGBMiddleware(object): """ Middleware to detect the EVE IGB """ def process_request(self, request): request.is_igb = False request.is_igb_trusted = False header_map = [ ('HTTP_EVE_SERVERIP', 'eve_server_ip'), ('HTTP_EVE_CHARNAME', 'eve_charname')...
<commit_before> class IGBMiddleware(object): """ Middleware to detect the EVE IGB """ def process_request(self, request): request.is_igb = False request.is_igb_trusted = False if request.META.has_key('HTTP_EVE_TRUSTED'): request.is_igb = True if request...
class IGBMiddleware(object): """ Middleware to detect the EVE IGB """ def process_request(self, request): request.is_igb = False request.is_igb_trusted = False header_map = [ ('HTTP_EVE_SERVERIP', 'eve_server_ip'), ('HTTP_EVE_CHARNAME', 'eve_charname')...
class IGBMiddleware(object): """ Middleware to detect the EVE IGB """ def process_request(self, request): request.is_igb = False request.is_igb_trusted = False if request.META.has_key('HTTP_EVE_TRUSTED'): request.is_igb = True if request.META.get('HTTP...
<commit_before> class IGBMiddleware(object): """ Middleware to detect the EVE IGB """ def process_request(self, request): request.is_igb = False request.is_igb_trusted = False if request.META.has_key('HTTP_EVE_TRUSTED'): request.is_igb = True if request...
1e03a6ba2a5277c6e665cde994e0ced8b15192c0
migrations/482-generate-featured-image-assets.py
migrations/482-generate-featured-image-assets.py
from amo.utils import chunked from mkt.developers.tasks import generate_image_assets from mkt.webapps.models import Webapp def run(): """Generate featured tiles.""" for chunk in chunked(Webapp.objects.all(), 50): for app in chunk: generate_image_assets.delay(app, slug='featured_tile') ...
from amo.utils import chunked from mkt.developers.tasks import generate_image_assets from mkt.webapps.models import Webapp def run(): """Generate featured tiles.""" for chunk in chunked(Webapp.objects.all(), 50): for app in chunk: generate_image_assets.delay(app, slug='featured_tile') ...
Fix migration to avoid unicode errors
Fix migration to avoid unicode errors If the app has a name that's not ASCII, you'd get an encoding error.
Python
bsd-3-clause
Joergen/olympia,aviarypl/mozilla-l10n-addons-server,mstriemer/olympia,lavish205/olympia,wagnerand/olympia,robhudson/zamboni,Nolski/olympia,andymckay/zamboni,kmaglione/olympia,mdaif/olympia,eviljeff/zamboni,eviljeff/zamboni,tsl143/zamboni,andymckay/addons-server,jamesthechamp/zamboni,harikishen/addons-server,yfdyh000/ol...
from amo.utils import chunked from mkt.developers.tasks import generate_image_assets from mkt.webapps.models import Webapp def run(): """Generate featured tiles.""" for chunk in chunked(Webapp.objects.all(), 50): for app in chunk: generate_image_assets.delay(app, slug='featured_tile') ...
from amo.utils import chunked from mkt.developers.tasks import generate_image_assets from mkt.webapps.models import Webapp def run(): """Generate featured tiles.""" for chunk in chunked(Webapp.objects.all(), 50): for app in chunk: generate_image_assets.delay(app, slug='featured_tile') ...
<commit_before>from amo.utils import chunked from mkt.developers.tasks import generate_image_assets from mkt.webapps.models import Webapp def run(): """Generate featured tiles.""" for chunk in chunked(Webapp.objects.all(), 50): for app in chunk: generate_image_assets.delay(app, slug='feat...
from amo.utils import chunked from mkt.developers.tasks import generate_image_assets from mkt.webapps.models import Webapp def run(): """Generate featured tiles.""" for chunk in chunked(Webapp.objects.all(), 50): for app in chunk: generate_image_assets.delay(app, slug='featured_tile') ...
from amo.utils import chunked from mkt.developers.tasks import generate_image_assets from mkt.webapps.models import Webapp def run(): """Generate featured tiles.""" for chunk in chunked(Webapp.objects.all(), 50): for app in chunk: generate_image_assets.delay(app, slug='featured_tile') ...
<commit_before>from amo.utils import chunked from mkt.developers.tasks import generate_image_assets from mkt.webapps.models import Webapp def run(): """Generate featured tiles.""" for chunk in chunked(Webapp.objects.all(), 50): for app in chunk: generate_image_assets.delay(app, slug='feat...
c716124b8ede9678ca24eb07f1aa83c1fba9f177
doorman/celery_serializer.py
doorman/celery_serializer.py
# -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'epoch': int(mktime(obj.timetuple())) ...
# -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json from doorman.compat import string_types class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'e...
Fix custom decoder on Python 3
Fix custom decoder on Python 3
Python
mit
mwielgoszewski/doorman,mwielgoszewski/doorman,mwielgoszewski/doorman,mwielgoszewski/doorman
# -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'epoch': int(mktime(obj.timetuple())) ...
# -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json from doorman.compat import string_types class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'e...
<commit_before># -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'epoch': int(mktime(obj.time...
# -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json from doorman.compat import string_types class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'e...
# -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'epoch': int(mktime(obj.timetuple())) ...
<commit_before># -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'epoch': int(mktime(obj.time...
70b23dbd315b93213fc62540aab6293665b9dd0c
pebble_tool/sdk/__init__.py
pebble_tool/sdk/__init__.py
from __future__ import absolute_import __author__ = 'katharine' import os import subprocess from pebble_tool.exceptions import MissingSDK from pebble_tool.util import get_persist_dir def sdk_path(): path = os.getenv('PEBBLE_SDK_PATH', None) or os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')...
from __future__ import absolute_import __author__ = 'katharine' import os import subprocess from pebble_tool.exceptions import MissingSDK from pebble_tool.util import get_persist_dir def sdk_path(): path = os.getenv('PEBBLE_SDK_PATH', None) or os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')...
Fix error determining current version in other working directories.
Fix error determining current version in other working directories.
Python
mit
pebble/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool,pebble/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool
from __future__ import absolute_import __author__ = 'katharine' import os import subprocess from pebble_tool.exceptions import MissingSDK from pebble_tool.util import get_persist_dir def sdk_path(): path = os.getenv('PEBBLE_SDK_PATH', None) or os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')...
from __future__ import absolute_import __author__ = 'katharine' import os import subprocess from pebble_tool.exceptions import MissingSDK from pebble_tool.util import get_persist_dir def sdk_path(): path = os.getenv('PEBBLE_SDK_PATH', None) or os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')...
<commit_before>from __future__ import absolute_import __author__ = 'katharine' import os import subprocess from pebble_tool.exceptions import MissingSDK from pebble_tool.util import get_persist_dir def sdk_path(): path = os.getenv('PEBBLE_SDK_PATH', None) or os.path.normpath(os.path.join(os.path.dirname(__file_...
from __future__ import absolute_import __author__ = 'katharine' import os import subprocess from pebble_tool.exceptions import MissingSDK from pebble_tool.util import get_persist_dir def sdk_path(): path = os.getenv('PEBBLE_SDK_PATH', None) or os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')...
from __future__ import absolute_import __author__ = 'katharine' import os import subprocess from pebble_tool.exceptions import MissingSDK from pebble_tool.util import get_persist_dir def sdk_path(): path = os.getenv('PEBBLE_SDK_PATH', None) or os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')...
<commit_before>from __future__ import absolute_import __author__ = 'katharine' import os import subprocess from pebble_tool.exceptions import MissingSDK from pebble_tool.util import get_persist_dir def sdk_path(): path = os.getenv('PEBBLE_SDK_PATH', None) or os.path.normpath(os.path.join(os.path.dirname(__file_...
79cbfc35ecca75434cf31839416e5866bad7909d
app/__init__.py
app/__init__.py
import logging logging.basicConfig( format='%(asctime)s %(levelname)-8s %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S')
import logging logging.root.handlers = [] logging.basicConfig(format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.INFO, filename='triggear.log') console = logging.StreamHandler() console.setLevel(logging.WARNING) logg...
Add logging to file on side of logging to stdout
Add logging to file on side of logging to stdout
Python
mit
futuresimple/triggear
import logging logging.basicConfig( format='%(asctime)s %(levelname)-8s %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') Add logging to file on side of logging to stdout
import logging logging.root.handlers = [] logging.basicConfig(format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.INFO, filename='triggear.log') console = logging.StreamHandler() console.setLevel(logging.WARNING) logg...
<commit_before>import logging logging.basicConfig( format='%(asctime)s %(levelname)-8s %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') <commit_msg>Add logging to file on side of logging to stdout<commit_after>
import logging logging.root.handlers = [] logging.basicConfig(format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.INFO, filename='triggear.log') console = logging.StreamHandler() console.setLevel(logging.WARNING) logg...
import logging logging.basicConfig( format='%(asctime)s %(levelname)-8s %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') Add logging to file on side of logging to stdoutimport logging logging.root.handlers = [] logging.basicConfig(format='%(asctime)s %(levelname)-8s %(message)s', ...
<commit_before>import logging logging.basicConfig( format='%(asctime)s %(levelname)-8s %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') <commit_msg>Add logging to file on side of logging to stdout<commit_after>import logging logging.root.handlers = [] logging.basicConfig(format='%(asctime)s ...
4ec3bd4e4d45c0dba9b8333b52ecd8e8a4a6796f
ghpythonremote/ghcompservice.py
ghpythonremote/ghcompservice.py
import sys import rpyc from rpyc.utils.server import OneShotServer class GhcompService(rpyc.ClassicService): def on_connect(self, conn): print('Incoming connection.') super(GhcompService, self).on_connect(conn) import ghpythonlib.components as ghcomp self.ghcomp = ghcomp def o...
import sys import rpyc from rpyc.utils.server import OneShotServer class GhcompService(rpyc.ClassicService): def on_connect(self, conn): print('Incoming connection.') super(GhcompService, self).on_connect(conn) import ghpythonlib.components as ghcomp self.ghcomp = ghcomp def o...
Stop using `exposed` prefix for remote attributes, per rpyc v4
Stop using `exposed` prefix for remote attributes, per rpyc v4
Python
mit
Digital-Structures/ghpythonremote,pilcru/ghpythonremote
import sys import rpyc from rpyc.utils.server import OneShotServer class GhcompService(rpyc.ClassicService): def on_connect(self, conn): print('Incoming connection.') super(GhcompService, self).on_connect(conn) import ghpythonlib.components as ghcomp self.ghcomp = ghcomp def o...
import sys import rpyc from rpyc.utils.server import OneShotServer class GhcompService(rpyc.ClassicService): def on_connect(self, conn): print('Incoming connection.') super(GhcompService, self).on_connect(conn) import ghpythonlib.components as ghcomp self.ghcomp = ghcomp def o...
<commit_before>import sys import rpyc from rpyc.utils.server import OneShotServer class GhcompService(rpyc.ClassicService): def on_connect(self, conn): print('Incoming connection.') super(GhcompService, self).on_connect(conn) import ghpythonlib.components as ghcomp self.ghcomp = gh...
import sys import rpyc from rpyc.utils.server import OneShotServer class GhcompService(rpyc.ClassicService): def on_connect(self, conn): print('Incoming connection.') super(GhcompService, self).on_connect(conn) import ghpythonlib.components as ghcomp self.ghcomp = ghcomp def o...
import sys import rpyc from rpyc.utils.server import OneShotServer class GhcompService(rpyc.ClassicService): def on_connect(self, conn): print('Incoming connection.') super(GhcompService, self).on_connect(conn) import ghpythonlib.components as ghcomp self.ghcomp = ghcomp def o...
<commit_before>import sys import rpyc from rpyc.utils.server import OneShotServer class GhcompService(rpyc.ClassicService): def on_connect(self, conn): print('Incoming connection.') super(GhcompService, self).on_connect(conn) import ghpythonlib.components as ghcomp self.ghcomp = gh...
b9fc50abab64f784c8d6defb74aaaf5bdb5a45a7
src/python/main.py
src/python/main.py
"""Script to act as a template""" import os import sys def main(args): return os.EX_OK if __name__ == '__main__': sys.exit(main(sys.argv[1:]))
#! /usr/bin/env python2 """Script to act as a template""" import os import sys def main(_args): return os.EX_OK if __name__ == '__main__': sys.exit(main(sys.argv[1:]))
Hide variable till something actually uses it
Hide variable till something actually uses it
Python
mit
jalanb/jab,jalanb/dotjab,jalanb/dotjab,jalanb/jab
"""Script to act as a template""" import os import sys def main(args): return os.EX_OK if __name__ == '__main__': sys.exit(main(sys.argv[1:])) Hide variable till something actually uses it
#! /usr/bin/env python2 """Script to act as a template""" import os import sys def main(_args): return os.EX_OK if __name__ == '__main__': sys.exit(main(sys.argv[1:]))
<commit_before>"""Script to act as a template""" import os import sys def main(args): return os.EX_OK if __name__ == '__main__': sys.exit(main(sys.argv[1:])) <commit_msg>Hide variable till something actually uses it<commit_after>
#! /usr/bin/env python2 """Script to act as a template""" import os import sys def main(_args): return os.EX_OK if __name__ == '__main__': sys.exit(main(sys.argv[1:]))
"""Script to act as a template""" import os import sys def main(args): return os.EX_OK if __name__ == '__main__': sys.exit(main(sys.argv[1:])) Hide variable till something actually uses it#! /usr/bin/env python2 """Script to act as a template""" import os import sys def main(_args): return os.EX_OK ...
<commit_before>"""Script to act as a template""" import os import sys def main(args): return os.EX_OK if __name__ == '__main__': sys.exit(main(sys.argv[1:])) <commit_msg>Hide variable till something actually uses it<commit_after>#! /usr/bin/env python2 """Script to act as a template""" import os import sy...
7bae2375adfbd178ce71cc817d1d44876aa58ab7
flaskapp.py
flaskapp.py
from flask import Flask app = Flask(__name__) from pymongo import MongoClient connection = MongoClient() @app.route("/") def hello(): return connection.essa.users.find({}).next()['name'] @app.route('/halla/<username>') def hi(username): return "Halla " + username @app.route('/add/<int:x>/<int:y>/') d...
from flask import Flask app = Flask(__name__) from pymongo import MongoClient connection = MongoClient() @app.route("/") def hello(): return connection.essa.users.find({}).next()['name'] #update master @app.route('/halla/<username>') def hi(username): return "Halla " + username @app.route('/add/<int:...
Update the comments for master
Update the comments for master
Python
apache-2.0
raklove/hello-world
from flask import Flask app = Flask(__name__) from pymongo import MongoClient connection = MongoClient() @app.route("/") def hello(): return connection.essa.users.find({}).next()['name'] @app.route('/halla/<username>') def hi(username): return "Halla " + username @app.route('/add/<int:x>/<int:y>/') d...
from flask import Flask app = Flask(__name__) from pymongo import MongoClient connection = MongoClient() @app.route("/") def hello(): return connection.essa.users.find({}).next()['name'] #update master @app.route('/halla/<username>') def hi(username): return "Halla " + username @app.route('/add/<int:...
<commit_before>from flask import Flask app = Flask(__name__) from pymongo import MongoClient connection = MongoClient() @app.route("/") def hello(): return connection.essa.users.find({}).next()['name'] @app.route('/halla/<username>') def hi(username): return "Halla " + username @app.route('/add/<int:...
from flask import Flask app = Flask(__name__) from pymongo import MongoClient connection = MongoClient() @app.route("/") def hello(): return connection.essa.users.find({}).next()['name'] #update master @app.route('/halla/<username>') def hi(username): return "Halla " + username @app.route('/add/<int:...
from flask import Flask app = Flask(__name__) from pymongo import MongoClient connection = MongoClient() @app.route("/") def hello(): return connection.essa.users.find({}).next()['name'] @app.route('/halla/<username>') def hi(username): return "Halla " + username @app.route('/add/<int:x>/<int:y>/') d...
<commit_before>from flask import Flask app = Flask(__name__) from pymongo import MongoClient connection = MongoClient() @app.route("/") def hello(): return connection.essa.users.find({}).next()['name'] @app.route('/halla/<username>') def hi(username): return "Halla " + username @app.route('/add/<int:...
e9df4039849e88433f75869b8b6997f21726e761
blog/myblog/views.py
blog/myblog/views.py
from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse from myblog.models import Article from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from django.core.urlresolvers import reverse def index(request): latest_articles = Article.objects.fil...
from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse from myblog.models import Article from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from django.core.urlresolvers import reverse def index(request): latest_articles = Article.objects.fil...
Add more text in jumbotron
Add more text in jumbotron
Python
mit
mileto94/Django-tutorial,mileto94/Django-tutorial
from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse from myblog.models import Article from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from django.core.urlresolvers import reverse def index(request): latest_articles = Article.objects.fil...
from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse from myblog.models import Article from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from django.core.urlresolvers import reverse def index(request): latest_articles = Article.objects.fil...
<commit_before>from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse from myblog.models import Article from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from django.core.urlresolvers import reverse def index(request): latest_articles = Arti...
from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse from myblog.models import Article from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from django.core.urlresolvers import reverse def index(request): latest_articles = Article.objects.fil...
from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse from myblog.models import Article from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from django.core.urlresolvers import reverse def index(request): latest_articles = Article.objects.fil...
<commit_before>from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse from myblog.models import Article from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from django.core.urlresolvers import reverse def index(request): latest_articles = Arti...
da0ba836636f6ce78d8606a5932de34a8e1160a1
registration/__init__.py
registration/__init__.py
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise ``django.cor...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured # TODO: When Python 2.7 is released this becomes a try/except falling # back to Django's implementation. from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backe...
Add reminder to myself to to importlib fallback.
Add reminder to myself to to importlib fallback.
Python
bsd-3-clause
Geffersonvivan/django-registration,tanjunyen/django-registration,rulz/django-registration,allo-/django-registration,furious-luke/django-registration,kinsights/django-registration,yorkedork/django-registration,mick-t/django-registration,torchingloom/django-registration,alawnchen/django-registration,furious-luke/django-r...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise ``django.cor...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured # TODO: When Python 2.7 is released this becomes a try/except falling # back to Django's implementation. from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backe...
<commit_before>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise ...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured # TODO: When Python 2.7 is released this becomes a try/except falling # back to Django's implementation. from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backe...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise ``django.cor...
<commit_before>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise ...
3398ca0dbdb6e76986ddaadf8ee35c637ce13c14
csunplugged/general/views.py
csunplugged/general/views.py
"""Views for the general application.""" from django.views.generic import TemplateView from django.http import HttpResponse class GeneralIndexView(TemplateView): """View for the homepage that renders from a template.""" template_name = 'general/index.html' class GeneralAboutView(TemplateView): """View...
"""Views for the general application.""" from django.views.generic import TemplateView from django.http import HttpResponse class GeneralIndexView(TemplateView): """View for the homepage that renders from a template.""" template_name = 'general/index.html' class GeneralAboutView(TemplateView): """View...
Break pydocstyle to check Travis
Break pydocstyle to check Travis
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
"""Views for the general application.""" from django.views.generic import TemplateView from django.http import HttpResponse class GeneralIndexView(TemplateView): """View for the homepage that renders from a template.""" template_name = 'general/index.html' class GeneralAboutView(TemplateView): """View...
"""Views for the general application.""" from django.views.generic import TemplateView from django.http import HttpResponse class GeneralIndexView(TemplateView): """View for the homepage that renders from a template.""" template_name = 'general/index.html' class GeneralAboutView(TemplateView): """View...
<commit_before>"""Views for the general application.""" from django.views.generic import TemplateView from django.http import HttpResponse class GeneralIndexView(TemplateView): """View for the homepage that renders from a template.""" template_name = 'general/index.html' class GeneralAboutView(TemplateVie...
"""Views for the general application.""" from django.views.generic import TemplateView from django.http import HttpResponse class GeneralIndexView(TemplateView): """View for the homepage that renders from a template.""" template_name = 'general/index.html' class GeneralAboutView(TemplateView): """View...
"""Views for the general application.""" from django.views.generic import TemplateView from django.http import HttpResponse class GeneralIndexView(TemplateView): """View for the homepage that renders from a template.""" template_name = 'general/index.html' class GeneralAboutView(TemplateView): """View...
<commit_before>"""Views for the general application.""" from django.views.generic import TemplateView from django.http import HttpResponse class GeneralIndexView(TemplateView): """View for the homepage that renders from a template.""" template_name = 'general/index.html' class GeneralAboutView(TemplateVie...
47bf4b10624d8bcdbf3906ff69f5430975679c1c
demo/mnist_learning_lenet.py
demo/mnist_learning_lenet.py
"""Training LeNet on MNIST data.""" import athenet from athenet.data_loader import MNISTDataLoader network = athenet.models.lenet(trained=False) network.data_loader = MNISTDataLoader() config = athenet.TrainConfig() config.n_epochs = 10 config.batch_size = 300 config.learning_rate = 0.1 config.val_interval = 1 con...
"""Training LeNet on MNIST data.""" import athenet from athenet.data_loader import MNISTDataLoader network = athenet.models.lenet(trained=False) network.data_loader = MNISTDataLoader() config = athenet.TrainConfig() config.n_epochs = 10 config.batch_size = 300 config.learning_rate = 0.1 config.val_interval = 1 con...
Fix name of config field
Fix name of config field
Python
bsd-2-clause
heurezjusz/Athenet,heurezjusz/Athena
"""Training LeNet on MNIST data.""" import athenet from athenet.data_loader import MNISTDataLoader network = athenet.models.lenet(trained=False) network.data_loader = MNISTDataLoader() config = athenet.TrainConfig() config.n_epochs = 10 config.batch_size = 300 config.learning_rate = 0.1 config.val_interval = 1 con...
"""Training LeNet on MNIST data.""" import athenet from athenet.data_loader import MNISTDataLoader network = athenet.models.lenet(trained=False) network.data_loader = MNISTDataLoader() config = athenet.TrainConfig() config.n_epochs = 10 config.batch_size = 300 config.learning_rate = 0.1 config.val_interval = 1 con...
<commit_before>"""Training LeNet on MNIST data.""" import athenet from athenet.data_loader import MNISTDataLoader network = athenet.models.lenet(trained=False) network.data_loader = MNISTDataLoader() config = athenet.TrainConfig() config.n_epochs = 10 config.batch_size = 300 config.learning_rate = 0.1 config.val_i...
"""Training LeNet on MNIST data.""" import athenet from athenet.data_loader import MNISTDataLoader network = athenet.models.lenet(trained=False) network.data_loader = MNISTDataLoader() config = athenet.TrainConfig() config.n_epochs = 10 config.batch_size = 300 config.learning_rate = 0.1 config.val_interval = 1 con...
"""Training LeNet on MNIST data.""" import athenet from athenet.data_loader import MNISTDataLoader network = athenet.models.lenet(trained=False) network.data_loader = MNISTDataLoader() config = athenet.TrainConfig() config.n_epochs = 10 config.batch_size = 300 config.learning_rate = 0.1 config.val_interval = 1 con...
<commit_before>"""Training LeNet on MNIST data.""" import athenet from athenet.data_loader import MNISTDataLoader network = athenet.models.lenet(trained=False) network.data_loader = MNISTDataLoader() config = athenet.TrainConfig() config.n_epochs = 10 config.batch_size = 300 config.learning_rate = 0.1 config.val_i...
7297f61674d37795f3d63ec990f87e9950d68456
salt/utils/yamldumper.py
salt/utils/yamldumper.py
# -*- coding: utf-8 -*- ''' salt.utils.yamldumper ~~~~~~~~~~~~~~~~~~~~~ ''' # pylint: disable=W0232 # class has no __init__ method from __future__ import absolute_import try: from yaml import CDumper as Dumper from yaml import CSafeDumper as SafeDumper except ImportError: from yaml import ...
# -*- coding: utf-8 -*- ''' salt.utils.yamldumper ~~~~~~~~~~~~~~~~~~~~~ ''' # pylint: disable=W0232 # class has no __init__ method from __future__ import absolute_import try: from yaml import CDumper as Dumper from yaml import CSafeDumper as SafeDumper except ImportError: from yaml import ...
Check for ioflo-flavored OrderedDicts as well when outputting YAML
Check for ioflo-flavored OrderedDicts as well when outputting YAML
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- ''' salt.utils.yamldumper ~~~~~~~~~~~~~~~~~~~~~ ''' # pylint: disable=W0232 # class has no __init__ method from __future__ import absolute_import try: from yaml import CDumper as Dumper from yaml import CSafeDumper as SafeDumper except ImportError: from yaml import ...
# -*- coding: utf-8 -*- ''' salt.utils.yamldumper ~~~~~~~~~~~~~~~~~~~~~ ''' # pylint: disable=W0232 # class has no __init__ method from __future__ import absolute_import try: from yaml import CDumper as Dumper from yaml import CSafeDumper as SafeDumper except ImportError: from yaml import ...
<commit_before># -*- coding: utf-8 -*- ''' salt.utils.yamldumper ~~~~~~~~~~~~~~~~~~~~~ ''' # pylint: disable=W0232 # class has no __init__ method from __future__ import absolute_import try: from yaml import CDumper as Dumper from yaml import CSafeDumper as SafeDumper except ImportError: fr...
# -*- coding: utf-8 -*- ''' salt.utils.yamldumper ~~~~~~~~~~~~~~~~~~~~~ ''' # pylint: disable=W0232 # class has no __init__ method from __future__ import absolute_import try: from yaml import CDumper as Dumper from yaml import CSafeDumper as SafeDumper except ImportError: from yaml import ...
# -*- coding: utf-8 -*- ''' salt.utils.yamldumper ~~~~~~~~~~~~~~~~~~~~~ ''' # pylint: disable=W0232 # class has no __init__ method from __future__ import absolute_import try: from yaml import CDumper as Dumper from yaml import CSafeDumper as SafeDumper except ImportError: from yaml import ...
<commit_before># -*- coding: utf-8 -*- ''' salt.utils.yamldumper ~~~~~~~~~~~~~~~~~~~~~ ''' # pylint: disable=W0232 # class has no __init__ method from __future__ import absolute_import try: from yaml import CDumper as Dumper from yaml import CSafeDumper as SafeDumper except ImportError: fr...
44f603cd947f63101cf6b7eb8e49b5210cfa4f6f
wry/__init__.py
wry/__init__.py
#!/usr/bin/env python2 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
#!/usr/bin/env python2 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
Add version. Note this will cause the file to be modified in your working copy. This change is gitignored
Add version. Note this will cause the file to be modified in your working copy. This change is gitignored
Python
apache-2.0
ocadotechnology/wry
#!/usr/bin/env python2 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
#!/usr/bin/env python2 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
<commit_before>#!/usr/bin/env python2 # 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 ...
#!/usr/bin/env python2 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
#!/usr/bin/env python2 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
<commit_before>#!/usr/bin/env python2 # 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 ...
0d9542011b78dca40f0c4c18a932a06d5305f6ef
examples/delete_old_files.py
examples/delete_old_files.py
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
Make the example code compatible with Python3
Make the example code compatible with Python3
Python
mit
uploadcare/pyuploadcare
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
<commit_before>#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'dem...
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'demoprivatekey' ...
<commit_before>#!/bin/python # installation: # pip install pytz pyuploadcare~=2.1.0 import pytz from datetime import timedelta, datetime import time from pyuploadcare import conf from pyuploadcare.api_resources import FileList, FilesStorage MAX_LIFETIME = 30 # days conf.pub_key = 'demopublickey' conf.secret = 'dem...
ddb91c20793d8e5e8a01e0302afeaaba76776741
setuptools/extern/six.py
setuptools/extern/six.py
""" Handle loading six package from system or from the bundled copy """ import imp _SIX_SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for part in parts: ...
""" Handle loading a package from system or from the bundled copy """ import imp _SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for part in parts: ...
Make the technique even more generic
Make the technique even more generic --HG-- branch : feature/issue-229
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
""" Handle loading six package from system or from the bundled copy """ import imp _SIX_SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for part in parts: ...
""" Handle loading a package from system or from the bundled copy """ import imp _SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for part in parts: ...
<commit_before>""" Handle loading six package from system or from the bundled copy """ import imp _SIX_SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for p...
""" Handle loading a package from system or from the bundled copy """ import imp _SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for part in parts: ...
""" Handle loading six package from system or from the bundled copy """ import imp _SIX_SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for part in parts: ...
<commit_before>""" Handle loading six package from system or from the bundled copy """ import imp _SIX_SEARCH_PATH = ['setuptools._vendor.six', 'six'] def _find_module(name, path=None): """ Alternative to `imp.find_module` that can also search in subpackages. """ parts = name.split('.') for p...
88ae237911346d74c1c8a51a11dd47b486f3b4c5
setuptools/py31compat.py
setuptools/py31compat.py
try: # Python >=3.2 from tempfile import TemporaryDirectory except ImportError: import shutil import tempfile class TemporaryDirectory(object): """ Very simple temporary directory context manager. Will try to delete afterward, but will also ignore OS and similar erro...
__all__ = [] try: # Python >=3.2 from tempfile import TemporaryDirectory except ImportError: import shutil import tempfile class TemporaryDirectory(object): """ Very simple temporary directory context manager. Will try to delete afterward, but will also ignore OS and simila...
Make it clear this compat module provides no public members
Make it clear this compat module provides no public members
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
try: # Python >=3.2 from tempfile import TemporaryDirectory except ImportError: import shutil import tempfile class TemporaryDirectory(object): """ Very simple temporary directory context manager. Will try to delete afterward, but will also ignore OS and similar erro...
__all__ = [] try: # Python >=3.2 from tempfile import TemporaryDirectory except ImportError: import shutil import tempfile class TemporaryDirectory(object): """ Very simple temporary directory context manager. Will try to delete afterward, but will also ignore OS and simila...
<commit_before>try: # Python >=3.2 from tempfile import TemporaryDirectory except ImportError: import shutil import tempfile class TemporaryDirectory(object): """ Very simple temporary directory context manager. Will try to delete afterward, but will also ignore OS and simil...
__all__ = [] try: # Python >=3.2 from tempfile import TemporaryDirectory except ImportError: import shutil import tempfile class TemporaryDirectory(object): """ Very simple temporary directory context manager. Will try to delete afterward, but will also ignore OS and simila...
try: # Python >=3.2 from tempfile import TemporaryDirectory except ImportError: import shutil import tempfile class TemporaryDirectory(object): """ Very simple temporary directory context manager. Will try to delete afterward, but will also ignore OS and similar erro...
<commit_before>try: # Python >=3.2 from tempfile import TemporaryDirectory except ImportError: import shutil import tempfile class TemporaryDirectory(object): """ Very simple temporary directory context manager. Will try to delete afterward, but will also ignore OS and simil...
3b257526c9f0ed523d51b023fa454bae59ecac5c
channels/ya_metro/app.py
channels/ya_metro/app.py
#encoding:utf-8 from urllib.parse import urlparse from utils import get_url t_channel = '@ya_metro' subreddit = 'Subways' def send_post(submission, r2t): what, url, ext = get_url(submission) title = submission.title link = submission.shortlink text = '{}\n{}'.format(title, link) if what == 't...
#encoding:utf-8 from urllib.parse import urlparse from utils import get_url t_channel = '@ya_metro' subreddit = 'Subways' def send_post(submission, r2t): what, url, ext = get_url(submission) title = submission.title link = submission.shortlink text = '{}\n{}'.format(title, link) if what == 't...
Set URL submission score cutoff to 4.
Set URL submission score cutoff to 4.
Python
mit
nsiregar/reddit2telegram,nsiregar/reddit2telegram,Fillll/reddit2telegram,Fillll/reddit2telegram
#encoding:utf-8 from urllib.parse import urlparse from utils import get_url t_channel = '@ya_metro' subreddit = 'Subways' def send_post(submission, r2t): what, url, ext = get_url(submission) title = submission.title link = submission.shortlink text = '{}\n{}'.format(title, link) if what == 't...
#encoding:utf-8 from urllib.parse import urlparse from utils import get_url t_channel = '@ya_metro' subreddit = 'Subways' def send_post(submission, r2t): what, url, ext = get_url(submission) title = submission.title link = submission.shortlink text = '{}\n{}'.format(title, link) if what == 't...
<commit_before>#encoding:utf-8 from urllib.parse import urlparse from utils import get_url t_channel = '@ya_metro' subreddit = 'Subways' def send_post(submission, r2t): what, url, ext = get_url(submission) title = submission.title link = submission.shortlink text = '{}\n{}'.format(title, link) ...
#encoding:utf-8 from urllib.parse import urlparse from utils import get_url t_channel = '@ya_metro' subreddit = 'Subways' def send_post(submission, r2t): what, url, ext = get_url(submission) title = submission.title link = submission.shortlink text = '{}\n{}'.format(title, link) if what == 't...
#encoding:utf-8 from urllib.parse import urlparse from utils import get_url t_channel = '@ya_metro' subreddit = 'Subways' def send_post(submission, r2t): what, url, ext = get_url(submission) title = submission.title link = submission.shortlink text = '{}\n{}'.format(title, link) if what == 't...
<commit_before>#encoding:utf-8 from urllib.parse import urlparse from utils import get_url t_channel = '@ya_metro' subreddit = 'Subways' def send_post(submission, r2t): what, url, ext = get_url(submission) title = submission.title link = submission.shortlink text = '{}\n{}'.format(title, link) ...
3849a5a842137a29ce06b5b7e027c8f8efd4e00e
shopify/product/admin.py
shopify/product/admin.py
from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ('description', 'product_type', 'account_number') ordering = ('description',) class Meta: model = Product admin.site.register(Product, ProductAdmin)
from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ('description', 'product_type', 'account_number') ordering = ('description',) readonly_fields = ('description', 'product_type', 'product_id') class Meta: model = Product admin....
Make Shopify product fields readonly
Make Shopify product fields readonly
Python
bsd-3-clause
CorbanU/corban-shopify,CorbanU/corban-shopify
from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ('description', 'product_type', 'account_number') ordering = ('description',) class Meta: model = Product admin.site.register(Product, ProductAdmin) Make Shopify product fields rea...
from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ('description', 'product_type', 'account_number') ordering = ('description',) readonly_fields = ('description', 'product_type', 'product_id') class Meta: model = Product admin....
<commit_before>from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ('description', 'product_type', 'account_number') ordering = ('description',) class Meta: model = Product admin.site.register(Product, ProductAdmin) <commit_msg>Make...
from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ('description', 'product_type', 'account_number') ordering = ('description',) readonly_fields = ('description', 'product_type', 'product_id') class Meta: model = Product admin....
from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ('description', 'product_type', 'account_number') ordering = ('description',) class Meta: model = Product admin.site.register(Product, ProductAdmin) Make Shopify product fields rea...
<commit_before>from django.contrib import admin from .models import Product class ProductAdmin(admin.ModelAdmin): list_display = ('description', 'product_type', 'account_number') ordering = ('description',) class Meta: model = Product admin.site.register(Product, ProductAdmin) <commit_msg>Make...