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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1009bd3b5e5941aff2f7b3852494ee19f085dcce | mediacloud/mediawords/db/exceptions/handler.py | mediacloud/mediawords/db/exceptions/handler.py | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | Add exception to be thrown by select() | Add exception to be thrown by select()
| Python | agpl-3.0 | berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | <commit_before>class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pa... | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pass
class McQu... | <commit_before>class McDatabaseHandlerException(Exception):
"""Database handler exception."""
pass
class McConnectException(McDatabaseHandlerException):
"""__connect() exception."""
pass
class McSchemaIsUpToDateException(McDatabaseHandlerException):
"""schema_is_up_to_date() exception."""
pa... |
cb6fa6b54ca3e1908037a1b1a3399d8bd4b1be58 | djoser/compat.py | djoser/compat.py | from djoser.conf import settings
try:
from django.contrib.auth.password_validation import validate_password
except ImportError:
from password_validation import validate_password
__all__ = ['settings', 'validate_password']
def get_user_email(user):
email_field_name = get_user_email_field_name(user)
r... | from djoser.conf import settings
try:
from django.contrib.auth.password_validation import validate_password
except ImportError: # pragma: no cover
from password_validation import validate_password
__all__ = ['settings', 'validate_password']
def get_user_email(user):
email_field_name = get_user_email_fi... | Fix invalid fallback leading to circular calls | Fix invalid fallback leading to circular calls
Remove redundant finally
| Python | mit | sunscrapers/djoser,akalipetis/djoser,sunscrapers/djoser,sunscrapers/djoser,akalipetis/djoser | from djoser.conf import settings
try:
from django.contrib.auth.password_validation import validate_password
except ImportError:
from password_validation import validate_password
__all__ = ['settings', 'validate_password']
def get_user_email(user):
email_field_name = get_user_email_field_name(user)
r... | from djoser.conf import settings
try:
from django.contrib.auth.password_validation import validate_password
except ImportError: # pragma: no cover
from password_validation import validate_password
__all__ = ['settings', 'validate_password']
def get_user_email(user):
email_field_name = get_user_email_fi... | <commit_before>from djoser.conf import settings
try:
from django.contrib.auth.password_validation import validate_password
except ImportError:
from password_validation import validate_password
__all__ = ['settings', 'validate_password']
def get_user_email(user):
email_field_name = get_user_email_field_n... | from djoser.conf import settings
try:
from django.contrib.auth.password_validation import validate_password
except ImportError: # pragma: no cover
from password_validation import validate_password
__all__ = ['settings', 'validate_password']
def get_user_email(user):
email_field_name = get_user_email_fi... | from djoser.conf import settings
try:
from django.contrib.auth.password_validation import validate_password
except ImportError:
from password_validation import validate_password
__all__ = ['settings', 'validate_password']
def get_user_email(user):
email_field_name = get_user_email_field_name(user)
r... | <commit_before>from djoser.conf import settings
try:
from django.contrib.auth.password_validation import validate_password
except ImportError:
from password_validation import validate_password
__all__ = ['settings', 'validate_password']
def get_user_email(user):
email_field_name = get_user_email_field_n... |
8aaeae23db31162677637a41c5343558f3842450 | tests/test_i19screen.py | tests/test_i19screen.py | from __future__ import absolute_import, division, print_function
import pytest
from i19.command_line.screen import I19Screen
def test_i19screen_command_line_help_does_not_crash():
I19Screen().run('')
def test_i19screen(regression_data, run_in_tmpdir):
data_dir = regression_data('X4_wide').strpath
I19Screen().... | from __future__ import absolute_import, division, print_function
import mock
import pytest
from i19.command_line.screen import I19Screen
def test_i19screen_command_line_help_does_not_crash():
I19Screen().run('')
def test_i19screen(regression_data, run_in_tmpdir):
data_dir = regression_data('X4_wide').strpath
... | Add test for template parsing | Add test for template parsing
| Python | bsd-3-clause | xia2/i19 | from __future__ import absolute_import, division, print_function
import pytest
from i19.command_line.screen import I19Screen
def test_i19screen_command_line_help_does_not_crash():
I19Screen().run('')
def test_i19screen(regression_data, run_in_tmpdir):
data_dir = regression_data('X4_wide').strpath
I19Screen().... | from __future__ import absolute_import, division, print_function
import mock
import pytest
from i19.command_line.screen import I19Screen
def test_i19screen_command_line_help_does_not_crash():
I19Screen().run('')
def test_i19screen(regression_data, run_in_tmpdir):
data_dir = regression_data('X4_wide').strpath
... | <commit_before>from __future__ import absolute_import, division, print_function
import pytest
from i19.command_line.screen import I19Screen
def test_i19screen_command_line_help_does_not_crash():
I19Screen().run('')
def test_i19screen(regression_data, run_in_tmpdir):
data_dir = regression_data('X4_wide').strpath
... | from __future__ import absolute_import, division, print_function
import mock
import pytest
from i19.command_line.screen import I19Screen
def test_i19screen_command_line_help_does_not_crash():
I19Screen().run('')
def test_i19screen(regression_data, run_in_tmpdir):
data_dir = regression_data('X4_wide').strpath
... | from __future__ import absolute_import, division, print_function
import pytest
from i19.command_line.screen import I19Screen
def test_i19screen_command_line_help_does_not_crash():
I19Screen().run('')
def test_i19screen(regression_data, run_in_tmpdir):
data_dir = regression_data('X4_wide').strpath
I19Screen().... | <commit_before>from __future__ import absolute_import, division, print_function
import pytest
from i19.command_line.screen import I19Screen
def test_i19screen_command_line_help_does_not_crash():
I19Screen().run('')
def test_i19screen(regression_data, run_in_tmpdir):
data_dir = regression_data('X4_wide').strpath
... |
ba6305578ad41519ea5f05296dda9732d538d5b3 | tests/test_pathutils.py | tests/test_pathutils.py | from os.path import join
import sublime
import sys
from unittest import TestCase
version = sublime.version()
if version < '3000':
from libsass import pathutils
else:
from sublime_libsass.libsass import pathutils
class test_pathutils(TestCase):
def test_subpaths(self):
path = join('/foo','bar','b... | from os.path import join
import sublime
import sys
from unittest import TestCase
from unittest.mock import patch
version = sublime.version()
if version < '3000':
from libsass import pathutils
else:
from sublime_libsass.libsass import pathutils
class test_pathutils(TestCase):
def test_subpaths(self):
... | Add unit test using mock | Add unit test using mock
| Python | mit | blitzrk/sublime_libsass,blitzrk/sublime_libsass | from os.path import join
import sublime
import sys
from unittest import TestCase
version = sublime.version()
if version < '3000':
from libsass import pathutils
else:
from sublime_libsass.libsass import pathutils
class test_pathutils(TestCase):
def test_subpaths(self):
path = join('/foo','bar','b... | from os.path import join
import sublime
import sys
from unittest import TestCase
from unittest.mock import patch
version = sublime.version()
if version < '3000':
from libsass import pathutils
else:
from sublime_libsass.libsass import pathutils
class test_pathutils(TestCase):
def test_subpaths(self):
... | <commit_before>from os.path import join
import sublime
import sys
from unittest import TestCase
version = sublime.version()
if version < '3000':
from libsass import pathutils
else:
from sublime_libsass.libsass import pathutils
class test_pathutils(TestCase):
def test_subpaths(self):
path = join(... | from os.path import join
import sublime
import sys
from unittest import TestCase
from unittest.mock import patch
version = sublime.version()
if version < '3000':
from libsass import pathutils
else:
from sublime_libsass.libsass import pathutils
class test_pathutils(TestCase):
def test_subpaths(self):
... | from os.path import join
import sublime
import sys
from unittest import TestCase
version = sublime.version()
if version < '3000':
from libsass import pathutils
else:
from sublime_libsass.libsass import pathutils
class test_pathutils(TestCase):
def test_subpaths(self):
path = join('/foo','bar','b... | <commit_before>from os.path import join
import sublime
import sys
from unittest import TestCase
version = sublime.version()
if version < '3000':
from libsass import pathutils
else:
from sublime_libsass.libsass import pathutils
class test_pathutils(TestCase):
def test_subpaths(self):
path = join(... |
0e5f5716b8a48ef5fc03f8ee5a3eef140304a354 | jmbo_calendar/views.py | jmbo_calendar/views.py | from django.utils.translation import ugettext as _
from jmbo.views import ObjectList
from jmbo_calendar.models import Event
class ObjectList(ObjectList):
def get_context_data(self, **kwargs):
context = super(ObjectList, self).get_context_data(**kwargs)
try:
from django.contrib.gis.g... | from django.utils.translation import ugettext as _
from jmbo import USE_GIS
from jmbo.views import ObjectList
from jmbo_calendar.models import Event
class ObjectList(ObjectList):
def get_context_data(self, **kwargs):
context = super(ObjectList, self).get_context_data(**kwargs)
show_distance = F... | Revert to using jmbo gis flag | Revert to using jmbo gis flag
| Python | bsd-3-clause | praekelt/jmbo-calendar,praekelt/jmbo-calendar | from django.utils.translation import ugettext as _
from jmbo.views import ObjectList
from jmbo_calendar.models import Event
class ObjectList(ObjectList):
def get_context_data(self, **kwargs):
context = super(ObjectList, self).get_context_data(**kwargs)
try:
from django.contrib.gis.g... | from django.utils.translation import ugettext as _
from jmbo import USE_GIS
from jmbo.views import ObjectList
from jmbo_calendar.models import Event
class ObjectList(ObjectList):
def get_context_data(self, **kwargs):
context = super(ObjectList, self).get_context_data(**kwargs)
show_distance = F... | <commit_before>from django.utils.translation import ugettext as _
from jmbo.views import ObjectList
from jmbo_calendar.models import Event
class ObjectList(ObjectList):
def get_context_data(self, **kwargs):
context = super(ObjectList, self).get_context_data(**kwargs)
try:
from djang... | from django.utils.translation import ugettext as _
from jmbo import USE_GIS
from jmbo.views import ObjectList
from jmbo_calendar.models import Event
class ObjectList(ObjectList):
def get_context_data(self, **kwargs):
context = super(ObjectList, self).get_context_data(**kwargs)
show_distance = F... | from django.utils.translation import ugettext as _
from jmbo.views import ObjectList
from jmbo_calendar.models import Event
class ObjectList(ObjectList):
def get_context_data(self, **kwargs):
context = super(ObjectList, self).get_context_data(**kwargs)
try:
from django.contrib.gis.g... | <commit_before>from django.utils.translation import ugettext as _
from jmbo.views import ObjectList
from jmbo_calendar.models import Event
class ObjectList(ObjectList):
def get_context_data(self, **kwargs):
context = super(ObjectList, self).get_context_data(**kwargs)
try:
from djang... |
407c6ceec878f60aa908ac12dd9cccc4c4dec9b4 | masters/master.chromium.chrome/master_gatekeeper_cfg.py | masters/master.chromium.chrome/master_gatekeeper_cfg.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If one cr... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If one cr... | Modify gatekeeper config for master.chromium.chrome after switch to recipes | Modify gatekeeper config for master.chromium.chrome after switch to recipes
BUG=338501
Review URL: https://codereview.chromium.org/131033006
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@249524 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If one cr... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If one cr... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# s... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If one cr... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If one cr... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# s... |
dc2f8342bc9b9c921086948ed10f99de9bcbc76d | client/python/setup.py | client/python/setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='Spiff',
version='0.1',
description="API to Spaceman Spiff",
author='Trever Fischer',
author_email='wm161@wm161.net',
url='http://github.com/synhak/spiff',
py_modules=['spiff']
)
| #!/usr/bin/env python
from distutils.core import setup
setup(name='Spiff',
version='0.1',
description="API to Spaceman Spiff",
author='Trever Fischer',
author_email='wm161@wm161.net',
url='http://github.com/synhak/spiff',
py_modules=['spiff'],
requires=['requests'],
)
| Add deps for python lib | Add deps for python lib
| Python | agpl-3.0 | SYNHAK/spiff,SYNHAK/spiff,SYNHAK/spiff | #!/usr/bin/env python
from distutils.core import setup
setup(name='Spiff',
version='0.1',
description="API to Spaceman Spiff",
author='Trever Fischer',
author_email='wm161@wm161.net',
url='http://github.com/synhak/spiff',
py_modules=['spiff']
)
Add deps for python lib | #!/usr/bin/env python
from distutils.core import setup
setup(name='Spiff',
version='0.1',
description="API to Spaceman Spiff",
author='Trever Fischer',
author_email='wm161@wm161.net',
url='http://github.com/synhak/spiff',
py_modules=['spiff'],
requires=['requests'],
)
| <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='Spiff',
version='0.1',
description="API to Spaceman Spiff",
author='Trever Fischer',
author_email='wm161@wm161.net',
url='http://github.com/synhak/spiff',
py_modules=['spiff']
)
<commit_msg>Add deps for python lib... | #!/usr/bin/env python
from distutils.core import setup
setup(name='Spiff',
version='0.1',
description="API to Spaceman Spiff",
author='Trever Fischer',
author_email='wm161@wm161.net',
url='http://github.com/synhak/spiff',
py_modules=['spiff'],
requires=['requests'],
)
| #!/usr/bin/env python
from distutils.core import setup
setup(name='Spiff',
version='0.1',
description="API to Spaceman Spiff",
author='Trever Fischer',
author_email='wm161@wm161.net',
url='http://github.com/synhak/spiff',
py_modules=['spiff']
)
Add deps for python lib#!/usr/bin/env python
from... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name='Spiff',
version='0.1',
description="API to Spaceman Spiff",
author='Trever Fischer',
author_email='wm161@wm161.net',
url='http://github.com/synhak/spiff',
py_modules=['spiff']
)
<commit_msg>Add deps for python lib... |
9546faddab321eb508f358883faf45cbc7d48dd8 | calexicon/internal/tests/test_julian.py | calexicon/internal/tests/test_julian.py | import unittest
from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian
class TestJulian(unittest.TestCase):
def test_distant_julian_to_gregorian(self):
self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12))
def test_julian_to_gregorian(self):
... | import unittest
from datetime import date as vanilla_date
from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian
class TestJulian(unittest.TestCase):
def test_distant_julian_to_gregorian(self):
self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12))
... | Correct test - vanilla_date not tuple. | Correct test - vanilla_date not tuple.
| Python | apache-2.0 | jwg4/calexicon,jwg4/qual | import unittest
from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian
class TestJulian(unittest.TestCase):
def test_distant_julian_to_gregorian(self):
self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12))
def test_julian_to_gregorian(self):
... | import unittest
from datetime import date as vanilla_date
from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian
class TestJulian(unittest.TestCase):
def test_distant_julian_to_gregorian(self):
self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12))
... | <commit_before>import unittest
from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian
class TestJulian(unittest.TestCase):
def test_distant_julian_to_gregorian(self):
self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12))
def test_julian_to_gregori... | import unittest
from datetime import date as vanilla_date
from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian
class TestJulian(unittest.TestCase):
def test_distant_julian_to_gregorian(self):
self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12))
... | import unittest
from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian
class TestJulian(unittest.TestCase):
def test_distant_julian_to_gregorian(self):
self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12))
def test_julian_to_gregorian(self):
... | <commit_before>import unittest
from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian
class TestJulian(unittest.TestCase):
def test_distant_julian_to_gregorian(self):
self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12))
def test_julian_to_gregori... |
ab15e817d4248f982502440007c7562779cc644b | pythonwarrior/ui.py | pythonwarrior/ui.py | from pythonwarrior.config import Config
import time
class UI(object):
@staticmethod
def puts(msg):
if Config.out_stream:
return Config.out_stream.write(msg + "\n")
@staticmethod
def puts_with_delay(msg):
result = UI.puts(msg)
if Config.delay:
time.sleep... | from pythonwarrior.config import Config
import time
class UI(object):
@staticmethod
def puts(msg):
if Config.out_stream:
return Config.out_stream.write(msg + "\n")
@staticmethod
def puts_with_delay(msg):
result = UI.puts(msg)
if Config.delay:
time.sleep... | Change UI gets to use readline instead of read | Change UI gets to use readline instead of read
| Python | mit | arbylee/python-warrior | from pythonwarrior.config import Config
import time
class UI(object):
@staticmethod
def puts(msg):
if Config.out_stream:
return Config.out_stream.write(msg + "\n")
@staticmethod
def puts_with_delay(msg):
result = UI.puts(msg)
if Config.delay:
time.sleep... | from pythonwarrior.config import Config
import time
class UI(object):
@staticmethod
def puts(msg):
if Config.out_stream:
return Config.out_stream.write(msg + "\n")
@staticmethod
def puts_with_delay(msg):
result = UI.puts(msg)
if Config.delay:
time.sleep... | <commit_before>from pythonwarrior.config import Config
import time
class UI(object):
@staticmethod
def puts(msg):
if Config.out_stream:
return Config.out_stream.write(msg + "\n")
@staticmethod
def puts_with_delay(msg):
result = UI.puts(msg)
if Config.delay:
... | from pythonwarrior.config import Config
import time
class UI(object):
@staticmethod
def puts(msg):
if Config.out_stream:
return Config.out_stream.write(msg + "\n")
@staticmethod
def puts_with_delay(msg):
result = UI.puts(msg)
if Config.delay:
time.sleep... | from pythonwarrior.config import Config
import time
class UI(object):
@staticmethod
def puts(msg):
if Config.out_stream:
return Config.out_stream.write(msg + "\n")
@staticmethod
def puts_with_delay(msg):
result = UI.puts(msg)
if Config.delay:
time.sleep... | <commit_before>from pythonwarrior.config import Config
import time
class UI(object):
@staticmethod
def puts(msg):
if Config.out_stream:
return Config.out_stream.write(msg + "\n")
@staticmethod
def puts_with_delay(msg):
result = UI.puts(msg)
if Config.delay:
... |
adb458132b4e633052c9e46e1dc4e67306f9fc6d | tikplay/database/models.py | tikplay/database/models.py | import sqlalchemy as sa
from database import Base
class Song(Base):
__tablename__ = 'songs'
song_hash = sa.Column(sa.String(40), primary_key=True)
filename = sa.Column(sa.Text, nullable=False)
play_count = sa.Column(sa.Integer, nullable=False)
artist = sa.Column(sa.Text, nullable=True)
title =... | import sqlalchemy as sa
from database import Base
class Song(Base):
__tablename__ = 'songs'
song_hash = sa.Column(sa.String(40), primary_key=True)
filename = sa.Column(sa.Text, nullable=False)
play_count = sa.Column(sa.Integer, nullable=False)
artist = sa.Column(sa.Text, nullable=True)
title =... | Add __repr__ and __str__ for DB model | Add __repr__ and __str__ for DB model
| Python | mit | tietokilta-saato/tikplay,tietokilta-saato/tikplay,tietokilta-saato/tikplay,tietokilta-saato/tikplay | import sqlalchemy as sa
from database import Base
class Song(Base):
__tablename__ = 'songs'
song_hash = sa.Column(sa.String(40), primary_key=True)
filename = sa.Column(sa.Text, nullable=False)
play_count = sa.Column(sa.Integer, nullable=False)
artist = sa.Column(sa.Text, nullable=True)
title =... | import sqlalchemy as sa
from database import Base
class Song(Base):
__tablename__ = 'songs'
song_hash = sa.Column(sa.String(40), primary_key=True)
filename = sa.Column(sa.Text, nullable=False)
play_count = sa.Column(sa.Integer, nullable=False)
artist = sa.Column(sa.Text, nullable=True)
title =... | <commit_before>import sqlalchemy as sa
from database import Base
class Song(Base):
__tablename__ = 'songs'
song_hash = sa.Column(sa.String(40), primary_key=True)
filename = sa.Column(sa.Text, nullable=False)
play_count = sa.Column(sa.Integer, nullable=False)
artist = sa.Column(sa.Text, nullable=Tr... | import sqlalchemy as sa
from database import Base
class Song(Base):
__tablename__ = 'songs'
song_hash = sa.Column(sa.String(40), primary_key=True)
filename = sa.Column(sa.Text, nullable=False)
play_count = sa.Column(sa.Integer, nullable=False)
artist = sa.Column(sa.Text, nullable=True)
title =... | import sqlalchemy as sa
from database import Base
class Song(Base):
__tablename__ = 'songs'
song_hash = sa.Column(sa.String(40), primary_key=True)
filename = sa.Column(sa.Text, nullable=False)
play_count = sa.Column(sa.Integer, nullable=False)
artist = sa.Column(sa.Text, nullable=True)
title =... | <commit_before>import sqlalchemy as sa
from database import Base
class Song(Base):
__tablename__ = 'songs'
song_hash = sa.Column(sa.String(40), primary_key=True)
filename = sa.Column(sa.Text, nullable=False)
play_count = sa.Column(sa.Integer, nullable=False)
artist = sa.Column(sa.Text, nullable=Tr... |
d7087cb309c028bdd56cf4c605d7c60eac3d4c0c | utils/custom_context.py | utils/custom_context.py | import discord
from discord.ext import commands
class CustomContext(commands.Context):
async def error(self, title: str, description: str = None):
em = discord.Embed(
title=f":no_entry_sign: {title}",
color=discord.Color.dark_red(),
description=description,
)
... | import discord
from discord.ext import commands
class CustomContext(commands.Context):
async def error(self, title: str, description: str = None):
em = discord.Embed(
title=f":no_entry_sign: {title}",
color=discord.Color.dark_red(),
description=description or '',
... | Remove 'None' in embed description | Remove 'None' in embed description
| Python | mit | Naught0/qtbot | import discord
from discord.ext import commands
class CustomContext(commands.Context):
async def error(self, title: str, description: str = None):
em = discord.Embed(
title=f":no_entry_sign: {title}",
color=discord.Color.dark_red(),
description=description,
)
... | import discord
from discord.ext import commands
class CustomContext(commands.Context):
async def error(self, title: str, description: str = None):
em = discord.Embed(
title=f":no_entry_sign: {title}",
color=discord.Color.dark_red(),
description=description or '',
... | <commit_before>import discord
from discord.ext import commands
class CustomContext(commands.Context):
async def error(self, title: str, description: str = None):
em = discord.Embed(
title=f":no_entry_sign: {title}",
color=discord.Color.dark_red(),
description=descriptio... | import discord
from discord.ext import commands
class CustomContext(commands.Context):
async def error(self, title: str, description: str = None):
em = discord.Embed(
title=f":no_entry_sign: {title}",
color=discord.Color.dark_red(),
description=description or '',
... | import discord
from discord.ext import commands
class CustomContext(commands.Context):
async def error(self, title: str, description: str = None):
em = discord.Embed(
title=f":no_entry_sign: {title}",
color=discord.Color.dark_red(),
description=description,
)
... | <commit_before>import discord
from discord.ext import commands
class CustomContext(commands.Context):
async def error(self, title: str, description: str = None):
em = discord.Embed(
title=f":no_entry_sign: {title}",
color=discord.Color.dark_red(),
description=descriptio... |
89593cc22f8de4bdb6d605b2e4d6e04b0d1fcd61 | microcosm_postgres/types.py | microcosm_postgres/types.py | """
Custom types.
"""
from six import text_type
from sqlalchemy.types import TypeDecorator, Unicode
class EnumType(TypeDecorator):
"""
SQLAlchemy enum type that persists the enum name (not value).
Note that this type is very similar to the `ChoiceType` from `sqlalchemy_utils`,
with the key differen... | """
Custom types.
"""
from enum import Enum
from six import text_type
from sqlalchemy.types import TypeDecorator, Unicode
class EnumType(TypeDecorator):
"""
SQLAlchemy enum type that persists the enum name (not value).
Note that this type is very similar to the `ChoiceType` from `sqlalchemy_utils`,
... | Handle non-enum inputs (if they are enum names) | Handle non-enum inputs (if they are enum names)
| Python | apache-2.0 | globality-corp/microcosm-postgres,globality-corp/microcosm-postgres | """
Custom types.
"""
from six import text_type
from sqlalchemy.types import TypeDecorator, Unicode
class EnumType(TypeDecorator):
"""
SQLAlchemy enum type that persists the enum name (not value).
Note that this type is very similar to the `ChoiceType` from `sqlalchemy_utils`,
with the key differen... | """
Custom types.
"""
from enum import Enum
from six import text_type
from sqlalchemy.types import TypeDecorator, Unicode
class EnumType(TypeDecorator):
"""
SQLAlchemy enum type that persists the enum name (not value).
Note that this type is very similar to the `ChoiceType` from `sqlalchemy_utils`,
... | <commit_before>"""
Custom types.
"""
from six import text_type
from sqlalchemy.types import TypeDecorator, Unicode
class EnumType(TypeDecorator):
"""
SQLAlchemy enum type that persists the enum name (not value).
Note that this type is very similar to the `ChoiceType` from `sqlalchemy_utils`,
with t... | """
Custom types.
"""
from enum import Enum
from six import text_type
from sqlalchemy.types import TypeDecorator, Unicode
class EnumType(TypeDecorator):
"""
SQLAlchemy enum type that persists the enum name (not value).
Note that this type is very similar to the `ChoiceType` from `sqlalchemy_utils`,
... | """
Custom types.
"""
from six import text_type
from sqlalchemy.types import TypeDecorator, Unicode
class EnumType(TypeDecorator):
"""
SQLAlchemy enum type that persists the enum name (not value).
Note that this type is very similar to the `ChoiceType` from `sqlalchemy_utils`,
with the key differen... | <commit_before>"""
Custom types.
"""
from six import text_type
from sqlalchemy.types import TypeDecorator, Unicode
class EnumType(TypeDecorator):
"""
SQLAlchemy enum type that persists the enum name (not value).
Note that this type is very similar to the `ChoiceType` from `sqlalchemy_utils`,
with t... |
c3d4000598a0d8dcbae91d11c36e8361887fa96a | storm/zope/schema.py | storm/zope/schema.py | #
# Copyright (c) 2006, 2007 Canonical
#
# Written by Gustavo Niemeyer <gustavo@niemeyer.net>
#
# This file is part of Storm Object Relational Mapper.
#
# Storm is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Found... | #
# Copyright (c) 2006, 2007 Canonical
#
# Written by Gustavo Niemeyer <gustavo@niemeyer.net>
#
# This file is part of Storm Object Relational Mapper.
#
# Storm is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Found... | Fix docstring and class name | Fix docstring and class name | Python | lgpl-2.1 | petrhosek/storm,PyMamba/mamba-storm,petrhosek/storm,petrhosek/storm,PyMamba/mamba-storm,PyMamba/mamba-storm | #
# Copyright (c) 2006, 2007 Canonical
#
# Written by Gustavo Niemeyer <gustavo@niemeyer.net>
#
# This file is part of Storm Object Relational Mapper.
#
# Storm is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Found... | #
# Copyright (c) 2006, 2007 Canonical
#
# Written by Gustavo Niemeyer <gustavo@niemeyer.net>
#
# This file is part of Storm Object Relational Mapper.
#
# Storm is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Found... | <commit_before>#
# Copyright (c) 2006, 2007 Canonical
#
# Written by Gustavo Niemeyer <gustavo@niemeyer.net>
#
# This file is part of Storm Object Relational Mapper.
#
# Storm is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free... | #
# Copyright (c) 2006, 2007 Canonical
#
# Written by Gustavo Niemeyer <gustavo@niemeyer.net>
#
# This file is part of Storm Object Relational Mapper.
#
# Storm is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Found... | #
# Copyright (c) 2006, 2007 Canonical
#
# Written by Gustavo Niemeyer <gustavo@niemeyer.net>
#
# This file is part of Storm Object Relational Mapper.
#
# Storm is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Found... | <commit_before>#
# Copyright (c) 2006, 2007 Canonical
#
# Written by Gustavo Niemeyer <gustavo@niemeyer.net>
#
# This file is part of Storm Object Relational Mapper.
#
# Storm is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free... |
d043b6b019898a8da69662ba3852cca8e887c384 | tests/TestAssignmentRegex.py | tests/TestAssignmentRegex.py | import unittest
import src
import resources.Constants as const
class TestAssignments(unittest.TestCase):
string_file = ''
int_file = ''
@classmethod
def setUpClass(cls):
cls.string_file = src.main("../resources/BasicStringAssignment.txt")
cls.int_file = src.main("../resources/BasicIn... | import unittest
import src
import resources.Constants as const
class TestAssignments(unittest.TestCase):
string_file = ''
int_file = ''
@classmethod
def setUpClass(cls):
cls.string_file = src.main("./resources/BasicStringAssignment.txt")
cls.int_file = src.main("./resources/BasicInte... | Test changing file path for nosetests | Test changing file path for nosetests
| Python | bsd-3-clause | sky-uk/bslint | import unittest
import src
import resources.Constants as const
class TestAssignments(unittest.TestCase):
string_file = ''
int_file = ''
@classmethod
def setUpClass(cls):
cls.string_file = src.main("../resources/BasicStringAssignment.txt")
cls.int_file = src.main("../resources/BasicIn... | import unittest
import src
import resources.Constants as const
class TestAssignments(unittest.TestCase):
string_file = ''
int_file = ''
@classmethod
def setUpClass(cls):
cls.string_file = src.main("./resources/BasicStringAssignment.txt")
cls.int_file = src.main("./resources/BasicInte... | <commit_before>import unittest
import src
import resources.Constants as const
class TestAssignments(unittest.TestCase):
string_file = ''
int_file = ''
@classmethod
def setUpClass(cls):
cls.string_file = src.main("../resources/BasicStringAssignment.txt")
cls.int_file = src.main("../re... | import unittest
import src
import resources.Constants as const
class TestAssignments(unittest.TestCase):
string_file = ''
int_file = ''
@classmethod
def setUpClass(cls):
cls.string_file = src.main("./resources/BasicStringAssignment.txt")
cls.int_file = src.main("./resources/BasicInte... | import unittest
import src
import resources.Constants as const
class TestAssignments(unittest.TestCase):
string_file = ''
int_file = ''
@classmethod
def setUpClass(cls):
cls.string_file = src.main("../resources/BasicStringAssignment.txt")
cls.int_file = src.main("../resources/BasicIn... | <commit_before>import unittest
import src
import resources.Constants as const
class TestAssignments(unittest.TestCase):
string_file = ''
int_file = ''
@classmethod
def setUpClass(cls):
cls.string_file = src.main("../resources/BasicStringAssignment.txt")
cls.int_file = src.main("../re... |
76f1dee56778fd3ee793604c66d010d900f4440c | Python/tigre/utilities/im3Dnorm.py | Python/tigre/utilities/im3Dnorm.py | import numpy as np
def im3DNORM(img,normind,varargin=None):
'''
% IMAGE3DNORM computes the desired image norm
% IMAGE3DNORM(IMG,NORMIND) computes the norm if image IMG using the norm
% defined in NORMING
%
% IMG A 3D image
% NORMIND {non-zero int, inf, -inf, 'fr... | import numpy as np
def im3DNORM(img,normind,varargin=None):
'''
% IMAGE3DNORM computes the desired image norm
% IMAGE3DNORM(IMG,NORMIND) computes the norm if image IMG using the norm
% defined in NORMING
%
% IMG A 3D image
% NORMIND {non-zero int, inf, -inf, 'fr... | Fix warnings during installation with python 3.8 | Fix warnings during installation with python 3.8
The warning was:
> .../lib/python3.8/site-packages/tigre/utilities/im3Dnorm.py:36:
> SyntaxWarning: "is" with a literal. Did you mean "=="?
| Python | bsd-3-clause | CERN/TIGRE,CERN/TIGRE,CERN/TIGRE,CERN/TIGRE | import numpy as np
def im3DNORM(img,normind,varargin=None):
'''
% IMAGE3DNORM computes the desired image norm
% IMAGE3DNORM(IMG,NORMIND) computes the norm if image IMG using the norm
% defined in NORMING
%
% IMG A 3D image
% NORMIND {non-zero int, inf, -inf, 'fr... | import numpy as np
def im3DNORM(img,normind,varargin=None):
'''
% IMAGE3DNORM computes the desired image norm
% IMAGE3DNORM(IMG,NORMIND) computes the norm if image IMG using the norm
% defined in NORMING
%
% IMG A 3D image
% NORMIND {non-zero int, inf, -inf, 'fr... | <commit_before>import numpy as np
def im3DNORM(img,normind,varargin=None):
'''
% IMAGE3DNORM computes the desired image norm
% IMAGE3DNORM(IMG,NORMIND) computes the norm if image IMG using the norm
% defined in NORMING
%
% IMG A 3D image
% NORMIND {non-zero int,... | import numpy as np
def im3DNORM(img,normind,varargin=None):
'''
% IMAGE3DNORM computes the desired image norm
% IMAGE3DNORM(IMG,NORMIND) computes the norm if image IMG using the norm
% defined in NORMING
%
% IMG A 3D image
% NORMIND {non-zero int, inf, -inf, 'fr... | import numpy as np
def im3DNORM(img,normind,varargin=None):
'''
% IMAGE3DNORM computes the desired image norm
% IMAGE3DNORM(IMG,NORMIND) computes the norm if image IMG using the norm
% defined in NORMING
%
% IMG A 3D image
% NORMIND {non-zero int, inf, -inf, 'fr... | <commit_before>import numpy as np
def im3DNORM(img,normind,varargin=None):
'''
% IMAGE3DNORM computes the desired image norm
% IMAGE3DNORM(IMG,NORMIND) computes the norm if image IMG using the norm
% defined in NORMING
%
% IMG A 3D image
% NORMIND {non-zero int,... |
02de17ee721d40ddcce9598d8a2ed82930240eda | server/python_django/file_uploader/__init__.py | server/python_django/file_uploader/__init__.py | """
@author: Ferdinand E. Silva
@email: ferdinandsilva@ferdinandsilva.com
@website: http://ferdinandsilva.com
"""
import os
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or []
self.sizeLimit = sizeLimit
de... | """
@author: Ferdinand E. Silva
@email: ferdinandsilva@ferdinandsilva.com
@website: http://ferdinandsilva.com
"""
import os
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or [... | Improve the responses. In the case of the success the json was invalid. It required quotes | Improve the responses. In the case of the success the json was invalid. It required quotes
| Python | mit | SimonWaldherr/uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,SimonWaldherr/uploader,FineUploader/fine-uploader,FineUploader/fine-uploader,SimonWaldherr/uploader,FineUploader/fine-uploader,SimonWaldherr/uploader | """
@author: Ferdinand E. Silva
@email: ferdinandsilva@ferdinandsilva.com
@website: http://ferdinandsilva.com
"""
import os
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or []
self.sizeLimit = sizeLimit
de... | """
@author: Ferdinand E. Silva
@email: ferdinandsilva@ferdinandsilva.com
@website: http://ferdinandsilva.com
"""
import os
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or [... | <commit_before>"""
@author: Ferdinand E. Silva
@email: ferdinandsilva@ferdinandsilva.com
@website: http://ferdinandsilva.com
"""
import os
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or []
self.sizeLimit = si... | """
@author: Ferdinand E. Silva
@email: ferdinandsilva@ferdinandsilva.com
@website: http://ferdinandsilva.com
"""
import os
from django.utils import simplejson as json
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or [... | """
@author: Ferdinand E. Silva
@email: ferdinandsilva@ferdinandsilva.com
@website: http://ferdinandsilva.com
"""
import os
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or []
self.sizeLimit = sizeLimit
de... | <commit_before>"""
@author: Ferdinand E. Silva
@email: ferdinandsilva@ferdinandsilva.com
@website: http://ferdinandsilva.com
"""
import os
class qqFileUploader(object):
def __init__(self, allowedExtensions=None, sizeLimit=1024):
self.allowedExtensions = allowedExtensions or []
self.sizeLimit = si... |
afec7b3844493f97d6ba287e1c7b10d272c6f205 | tests/test_error_handling.py | tests/test_error_handling.py | import unittest
from flask import Flask
from flask_selfdoc import Autodoc
class TestErrorHandling(unittest.TestCase):
def test_app_not_initialized(self):
app = Flask(__name__)
autodoc = Autodoc()
with app.app_context():
self.assertRaises(RuntimeError, lambda: autodoc.html())
... | import unittest
from flask import Flask
from flask_selfdoc import Autodoc
class TestErrorHandling(unittest.TestCase):
def test_app_not_initialized(self):
app = Flask(__name__)
autodoc = Autodoc()
with app.app_context():
self.assertRaises(RuntimeError, lambda: autodoc.html())
... | Change this test to not expect an error. | Change this test to not expect an error. | Python | mit | jwg4/flask-autodoc,jwg4/flask-autodoc | import unittest
from flask import Flask
from flask_selfdoc import Autodoc
class TestErrorHandling(unittest.TestCase):
def test_app_not_initialized(self):
app = Flask(__name__)
autodoc = Autodoc()
with app.app_context():
self.assertRaises(RuntimeError, lambda: autodoc.html())
... | import unittest
from flask import Flask
from flask_selfdoc import Autodoc
class TestErrorHandling(unittest.TestCase):
def test_app_not_initialized(self):
app = Flask(__name__)
autodoc = Autodoc()
with app.app_context():
self.assertRaises(RuntimeError, lambda: autodoc.html())
... | <commit_before>import unittest
from flask import Flask
from flask_selfdoc import Autodoc
class TestErrorHandling(unittest.TestCase):
def test_app_not_initialized(self):
app = Flask(__name__)
autodoc = Autodoc()
with app.app_context():
self.assertRaises(RuntimeError, lambda: au... | import unittest
from flask import Flask
from flask_selfdoc import Autodoc
class TestErrorHandling(unittest.TestCase):
def test_app_not_initialized(self):
app = Flask(__name__)
autodoc = Autodoc()
with app.app_context():
self.assertRaises(RuntimeError, lambda: autodoc.html())
... | import unittest
from flask import Flask
from flask_selfdoc import Autodoc
class TestErrorHandling(unittest.TestCase):
def test_app_not_initialized(self):
app = Flask(__name__)
autodoc = Autodoc()
with app.app_context():
self.assertRaises(RuntimeError, lambda: autodoc.html())
... | <commit_before>import unittest
from flask import Flask
from flask_selfdoc import Autodoc
class TestErrorHandling(unittest.TestCase):
def test_app_not_initialized(self):
app = Flask(__name__)
autodoc = Autodoc()
with app.app_context():
self.assertRaises(RuntimeError, lambda: au... |
af413ab076bb74e93499455bc2fb761e4ec56702 | scent.py | scent.py | import os
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notify
watch_paths = ['mine/', 'tests/']
show_coverage = True
@select_runnable('python_tests')
@file_validat... | import os
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notify
watch_paths = ['mine/', 'tests/']
show_coverage = True
@select_runnable('python_tests')
@file_validat... | Disable tests the launch programs with 'watch' | Disable tests the launch programs with 'watch'
| Python | mit | jacebrowning/mine | import os
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notify
watch_paths = ['mine/', 'tests/']
show_coverage = True
@select_runnable('python_tests')
@file_validat... | import os
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notify
watch_paths = ['mine/', 'tests/']
show_coverage = True
@select_runnable('python_tests')
@file_validat... | <commit_before>import os
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notify
watch_paths = ['mine/', 'tests/']
show_coverage = True
@select_runnable('python_tests'... | import os
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notify
watch_paths = ['mine/', 'tests/']
show_coverage = True
@select_runnable('python_tests')
@file_validat... | import os
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notify
watch_paths = ['mine/', 'tests/']
show_coverage = True
@select_runnable('python_tests')
@file_validat... | <commit_before>import os
import time
import subprocess
from sniffer.api import select_runnable, file_validator, runnable
try:
from pync import Notifier
except ImportError:
notify = None
else:
notify = Notifier.notify
watch_paths = ['mine/', 'tests/']
show_coverage = True
@select_runnable('python_tests'... |
47a3c103344a5d6a558d8a5fa581c3440ca791e6 | erpnext/patches/4_0/countrywise_coa.py | erpnext/patches/4_0/countrywise_coa.py | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("setup", 'doctype', "company")
frappe.reload_doc("accounts", 'doctype', "account")
frappe.db.sql... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("setup", 'doctype', "company")
frappe.reload_doc("accounts", 'doctype', "account")
frappe.db.sql... | Patch to update old accounts property | Patch to update old accounts property
| Python | agpl-3.0 | anandpdoshi/erpnext,anandpdoshi/erpnext,pombredanne/erpnext,gmarke/erpnext,Drooids/erpnext,suyashphadtare/test,suyashphadtare/vestasi-erp-final,mbauskar/omnitech-erpnext,treejames/erpnext,tmimori/erpnext,susuchina/ERPNEXT,gangadharkadam/smrterp,suyashphadtare/vestasi-update-erp,fuhongliang/erpnext,gsnbng/erpnext,hatwar... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("setup", 'doctype', "company")
frappe.reload_doc("accounts", 'doctype', "account")
frappe.db.sql... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("setup", 'doctype', "company")
frappe.reload_doc("accounts", 'doctype', "account")
frappe.db.sql... | <commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("setup", 'doctype', "company")
frappe.reload_doc("accounts", 'doctype', "account")
... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("setup", 'doctype', "company")
frappe.reload_doc("accounts", 'doctype', "account")
frappe.db.sql... | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("setup", 'doctype', "company")
frappe.reload_doc("accounts", 'doctype', "account")
frappe.db.sql... | <commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("setup", 'doctype', "company")
frappe.reload_doc("accounts", 'doctype', "account")
... |
eaa99e12ef4b868e825ffe01f4eb9319e439827b | examples/face_detection/face_detect.py | examples/face_detection/face_detect.py | from scannerpy import Database, DeviceType, Job
from scannerpy.stdlib import pipelines
import subprocess
import cv2
import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
import util
with Database() as db:
print('Ingesting video into Scanner ...')
[input_table], _ = db.in... | from scannerpy import Database, DeviceType, Job
from scannerpy.stdlib import pipelines
import subprocess
import cv2
import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
import util
movie_path = util.download_video() if len(sys.argv) <= 1 else sys.argv[1]
print('Detecting faces ... | Update face detect example to take a path argument | Update face detect example to take a path argument
| Python | apache-2.0 | scanner-research/scanner,scanner-research/scanner,scanner-research/scanner,scanner-research/scanner | from scannerpy import Database, DeviceType, Job
from scannerpy.stdlib import pipelines
import subprocess
import cv2
import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
import util
with Database() as db:
print('Ingesting video into Scanner ...')
[input_table], _ = db.in... | from scannerpy import Database, DeviceType, Job
from scannerpy.stdlib import pipelines
import subprocess
import cv2
import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
import util
movie_path = util.download_video() if len(sys.argv) <= 1 else sys.argv[1]
print('Detecting faces ... | <commit_before>from scannerpy import Database, DeviceType, Job
from scannerpy.stdlib import pipelines
import subprocess
import cv2
import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
import util
with Database() as db:
print('Ingesting video into Scanner ...')
[input_ta... | from scannerpy import Database, DeviceType, Job
from scannerpy.stdlib import pipelines
import subprocess
import cv2
import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
import util
movie_path = util.download_video() if len(sys.argv) <= 1 else sys.argv[1]
print('Detecting faces ... | from scannerpy import Database, DeviceType, Job
from scannerpy.stdlib import pipelines
import subprocess
import cv2
import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
import util
with Database() as db:
print('Ingesting video into Scanner ...')
[input_table], _ = db.in... | <commit_before>from scannerpy import Database, DeviceType, Job
from scannerpy.stdlib import pipelines
import subprocess
import cv2
import sys
import os.path
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
import util
with Database() as db:
print('Ingesting video into Scanner ...')
[input_ta... |
421fd2d6fc0ffeaf35a99d426c7a1f9914e1da4e | weaveserver/services/plugins/__init__.py | weaveserver/services/plugins/__init__.py | from .service import PluginService
__meta__ = {
"name": "Plugin Manager",
"class": PluginService,
"deps": ["messaging", "simpledb", "appmanager"],
"config": [
{
"name": "plugins",
"loaders": [
{"type": "env"},
{"type": "sysvarfile"}
... | from .service import PluginService
__meta__ = {
"name": "Plugin Manager",
"class": PluginService,
"deps": ["messaging", "simpledb", "appmanager", "http"],
"config": [
{
"name": "plugins",
"loaders": [
{"type": "env"},
{"type": "sysvarfile"... | Add http dependency for plugins. | Add http dependency for plugins.
| Python | mit | supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer | from .service import PluginService
__meta__ = {
"name": "Plugin Manager",
"class": PluginService,
"deps": ["messaging", "simpledb", "appmanager"],
"config": [
{
"name": "plugins",
"loaders": [
{"type": "env"},
{"type": "sysvarfile"}
... | from .service import PluginService
__meta__ = {
"name": "Plugin Manager",
"class": PluginService,
"deps": ["messaging", "simpledb", "appmanager", "http"],
"config": [
{
"name": "plugins",
"loaders": [
{"type": "env"},
{"type": "sysvarfile"... | <commit_before>from .service import PluginService
__meta__ = {
"name": "Plugin Manager",
"class": PluginService,
"deps": ["messaging", "simpledb", "appmanager"],
"config": [
{
"name": "plugins",
"loaders": [
{"type": "env"},
{"type": "sysv... | from .service import PluginService
__meta__ = {
"name": "Plugin Manager",
"class": PluginService,
"deps": ["messaging", "simpledb", "appmanager", "http"],
"config": [
{
"name": "plugins",
"loaders": [
{"type": "env"},
{"type": "sysvarfile"... | from .service import PluginService
__meta__ = {
"name": "Plugin Manager",
"class": PluginService,
"deps": ["messaging", "simpledb", "appmanager"],
"config": [
{
"name": "plugins",
"loaders": [
{"type": "env"},
{"type": "sysvarfile"}
... | <commit_before>from .service import PluginService
__meta__ = {
"name": "Plugin Manager",
"class": PluginService,
"deps": ["messaging", "simpledb", "appmanager"],
"config": [
{
"name": "plugins",
"loaders": [
{"type": "env"},
{"type": "sysv... |
627d79ae4950338c8a5a0d75bae244c9c0374d4a | friendlyurls/admin.py | friendlyurls/admin.py | from django.contrib import admin
from friendlyurls.models import *
class UrlMappingAdmin(admin.ModelAdmin):
list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
admin.site.register(UrlMapping, UrlMappingAdmin)
| from django.contrib import admin
from friendlyurls.models import *
class UrlMappingAdmin(admin.ModelAdmin):
list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
search_fields = ('friendly_path','content_type__name')
admin.site.register(UrlMapping, UrlMappingAdmin)
| Allow searching of vanity urls | Allow searching of vanity urls
| Python | bsd-3-clause | tachang/django_friendlyurls | from django.contrib import admin
from friendlyurls.models import *
class UrlMappingAdmin(admin.ModelAdmin):
list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
admin.site.register(UrlMapping, UrlMappingAdmin)
Allow searching of vanity urls | from django.contrib import admin
from friendlyurls.models import *
class UrlMappingAdmin(admin.ModelAdmin):
list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
search_fields = ('friendly_path','content_type__name')
admin.site.register(UrlMapping, UrlMappingAdmin)
| <commit_before>from django.contrib import admin
from friendlyurls.models import *
class UrlMappingAdmin(admin.ModelAdmin):
list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
admin.site.register(UrlMapping, UrlMappingAdmin)
<commit_msg>Allow searching of vanity urls<commit_after> | from django.contrib import admin
from friendlyurls.models import *
class UrlMappingAdmin(admin.ModelAdmin):
list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
search_fields = ('friendly_path','content_type__name')
admin.site.register(UrlMapping, UrlMappingAdmin)
| from django.contrib import admin
from friendlyurls.models import *
class UrlMappingAdmin(admin.ModelAdmin):
list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
admin.site.register(UrlMapping, UrlMappingAdmin)
Allow searching of vanity urlsfrom django.contrib import admin
from friendlyurls.mod... | <commit_before>from django.contrib import admin
from friendlyurls.models import *
class UrlMappingAdmin(admin.ModelAdmin):
list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')
admin.site.register(UrlMapping, UrlMappingAdmin)
<commit_msg>Allow searching of vanity urls<commit_after>from django.c... |
d0126b7e31c69ea7dd5cda4b9a3e931f5b8a8fbf | rest_framework/authtoken/views.py | rest_framework/authtoken/views.py | from rest_framework.views import APIView
from rest_framework import parsers
from rest_framework import renderers
from rest_framework.response import Response
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.serializers import AuthTokenSerializer
class ObtainAuthToken(APIView):
throt... | from rest_framework.views import APIView
from rest_framework import parsers
from rest_framework import renderers
from rest_framework.response import Response
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.serializers import AuthTokenSerializer
class ObtainAuthToken(APIView):
throt... | Set serializer_class on ObtainAuthToken view | Set serializer_class on ObtainAuthToken view
| Python | bsd-2-clause | kennydude/django-rest-framework,mgaitan/django-rest-framework,wedaly/django-rest-framework,arpheno/django-rest-framework,callorico/django-rest-framework,johnraz/django-rest-framework,nryoung/django-rest-framework,krinart/django-rest-framework,gregmuellegger/django-rest-framework,akalipetis/django-rest-framework,tigeran... | from rest_framework.views import APIView
from rest_framework import parsers
from rest_framework import renderers
from rest_framework.response import Response
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.serializers import AuthTokenSerializer
class ObtainAuthToken(APIView):
throt... | from rest_framework.views import APIView
from rest_framework import parsers
from rest_framework import renderers
from rest_framework.response import Response
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.serializers import AuthTokenSerializer
class ObtainAuthToken(APIView):
throt... | <commit_before>from rest_framework.views import APIView
from rest_framework import parsers
from rest_framework import renderers
from rest_framework.response import Response
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.serializers import AuthTokenSerializer
class ObtainAuthToken(APIV... | from rest_framework.views import APIView
from rest_framework import parsers
from rest_framework import renderers
from rest_framework.response import Response
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.serializers import AuthTokenSerializer
class ObtainAuthToken(APIView):
throt... | from rest_framework.views import APIView
from rest_framework import parsers
from rest_framework import renderers
from rest_framework.response import Response
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.serializers import AuthTokenSerializer
class ObtainAuthToken(APIView):
throt... | <commit_before>from rest_framework.views import APIView
from rest_framework import parsers
from rest_framework import renderers
from rest_framework.response import Response
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.serializers import AuthTokenSerializer
class ObtainAuthToken(APIV... |
4393740af93ae0ac1927e68c422e24735b0216c1 | infosystem/subsystem/policy/entity.py | infosystem/subsystem/policy/entity.py | from sqlalchemy import UniqueConstraint
from infosystem.common.subsystem import entity
from infosystem.database import db
class Policy(entity.Entity, db.Model):
attributes = ['id', 'capability_id', 'role_id', 'bypass']
domain_id = db.Column(db.CHAR(32), db.ForeignKey("domain.id"), nullable=False)
capabil... | from sqlalchemy import UniqueConstraint
from infosystem.common.subsystem import entity
from infosystem.database import db
class Policy(entity.Entity, db.Model):
attributes = ['id', 'capability_id', 'role_id', 'bypass']
domain_id = db.Column(db.CHAR(32), db.ForeignKey("domain.id"), nullable=False)
capabil... | Make role_id & bypass opt args in Policy __init__ | Make role_id & bypass opt args in Policy __init__
| Python | apache-2.0 | samueldmq/infosystem | from sqlalchemy import UniqueConstraint
from infosystem.common.subsystem import entity
from infosystem.database import db
class Policy(entity.Entity, db.Model):
attributes = ['id', 'capability_id', 'role_id', 'bypass']
domain_id = db.Column(db.CHAR(32), db.ForeignKey("domain.id"), nullable=False)
capabil... | from sqlalchemy import UniqueConstraint
from infosystem.common.subsystem import entity
from infosystem.database import db
class Policy(entity.Entity, db.Model):
attributes = ['id', 'capability_id', 'role_id', 'bypass']
domain_id = db.Column(db.CHAR(32), db.ForeignKey("domain.id"), nullable=False)
capabil... | <commit_before>from sqlalchemy import UniqueConstraint
from infosystem.common.subsystem import entity
from infosystem.database import db
class Policy(entity.Entity, db.Model):
attributes = ['id', 'capability_id', 'role_id', 'bypass']
domain_id = db.Column(db.CHAR(32), db.ForeignKey("domain.id"), nullable=Fal... | from sqlalchemy import UniqueConstraint
from infosystem.common.subsystem import entity
from infosystem.database import db
class Policy(entity.Entity, db.Model):
attributes = ['id', 'capability_id', 'role_id', 'bypass']
domain_id = db.Column(db.CHAR(32), db.ForeignKey("domain.id"), nullable=False)
capabil... | from sqlalchemy import UniqueConstraint
from infosystem.common.subsystem import entity
from infosystem.database import db
class Policy(entity.Entity, db.Model):
attributes = ['id', 'capability_id', 'role_id', 'bypass']
domain_id = db.Column(db.CHAR(32), db.ForeignKey("domain.id"), nullable=False)
capabil... | <commit_before>from sqlalchemy import UniqueConstraint
from infosystem.common.subsystem import entity
from infosystem.database import db
class Policy(entity.Entity, db.Model):
attributes = ['id', 'capability_id', 'role_id', 'bypass']
domain_id = db.Column(db.CHAR(32), db.ForeignKey("domain.id"), nullable=Fal... |
e99a4aa3fab84e112f5d82eafe9012f7e2be9447 | problem-static/Intro-Eval_50/admin/eval.py | problem-static/Intro-Eval_50/admin/eval.py | #!/usr/bin/python2.7
del __builtins__.__dict__['__import__']
del __builtins__.__dict__['reload']
flag = "eval_is_fun"
def main():
print "Hi, welcome to the flag database. We are under construction right now, so you cannot view the flags, or do anything."
while True:
command = raw_input("What would yo... | #!/usr/bin/python2.7
import sys
del __builtins__.__dict__['__import__']
del __builtins__.__dict__['reload']
flag = "eval_is_fun"
class UnbufferedStream(object):
def __init__(self, stream):
self.stream = stream
def write(self, data):
self.stream.write(data)
self.stream.flush()
def... | Fix Intro Eval with Unbuffered Streams | Fix Intro Eval with Unbuffered Streams
| Python | mit | james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF,james9909/IntroCTF | #!/usr/bin/python2.7
del __builtins__.__dict__['__import__']
del __builtins__.__dict__['reload']
flag = "eval_is_fun"
def main():
print "Hi, welcome to the flag database. We are under construction right now, so you cannot view the flags, or do anything."
while True:
command = raw_input("What would yo... | #!/usr/bin/python2.7
import sys
del __builtins__.__dict__['__import__']
del __builtins__.__dict__['reload']
flag = "eval_is_fun"
class UnbufferedStream(object):
def __init__(self, stream):
self.stream = stream
def write(self, data):
self.stream.write(data)
self.stream.flush()
def... | <commit_before>#!/usr/bin/python2.7
del __builtins__.__dict__['__import__']
del __builtins__.__dict__['reload']
flag = "eval_is_fun"
def main():
print "Hi, welcome to the flag database. We are under construction right now, so you cannot view the flags, or do anything."
while True:
command = raw_input... | #!/usr/bin/python2.7
import sys
del __builtins__.__dict__['__import__']
del __builtins__.__dict__['reload']
flag = "eval_is_fun"
class UnbufferedStream(object):
def __init__(self, stream):
self.stream = stream
def write(self, data):
self.stream.write(data)
self.stream.flush()
def... | #!/usr/bin/python2.7
del __builtins__.__dict__['__import__']
del __builtins__.__dict__['reload']
flag = "eval_is_fun"
def main():
print "Hi, welcome to the flag database. We are under construction right now, so you cannot view the flags, or do anything."
while True:
command = raw_input("What would yo... | <commit_before>#!/usr/bin/python2.7
del __builtins__.__dict__['__import__']
del __builtins__.__dict__['reload']
flag = "eval_is_fun"
def main():
print "Hi, welcome to the flag database. We are under construction right now, so you cannot view the flags, or do anything."
while True:
command = raw_input... |
bdeb60d5e82e5eaaaaf805286bae29e9112af307 | us_ignite/common/management/commands/common_load_fixtures.py | us_ignite/common/management/commands/common_load_fixtures.py | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
class Command(BaseCommand):
def handle(self, *args, **options):
parsed_url = urlparse.urlparse(settings.SITE_URL)
Site.objects.all().update(domain=par... | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('Advanced wirele... | Add initial data for the ``Interest`` model. | Add initial data for the ``Interest`` model.
| Python | bsd-3-clause | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
class Command(BaseCommand):
def handle(self, *args, **options):
parsed_url = urlparse.urlparse(settings.SITE_URL)
Site.objects.all().update(domain=par... | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('Advanced wirele... | <commit_before>import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
class Command(BaseCommand):
def handle(self, *args, **options):
parsed_url = urlparse.urlparse(settings.SITE_URL)
Site.objects.all().up... | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('Advanced wirele... | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
class Command(BaseCommand):
def handle(self, *args, **options):
parsed_url = urlparse.urlparse(settings.SITE_URL)
Site.objects.all().update(domain=par... | <commit_before>import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
class Command(BaseCommand):
def handle(self, *args, **options):
parsed_url = urlparse.urlparse(settings.SITE_URL)
Site.objects.all().up... |
4ce3a0d32c3b1399523483257ad1922705cb3dc9 | __openerp__.py | __openerp__.py | # -*- coding: utf-8 -*-
{
"name": "Account Credit Transfer",
"version": "1.0.2",
"author": "XCG Consulting",
"website": "http://www.openerp-experts.com",
"category": 'Accounting',
"description": """Account Voucher Credit Transfer Payment.
You need to set up some things before using it.
... | # -*- coding: utf-8 -*-
{
"name": "Account Credit Transfer",
"version": "1.0.3",
"author": "XCG Consulting",
"website": "http://www.openerp-experts.com",
"category": 'Accounting',
"description": """Account Voucher Credit Transfer Payment.
You need to set up some things before using it.
... | Change version to 1.0.3 (dev) | Change version to 1.0.3 (dev)
| Python | agpl-3.0 | xcgd/account_credit_transfer | # -*- coding: utf-8 -*-
{
"name": "Account Credit Transfer",
"version": "1.0.2",
"author": "XCG Consulting",
"website": "http://www.openerp-experts.com",
"category": 'Accounting',
"description": """Account Voucher Credit Transfer Payment.
You need to set up some things before using it.
... | # -*- coding: utf-8 -*-
{
"name": "Account Credit Transfer",
"version": "1.0.3",
"author": "XCG Consulting",
"website": "http://www.openerp-experts.com",
"category": 'Accounting',
"description": """Account Voucher Credit Transfer Payment.
You need to set up some things before using it.
... | <commit_before># -*- coding: utf-8 -*-
{
"name": "Account Credit Transfer",
"version": "1.0.2",
"author": "XCG Consulting",
"website": "http://www.openerp-experts.com",
"category": 'Accounting',
"description": """Account Voucher Credit Transfer Payment.
You need to set up some things before... | # -*- coding: utf-8 -*-
{
"name": "Account Credit Transfer",
"version": "1.0.3",
"author": "XCG Consulting",
"website": "http://www.openerp-experts.com",
"category": 'Accounting',
"description": """Account Voucher Credit Transfer Payment.
You need to set up some things before using it.
... | # -*- coding: utf-8 -*-
{
"name": "Account Credit Transfer",
"version": "1.0.2",
"author": "XCG Consulting",
"website": "http://www.openerp-experts.com",
"category": 'Accounting',
"description": """Account Voucher Credit Transfer Payment.
You need to set up some things before using it.
... | <commit_before># -*- coding: utf-8 -*-
{
"name": "Account Credit Transfer",
"version": "1.0.2",
"author": "XCG Consulting",
"website": "http://www.openerp-experts.com",
"category": 'Accounting',
"description": """Account Voucher Credit Transfer Payment.
You need to set up some things before... |
e73795b8ad016bba5b1ab5118a5153085a1e99b0 | nova/tests/functional/api_sample_tests/test_servers_ips.py | nova/tests/functional/api_sample_tests/test_servers_ips.py | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | Make it obvious where we're getting our names from | trivial: Make it obvious where we're getting our names from
Change-Id: Ib9aa790c8999e50a2a3587561604ff1e51666f38
Signed-off-by: Stephen Finucane <492121341a95b3c3aab646bed44634f739dd019b@redhat.com>
| Python | apache-2.0 | mahak/nova,mahak/nova,klmitch/nova,klmitch/nova,klmitch/nova,rahulunair/nova,mahak/nova,rahulunair/nova,openstack/nova,openstack/nova,rahulunair/nova,openstack/nova,klmitch/nova | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | <commit_before># Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | <commit_before># Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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
#
# ... |
9708e6d01835f597460967b9da47fa4c6d32a907 | test/goldstandard/benchmark_confirm.py | test/goldstandard/benchmark_confirm.py | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | Set up reading lines from file, print count for testing purposes | Set up reading lines from file, print count for testing purposes
| Python | bsd-2-clause | yngcan/patentprocessor,nikken1/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor,yngcan/patentprocessor,nikken1/patentprocessor,funginstitute/patentprocessor,yngcan/patentprocessor,funginstitute/patentprocessor | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | <commit_before>import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_... | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_results.log'
#... | <commit_before>import sqlite3 as sql
import os
import sys
import logging
import benchmark
# bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/")
# Text Files
txt_file = 'benchmark_errors.txt'
opened_file = open(txt_file, 'U')
log_file = 'benchmark_... |
943d66dc04ec74a27ae12c46ae1559e585faa716 | scripts/master/factory/dart/channels.py | scripts/master/factory/dart/channels.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | Make stable builder pull from 1.10 | Make stable builder pull from 1.10
R=kasperl@google.com
BUG=
Review URL: https://codereview.chromium.org/1107673002
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@294974 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_postfix = '-' + na... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Channel(object):
def __init__(self, name, branch, position, category_postfix, priority):
self.branch = branch
self.builder_pos... |
4e5ef4a04fd0b3b354b187ee6e8e8ef27337ad6f | xclib/dbmops.py | xclib/dbmops.py | import sys
import bsddb3
from xclib.utf8 import utf8, unutf8
def perform(args):
domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)
if args.get:
print(unutf8(domain_db[utf8(args.get)]))
elif args.put:
domain_db[utf8(args.put[0])] = args.put[1]
elif args.delete:
del domain_db... | import sys
import bsddb3
from xclib.utf8 import utf8, unutf8
def perform(args):
domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)
if args.get:
print(unutf8(domain_db[utf8(args.get)], 'illegal'))
elif args.put:
domain_db[utf8(args.put[0])] = args.put[1]
elif args.delete:
de... | Allow dumping illegal utf-8 contents | Allow dumping illegal utf-8 contents
| Python | mit | jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth | import sys
import bsddb3
from xclib.utf8 import utf8, unutf8
def perform(args):
domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)
if args.get:
print(unutf8(domain_db[utf8(args.get)]))
elif args.put:
domain_db[utf8(args.put[0])] = args.put[1]
elif args.delete:
del domain_db... | import sys
import bsddb3
from xclib.utf8 import utf8, unutf8
def perform(args):
domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)
if args.get:
print(unutf8(domain_db[utf8(args.get)], 'illegal'))
elif args.put:
domain_db[utf8(args.put[0])] = args.put[1]
elif args.delete:
de... | <commit_before>import sys
import bsddb3
from xclib.utf8 import utf8, unutf8
def perform(args):
domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)
if args.get:
print(unutf8(domain_db[utf8(args.get)]))
elif args.put:
domain_db[utf8(args.put[0])] = args.put[1]
elif args.delete:
... | import sys
import bsddb3
from xclib.utf8 import utf8, unutf8
def perform(args):
domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)
if args.get:
print(unutf8(domain_db[utf8(args.get)], 'illegal'))
elif args.put:
domain_db[utf8(args.put[0])] = args.put[1]
elif args.delete:
de... | import sys
import bsddb3
from xclib.utf8 import utf8, unutf8
def perform(args):
domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)
if args.get:
print(unutf8(domain_db[utf8(args.get)]))
elif args.put:
domain_db[utf8(args.put[0])] = args.put[1]
elif args.delete:
del domain_db... | <commit_before>import sys
import bsddb3
from xclib.utf8 import utf8, unutf8
def perform(args):
domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)
if args.get:
print(unutf8(domain_db[utf8(args.get)]))
elif args.put:
domain_db[utf8(args.put[0])] = args.put[1]
elif args.delete:
... |
53171f75a64a26dcec91facbdec95b2ed7f74338 | ironic/drivers/drac.py | ironic/drivers/drac.py | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | Add the PXE VendorPassthru interface to PXEDracDriver | Add the PXE VendorPassthru interface to PXEDracDriver
Without the PXE VendorPassthru interface to expose the "pass_deploy_info"
method in the vendor_passthru endpoint of the API the DRAC it can't
continue the deployment after the ramdisk is booted.
Closes-Bug: #1379705
Change-Id: I21042cbb95a486742abfcb430471d01cd73b... | Python | apache-2.0 | SauloAislan/ironic,dims/ironic,NaohiroTamura/ironic,hpproliant/ironic,bacaldwell/ironic,naterh/ironic,redhat-openstack/ironic,NaohiroTamura/ironic,ionutbalutoiu/ironic,SauloAislan/ironic,dims/ironic,openstack/ironic,Tan0/ironic,openstack/ironic,pshchelo/ironic,debayanray/ironic_backup,ionutbalutoiu/ironic,devananda/iro... | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | <commit_before>#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | <commit_before>#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... |
84a2ece10b0e246564fd539eed119f46d44ca74d | tests/no_hadoop_bare_image_provider.py | tests/no_hadoop_bare_image_provider.py | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | Use bare image name dependent on base image name | Use bare image name dependent on base image name
| Python | apache-2.0 | prestodb/presto-admin,prestodb/presto-admin | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | <commit_before># -*- coding: utf-8 -*-
#
# 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 wri... | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | <commit_before># -*- coding: utf-8 -*-
#
# 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 wri... |
c671301e29e41b0ea7988bad0a5ff4793890ea64 | readKanjiFileTest.py | readKanjiFileTest.py | from readKanjiFile import *
def main():
testDict = readKanjiFile('kanjiTestFile.txt')
print('There are {} entries in this dictionary.'.format(len(testDict)))
for entry in list(testDict.items())[0:15]:
print(entry)
if __name__ == '__main__':
main()
| from readKanjiFile import *
def main():
testDict = readKanjiFile('kanjiTestFile.txt')
print('There are {} entries in this dictionary.'.format(len(testDict)))
for entry in list(testDict.items()):
print(entry)
if __name__ == '__main__':
main()
| Test now prints out all kanji | Test now prints out all kanji
| Python | mit | WilliamRayJohnson/kanjiStudier | from readKanjiFile import *
def main():
testDict = readKanjiFile('kanjiTestFile.txt')
print('There are {} entries in this dictionary.'.format(len(testDict)))
for entry in list(testDict.items())[0:15]:
print(entry)
if __name__ == '__main__':
main()
Test now prints out all kanji | from readKanjiFile import *
def main():
testDict = readKanjiFile('kanjiTestFile.txt')
print('There are {} entries in this dictionary.'.format(len(testDict)))
for entry in list(testDict.items()):
print(entry)
if __name__ == '__main__':
main()
| <commit_before>from readKanjiFile import *
def main():
testDict = readKanjiFile('kanjiTestFile.txt')
print('There are {} entries in this dictionary.'.format(len(testDict)))
for entry in list(testDict.items())[0:15]:
print(entry)
if __name__ == '__main__':
main()
<commit_msg>Test now prints ou... | from readKanjiFile import *
def main():
testDict = readKanjiFile('kanjiTestFile.txt')
print('There are {} entries in this dictionary.'.format(len(testDict)))
for entry in list(testDict.items()):
print(entry)
if __name__ == '__main__':
main()
| from readKanjiFile import *
def main():
testDict = readKanjiFile('kanjiTestFile.txt')
print('There are {} entries in this dictionary.'.format(len(testDict)))
for entry in list(testDict.items())[0:15]:
print(entry)
if __name__ == '__main__':
main()
Test now prints out all kanjifrom readKanjiFi... | <commit_before>from readKanjiFile import *
def main():
testDict = readKanjiFile('kanjiTestFile.txt')
print('There are {} entries in this dictionary.'.format(len(testDict)))
for entry in list(testDict.items())[0:15]:
print(entry)
if __name__ == '__main__':
main()
<commit_msg>Test now prints ou... |
d1d7684edb6d687206deea75d2ba13194046e376 | sixquiprend/models/chosen_card.py | sixquiprend/models/chosen_card.py | from sixquiprend.sixquiprend import app, db
class ChosenCard(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete="CASCADE"))
game_id = db.Column(db.Integer, db.ForeignKey('game.id', ondelete="CASCADE"))
card_id = db.Column(db.Integer... | from sixquiprend.sixquiprend import app, db
from sixquiprend.models.card import Card
class ChosenCard(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete="CASCADE"))
game_id = db.Column(db.Integer, db.ForeignKey('game.id', ondelete="CASC... | Move an import to top | Move an import to top
| Python | mit | nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend | from sixquiprend.sixquiprend import app, db
class ChosenCard(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete="CASCADE"))
game_id = db.Column(db.Integer, db.ForeignKey('game.id', ondelete="CASCADE"))
card_id = db.Column(db.Integer... | from sixquiprend.sixquiprend import app, db
from sixquiprend.models.card import Card
class ChosenCard(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete="CASCADE"))
game_id = db.Column(db.Integer, db.ForeignKey('game.id', ondelete="CASC... | <commit_before>from sixquiprend.sixquiprend import app, db
class ChosenCard(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete="CASCADE"))
game_id = db.Column(db.Integer, db.ForeignKey('game.id', ondelete="CASCADE"))
card_id = db.Co... | from sixquiprend.sixquiprend import app, db
from sixquiprend.models.card import Card
class ChosenCard(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete="CASCADE"))
game_id = db.Column(db.Integer, db.ForeignKey('game.id', ondelete="CASC... | from sixquiprend.sixquiprend import app, db
class ChosenCard(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete="CASCADE"))
game_id = db.Column(db.Integer, db.ForeignKey('game.id', ondelete="CASCADE"))
card_id = db.Column(db.Integer... | <commit_before>from sixquiprend.sixquiprend import app, db
class ChosenCard(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete="CASCADE"))
game_id = db.Column(db.Integer, db.ForeignKey('game.id', ondelete="CASCADE"))
card_id = db.Co... |
778f5b8f905195a54a09f1e9cc8768e5cabc4dcd | navigator/settings/prod.py | navigator/settings/prod.py | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', 'david@downes.co.uk'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', 'david@downes.co.uk'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | Set the secure flag for both our cookies | Set the secure flag for both our cookies
| Python | mit | uktrade/navigator,dahfool/navigator,dahfool/navigator,uktrade/navigator,uktrade/navigator,dahfool/navigator,dahfool/navigator,uktrade/navigator | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', 'david@downes.co.uk'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', 'david@downes.co.uk'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | <commit_before>from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', 'david@downes.co.uk'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
... | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', 'david@downes.co.uk'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', 'david@downes.co.uk'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
'dsn': os.e... | <commit_before>from .base import *
DEBUG = False
ALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']
ADMINS = (('David Downes', 'david@downes.co.uk'),)
MIDDLEWARE_CLASSES += [
'core.middleware.IpRestrictionMiddleware',
]
INSTALLED_APPS += [
'raven.contrib.django.raven_compat'
]
RAVEN_CONFIG = {
... |
166c1a4dde981d5bd7d20a00c8329d7bbb4a3c00 | nipype/interfaces/setup.py | nipype/interfaces/setup.py | def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('interfaces', parent_package, top_path)
config.add_data_dir('tests')
config.add_data_dir('data')
config.add_data_dir('script_templates')
return config
if __name__ ==... | def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('interfaces', parent_package, top_path)
config.add_data_dir('tests')
config.add_data_dir('script_templates')
return config
if __name__ == '__main__':
from numpy.dist... | Remove reference to non-existing data directory. | Remove reference to non-existing data directory.
git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@513 ead46cd0-7350-4e37-8683-fc4c6f79bf00
| Python | bsd-3-clause | arokem/nipype,gerddie/nipype,iglpdc/nipype,pearsonlab/nipype,carlohamalainen/nipype,Leoniela/nipype,glatard/nipype,dgellis90/nipype,satra/NiPypeold,glatard/nipype,mick-d/nipype,carolFrohlich/nipype,blakedewey/nipype,dgellis90/nipype,pearsonlab/nipype,mick-d/nipype_source,FCP-INDI/nipype,dgellis90/nipype,carolFrohlich/n... | def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('interfaces', parent_package, top_path)
config.add_data_dir('tests')
config.add_data_dir('data')
config.add_data_dir('script_templates')
return config
if __name__ ==... | def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('interfaces', parent_package, top_path)
config.add_data_dir('tests')
config.add_data_dir('script_templates')
return config
if __name__ == '__main__':
from numpy.dist... | <commit_before>def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('interfaces', parent_package, top_path)
config.add_data_dir('tests')
config.add_data_dir('data')
config.add_data_dir('script_templates')
return config
... | def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('interfaces', parent_package, top_path)
config.add_data_dir('tests')
config.add_data_dir('script_templates')
return config
if __name__ == '__main__':
from numpy.dist... | def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('interfaces', parent_package, top_path)
config.add_data_dir('tests')
config.add_data_dir('data')
config.add_data_dir('script_templates')
return config
if __name__ ==... | <commit_before>def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('interfaces', parent_package, top_path)
config.add_data_dir('tests')
config.add_data_dir('data')
config.add_data_dir('script_templates')
return config
... |
56ac100c8ca357a5600db7a16859cca1483ccb13 | blueprints/multi_node_kubernetes_cluster/teardown_kubernetes_cluster/teardown_kubernetes_cluster.py | blueprints/multi_node_kubernetes_cluster/teardown_kubernetes_cluster/teardown_kubernetes_cluster.py | """
Teardown the CloudBolt resources (container_orchestrator, environment)
associated with this Kubernetes cluster.
"""
from common.methods import set_progress
from containerorchestrators.kuberneteshandler.models import Kubernetes
def run(job, *args, **kwargs):
resource = job.resource_set.first()
contain... | """
Teardown the CloudBolt resources (container_orchestrator, environment)
associated with this Kubernetes cluster.
"""
from common.methods import set_progress
from containerorchestrators.kuberneteshandler.models import Kubernetes
from utilities.run_command import execute_command
def run(job, *args, **kwargs):
re... | Remove config files from filesystem on teardown | Remove config files from filesystem on teardown
[DEV-13843]
| Python | apache-2.0 | CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge | """
Teardown the CloudBolt resources (container_orchestrator, environment)
associated with this Kubernetes cluster.
"""
from common.methods import set_progress
from containerorchestrators.kuberneteshandler.models import Kubernetes
def run(job, *args, **kwargs):
resource = job.resource_set.first()
contain... | """
Teardown the CloudBolt resources (container_orchestrator, environment)
associated with this Kubernetes cluster.
"""
from common.methods import set_progress
from containerorchestrators.kuberneteshandler.models import Kubernetes
from utilities.run_command import execute_command
def run(job, *args, **kwargs):
re... | <commit_before>"""
Teardown the CloudBolt resources (container_orchestrator, environment)
associated with this Kubernetes cluster.
"""
from common.methods import set_progress
from containerorchestrators.kuberneteshandler.models import Kubernetes
def run(job, *args, **kwargs):
resource = job.resource_set.first()
... | """
Teardown the CloudBolt resources (container_orchestrator, environment)
associated with this Kubernetes cluster.
"""
from common.methods import set_progress
from containerorchestrators.kuberneteshandler.models import Kubernetes
from utilities.run_command import execute_command
def run(job, *args, **kwargs):
re... | """
Teardown the CloudBolt resources (container_orchestrator, environment)
associated with this Kubernetes cluster.
"""
from common.methods import set_progress
from containerorchestrators.kuberneteshandler.models import Kubernetes
def run(job, *args, **kwargs):
resource = job.resource_set.first()
contain... | <commit_before>"""
Teardown the CloudBolt resources (container_orchestrator, environment)
associated with this Kubernetes cluster.
"""
from common.methods import set_progress
from containerorchestrators.kuberneteshandler.models import Kubernetes
def run(job, *args, **kwargs):
resource = job.resource_set.first()
... |
85405d242b41b9dd721131c6e3046c47fe86847d | pic2map/cli.py | pic2map/cli.py | # -*- coding: utf-8 -*-
"""Command Line Interface."""
import argparse
import sys
def main(argv):
"""Entry point for the pic2map.py script."""
args = parse_arguments(argv)
print args
def parse_arguments(argv):
"""Parse command line arguments.
:returns: Parsed arguments
:rtype: argparse.Namesp... | # -*- coding: utf-8 -*-
"""Command Line Interface."""
import argparse
import logging
import sys
def main(argv):
"""Entry point for the pic2map.py script."""
args = parse_arguments(argv)
print args
def configure_logging(log_level):
"""Configure logging based on command line argument.
:param log... | Add command line option to set log level | Add command line option to set log level
| Python | mit | jcollado/pic2map,jcollado/pic2map,jcollado/pic2map | # -*- coding: utf-8 -*-
"""Command Line Interface."""
import argparse
import sys
def main(argv):
"""Entry point for the pic2map.py script."""
args = parse_arguments(argv)
print args
def parse_arguments(argv):
"""Parse command line arguments.
:returns: Parsed arguments
:rtype: argparse.Namesp... | # -*- coding: utf-8 -*-
"""Command Line Interface."""
import argparse
import logging
import sys
def main(argv):
"""Entry point for the pic2map.py script."""
args = parse_arguments(argv)
print args
def configure_logging(log_level):
"""Configure logging based on command line argument.
:param log... | <commit_before># -*- coding: utf-8 -*-
"""Command Line Interface."""
import argparse
import sys
def main(argv):
"""Entry point for the pic2map.py script."""
args = parse_arguments(argv)
print args
def parse_arguments(argv):
"""Parse command line arguments.
:returns: Parsed arguments
:rtype: ... | # -*- coding: utf-8 -*-
"""Command Line Interface."""
import argparse
import logging
import sys
def main(argv):
"""Entry point for the pic2map.py script."""
args = parse_arguments(argv)
print args
def configure_logging(log_level):
"""Configure logging based on command line argument.
:param log... | # -*- coding: utf-8 -*-
"""Command Line Interface."""
import argparse
import sys
def main(argv):
"""Entry point for the pic2map.py script."""
args = parse_arguments(argv)
print args
def parse_arguments(argv):
"""Parse command line arguments.
:returns: Parsed arguments
:rtype: argparse.Namesp... | <commit_before># -*- coding: utf-8 -*-
"""Command Line Interface."""
import argparse
import sys
def main(argv):
"""Entry point for the pic2map.py script."""
args = parse_arguments(argv)
print args
def parse_arguments(argv):
"""Parse command line arguments.
:returns: Parsed arguments
:rtype: ... |
f1d2bb08dfde9402b7fc858d57130b43e3f1cd4d | bootstrap/hooks.py | bootstrap/hooks.py | # coding: utf-8
from os.path import join, dirname, pardir, abspath
from shutil import copy
import subprocess
BOOTSTRAP = abspath(dirname(__file__))
ROOT = abspath(join(BOOTSTRAP, pardir))
# Path where venv will be created. It's imported by bootstrapX.Y.py
VIRTUALENV = abspath(join(BOOTSTRAP, pardir))
ACTIVATE = jo... | # coding: utf-8
from os.path import join, dirname, pardir, abspath
from shutil import copy
import subprocess
BOOTSTRAP = abspath(dirname(__file__))
ROOT = abspath(join(BOOTSTRAP, pardir))
# Path where venv will be created. It's imported by bootstrapX.Y.py
VIRTUALENV = join(BOOTSTRAP, pardir)
VIRTUALENV_BIN = join(VI... | Fix wrong destination for postactivate file. | Fix wrong destination for postactivate file. | Python | mit | henriquebastos/virtualenv-bootstrap,henriquebastos/virtualenv-bootstrap | # coding: utf-8
from os.path import join, dirname, pardir, abspath
from shutil import copy
import subprocess
BOOTSTRAP = abspath(dirname(__file__))
ROOT = abspath(join(BOOTSTRAP, pardir))
# Path where venv will be created. It's imported by bootstrapX.Y.py
VIRTUALENV = abspath(join(BOOTSTRAP, pardir))
ACTIVATE = jo... | # coding: utf-8
from os.path import join, dirname, pardir, abspath
from shutil import copy
import subprocess
BOOTSTRAP = abspath(dirname(__file__))
ROOT = abspath(join(BOOTSTRAP, pardir))
# Path where venv will be created. It's imported by bootstrapX.Y.py
VIRTUALENV = join(BOOTSTRAP, pardir)
VIRTUALENV_BIN = join(VI... | <commit_before># coding: utf-8
from os.path import join, dirname, pardir, abspath
from shutil import copy
import subprocess
BOOTSTRAP = abspath(dirname(__file__))
ROOT = abspath(join(BOOTSTRAP, pardir))
# Path where venv will be created. It's imported by bootstrapX.Y.py
VIRTUALENV = abspath(join(BOOTSTRAP, pardir))
... | # coding: utf-8
from os.path import join, dirname, pardir, abspath
from shutil import copy
import subprocess
BOOTSTRAP = abspath(dirname(__file__))
ROOT = abspath(join(BOOTSTRAP, pardir))
# Path where venv will be created. It's imported by bootstrapX.Y.py
VIRTUALENV = join(BOOTSTRAP, pardir)
VIRTUALENV_BIN = join(VI... | # coding: utf-8
from os.path import join, dirname, pardir, abspath
from shutil import copy
import subprocess
BOOTSTRAP = abspath(dirname(__file__))
ROOT = abspath(join(BOOTSTRAP, pardir))
# Path where venv will be created. It's imported by bootstrapX.Y.py
VIRTUALENV = abspath(join(BOOTSTRAP, pardir))
ACTIVATE = jo... | <commit_before># coding: utf-8
from os.path import join, dirname, pardir, abspath
from shutil import copy
import subprocess
BOOTSTRAP = abspath(dirname(__file__))
ROOT = abspath(join(BOOTSTRAP, pardir))
# Path where venv will be created. It's imported by bootstrapX.Y.py
VIRTUALENV = abspath(join(BOOTSTRAP, pardir))
... |
8e72ef3fa525c961786e9b60c039c847bc2c710f | caSandbox.py | caSandbox.py | import map
import curses
# Set up Curses screen
screen = curses.initscr()
curses.noecho()
screen.keypad(True)
curses.cbreak()
curses.halfdelay(5) # Wait for half a second for input before continuing
curses.start_color()
curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_WH... | import map
import curses
# Set up Curses screen
screen = curses.initscr()
curses.noecho()
screen.keypad(True)
curses.cbreak()
curses.halfdelay(5) # Wait for half a second for input before continuing
curses.start_color()
curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_WH... | Make program close on any keypress | Make program close on any keypress
| Python | mit | cferwin/CA-Sandbox | import map
import curses
# Set up Curses screen
screen = curses.initscr()
curses.noecho()
screen.keypad(True)
curses.cbreak()
curses.halfdelay(5) # Wait for half a second for input before continuing
curses.start_color()
curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_WH... | import map
import curses
# Set up Curses screen
screen = curses.initscr()
curses.noecho()
screen.keypad(True)
curses.cbreak()
curses.halfdelay(5) # Wait for half a second for input before continuing
curses.start_color()
curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_WH... | <commit_before>import map
import curses
# Set up Curses screen
screen = curses.initscr()
curses.noecho()
screen.keypad(True)
curses.cbreak()
curses.halfdelay(5) # Wait for half a second for input before continuing
curses.start_color()
curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
curses.init_pair(2, ... | import map
import curses
# Set up Curses screen
screen = curses.initscr()
curses.noecho()
screen.keypad(True)
curses.cbreak()
curses.halfdelay(5) # Wait for half a second for input before continuing
curses.start_color()
curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_WH... | import map
import curses
# Set up Curses screen
screen = curses.initscr()
curses.noecho()
screen.keypad(True)
curses.cbreak()
curses.halfdelay(5) # Wait for half a second for input before continuing
curses.start_color()
curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_WH... | <commit_before>import map
import curses
# Set up Curses screen
screen = curses.initscr()
curses.noecho()
screen.keypad(True)
curses.cbreak()
curses.halfdelay(5) # Wait for half a second for input before continuing
curses.start_color()
curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
curses.init_pair(2, ... |
bf38a26ea239ce70fd4fc3748912b243fb1f7d88 | tools/perf/benchmarks/pica.py | tools/perf/benchmarks/pica.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from telemetry.page import page_measurement
class PicaMeasurement(page_measurement.PageMeasurement):
def MeasurePage(self, _, t... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from telemetry.page import page_measurement
class PicaMeasurement(page_measurement.PageMeasurement):
def CustomizeBrowserOption... | Enable native custom elements for Pica benchmark | Enable native custom elements for Pica benchmark
R=tonyg@chromium.org
BUG=245358
Review URL: https://codereview.chromium.org/22884003
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@217042 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,Chilledheart/chromium,mogoweb/chromium-crosswalk,Just-D/chromium-1,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from telemetry.page import page_measurement
class PicaMeasurement(page_measurement.PageMeasurement):
def MeasurePage(self, _, t... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from telemetry.page import page_measurement
class PicaMeasurement(page_measurement.PageMeasurement):
def CustomizeBrowserOption... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from telemetry.page import page_measurement
class PicaMeasurement(page_measurement.PageMeasurement):
def Measure... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from telemetry.page import page_measurement
class PicaMeasurement(page_measurement.PageMeasurement):
def CustomizeBrowserOption... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from telemetry.page import page_measurement
class PicaMeasurement(page_measurement.PageMeasurement):
def MeasurePage(self, _, t... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import test
from telemetry.page import page_measurement
class PicaMeasurement(page_measurement.PageMeasurement):
def Measure... |
2f72f75da7ba03e331927c5ab0a5702c150b2f9a | perfrunner/celeryremote.py | perfrunner/celeryremote.py | BROKER_URL = 'amqp://couchbase:couchbase@ci.sc.couchbase.com:5672/broker'
CELERY_RESULT_BACKEND = 'amqp'
CELERY_RESULT_EXCHANGE = 'perf_results'
CELERY_RESULT_PERSISTENT = False
| BROKER_URL = 'amqp://couchbase:couchbase@172.23.97.73:5672/broker'
CELERY_RESULT_BACKEND = 'amqp'
CELERY_RESULT_EXCHANGE = 'perf_results'
CELERY_RESULT_PERSISTENT = False
| Use broker IP instead of domain name | Use broker IP instead of domain name
Change-Id: Ide27c97a00c18ac62c1a92e2ec51c74c5af4cf30
Reviewed-on: http://review.couchbase.org/81029
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>
| Python | apache-2.0 | couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner | BROKER_URL = 'amqp://couchbase:couchbase@ci.sc.couchbase.com:5672/broker'
CELERY_RESULT_BACKEND = 'amqp'
CELERY_RESULT_EXCHANGE = 'perf_results'
CELERY_RESULT_PERSISTENT = False
Use broker IP instead of domain name
Change-Id: Ide27c97a00c18ac62c1a92e2ec51c74c5af4cf30
Reviewed-on: http://review.couchbase.org/81029
Test... | BROKER_URL = 'amqp://couchbase:couchbase@172.23.97.73:5672/broker'
CELERY_RESULT_BACKEND = 'amqp'
CELERY_RESULT_EXCHANGE = 'perf_results'
CELERY_RESULT_PERSISTENT = False
| <commit_before>BROKER_URL = 'amqp://couchbase:couchbase@ci.sc.couchbase.com:5672/broker'
CELERY_RESULT_BACKEND = 'amqp'
CELERY_RESULT_EXCHANGE = 'perf_results'
CELERY_RESULT_PERSISTENT = False
<commit_msg>Use broker IP instead of domain name
Change-Id: Ide27c97a00c18ac62c1a92e2ec51c74c5af4cf30
Reviewed-on: http://revi... | BROKER_URL = 'amqp://couchbase:couchbase@172.23.97.73:5672/broker'
CELERY_RESULT_BACKEND = 'amqp'
CELERY_RESULT_EXCHANGE = 'perf_results'
CELERY_RESULT_PERSISTENT = False
| BROKER_URL = 'amqp://couchbase:couchbase@ci.sc.couchbase.com:5672/broker'
CELERY_RESULT_BACKEND = 'amqp'
CELERY_RESULT_EXCHANGE = 'perf_results'
CELERY_RESULT_PERSISTENT = False
Use broker IP instead of domain name
Change-Id: Ide27c97a00c18ac62c1a92e2ec51c74c5af4cf30
Reviewed-on: http://review.couchbase.org/81029
Test... | <commit_before>BROKER_URL = 'amqp://couchbase:couchbase@ci.sc.couchbase.com:5672/broker'
CELERY_RESULT_BACKEND = 'amqp'
CELERY_RESULT_EXCHANGE = 'perf_results'
CELERY_RESULT_PERSISTENT = False
<commit_msg>Use broker IP instead of domain name
Change-Id: Ide27c97a00c18ac62c1a92e2ec51c74c5af4cf30
Reviewed-on: http://revi... |
a5bc36df3435258fad9700c150985998e9663ff9 | haas/tests/test_coverage.py | haas/tests/test_coverage.py | # -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
try:
import coverage
except ImportErr... | # -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
try:
import coverage
from ..cover... | Fix test error when coverage is not installed | Fix test error when coverage is not installed
| Python | bsd-3-clause | itziakos/haas,scalative/haas,sjagoe/haas,sjagoe/haas,scalative/haas,itziakos/haas | # -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
try:
import coverage
except ImportErr... | # -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
try:
import coverage
from ..cover... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
try:
import coverage
e... | # -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
try:
import coverage
from ..cover... | # -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
try:
import coverage
except ImportErr... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
try:
import coverage
e... |
5b155b6e6b09874d7783135528d39ab7bbc61fdb | config/__init__.py | config/__init__.py | import logging
import yaml
l = logging.getLogger(__name__)
def _replace_with_type(type_, replace_type, data):
if isinstance(data, type_):
return replace_type(data)
return data
class Config(dict):
def __init__(self, items=None):
if items is not None:
if hasattr(items, 'ite... | import logging
import yaml
l = logging.getLogger(__name__)
def _replace_with_type(type_, replace_type, data):
if isinstance(data, type_):
return replace_type(data)
return data
class Config(dict):
def __init__(self, items=None):
if items is not None:
if hasattr(items, 'ite... | Use dynamic self.__class__ and not name directly | Use dynamic self.__class__ and not name directly
| Python | mit | FichteFoll/TelegramIRCImageProxy,codetalkio/TelegramIRCImageProxy,FichteFoll/CodetalkIRCBot | import logging
import yaml
l = logging.getLogger(__name__)
def _replace_with_type(type_, replace_type, data):
if isinstance(data, type_):
return replace_type(data)
return data
class Config(dict):
def __init__(self, items=None):
if items is not None:
if hasattr(items, 'ite... | import logging
import yaml
l = logging.getLogger(__name__)
def _replace_with_type(type_, replace_type, data):
if isinstance(data, type_):
return replace_type(data)
return data
class Config(dict):
def __init__(self, items=None):
if items is not None:
if hasattr(items, 'ite... | <commit_before>import logging
import yaml
l = logging.getLogger(__name__)
def _replace_with_type(type_, replace_type, data):
if isinstance(data, type_):
return replace_type(data)
return data
class Config(dict):
def __init__(self, items=None):
if items is not None:
if hasa... | import logging
import yaml
l = logging.getLogger(__name__)
def _replace_with_type(type_, replace_type, data):
if isinstance(data, type_):
return replace_type(data)
return data
class Config(dict):
def __init__(self, items=None):
if items is not None:
if hasattr(items, 'ite... | import logging
import yaml
l = logging.getLogger(__name__)
def _replace_with_type(type_, replace_type, data):
if isinstance(data, type_):
return replace_type(data)
return data
class Config(dict):
def __init__(self, items=None):
if items is not None:
if hasattr(items, 'ite... | <commit_before>import logging
import yaml
l = logging.getLogger(__name__)
def _replace_with_type(type_, replace_type, data):
if isinstance(data, type_):
return replace_type(data)
return data
class Config(dict):
def __init__(self, items=None):
if items is not None:
if hasa... |
49bf8bd8137928a1dc5165f38f8abfe423f5e7f0 | pi_director/controllers/user_controls.py | pi_director/controllers/user_controls.py | from pyramid.response import Response
from pi_director.models.models import (
DBSession,
MyModel,
)
from pi_director.models.UserModel import UserModel
def authorize_user(email):
user=DBSession.query(UserModel).filter(UserModel.email==email).one()
user.AccessLevel=2
DBSession.flush()
def delet... | from pyramid.response import Response
from pi_director.models.models import (
DBSession,
MyModel,
)
from pi_director.models.UserModel import UserModel
def authorize_user(email):
user=DBSession.query(UserModel).filter(UserModel.email==email).one()
user.AccessLevel=2
DBSession.flush()
def delet... | Create the user if it isn't already in the database first, then make it an admin. | Create the user if it isn't already in the database first, then make it an admin.
| Python | mit | selfcommit/pi_director,PeterGrace/pi_director,selfcommit/pi_director,PeterGrace/pi_director,PeterGrace/pi_director,selfcommit/pi_director | from pyramid.response import Response
from pi_director.models.models import (
DBSession,
MyModel,
)
from pi_director.models.UserModel import UserModel
def authorize_user(email):
user=DBSession.query(UserModel).filter(UserModel.email==email).one()
user.AccessLevel=2
DBSession.flush()
def delet... | from pyramid.response import Response
from pi_director.models.models import (
DBSession,
MyModel,
)
from pi_director.models.UserModel import UserModel
def authorize_user(email):
user=DBSession.query(UserModel).filter(UserModel.email==email).one()
user.AccessLevel=2
DBSession.flush()
def delet... | <commit_before>from pyramid.response import Response
from pi_director.models.models import (
DBSession,
MyModel,
)
from pi_director.models.UserModel import UserModel
def authorize_user(email):
user=DBSession.query(UserModel).filter(UserModel.email==email).one()
user.AccessLevel=2
DBSession.flu... | from pyramid.response import Response
from pi_director.models.models import (
DBSession,
MyModel,
)
from pi_director.models.UserModel import UserModel
def authorize_user(email):
user=DBSession.query(UserModel).filter(UserModel.email==email).one()
user.AccessLevel=2
DBSession.flush()
def delet... | from pyramid.response import Response
from pi_director.models.models import (
DBSession,
MyModel,
)
from pi_director.models.UserModel import UserModel
def authorize_user(email):
user=DBSession.query(UserModel).filter(UserModel.email==email).one()
user.AccessLevel=2
DBSession.flush()
def delet... | <commit_before>from pyramid.response import Response
from pi_director.models.models import (
DBSession,
MyModel,
)
from pi_director.models.UserModel import UserModel
def authorize_user(email):
user=DBSession.query(UserModel).filter(UserModel.email==email).one()
user.AccessLevel=2
DBSession.flu... |
6d450dccc7e89e4e90fd1f0f27cdf2aa67166859 | conanfile.py | conanfile.py | from conans import ConanFile, CMake
class SocketwConan(ConanFile):
name = "SocketW"
version = "3.10.36"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/socketw/issues"
description = "SocketW is a library which provides cross-platform socket abstraction"
... | from conans import ConanFile, CMake
class SocketwConan(ConanFile):
name = "SocketW"
version = "3.10.36"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/socketw/issues"
description = "SocketW is a library which provides cross-platform socket abstraction"
... | Use collect_libs for finding libs | Use collect_libs for finding libs | Python | lgpl-2.1 | Hiradur/mysocketw,Hiradur/mysocketw | from conans import ConanFile, CMake
class SocketwConan(ConanFile):
name = "SocketW"
version = "3.10.36"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/socketw/issues"
description = "SocketW is a library which provides cross-platform socket abstraction"
... | from conans import ConanFile, CMake
class SocketwConan(ConanFile):
name = "SocketW"
version = "3.10.36"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/socketw/issues"
description = "SocketW is a library which provides cross-platform socket abstraction"
... | <commit_before>from conans import ConanFile, CMake
class SocketwConan(ConanFile):
name = "SocketW"
version = "3.10.36"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/socketw/issues"
description = "SocketW is a library which provides cross-platform socket ab... | from conans import ConanFile, CMake
class SocketwConan(ConanFile):
name = "SocketW"
version = "3.10.36"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/socketw/issues"
description = "SocketW is a library which provides cross-platform socket abstraction"
... | from conans import ConanFile, CMake
class SocketwConan(ConanFile):
name = "SocketW"
version = "3.10.36"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/socketw/issues"
description = "SocketW is a library which provides cross-platform socket abstraction"
... | <commit_before>from conans import ConanFile, CMake
class SocketwConan(ConanFile):
name = "SocketW"
version = "3.10.36"
license = "GNU Lesser General Public License v2.1"
url = "https://github.com/RigsOfRods/socketw/issues"
description = "SocketW is a library which provides cross-platform socket ab... |
445db7dedb7c60edc03caa1969dca4253e2b9048 | example_project/example_project/web/templatetags/testags.py | example_project/example_project/web/templatetags/testags.py | # -*- coding: utf-8 -*-
from django_jinja.base import Library
import jinja2
register = Library()
@register.filter
@jinja2.contextfilter
def datetimeformat(ctx, value, format='%H:%M / %d-%m-%Y'):
return value.strftime(format)
@register.global_function
def hello(name):
return "Hello" + name
| # -*- coding: utf-8 -*-
from django_jinja.library import Library
import jinja2
register = Library()
@register.filter
@jinja2.contextfilter
def datetimeformat(ctx, value, format='%H:%M / %d-%m-%Y'):
return value.strftime(format)
@register.global_function
def hello(name):
return "Hello" + name
| Adjust the example_projects to work | Adjust the example_projects to work
| Python | bsd-3-clause | glogiotatidis/django-jinja,akx/django-jinja,akx/django-jinja,niwinz/django-jinja,niwinz/django-jinja,akx/django-jinja,niwinz/django-jinja,akx/django-jinja,glogiotatidis/django-jinja,glogiotatidis/django-jinja,glogiotatidis/django-jinja | # -*- coding: utf-8 -*-
from django_jinja.base import Library
import jinja2
register = Library()
@register.filter
@jinja2.contextfilter
def datetimeformat(ctx, value, format='%H:%M / %d-%m-%Y'):
return value.strftime(format)
@register.global_function
def hello(name):
return "Hello" + name
Adjust the example... | # -*- coding: utf-8 -*-
from django_jinja.library import Library
import jinja2
register = Library()
@register.filter
@jinja2.contextfilter
def datetimeformat(ctx, value, format='%H:%M / %d-%m-%Y'):
return value.strftime(format)
@register.global_function
def hello(name):
return "Hello" + name
| <commit_before># -*- coding: utf-8 -*-
from django_jinja.base import Library
import jinja2
register = Library()
@register.filter
@jinja2.contextfilter
def datetimeformat(ctx, value, format='%H:%M / %d-%m-%Y'):
return value.strftime(format)
@register.global_function
def hello(name):
return "Hello" + name
<co... | # -*- coding: utf-8 -*-
from django_jinja.library import Library
import jinja2
register = Library()
@register.filter
@jinja2.contextfilter
def datetimeformat(ctx, value, format='%H:%M / %d-%m-%Y'):
return value.strftime(format)
@register.global_function
def hello(name):
return "Hello" + name
| # -*- coding: utf-8 -*-
from django_jinja.base import Library
import jinja2
register = Library()
@register.filter
@jinja2.contextfilter
def datetimeformat(ctx, value, format='%H:%M / %d-%m-%Y'):
return value.strftime(format)
@register.global_function
def hello(name):
return "Hello" + name
Adjust the example... | <commit_before># -*- coding: utf-8 -*-
from django_jinja.base import Library
import jinja2
register = Library()
@register.filter
@jinja2.contextfilter
def datetimeformat(ctx, value, format='%H:%M / %d-%m-%Y'):
return value.strftime(format)
@register.global_function
def hello(name):
return "Hello" + name
<co... |
0a02b896c7f8499504a855652de22bab10824c69 | database_setup.py | database_setup.py | import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class Restaurant(Base):
__tablename__ = 'restaurant'
name = Column(String(80),... | import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class Restaurant(Base):
__tablename__ = 'restaurant'
name = Column(String(80),... | Add description column to Restaurant | feat: Add description column to Restaurant
| Python | mit | gsbullmer/restaurant-menu-directory,gsbullmer/restaurant-menu-directory | import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class Restaurant(Base):
__tablename__ = 'restaurant'
name = Column(String(80),... | import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class Restaurant(Base):
__tablename__ = 'restaurant'
name = Column(String(80),... | <commit_before>import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class Restaurant(Base):
__tablename__ = 'restaurant'
name = Col... | import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class Restaurant(Base):
__tablename__ = 'restaurant'
name = Column(String(80),... | import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class Restaurant(Base):
__tablename__ = 'restaurant'
name = Column(String(80),... | <commit_before>import sys
from sqlalchemy import Column, ForeignKey, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
Base = declarative_base()
class Restaurant(Base):
__tablename__ = 'restaurant'
name = Col... |
3e02a38a9ae52603f620a7969ce532b61de531d7 | libgreader/__init__.py | libgreader/__init__.py | # -*- coding: utf-8 -*-
# libgreader
# Copyright (C) 2012 Matt Behrens <askedrelic@gmail.com>
# Python library for the Google Reader API
__author__ = "Matt Behrens <askedrelic@gmail.com>"
__version__ = "0.8.0"
__copyright__ = "Copyright (C) 2012 Matt Behrens"
from .googlereader import GoogleReader
from .auth impo... | # -*- coding: utf-8 -*-
# libgreader
# Copyright (C) 2012 Matt Behrens <askedrelic@gmail.com>
# Python library for the Google Reader API
__author__ = "Matt Behrens <askedrelic@gmail.com>"
__version__ = "0.8.0"
__copyright__ = "Copyright (C) 2012 Matt Behrens"
try:
import requests
except ImportError:
# Wil... | Fix import error during setup.py install | Fix import error during setup.py install
| Python | mit | smurfix/librssreader,askedrelic/libgreader | # -*- coding: utf-8 -*-
# libgreader
# Copyright (C) 2012 Matt Behrens <askedrelic@gmail.com>
# Python library for the Google Reader API
__author__ = "Matt Behrens <askedrelic@gmail.com>"
__version__ = "0.8.0"
__copyright__ = "Copyright (C) 2012 Matt Behrens"
from .googlereader import GoogleReader
from .auth impo... | # -*- coding: utf-8 -*-
# libgreader
# Copyright (C) 2012 Matt Behrens <askedrelic@gmail.com>
# Python library for the Google Reader API
__author__ = "Matt Behrens <askedrelic@gmail.com>"
__version__ = "0.8.0"
__copyright__ = "Copyright (C) 2012 Matt Behrens"
try:
import requests
except ImportError:
# Wil... | <commit_before># -*- coding: utf-8 -*-
# libgreader
# Copyright (C) 2012 Matt Behrens <askedrelic@gmail.com>
# Python library for the Google Reader API
__author__ = "Matt Behrens <askedrelic@gmail.com>"
__version__ = "0.8.0"
__copyright__ = "Copyright (C) 2012 Matt Behrens"
from .googlereader import GoogleReader
... | # -*- coding: utf-8 -*-
# libgreader
# Copyright (C) 2012 Matt Behrens <askedrelic@gmail.com>
# Python library for the Google Reader API
__author__ = "Matt Behrens <askedrelic@gmail.com>"
__version__ = "0.8.0"
__copyright__ = "Copyright (C) 2012 Matt Behrens"
try:
import requests
except ImportError:
# Wil... | # -*- coding: utf-8 -*-
# libgreader
# Copyright (C) 2012 Matt Behrens <askedrelic@gmail.com>
# Python library for the Google Reader API
__author__ = "Matt Behrens <askedrelic@gmail.com>"
__version__ = "0.8.0"
__copyright__ = "Copyright (C) 2012 Matt Behrens"
from .googlereader import GoogleReader
from .auth impo... | <commit_before># -*- coding: utf-8 -*-
# libgreader
# Copyright (C) 2012 Matt Behrens <askedrelic@gmail.com>
# Python library for the Google Reader API
__author__ = "Matt Behrens <askedrelic@gmail.com>"
__version__ = "0.8.0"
__copyright__ = "Copyright (C) 2012 Matt Behrens"
from .googlereader import GoogleReader
... |
3d8d82be3528cc0150dac0c8ade1f6c306b412e4 | channels/apps.py | channels/apps.py | from django.apps import AppConfig
#from .binding.base import BindingMetaclass
from .package_checks import check_all
class ChannelsConfig(AppConfig):
name = "channels"
verbose_name = "Channels"
def ready(self):
# Check versions
check_all()
# Do django monkeypatches
from .... | from django.apps import AppConfig
# We import this here to ensure the reactor is installed very early on
# in case other packages accidentally import twisted.internet.reactor
# (e.g. raven does this).
import daphne.server # noqa
#from .binding.base import BindingMetaclass
from .package_checks import check_all
clas... | Add early import to fix problems with other packages and Twisted. | Add early import to fix problems with other packages and Twisted.
| Python | bsd-3-clause | andrewgodwin/channels,andrewgodwin/django-channels,django/channels | from django.apps import AppConfig
#from .binding.base import BindingMetaclass
from .package_checks import check_all
class ChannelsConfig(AppConfig):
name = "channels"
verbose_name = "Channels"
def ready(self):
# Check versions
check_all()
# Do django monkeypatches
from .... | from django.apps import AppConfig
# We import this here to ensure the reactor is installed very early on
# in case other packages accidentally import twisted.internet.reactor
# (e.g. raven does this).
import daphne.server # noqa
#from .binding.base import BindingMetaclass
from .package_checks import check_all
clas... | <commit_before>from django.apps import AppConfig
#from .binding.base import BindingMetaclass
from .package_checks import check_all
class ChannelsConfig(AppConfig):
name = "channels"
verbose_name = "Channels"
def ready(self):
# Check versions
check_all()
# Do django monkeypatches... | from django.apps import AppConfig
# We import this here to ensure the reactor is installed very early on
# in case other packages accidentally import twisted.internet.reactor
# (e.g. raven does this).
import daphne.server # noqa
#from .binding.base import BindingMetaclass
from .package_checks import check_all
clas... | from django.apps import AppConfig
#from .binding.base import BindingMetaclass
from .package_checks import check_all
class ChannelsConfig(AppConfig):
name = "channels"
verbose_name = "Channels"
def ready(self):
# Check versions
check_all()
# Do django monkeypatches
from .... | <commit_before>from django.apps import AppConfig
#from .binding.base import BindingMetaclass
from .package_checks import check_all
class ChannelsConfig(AppConfig):
name = "channels"
verbose_name = "Channels"
def ready(self):
# Check versions
check_all()
# Do django monkeypatches... |
b94f849fe28918a343a142da57b6055064d5b194 | tests/test_abort_generate_on_hook_error.py | tests/test_abort_generate_on_hook_error.py | # -*- coding: utf-8 -*-
import pytest
from cookiecutter import generate
from cookiecutter import exceptions
@pytest.mark.usefixtures('clean_system')
def test_pre_gen_hook(tmpdir):
context = {
'cookiecutter': {
"repo_dir": "foobar",
"abort_pre_gen": "yes",
"abort_post_... | # -*- coding: utf-8 -*-
import pytest
from cookiecutter import generate
from cookiecutter import exceptions
@pytest.mark.usefixtures('clean_system')
def test_pre_gen_hook(tmpdir):
context = {
'cookiecutter': {
"repo_dir": "foobar",
"abort_pre_gen": "yes",
"abort_post_... | Test that an error in post_gen_project aborts generation | Test that an error in post_gen_project aborts generation
| Python | bsd-3-clause | dajose/cookiecutter,pjbull/cookiecutter,willingc/cookiecutter,audreyr/cookiecutter,michaeljoseph/cookiecutter,terryjbates/cookiecutter,hackebrot/cookiecutter,Springerle/cookiecutter,dajose/cookiecutter,audreyr/cookiecutter,stevepiercy/cookiecutter,terryjbates/cookiecutter,hackebrot/cookiecutter,pjbull/cookiecutter,will... | # -*- coding: utf-8 -*-
import pytest
from cookiecutter import generate
from cookiecutter import exceptions
@pytest.mark.usefixtures('clean_system')
def test_pre_gen_hook(tmpdir):
context = {
'cookiecutter': {
"repo_dir": "foobar",
"abort_pre_gen": "yes",
"abort_post_... | # -*- coding: utf-8 -*-
import pytest
from cookiecutter import generate
from cookiecutter import exceptions
@pytest.mark.usefixtures('clean_system')
def test_pre_gen_hook(tmpdir):
context = {
'cookiecutter': {
"repo_dir": "foobar",
"abort_pre_gen": "yes",
"abort_post_... | <commit_before># -*- coding: utf-8 -*-
import pytest
from cookiecutter import generate
from cookiecutter import exceptions
@pytest.mark.usefixtures('clean_system')
def test_pre_gen_hook(tmpdir):
context = {
'cookiecutter': {
"repo_dir": "foobar",
"abort_pre_gen": "yes",
... | # -*- coding: utf-8 -*-
import pytest
from cookiecutter import generate
from cookiecutter import exceptions
@pytest.mark.usefixtures('clean_system')
def test_pre_gen_hook(tmpdir):
context = {
'cookiecutter': {
"repo_dir": "foobar",
"abort_pre_gen": "yes",
"abort_post_... | # -*- coding: utf-8 -*-
import pytest
from cookiecutter import generate
from cookiecutter import exceptions
@pytest.mark.usefixtures('clean_system')
def test_pre_gen_hook(tmpdir):
context = {
'cookiecutter': {
"repo_dir": "foobar",
"abort_pre_gen": "yes",
"abort_post_... | <commit_before># -*- coding: utf-8 -*-
import pytest
from cookiecutter import generate
from cookiecutter import exceptions
@pytest.mark.usefixtures('clean_system')
def test_pre_gen_hook(tmpdir):
context = {
'cookiecutter': {
"repo_dir": "foobar",
"abort_pre_gen": "yes",
... |
1f66670b94d2eca70ecf8e26b21f8b28986154b9 | test-mm.py | test-mm.py | from psautohint import autohint
from psautohint import psautohint
baseDir = "tests/data/source-code-pro"
masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold")
glyphList = None
fonts = []
for master in masters:
print("Hinting %s" % master)
path = "%s/%s/font.otf" % (baseDir, mas... | from psautohint import autohint
from psautohint import psautohint
baseDir = "tests/data/source-code-pro"
masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold")
glyphList = None
fonts = []
for master in masters:
print("Hinting %s" % master)
options = autohint.ACOptions()
opti... | Use the UFOs not the OTFs | Use the UFOs not the OTFs
Oops, the OTF are not interpolation compatible due to overlap removal, I
should have use the UFOs all along. Now the script passes without
errors, still need to verify the output.
| Python | apache-2.0 | khaledhosny/psautohint,khaledhosny/psautohint | from psautohint import autohint
from psautohint import psautohint
baseDir = "tests/data/source-code-pro"
masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold")
glyphList = None
fonts = []
for master in masters:
print("Hinting %s" % master)
path = "%s/%s/font.otf" % (baseDir, mas... | from psautohint import autohint
from psautohint import psautohint
baseDir = "tests/data/source-code-pro"
masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold")
glyphList = None
fonts = []
for master in masters:
print("Hinting %s" % master)
options = autohint.ACOptions()
opti... | <commit_before>from psautohint import autohint
from psautohint import psautohint
baseDir = "tests/data/source-code-pro"
masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold")
glyphList = None
fonts = []
for master in masters:
print("Hinting %s" % master)
path = "%s/%s/font.otf" ... | from psautohint import autohint
from psautohint import psautohint
baseDir = "tests/data/source-code-pro"
masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold")
glyphList = None
fonts = []
for master in masters:
print("Hinting %s" % master)
options = autohint.ACOptions()
opti... | from psautohint import autohint
from psautohint import psautohint
baseDir = "tests/data/source-code-pro"
masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold")
glyphList = None
fonts = []
for master in masters:
print("Hinting %s" % master)
path = "%s/%s/font.otf" % (baseDir, mas... | <commit_before>from psautohint import autohint
from psautohint import psautohint
baseDir = "tests/data/source-code-pro"
masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold")
glyphList = None
fonts = []
for master in masters:
print("Hinting %s" % master)
path = "%s/%s/font.otf" ... |
7f6da4dee6464e48a0e6b491f3f740a750e86ed2 | dataactcore/scripts/resetAlembicVersion.py | dataactcore/scripts/resetAlembicVersion.py | import argparse
from dataactcore.models.errorInterface import ErrorInterface
from dataactcore.models.jobTrackerInterface import JobTrackerInterface
from dataactcore.models.userInterface import UserInterface
from dataactcore.models.validationInterface import ValidationInterface
from sqlalchemy import MetaData, Table
fro... | import argparse
from sqlalchemy import MetaData, Table
from sqlalchemy.sql import update
from dataactcore.interfaces.db import GlobalDB
from dataactvalidator.app import createApp
def reset_alembic(alembic_version):
with createApp().app_context():
db = GlobalDB.db()
engine = db.engine
s... | Remove db interfaces from the alembic version reset helper script. | Remove db interfaces from the alembic version reset helper script.
Arguably, this script is no longer especially useful now that we
only have a single database for the broker. That said, removed the
interfaces in case folks are still using it.
| Python | cc0-1.0 | fedspendingtransparency/data-act-broker-backend,chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend,chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend,fedspendingtransparency/data-act-broker-backend | import argparse
from dataactcore.models.errorInterface import ErrorInterface
from dataactcore.models.jobTrackerInterface import JobTrackerInterface
from dataactcore.models.userInterface import UserInterface
from dataactcore.models.validationInterface import ValidationInterface
from sqlalchemy import MetaData, Table
fro... | import argparse
from sqlalchemy import MetaData, Table
from sqlalchemy.sql import update
from dataactcore.interfaces.db import GlobalDB
from dataactvalidator.app import createApp
def reset_alembic(alembic_version):
with createApp().app_context():
db = GlobalDB.db()
engine = db.engine
s... | <commit_before>import argparse
from dataactcore.models.errorInterface import ErrorInterface
from dataactcore.models.jobTrackerInterface import JobTrackerInterface
from dataactcore.models.userInterface import UserInterface
from dataactcore.models.validationInterface import ValidationInterface
from sqlalchemy import Meta... | import argparse
from sqlalchemy import MetaData, Table
from sqlalchemy.sql import update
from dataactcore.interfaces.db import GlobalDB
from dataactvalidator.app import createApp
def reset_alembic(alembic_version):
with createApp().app_context():
db = GlobalDB.db()
engine = db.engine
s... | import argparse
from dataactcore.models.errorInterface import ErrorInterface
from dataactcore.models.jobTrackerInterface import JobTrackerInterface
from dataactcore.models.userInterface import UserInterface
from dataactcore.models.validationInterface import ValidationInterface
from sqlalchemy import MetaData, Table
fro... | <commit_before>import argparse
from dataactcore.models.errorInterface import ErrorInterface
from dataactcore.models.jobTrackerInterface import JobTrackerInterface
from dataactcore.models.userInterface import UserInterface
from dataactcore.models.validationInterface import ValidationInterface
from sqlalchemy import Meta... |
14329daf571400812594c0388eac87538cd10079 | denim/api.py | denim/api.py | from fabric import api as __api
# Setup some default values.
__api.env.deploy_user = 'webapps'
from denim.paths import (cd_deploy, cd_package, deploy_path, package_path)
from denim import (scm, service, system, virtualenv, webserver)
from denim.decorators import deploy_env
@__api.task(name="help")
def show_help():
... | from fabric import api as _api
# Setup some default values.
_api.env.deploy_user = 'webapps'
from denim.paths import (cd_deploy, cd_application, deploy_path, application_path)
from denim import (scm, service, system, virtualenv, webserver)
from denim.decorators import deploy_env
# Pending deprecation
from denim.path... | Break out items pending deprecation, remove double underscores | Break out items pending deprecation, remove double underscores
| Python | bsd-2-clause | timsavage/denim | from fabric import api as __api
# Setup some default values.
__api.env.deploy_user = 'webapps'
from denim.paths import (cd_deploy, cd_package, deploy_path, package_path)
from denim import (scm, service, system, virtualenv, webserver)
from denim.decorators import deploy_env
@__api.task(name="help")
def show_help():
... | from fabric import api as _api
# Setup some default values.
_api.env.deploy_user = 'webapps'
from denim.paths import (cd_deploy, cd_application, deploy_path, application_path)
from denim import (scm, service, system, virtualenv, webserver)
from denim.decorators import deploy_env
# Pending deprecation
from denim.path... | <commit_before>from fabric import api as __api
# Setup some default values.
__api.env.deploy_user = 'webapps'
from denim.paths import (cd_deploy, cd_package, deploy_path, package_path)
from denim import (scm, service, system, virtualenv, webserver)
from denim.decorators import deploy_env
@__api.task(name="help")
de... | from fabric import api as _api
# Setup some default values.
_api.env.deploy_user = 'webapps'
from denim.paths import (cd_deploy, cd_application, deploy_path, application_path)
from denim import (scm, service, system, virtualenv, webserver)
from denim.decorators import deploy_env
# Pending deprecation
from denim.path... | from fabric import api as __api
# Setup some default values.
__api.env.deploy_user = 'webapps'
from denim.paths import (cd_deploy, cd_package, deploy_path, package_path)
from denim import (scm, service, system, virtualenv, webserver)
from denim.decorators import deploy_env
@__api.task(name="help")
def show_help():
... | <commit_before>from fabric import api as __api
# Setup some default values.
__api.env.deploy_user = 'webapps'
from denim.paths import (cd_deploy, cd_package, deploy_path, package_path)
from denim import (scm, service, system, virtualenv, webserver)
from denim.decorators import deploy_env
@__api.task(name="help")
de... |
770f9dd75a223fb31a18af2fcb089398663f2065 | concentration.py | concentration.py | from major import Major
class Concentration(Major):
def __init__(self, dept="NONE"):
super().__init__(dept, path="concentrations/")
if __name__ == '__main__':
tmp = [
Concentration(dept="Asian")
]
for i in tmp:
print(i)
| from major import Major
class Concentration(Major):
def __init__(self, dept="NONE"):
super().__init__(dept, path="concentrations/")
def getConcentrationRequirement(self, string):
return self.requirements[string]
if __name__ == '__main__':
tmp = [
Concentration(dept="Asian")
]
for i in tmp:
print(i)
| Add a getConcentrationRequirement to corrospond to getMajorRequirement | Add a getConcentrationRequirement to corrospond to getMajorRequirement
| Python | agpl-3.0 | hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook | from major import Major
class Concentration(Major):
def __init__(self, dept="NONE"):
super().__init__(dept, path="concentrations/")
if __name__ == '__main__':
tmp = [
Concentration(dept="Asian")
]
for i in tmp:
print(i)
Add a getConcentrationRequirement to corrospond to getMajorRequirement | from major import Major
class Concentration(Major):
def __init__(self, dept="NONE"):
super().__init__(dept, path="concentrations/")
def getConcentrationRequirement(self, string):
return self.requirements[string]
if __name__ == '__main__':
tmp = [
Concentration(dept="Asian")
]
for i in tmp:
print(i)
| <commit_before>from major import Major
class Concentration(Major):
def __init__(self, dept="NONE"):
super().__init__(dept, path="concentrations/")
if __name__ == '__main__':
tmp = [
Concentration(dept="Asian")
]
for i in tmp:
print(i)
<commit_msg>Add a getConcentrationRequirement to corrospond to getMajorRe... | from major import Major
class Concentration(Major):
def __init__(self, dept="NONE"):
super().__init__(dept, path="concentrations/")
def getConcentrationRequirement(self, string):
return self.requirements[string]
if __name__ == '__main__':
tmp = [
Concentration(dept="Asian")
]
for i in tmp:
print(i)
| from major import Major
class Concentration(Major):
def __init__(self, dept="NONE"):
super().__init__(dept, path="concentrations/")
if __name__ == '__main__':
tmp = [
Concentration(dept="Asian")
]
for i in tmp:
print(i)
Add a getConcentrationRequirement to corrospond to getMajorRequirementfrom major import ... | <commit_before>from major import Major
class Concentration(Major):
def __init__(self, dept="NONE"):
super().__init__(dept, path="concentrations/")
if __name__ == '__main__':
tmp = [
Concentration(dept="Asian")
]
for i in tmp:
print(i)
<commit_msg>Add a getConcentrationRequirement to corrospond to getMajorRe... |
1f61ece6f6b0950706ebef159665eafbfeeaa1fd | app/api/utils/containerMapper.py | app/api/utils/containerMapper.py |
def getContainerDetails(container):
ip = 'N/A'
if container.state().network != None and container.state().network.get('eth0') != None:
if len(container.state().network.get('eth0')['addresses']) > 0:
ip = container.state().network['eth0']['addresses'][0].get('address', 'N/A')
return {
... |
def getContainerDetails(container):
ip = 'N/A'
if container.state().network != None and container.state().network.get('eth0') != None:
if len(container.state().network.get('eth0')['addresses']) > 0:
ip = container.state().network['eth0']['addresses'][0].get('address', 'N/A')
image = '... | Fix container list bug when missing image | Fix container list bug when missing image
| Python | apache-2.0 | AdaptiveScale/lxdui,AdaptiveScale/lxdui,AdaptiveScale/lxdui,AdaptiveScale/lxdui |
def getContainerDetails(container):
ip = 'N/A'
if container.state().network != None and container.state().network.get('eth0') != None:
if len(container.state().network.get('eth0')['addresses']) > 0:
ip = container.state().network['eth0']['addresses'][0].get('address', 'N/A')
return {
... |
def getContainerDetails(container):
ip = 'N/A'
if container.state().network != None and container.state().network.get('eth0') != None:
if len(container.state().network.get('eth0')['addresses']) > 0:
ip = container.state().network['eth0']['addresses'][0].get('address', 'N/A')
image = '... | <commit_before>
def getContainerDetails(container):
ip = 'N/A'
if container.state().network != None and container.state().network.get('eth0') != None:
if len(container.state().network.get('eth0')['addresses']) > 0:
ip = container.state().network['eth0']['addresses'][0].get('address', 'N/A')... |
def getContainerDetails(container):
ip = 'N/A'
if container.state().network != None and container.state().network.get('eth0') != None:
if len(container.state().network.get('eth0')['addresses']) > 0:
ip = container.state().network['eth0']['addresses'][0].get('address', 'N/A')
image = '... |
def getContainerDetails(container):
ip = 'N/A'
if container.state().network != None and container.state().network.get('eth0') != None:
if len(container.state().network.get('eth0')['addresses']) > 0:
ip = container.state().network['eth0']['addresses'][0].get('address', 'N/A')
return {
... | <commit_before>
def getContainerDetails(container):
ip = 'N/A'
if container.state().network != None and container.state().network.get('eth0') != None:
if len(container.state().network.get('eth0')['addresses']) > 0:
ip = container.state().network['eth0']['addresses'][0].get('address', 'N/A')... |
26538b01b5865c4b5f68fc0ea0f22268d4768376 | scrapy/contrib/memdebug.py | scrapy/contrib/memdebug.py | """
MemoryDebugger extension
See documentation in docs/topics/extensions.rst
"""
import gc
from scrapy import signals
from scrapy.exceptions import NotConfigured
from scrapy.utils.trackref import live_refs
class MemoryDebugger(object):
def __init__(self, stats):
self.stats = stats
@classmethod
... | """
MemoryDebugger extension
See documentation in docs/topics/extensions.rst
"""
import gc
from scrapy import signals
from scrapy.exceptions import NotConfigured
from scrapy.utils.trackref import live_refs
class MemoryDebugger(object):
def __init__(self, stats):
self.stats = stats
@classmethod
... | Fix logging of stats collected by MemoryDebugger extension. | Fix logging of stats collected by MemoryDebugger extension.
Stats are printed on spider_closed event;
engine_stopped signal is called after spider_closed signal,
so stats for MemoryDebugger extension were not printed to user.
| Python | bsd-3-clause | olorz/scrapy,OpenWhere/scrapy,cursesun/scrapy,pablohoffman/scrapy,avtoritet/scrapy,nikgr95/scrapy,eLRuLL/scrapy,rolando-contrib/scrapy,amboxer21/scrapy,aivarsk/scrapy,zjuwangg/scrapy,dacjames/scrapy,cursesun/scrapy,TarasRudnyk/scrapy,Digenis/scrapy,bmess/scrapy,agreen/scrapy,CENDARI/scrapy,redapple/scrapy,shaform/scrap... | """
MemoryDebugger extension
See documentation in docs/topics/extensions.rst
"""
import gc
from scrapy import signals
from scrapy.exceptions import NotConfigured
from scrapy.utils.trackref import live_refs
class MemoryDebugger(object):
def __init__(self, stats):
self.stats = stats
@classmethod
... | """
MemoryDebugger extension
See documentation in docs/topics/extensions.rst
"""
import gc
from scrapy import signals
from scrapy.exceptions import NotConfigured
from scrapy.utils.trackref import live_refs
class MemoryDebugger(object):
def __init__(self, stats):
self.stats = stats
@classmethod
... | <commit_before>"""
MemoryDebugger extension
See documentation in docs/topics/extensions.rst
"""
import gc
from scrapy import signals
from scrapy.exceptions import NotConfigured
from scrapy.utils.trackref import live_refs
class MemoryDebugger(object):
def __init__(self, stats):
self.stats = stats
... | """
MemoryDebugger extension
See documentation in docs/topics/extensions.rst
"""
import gc
from scrapy import signals
from scrapy.exceptions import NotConfigured
from scrapy.utils.trackref import live_refs
class MemoryDebugger(object):
def __init__(self, stats):
self.stats = stats
@classmethod
... | """
MemoryDebugger extension
See documentation in docs/topics/extensions.rst
"""
import gc
from scrapy import signals
from scrapy.exceptions import NotConfigured
from scrapy.utils.trackref import live_refs
class MemoryDebugger(object):
def __init__(self, stats):
self.stats = stats
@classmethod
... | <commit_before>"""
MemoryDebugger extension
See documentation in docs/topics/extensions.rst
"""
import gc
from scrapy import signals
from scrapy.exceptions import NotConfigured
from scrapy.utils.trackref import live_refs
class MemoryDebugger(object):
def __init__(self, stats):
self.stats = stats
... |
7fc576f3dd4d8d7dbe64dbecfc6dcc9ac9ad6b12 | conman/routes/utils.py | conman/routes/utils.py | import os
def split_path(path):
"""
Split a url path into its sub-paths.
A url's sub-paths consist of all substrings ending in / and starting at
the start of the url.
"""
paths = ['/']
path = path.rstrip('/')
while path:
paths.insert(1, path + '/')
path = os.path.spli... | from collections import deque
def split_path(path):
"""
Split a url path into its sub-paths.
A url's sub-paths consist of all substrings ending in / and starting at
the start of the url.
eg: /path/containing/subpaths/ becomes:
/
/path/
/path/containing/
/path/con... | Refactor split_path code for brevity and clarity | Refactor split_path code for brevity and clarity
| Python | bsd-2-clause | meshy/django-conman,meshy/django-conman | import os
def split_path(path):
"""
Split a url path into its sub-paths.
A url's sub-paths consist of all substrings ending in / and starting at
the start of the url.
"""
paths = ['/']
path = path.rstrip('/')
while path:
paths.insert(1, path + '/')
path = os.path.spli... | from collections import deque
def split_path(path):
"""
Split a url path into its sub-paths.
A url's sub-paths consist of all substrings ending in / and starting at
the start of the url.
eg: /path/containing/subpaths/ becomes:
/
/path/
/path/containing/
/path/con... | <commit_before>import os
def split_path(path):
"""
Split a url path into its sub-paths.
A url's sub-paths consist of all substrings ending in / and starting at
the start of the url.
"""
paths = ['/']
path = path.rstrip('/')
while path:
paths.insert(1, path + '/')
path... | from collections import deque
def split_path(path):
"""
Split a url path into its sub-paths.
A url's sub-paths consist of all substrings ending in / and starting at
the start of the url.
eg: /path/containing/subpaths/ becomes:
/
/path/
/path/containing/
/path/con... | import os
def split_path(path):
"""
Split a url path into its sub-paths.
A url's sub-paths consist of all substrings ending in / and starting at
the start of the url.
"""
paths = ['/']
path = path.rstrip('/')
while path:
paths.insert(1, path + '/')
path = os.path.spli... | <commit_before>import os
def split_path(path):
"""
Split a url path into its sub-paths.
A url's sub-paths consist of all substrings ending in / and starting at
the start of the url.
"""
paths = ['/']
path = path.rstrip('/')
while path:
paths.insert(1, path + '/')
path... |
15c773250b52a03196a023e286f4f3a2405ba94e | backend/uclapi/dashboard/app_helpers.py | backend/uclapi/dashboard/app_helpers.py | from binascii import hexlify
import os
def generate_api_token():
key = hexlify(os.urandom(30)).decode()
dashes_key = ""
for idx, char in enumerate(key):
if idx % 15 == 0 and idx != len(key)-1:
dashes_key += "-"
else:
dashes_key += char
final = "uclapi" + dashes... | from binascii import hexlify
from random import choice
import os
import string
def generate_api_token():
key = hexlify(os.urandom(30)).decode()
dashes_key = ""
for idx, char in enumerate(key):
if idx % 15 == 0 and idx != len(key)-1:
dashes_key += "-"
else:
dashes_k... | Add helpers to the dashboard code to generate OAuth keys | Add helpers to the dashboard code to generate OAuth keys
| Python | mit | uclapi/uclapi,uclapi/uclapi,uclapi/uclapi,uclapi/uclapi | from binascii import hexlify
import os
def generate_api_token():
key = hexlify(os.urandom(30)).decode()
dashes_key = ""
for idx, char in enumerate(key):
if idx % 15 == 0 and idx != len(key)-1:
dashes_key += "-"
else:
dashes_key += char
final = "uclapi" + dashes... | from binascii import hexlify
from random import choice
import os
import string
def generate_api_token():
key = hexlify(os.urandom(30)).decode()
dashes_key = ""
for idx, char in enumerate(key):
if idx % 15 == 0 and idx != len(key)-1:
dashes_key += "-"
else:
dashes_k... | <commit_before>from binascii import hexlify
import os
def generate_api_token():
key = hexlify(os.urandom(30)).decode()
dashes_key = ""
for idx, char in enumerate(key):
if idx % 15 == 0 and idx != len(key)-1:
dashes_key += "-"
else:
dashes_key += char
final = "u... | from binascii import hexlify
from random import choice
import os
import string
def generate_api_token():
key = hexlify(os.urandom(30)).decode()
dashes_key = ""
for idx, char in enumerate(key):
if idx % 15 == 0 and idx != len(key)-1:
dashes_key += "-"
else:
dashes_k... | from binascii import hexlify
import os
def generate_api_token():
key = hexlify(os.urandom(30)).decode()
dashes_key = ""
for idx, char in enumerate(key):
if idx % 15 == 0 and idx != len(key)-1:
dashes_key += "-"
else:
dashes_key += char
final = "uclapi" + dashes... | <commit_before>from binascii import hexlify
import os
def generate_api_token():
key = hexlify(os.urandom(30)).decode()
dashes_key = ""
for idx, char in enumerate(key):
if idx % 15 == 0 and idx != len(key)-1:
dashes_key += "-"
else:
dashes_key += char
final = "u... |
5bb4c61e9950de4c8c000a4ab02b0c901e0b06ff | version.py | version.py | """
automatically maintains the latest git tag + revision info in a python file
"""
import imp
import os
import subprocess
def get_project_version(version_file):
version_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), version_file)
try:
module = imp.load_source("verfile", version_fi... | """
automatically maintains the latest git tag + revision info in a python file
"""
import importlib
import os
import subprocess
def get_project_version(version_file):
version_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), version_file)
try:
module = importlib.load_module(version_f... | Migrate from deprecated imp to importlib | Migrate from deprecated imp to importlib
| Python | apache-2.0 | aiven/aiven-client | """
automatically maintains the latest git tag + revision info in a python file
"""
import imp
import os
import subprocess
def get_project_version(version_file):
version_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), version_file)
try:
module = imp.load_source("verfile", version_fi... | """
automatically maintains the latest git tag + revision info in a python file
"""
import importlib
import os
import subprocess
def get_project_version(version_file):
version_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), version_file)
try:
module = importlib.load_module(version_f... | <commit_before>"""
automatically maintains the latest git tag + revision info in a python file
"""
import imp
import os
import subprocess
def get_project_version(version_file):
version_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), version_file)
try:
module = imp.load_source("verfi... | """
automatically maintains the latest git tag + revision info in a python file
"""
import importlib
import os
import subprocess
def get_project_version(version_file):
version_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), version_file)
try:
module = importlib.load_module(version_f... | """
automatically maintains the latest git tag + revision info in a python file
"""
import imp
import os
import subprocess
def get_project_version(version_file):
version_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), version_file)
try:
module = imp.load_source("verfile", version_fi... | <commit_before>"""
automatically maintains the latest git tag + revision info in a python file
"""
import imp
import os
import subprocess
def get_project_version(version_file):
version_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), version_file)
try:
module = imp.load_source("verfi... |
e799c94932aa3a9284d99739502645abc47aa8b4 | docs/conf.py | docs/conf.py | import os
import sdv
project = u'stix-validator'
copyright = u'2015, The MITRE Corporation'
version = sdv.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.napoleon',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
exclude_patterns = ['_build']
... | import os
import sdv
project = u'stix-validator'
copyright = u'2015, The MITRE Corporation'
version = sdv.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.napoleon',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
rst_prolog = """
**Version**: ... | Add package version to rst_prolog. | Add package version to rst_prolog.
| Python | bsd-3-clause | STIXProject/stix-validator,pombredanne/stix-validator | import os
import sdv
project = u'stix-validator'
copyright = u'2015, The MITRE Corporation'
version = sdv.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.napoleon',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
exclude_patterns = ['_build']
... | import os
import sdv
project = u'stix-validator'
copyright = u'2015, The MITRE Corporation'
version = sdv.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.napoleon',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
rst_prolog = """
**Version**: ... | <commit_before>import os
import sdv
project = u'stix-validator'
copyright = u'2015, The MITRE Corporation'
version = sdv.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.napoleon',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
exclude_pattern... | import os
import sdv
project = u'stix-validator'
copyright = u'2015, The MITRE Corporation'
version = sdv.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.napoleon',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
rst_prolog = """
**Version**: ... | import os
import sdv
project = u'stix-validator'
copyright = u'2015, The MITRE Corporation'
version = sdv.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.napoleon',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
exclude_patterns = ['_build']
... | <commit_before>import os
import sdv
project = u'stix-validator'
copyright = u'2015, The MITRE Corporation'
version = sdv.__version__
release = version
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.napoleon',
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
exclude_pattern... |
80002186ecec3a50d13d04e8467d8d7456d189b5 | webdriver/webdriver-w3c-tests/base_test.py | webdriver/webdriver-w3c-tests/base_test.py |
import ConfigParser
import json
import os
import unittest
from webserver import Httpd
from network import get_lan_ip
from selenium import webdriver
class WebDriverBaseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = create_driver()
cls.webserver = Httpd(host=get_lan_... |
import ConfigParser
import json
import os
import unittest
from webserver import Httpd
from network import get_lan_ip
from selenium import webdriver
class WebDriverBaseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = create_driver()
cls.webserver = Httpd(host=get_lan_... | Update activity name for crosswalk android package rule changed | [xwalkdriver] Update activity name for crosswalk android package rule changed
| Python | bsd-3-clause | YongseopKim/crosswalk-test-suite,kangxu/crosswalk-test-suite,jacky-young/crosswalk-test-suite,kangxu/crosswalk-test-suite,ibelem/crosswalk-test-suite,XiaosongWei/crosswalk-test-suite,kangxu/crosswalk-test-suite,xiaojunwu/crosswalk-test-suite,Shao-Feng/crosswalk-test-suite,XiaosongWei/crosswalk-test-suite,crosswalk-proj... |
import ConfigParser
import json
import os
import unittest
from webserver import Httpd
from network import get_lan_ip
from selenium import webdriver
class WebDriverBaseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = create_driver()
cls.webserver = Httpd(host=get_lan_... |
import ConfigParser
import json
import os
import unittest
from webserver import Httpd
from network import get_lan_ip
from selenium import webdriver
class WebDriverBaseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = create_driver()
cls.webserver = Httpd(host=get_lan_... | <commit_before>
import ConfigParser
import json
import os
import unittest
from webserver import Httpd
from network import get_lan_ip
from selenium import webdriver
class WebDriverBaseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = create_driver()
cls.webserver = Http... |
import ConfigParser
import json
import os
import unittest
from webserver import Httpd
from network import get_lan_ip
from selenium import webdriver
class WebDriverBaseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = create_driver()
cls.webserver = Httpd(host=get_lan_... |
import ConfigParser
import json
import os
import unittest
from webserver import Httpd
from network import get_lan_ip
from selenium import webdriver
class WebDriverBaseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = create_driver()
cls.webserver = Httpd(host=get_lan_... | <commit_before>
import ConfigParser
import json
import os
import unittest
from webserver import Httpd
from network import get_lan_ip
from selenium import webdriver
class WebDriverBaseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = create_driver()
cls.webserver = Http... |
d641d7d843899258d88da0d1dffaa762c1378712 | opps/fields/widgets.py | opps/fields/widgets.py | #!/usr/bin/env python
# -*- coding: utf-8 -*
import json
from django import forms
from django.template.loader import render_to_string
from .models import Field, Option, FieldOption
class JSONField(forms.TextInput):
model = Field
def render(self, name, value, attrs=None):
elements = []
values ... | #!/usr/bin/env python
# -*- coding: utf-8 -*
import json
from django import forms
from django.template.loader import render_to_string
from .models import Field, FieldOption
class JSONField(forms.TextInput):
model = Field
def render(self, name, value, attrs=None):
elements = []
try:
... | Fix bug TypeError, not exist values (json) is dict None | Fix bug TypeError, not exist values (json) is dict None
| Python | mit | williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,williamroot/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,opps/opps,opps/opps,YACOWS/opps,opps/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*
import json
from django import forms
from django.template.loader import render_to_string
from .models import Field, Option, FieldOption
class JSONField(forms.TextInput):
model = Field
def render(self, name, value, attrs=None):
elements = []
values ... | #!/usr/bin/env python
# -*- coding: utf-8 -*
import json
from django import forms
from django.template.loader import render_to_string
from .models import Field, FieldOption
class JSONField(forms.TextInput):
model = Field
def render(self, name, value, attrs=None):
elements = []
try:
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*
import json
from django import forms
from django.template.loader import render_to_string
from .models import Field, Option, FieldOption
class JSONField(forms.TextInput):
model = Field
def render(self, name, value, attrs=None):
elements = []
... | #!/usr/bin/env python
# -*- coding: utf-8 -*
import json
from django import forms
from django.template.loader import render_to_string
from .models import Field, FieldOption
class JSONField(forms.TextInput):
model = Field
def render(self, name, value, attrs=None):
elements = []
try:
... | #!/usr/bin/env python
# -*- coding: utf-8 -*
import json
from django import forms
from django.template.loader import render_to_string
from .models import Field, Option, FieldOption
class JSONField(forms.TextInput):
model = Field
def render(self, name, value, attrs=None):
elements = []
values ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*
import json
from django import forms
from django.template.loader import render_to_string
from .models import Field, Option, FieldOption
class JSONField(forms.TextInput):
model = Field
def render(self, name, value, attrs=None):
elements = []
... |
ea57d89c1acc82a473a648f1c53430fadc27f7b2 | opps/polls/__init__.py | opps/polls/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Poll App for Opps CMS"
__author__ = u"Bruno Cezar Rocha"
__credits__ = []
__email__ = u"rochacbruno@gmail.com"
__license__ = u"MIT License"
__copyright__ = u"Copy... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Poll App for Opps CMS"
__author__ = u"Bruno Cezar Rocha"
__credits__ = []
__email__ = u"rochacbruno@gmail.com"
__license__ = u"MIT License"
__copyright__ = u"Copy... | Fix Copyright application, YACOWS to Opps Projects | Fix Copyright application, YACOWS to Opps Projects
| Python | mit | opps/opps-polls,opps/opps-polls | #!/usr/bin/env python
# -*- coding: utf-8 -*-
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Poll App for Opps CMS"
__author__ = u"Bruno Cezar Rocha"
__credits__ = []
__email__ = u"rochacbruno@gmail.com"
__license__ = u"MIT License"
__copyright__ = u"Copy... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Poll App for Opps CMS"
__author__ = u"Bruno Cezar Rocha"
__credits__ = []
__email__ = u"rochacbruno@gmail.com"
__license__ = u"MIT License"
__copyright__ = u"Copy... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Poll App for Opps CMS"
__author__ = u"Bruno Cezar Rocha"
__credits__ = []
__email__ = u"rochacbruno@gmail.com"
__license__ = u"MIT License"
__copyr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Poll App for Opps CMS"
__author__ = u"Bruno Cezar Rocha"
__credits__ = []
__email__ = u"rochacbruno@gmail.com"
__license__ = u"MIT License"
__copyright__ = u"Copy... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Poll App for Opps CMS"
__author__ = u"Bruno Cezar Rocha"
__credits__ = []
__email__ = u"rochacbruno@gmail.com"
__license__ = u"MIT License"
__copyright__ = u"Copy... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
VERSION = (0, 1, 4)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Poll App for Opps CMS"
__author__ = u"Bruno Cezar Rocha"
__credits__ = []
__email__ = u"rochacbruno@gmail.com"
__license__ = u"MIT License"
__copyr... |
e2282e8832bcf1f2621dc56488fec5eb9f1b1acc | src/sentry/api/endpoints/group_events.py | src/sentry/api/endpoints/group_events.py | from __future__ import absolute_import
from sentry.api.base import DocSection
from sentry.api.bases import GroupEndpoint
from sentry.api.serializers import serialize
from sentry.api.paginator import DateTimePaginator
from sentry.models import Event, Group
from sentry.utils.apidocs import scenario, attach_scenarios
@... | from __future__ import absolute_import
from sentry.api.base import DocSection
from sentry.api.bases import GroupEndpoint
from sentry.api.serializers import serialize
from sentry.api.paginator import DateTimePaginator
from sentry.models import Event, Group
from sentry.utils.apidocs import scenario, attach_scenarios
@... | Make event search actually useful | Make event search actually useful
| Python | bsd-3-clause | looker/sentry,zenefits/sentry,zenefits/sentry,zenefits/sentry,jean/sentry,mvaled/sentry,ifduyue/sentry,beeftornado/sentry,beeftornado/sentry,JamesMura/sentry,fotinakis/sentry,looker/sentry,alexm92/sentry,beeftornado/sentry,looker/sentry,alexm92/sentry,JamesMura/sentry,JackDanger/sentry,mvaled/sentry,jean/sentry,JackDan... | from __future__ import absolute_import
from sentry.api.base import DocSection
from sentry.api.bases import GroupEndpoint
from sentry.api.serializers import serialize
from sentry.api.paginator import DateTimePaginator
from sentry.models import Event, Group
from sentry.utils.apidocs import scenario, attach_scenarios
@... | from __future__ import absolute_import
from sentry.api.base import DocSection
from sentry.api.bases import GroupEndpoint
from sentry.api.serializers import serialize
from sentry.api.paginator import DateTimePaginator
from sentry.models import Event, Group
from sentry.utils.apidocs import scenario, attach_scenarios
@... | <commit_before>from __future__ import absolute_import
from sentry.api.base import DocSection
from sentry.api.bases import GroupEndpoint
from sentry.api.serializers import serialize
from sentry.api.paginator import DateTimePaginator
from sentry.models import Event, Group
from sentry.utils.apidocs import scenario, attac... | from __future__ import absolute_import
from sentry.api.base import DocSection
from sentry.api.bases import GroupEndpoint
from sentry.api.serializers import serialize
from sentry.api.paginator import DateTimePaginator
from sentry.models import Event, Group
from sentry.utils.apidocs import scenario, attach_scenarios
@... | from __future__ import absolute_import
from sentry.api.base import DocSection
from sentry.api.bases import GroupEndpoint
from sentry.api.serializers import serialize
from sentry.api.paginator import DateTimePaginator
from sentry.models import Event, Group
from sentry.utils.apidocs import scenario, attach_scenarios
@... | <commit_before>from __future__ import absolute_import
from sentry.api.base import DocSection
from sentry.api.bases import GroupEndpoint
from sentry.api.serializers import serialize
from sentry.api.paginator import DateTimePaginator
from sentry.models import Event, Group
from sentry.utils.apidocs import scenario, attac... |
ebfeba2704dc73c136fa2ed217ef4337265b92dd | addie/utilities/__init__.py | addie/utilities/__init__.py | import os
from qtpy.uic import loadUi
def load_ui(ui_filename, baseinstance):
ui_filename = os.path.split(ui_filename)[-1]
# directory containing this file
filename = __file__
if not os.path.isdir(filename):
filename = os.path.split(filename)[0]
# get the location of the designer directory... | import os
from qtpy.uic import loadUi
def load_ui(ui_filename, baseinstance):
cwd = os.getcwd()
ui_filename = os.path.split(ui_filename)[-1]
# get the location of the designer directory
# this function assumes that all ui files are there
filename = os.path.join(cwd, 'designer', ui_filename)
r... | Fix path for designer directory with ui files | Fix path for designer directory with ui files
| Python | mit | neutrons/FastGR,neutrons/FastGR,neutrons/FastGR | import os
from qtpy.uic import loadUi
def load_ui(ui_filename, baseinstance):
ui_filename = os.path.split(ui_filename)[-1]
# directory containing this file
filename = __file__
if not os.path.isdir(filename):
filename = os.path.split(filename)[0]
# get the location of the designer directory... | import os
from qtpy.uic import loadUi
def load_ui(ui_filename, baseinstance):
cwd = os.getcwd()
ui_filename = os.path.split(ui_filename)[-1]
# get the location of the designer directory
# this function assumes that all ui files are there
filename = os.path.join(cwd, 'designer', ui_filename)
r... | <commit_before>import os
from qtpy.uic import loadUi
def load_ui(ui_filename, baseinstance):
ui_filename = os.path.split(ui_filename)[-1]
# directory containing this file
filename = __file__
if not os.path.isdir(filename):
filename = os.path.split(filename)[0]
# get the location of the des... | import os
from qtpy.uic import loadUi
def load_ui(ui_filename, baseinstance):
cwd = os.getcwd()
ui_filename = os.path.split(ui_filename)[-1]
# get the location of the designer directory
# this function assumes that all ui files are there
filename = os.path.join(cwd, 'designer', ui_filename)
r... | import os
from qtpy.uic import loadUi
def load_ui(ui_filename, baseinstance):
ui_filename = os.path.split(ui_filename)[-1]
# directory containing this file
filename = __file__
if not os.path.isdir(filename):
filename = os.path.split(filename)[0]
# get the location of the designer directory... | <commit_before>import os
from qtpy.uic import loadUi
def load_ui(ui_filename, baseinstance):
ui_filename = os.path.split(ui_filename)[-1]
# directory containing this file
filename = __file__
if not os.path.isdir(filename):
filename = os.path.split(filename)[0]
# get the location of the des... |
e2bee28d9b9f5034fe1c92b94e08fd73d2050b30 | PythonClient/index.py | PythonClient/index.py | # -*- coding: utf-8 -*-
from socketIO_client import SocketIO, LoggingNamespace
def on_bbb_response(*args):
print('on_bbb_response', args)
def on_chat_message_response(*args):
print(args)
with SocketIO('http://192.168.0.110', 8080, LoggingNamespace) as socketIO:
socketIO.emit('hello', {'xxx': 'yyy'}, o... | # -*- coding: utf-8 -*-
from socketIO_client import SocketIO, LoggingNamespace
def on_bbb_response(*args):
print('on_bbb_response', args)
def on_chat_message_response(*args):
print(args)
with SocketIO('http://192.168.0.110', 8080, LoggingNamespace) as socketIO:
socketIO.emit('hello', {'xxx': 'yyy'}, o... | Correct chat message event name | Correct chat message event name
| Python | mit | yakovenkodenis/websockets_secure_chat,yakovenkodenis/websockets_secure_chat,yakovenkodenis/websockets_secure_chat,yakovenkodenis/websockets_secure_chat | # -*- coding: utf-8 -*-
from socketIO_client import SocketIO, LoggingNamespace
def on_bbb_response(*args):
print('on_bbb_response', args)
def on_chat_message_response(*args):
print(args)
with SocketIO('http://192.168.0.110', 8080, LoggingNamespace) as socketIO:
socketIO.emit('hello', {'xxx': 'yyy'}, o... | # -*- coding: utf-8 -*-
from socketIO_client import SocketIO, LoggingNamespace
def on_bbb_response(*args):
print('on_bbb_response', args)
def on_chat_message_response(*args):
print(args)
with SocketIO('http://192.168.0.110', 8080, LoggingNamespace) as socketIO:
socketIO.emit('hello', {'xxx': 'yyy'}, o... | <commit_before># -*- coding: utf-8 -*-
from socketIO_client import SocketIO, LoggingNamespace
def on_bbb_response(*args):
print('on_bbb_response', args)
def on_chat_message_response(*args):
print(args)
with SocketIO('http://192.168.0.110', 8080, LoggingNamespace) as socketIO:
socketIO.emit('hello', {'... | # -*- coding: utf-8 -*-
from socketIO_client import SocketIO, LoggingNamespace
def on_bbb_response(*args):
print('on_bbb_response', args)
def on_chat_message_response(*args):
print(args)
with SocketIO('http://192.168.0.110', 8080, LoggingNamespace) as socketIO:
socketIO.emit('hello', {'xxx': 'yyy'}, o... | # -*- coding: utf-8 -*-
from socketIO_client import SocketIO, LoggingNamespace
def on_bbb_response(*args):
print('on_bbb_response', args)
def on_chat_message_response(*args):
print(args)
with SocketIO('http://192.168.0.110', 8080, LoggingNamespace) as socketIO:
socketIO.emit('hello', {'xxx': 'yyy'}, o... | <commit_before># -*- coding: utf-8 -*-
from socketIO_client import SocketIO, LoggingNamespace
def on_bbb_response(*args):
print('on_bbb_response', args)
def on_chat_message_response(*args):
print(args)
with SocketIO('http://192.168.0.110', 8080, LoggingNamespace) as socketIO:
socketIO.emit('hello', {'... |
631665a8aeee54d5094480ddf4140a61dce4a960 | ostinato/blog/apps.py | ostinato/blog/apps.py | from django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
name = 'ostinato.blog'
label = 'ost_blog'
verbose_name = 'Ostinato Blog Engine'
| from django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
name = 'ostinato.blog'
label = 'ostinato_blog'
verbose_name = 'Ostinato Blog Engine'
| Correct app label of ostinato_blog | Correct app label of ostinato_blog
| Python | mit | andrewebdev/django-ostinato,andrewebdev/django-ostinato,andrewebdev/django-ostinato | from django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
name = 'ostinato.blog'
label = 'ost_blog'
verbose_name = 'Ostinato Blog Engine'
Correct app label of ostinato_blog | from django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
name = 'ostinato.blog'
label = 'ostinato_blog'
verbose_name = 'Ostinato Blog Engine'
| <commit_before>from django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
name = 'ostinato.blog'
label = 'ost_blog'
verbose_name = 'Ostinato Blog Engine'
<commit_msg>Correct app label of ostinato_blog<commit_after> | from django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
name = 'ostinato.blog'
label = 'ostinato_blog'
verbose_name = 'Ostinato Blog Engine'
| from django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
name = 'ostinato.blog'
label = 'ost_blog'
verbose_name = 'Ostinato Blog Engine'
Correct app label of ostinato_blogfrom django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
name = 'ostinato.blog'
label = 'ostinat... | <commit_before>from django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
name = 'ostinato.blog'
label = 'ost_blog'
verbose_name = 'Ostinato Blog Engine'
<commit_msg>Correct app label of ostinato_blog<commit_after>from django.apps import AppConfig
class OstinatoBlogConfig(AppConfig):
na... |
7643635278fc1c92289e8fdd456614ce85a2c2f3 | addons/osfstorage/models.py | addons/osfstorage/models.py | import logging
from addons.base.models import BaseNodeSettings, BaseStorageAddon
logger = logging.getLogger(__name__)
class NodeSettings(BaseStorageAddon, BaseNodeSettings):
pass
| import logging
from addons.base.models import BaseNodeSettings, BaseStorageAddon
logger = logging.getLogger(__name__)
class NodeSettings(BaseStorageAddon, BaseNodeSettings):
# Required overrides
complete = True
has_auth = True
| Add required overrides to osfstorage.NodeSettings | Add required overrides to osfstorage.NodeSettings
| Python | apache-2.0 | felliott/osf.io,CenterForOpenScience/osf.io,laurenrevere/osf.io,cslzchen/osf.io,monikagrabowska/osf.io,caneruguz/osf.io,Nesiehr/osf.io,alexschiller/osf.io,aaxelb/osf.io,caseyrollins/osf.io,Johnetordoff/osf.io,caneruguz/osf.io,mluo613/osf.io,chrisseto/osf.io,monikagrabowska/osf.io,cslzchen/osf.io,monikagrabowska/osf.io,... | import logging
from addons.base.models import BaseNodeSettings, BaseStorageAddon
logger = logging.getLogger(__name__)
class NodeSettings(BaseStorageAddon, BaseNodeSettings):
pass
Add required overrides to osfstorage.NodeSettings | import logging
from addons.base.models import BaseNodeSettings, BaseStorageAddon
logger = logging.getLogger(__name__)
class NodeSettings(BaseStorageAddon, BaseNodeSettings):
# Required overrides
complete = True
has_auth = True
| <commit_before>import logging
from addons.base.models import BaseNodeSettings, BaseStorageAddon
logger = logging.getLogger(__name__)
class NodeSettings(BaseStorageAddon, BaseNodeSettings):
pass
<commit_msg>Add required overrides to osfstorage.NodeSettings<commit_after> | import logging
from addons.base.models import BaseNodeSettings, BaseStorageAddon
logger = logging.getLogger(__name__)
class NodeSettings(BaseStorageAddon, BaseNodeSettings):
# Required overrides
complete = True
has_auth = True
| import logging
from addons.base.models import BaseNodeSettings, BaseStorageAddon
logger = logging.getLogger(__name__)
class NodeSettings(BaseStorageAddon, BaseNodeSettings):
pass
Add required overrides to osfstorage.NodeSettingsimport logging
from addons.base.models import BaseNodeSettings, BaseStorageAddon
lo... | <commit_before>import logging
from addons.base.models import BaseNodeSettings, BaseStorageAddon
logger = logging.getLogger(__name__)
class NodeSettings(BaseStorageAddon, BaseNodeSettings):
pass
<commit_msg>Add required overrides to osfstorage.NodeSettings<commit_after>import logging
from addons.base.models impo... |
3875b14e6c94c4a6a7ad47a3eb55cae62096d0e4 | agateremote/table_remote.py | agateremote/table_remote.py | #!/usr/bin/env python
"""
This module contains the Remote extension to :class:`Table <agate.table.Table>`.
"""
import agate
import requests
import six
def from_url(cls, url, callback=agate.Table.from_csv, binary=False, **kwargs):
"""
Download a remote file and pass it to a :class:`.Table` parser.
:param... | #!/usr/bin/env python
"""
This module contains the Remote extension to :class:`Table <agate.table.Table>`.
"""
import agate
import requests
import six
def from_url(cls, url, callback=agate.Table.from_csv, requests_encoding=None, binary=False, **kwargs):
"""
Download a remote file and pass it to a :class:`.Ta... | Add 'requests_encoding' parameter Allows user to override Requests' 'educated guess' about encoding of a response. Useful when loading a remote CSV that has a BOM that has been served with a 'text/csv' content-type, which Requests guesses needs a 'ISO-8859-1' encoding. | Add 'requests_encoding' parameter
Allows user to override Requests' 'educated guess' about encoding of a response. Useful when loading a remote CSV that has a BOM that has been served with a 'text/csv' content-type, which Requests guesses needs a 'ISO-8859-1' encoding.
| Python | mit | wireservice/agate-remote | #!/usr/bin/env python
"""
This module contains the Remote extension to :class:`Table <agate.table.Table>`.
"""
import agate
import requests
import six
def from_url(cls, url, callback=agate.Table.from_csv, binary=False, **kwargs):
"""
Download a remote file and pass it to a :class:`.Table` parser.
:param... | #!/usr/bin/env python
"""
This module contains the Remote extension to :class:`Table <agate.table.Table>`.
"""
import agate
import requests
import six
def from_url(cls, url, callback=agate.Table.from_csv, requests_encoding=None, binary=False, **kwargs):
"""
Download a remote file and pass it to a :class:`.Ta... | <commit_before>#!/usr/bin/env python
"""
This module contains the Remote extension to :class:`Table <agate.table.Table>`.
"""
import agate
import requests
import six
def from_url(cls, url, callback=agate.Table.from_csv, binary=False, **kwargs):
"""
Download a remote file and pass it to a :class:`.Table` pars... | #!/usr/bin/env python
"""
This module contains the Remote extension to :class:`Table <agate.table.Table>`.
"""
import agate
import requests
import six
def from_url(cls, url, callback=agate.Table.from_csv, requests_encoding=None, binary=False, **kwargs):
"""
Download a remote file and pass it to a :class:`.Ta... | #!/usr/bin/env python
"""
This module contains the Remote extension to :class:`Table <agate.table.Table>`.
"""
import agate
import requests
import six
def from_url(cls, url, callback=agate.Table.from_csv, binary=False, **kwargs):
"""
Download a remote file and pass it to a :class:`.Table` parser.
:param... | <commit_before>#!/usr/bin/env python
"""
This module contains the Remote extension to :class:`Table <agate.table.Table>`.
"""
import agate
import requests
import six
def from_url(cls, url, callback=agate.Table.from_csv, binary=False, **kwargs):
"""
Download a remote file and pass it to a :class:`.Table` pars... |
9262dad14237d57a3817a199f9a8b04371de9607 | mis_bot/scraper/database.py | mis_bot/scraper/database.py | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# Database
engine = create_engine('sqlite:///files/chats.db', convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
... | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.pool import StaticPool
# Database
engine = create_engine('sqlite:///files/chats.db', convert_unicode=True,
connect_args= {'check_... | Allow sharing db connection across threads | Allow sharing db connection across threads
| Python | mit | ArionMiles/MIS-Bot | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# Database
engine = create_engine('sqlite:///files/chats.db', convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
... | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.pool import StaticPool
# Database
engine = create_engine('sqlite:///files/chats.db', convert_unicode=True,
connect_args= {'check_... | <commit_before>from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# Database
engine = create_engine('sqlite:///files/chats.db', convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
... | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.pool import StaticPool
# Database
engine = create_engine('sqlite:///files/chats.db', convert_unicode=True,
connect_args= {'check_... | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# Database
engine = create_engine('sqlite:///files/chats.db', convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
... | <commit_before>from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
# Database
engine = create_engine('sqlite:///files/chats.db', convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
... |
a04116d32931c5e85de417b5da048c91d495261b | pyeventstore/client.py | pyeventstore/client.py | import asyncio
import uuid
import json
import requests
from requests.exceptions import HTTPError
from pyeventstore.events import (get_all_events,
start_subscription,
publish_events)
from pyeventstore.stream_page import StreamPage
class Client:
d... | import asyncio
import uuid
import json
from pyeventstore.events import (get_all_events,
start_subscription,
publish_events)
class Client:
def __init__(self, host, secure=False, port=2113):
proto = "https" if secure else "http"
self... | Remove projections methods for now | Remove projections methods for now
| Python | mit | cjlarose/pyeventstore | import asyncio
import uuid
import json
import requests
from requests.exceptions import HTTPError
from pyeventstore.events import (get_all_events,
start_subscription,
publish_events)
from pyeventstore.stream_page import StreamPage
class Client:
d... | import asyncio
import uuid
import json
from pyeventstore.events import (get_all_events,
start_subscription,
publish_events)
class Client:
def __init__(self, host, secure=False, port=2113):
proto = "https" if secure else "http"
self... | <commit_before>import asyncio
import uuid
import json
import requests
from requests.exceptions import HTTPError
from pyeventstore.events import (get_all_events,
start_subscription,
publish_events)
from pyeventstore.stream_page import StreamPage
class... | import asyncio
import uuid
import json
from pyeventstore.events import (get_all_events,
start_subscription,
publish_events)
class Client:
def __init__(self, host, secure=False, port=2113):
proto = "https" if secure else "http"
self... | import asyncio
import uuid
import json
import requests
from requests.exceptions import HTTPError
from pyeventstore.events import (get_all_events,
start_subscription,
publish_events)
from pyeventstore.stream_page import StreamPage
class Client:
d... | <commit_before>import asyncio
import uuid
import json
import requests
from requests.exceptions import HTTPError
from pyeventstore.events import (get_all_events,
start_subscription,
publish_events)
from pyeventstore.stream_page import StreamPage
class... |
5a3ffb93131c83f81eb123c2969714dcc80513ca | django/crashreport/processor/signals.py | django/crashreport/processor/signals.py | # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from .processor import MinidumpPro... | # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from .processor import MinidumpPro... | Revert "make the uwsgi spooler code also work with the fallback" | Revert "make the uwsgi spooler code also work with the fallback"
This reverts commit 84ab847b444fbd41b9cc17e5c79a609efdcdf6cf.
| Python | mpl-2.0 | mmohrhard/crash,mmohrhard/crash,Liongold/crash,Liongold/crash,mmohrhard/crash,Liongold/crash | # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from .processor import MinidumpPro... | # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from .processor import MinidumpPro... | <commit_before># -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from .processor imp... | # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from .processor import MinidumpPro... | # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from .processor import MinidumpPro... | <commit_before># -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from .processor imp... |
98dafbc7578209b9768e6ca6ccfa7854f70deb16 | runTwircBot.py | runTwircBot.py | from TwircBot import TwircBot as tw
bot = tw("config/sampleConfig.sample")
bot.print_config()
bot.connect()
| from TwircBot import TwircBot as tw
import sys
bot = tw(sys.argv[1])
bot.print_config()
bot.connect()
| Modify runTwirc.py to accept system arguments | Modify runTwirc.py to accept system arguments
| Python | mit | johnmarcampbell/twircBot | from TwircBot import TwircBot as tw
bot = tw("config/sampleConfig.sample")
bot.print_config()
bot.connect()
Modify runTwirc.py to accept system arguments | from TwircBot import TwircBot as tw
import sys
bot = tw(sys.argv[1])
bot.print_config()
bot.connect()
| <commit_before>from TwircBot import TwircBot as tw
bot = tw("config/sampleConfig.sample")
bot.print_config()
bot.connect()
<commit_msg>Modify runTwirc.py to accept system arguments<commit_after> | from TwircBot import TwircBot as tw
import sys
bot = tw(sys.argv[1])
bot.print_config()
bot.connect()
| from TwircBot import TwircBot as tw
bot = tw("config/sampleConfig.sample")
bot.print_config()
bot.connect()
Modify runTwirc.py to accept system argumentsfrom TwircBot import TwircBot as tw
import sys
bot = tw(sys.argv[1])
bot.print_config()
bot.connect()
| <commit_before>from TwircBot import TwircBot as tw
bot = tw("config/sampleConfig.sample")
bot.print_config()
bot.connect()
<commit_msg>Modify runTwirc.py to accept system arguments<commit_after>from TwircBot import TwircBot as tw
import sys
bot = tw(sys.argv[1])
bot.print_config()
bot.connect()
|
f868b126b3bd81ec900f378ff1fa8bd29ab8ea4c | transformations/Transformations.py | transformations/Transformations.py | from transformations.BackTranslation import BackTranslation
from transformations.ButterFingersPerturbation import ButterFingersPerturbation
from transformations.ChangeNamedEntities import ChangeNamedEntities
from transformations.SentenceTransformation import SentenceTransformation
from transformations.WithoutPunctuatio... |
from transformations.BackTranslation import BackTranslation
from transformations.ButterFingersPerturbation import ButterFingersPerturbation
from transformations.ChangeNamedEntities import ChangeNamedEntities
from transformations.SentenceTransformation import SentenceTransformation
from transformations.WithoutPunctuati... | Add interface for source+label pertubation | Add interface for source+label pertubation
| Python | mit | GEM-benchmark/NL-Augmenter | from transformations.BackTranslation import BackTranslation
from transformations.ButterFingersPerturbation import ButterFingersPerturbation
from transformations.ChangeNamedEntities import ChangeNamedEntities
from transformations.SentenceTransformation import SentenceTransformation
from transformations.WithoutPunctuatio... |
from transformations.BackTranslation import BackTranslation
from transformations.ButterFingersPerturbation import ButterFingersPerturbation
from transformations.ChangeNamedEntities import ChangeNamedEntities
from transformations.SentenceTransformation import SentenceTransformation
from transformations.WithoutPunctuati... | <commit_before>from transformations.BackTranslation import BackTranslation
from transformations.ButterFingersPerturbation import ButterFingersPerturbation
from transformations.ChangeNamedEntities import ChangeNamedEntities
from transformations.SentenceTransformation import SentenceTransformation
from transformations.Wi... |
from transformations.BackTranslation import BackTranslation
from transformations.ButterFingersPerturbation import ButterFingersPerturbation
from transformations.ChangeNamedEntities import ChangeNamedEntities
from transformations.SentenceTransformation import SentenceTransformation
from transformations.WithoutPunctuati... | from transformations.BackTranslation import BackTranslation
from transformations.ButterFingersPerturbation import ButterFingersPerturbation
from transformations.ChangeNamedEntities import ChangeNamedEntities
from transformations.SentenceTransformation import SentenceTransformation
from transformations.WithoutPunctuatio... | <commit_before>from transformations.BackTranslation import BackTranslation
from transformations.ButterFingersPerturbation import ButterFingersPerturbation
from transformations.ChangeNamedEntities import ChangeNamedEntities
from transformations.SentenceTransformation import SentenceTransformation
from transformations.Wi... |
44226dabb65cb06522c128539660e407e53ca602 | parseHTML.py | parseHTML.py | from bs4 import BeautifulSoup
#uses beautiful soup to parse html file
#finds the correct span tag
#Gets the percentage of ink left in the printer
soup = BeautifulSoup(open("test/test.html"))
res = soup.find('span',{'class':'hpConsumableBlockHeaderText'}).text
num = res[24] + res[25]
| from bs4 import BeautifulSoup
#uses beautiful soup to parse html file
#finds the correct span tag
#Gets the percentage of ink left in the printer
soup = BeautifulSoup(open("test/test.html"))
res = soup.find('span',{'class':'hpConsumableBlockHeaderText'}).text
num = res[24] + res[25]
file = open('test/data.csv', 'w+'... | Write information from test.html to csv file | Write information from test.html to csv file
| Python | mit | tfahl/printfo,tfahl/printfo | from bs4 import BeautifulSoup
#uses beautiful soup to parse html file
#finds the correct span tag
#Gets the percentage of ink left in the printer
soup = BeautifulSoup(open("test/test.html"))
res = soup.find('span',{'class':'hpConsumableBlockHeaderText'}).text
num = res[24] + res[25]
Write information from test.html... | from bs4 import BeautifulSoup
#uses beautiful soup to parse html file
#finds the correct span tag
#Gets the percentage of ink left in the printer
soup = BeautifulSoup(open("test/test.html"))
res = soup.find('span',{'class':'hpConsumableBlockHeaderText'}).text
num = res[24] + res[25]
file = open('test/data.csv', 'w+'... | <commit_before>from bs4 import BeautifulSoup
#uses beautiful soup to parse html file
#finds the correct span tag
#Gets the percentage of ink left in the printer
soup = BeautifulSoup(open("test/test.html"))
res = soup.find('span',{'class':'hpConsumableBlockHeaderText'}).text
num = res[24] + res[25]
<commit_msg>Write... | from bs4 import BeautifulSoup
#uses beautiful soup to parse html file
#finds the correct span tag
#Gets the percentage of ink left in the printer
soup = BeautifulSoup(open("test/test.html"))
res = soup.find('span',{'class':'hpConsumableBlockHeaderText'}).text
num = res[24] + res[25]
file = open('test/data.csv', 'w+'... | from bs4 import BeautifulSoup
#uses beautiful soup to parse html file
#finds the correct span tag
#Gets the percentage of ink left in the printer
soup = BeautifulSoup(open("test/test.html"))
res = soup.find('span',{'class':'hpConsumableBlockHeaderText'}).text
num = res[24] + res[25]
Write information from test.html... | <commit_before>from bs4 import BeautifulSoup
#uses beautiful soup to parse html file
#finds the correct span tag
#Gets the percentage of ink left in the printer
soup = BeautifulSoup(open("test/test.html"))
res = soup.find('span',{'class':'hpConsumableBlockHeaderText'}).text
num = res[24] + res[25]
<commit_msg>Write... |
f820ef6cef8037942d18dcc912fb6de093ecc8de | txircd/modules/rfc/cmd_userhost.py | txircd/modules/rfc/cmd_userhost.py | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class UserhostCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "UserhostCommand"
core = Tru... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class UserhostCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "UserhostCommand"
core = Tru... | Check away status of the target, not user, of USERHOST | Check away status of the target, not user, of USERHOST
| Python | bsd-3-clause | ElementalAlchemist/txircd,Heufneutje/txircd | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class UserhostCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "UserhostCommand"
core = Tru... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class UserhostCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "UserhostCommand"
core = Tru... | <commit_before>from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class UserhostCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "UserhostComma... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class UserhostCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "UserhostCommand"
core = Tru... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class UserhostCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "UserhostCommand"
core = Tru... | <commit_before>from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class UserhostCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "UserhostComma... |
36fe90ca170525cabc4f2a496a12a28c86b7e82d | uchicagohvz/production_settings.py | uchicagohvz/production_settings.py | from local_settings import *
ALLOWED_HOSTS = ['uchicagohvz.org']
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'uchicagohvz', # Or path to database fi... | from local_settings import *
settings.DEBUG = False
ALLOWED_HOSTS = ['uchicagohvz.org']
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'uchicagohvz', ... | Set DEBUG = False in production | Set DEBUG = False in production
| Python | mit | kz26/uchicago-hvz,kz26/uchicago-hvz,kz26/uchicago-hvz | from local_settings import *
ALLOWED_HOSTS = ['uchicagohvz.org']
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'uchicagohvz', # Or path to database fi... | from local_settings import *
settings.DEBUG = False
ALLOWED_HOSTS = ['uchicagohvz.org']
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'uchicagohvz', ... | <commit_before>from local_settings import *
ALLOWED_HOSTS = ['uchicagohvz.org']
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'uchicagohvz', # Or path... | from local_settings import *
settings.DEBUG = False
ALLOWED_HOSTS = ['uchicagohvz.org']
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'uchicagohvz', ... | from local_settings import *
ALLOWED_HOSTS = ['uchicagohvz.org']
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'uchicagohvz', # Or path to database fi... | <commit_before>from local_settings import *
ALLOWED_HOSTS = ['uchicagohvz.org']
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'uchicagohvz', # Or path... |
2b603ebe92e308aa78928772e8681f3cc46775cb | numba/cloudpickle/compat.py | numba/cloudpickle/compat.py | import sys
if sys.version_info < (3, 8):
try:
import pickle5 as pickle # noqa: F401
from pickle5 import Pickler # noqa: F401
except ImportError:
import pickle # noqa: F401
from pickle import _Pickler as Pickler # noqa: F401
else:
import pickle # noqa: F401
from _pi... | import sys
if sys.version_info < (3, 8):
# NOTE: pickle5 is disabled due to problems in testing.
# try:
# import pickle5 as pickle # noqa: F401
# from pickle5 import Pickler # noqa: F401
# except ImportError:
import pickle # noqa: F401
from pickle import _Pickler as Pickler # n... | Disable pickle5 use in cloudpickle | Disable pickle5 use in cloudpickle
| Python | bsd-2-clause | numba/numba,IntelLabs/numba,stuartarchibald/numba,stonebig/numba,seibert/numba,cpcloud/numba,stonebig/numba,cpcloud/numba,numba/numba,IntelLabs/numba,stuartarchibald/numba,seibert/numba,cpcloud/numba,numba/numba,IntelLabs/numba,cpcloud/numba,seibert/numba,cpcloud/numba,stonebig/numba,stonebig/numba,stuartarchibald/numb... | import sys
if sys.version_info < (3, 8):
try:
import pickle5 as pickle # noqa: F401
from pickle5 import Pickler # noqa: F401
except ImportError:
import pickle # noqa: F401
from pickle import _Pickler as Pickler # noqa: F401
else:
import pickle # noqa: F401
from _pi... | import sys
if sys.version_info < (3, 8):
# NOTE: pickle5 is disabled due to problems in testing.
# try:
# import pickle5 as pickle # noqa: F401
# from pickle5 import Pickler # noqa: F401
# except ImportError:
import pickle # noqa: F401
from pickle import _Pickler as Pickler # n... | <commit_before>import sys
if sys.version_info < (3, 8):
try:
import pickle5 as pickle # noqa: F401
from pickle5 import Pickler # noqa: F401
except ImportError:
import pickle # noqa: F401
from pickle import _Pickler as Pickler # noqa: F401
else:
import pickle # noqa: F4... | import sys
if sys.version_info < (3, 8):
# NOTE: pickle5 is disabled due to problems in testing.
# try:
# import pickle5 as pickle # noqa: F401
# from pickle5 import Pickler # noqa: F401
# except ImportError:
import pickle # noqa: F401
from pickle import _Pickler as Pickler # n... | import sys
if sys.version_info < (3, 8):
try:
import pickle5 as pickle # noqa: F401
from pickle5 import Pickler # noqa: F401
except ImportError:
import pickle # noqa: F401
from pickle import _Pickler as Pickler # noqa: F401
else:
import pickle # noqa: F401
from _pi... | <commit_before>import sys
if sys.version_info < (3, 8):
try:
import pickle5 as pickle # noqa: F401
from pickle5 import Pickler # noqa: F401
except ImportError:
import pickle # noqa: F401
from pickle import _Pickler as Pickler # noqa: F401
else:
import pickle # noqa: F4... |
7e166ba983bd1470f6eac6776107a64539c38581 | animal_spharm/test/test_animal_spharm.py | animal_spharm/test/test_animal_spharm.py | import numpy as np
import pytest
import xray
from aospy_user import SpharmInterface
@pytest.fixture
def compute_vrtdiv(u, v):
sphint = SpharmInterface(u, v)
sphint.make_vectorwind()
sphint.make_spharmt()
vort, divg = sphint.vectorwind.vrtdiv()
return sphint.to_xray(vort), sphint.to_xray(divg)
... | Copy over tests from aospy-obj-lib | Copy over tests from aospy-obj-lib
| Python | apache-2.0 | spencerahill/animal-spharm | Copy over tests from aospy-obj-lib | import numpy as np
import pytest
import xray
from aospy_user import SpharmInterface
@pytest.fixture
def compute_vrtdiv(u, v):
sphint = SpharmInterface(u, v)
sphint.make_vectorwind()
sphint.make_spharmt()
vort, divg = sphint.vectorwind.vrtdiv()
return sphint.to_xray(vort), sphint.to_xray(divg)
... | <commit_before><commit_msg>Copy over tests from aospy-obj-lib<commit_after> | import numpy as np
import pytest
import xray
from aospy_user import SpharmInterface
@pytest.fixture
def compute_vrtdiv(u, v):
sphint = SpharmInterface(u, v)
sphint.make_vectorwind()
sphint.make_spharmt()
vort, divg = sphint.vectorwind.vrtdiv()
return sphint.to_xray(vort), sphint.to_xray(divg)
... | Copy over tests from aospy-obj-libimport numpy as np
import pytest
import xray
from aospy_user import SpharmInterface
@pytest.fixture
def compute_vrtdiv(u, v):
sphint = SpharmInterface(u, v)
sphint.make_vectorwind()
sphint.make_spharmt()
vort, divg = sphint.vectorwind.vrtdiv()
return sphint.to_x... | <commit_before><commit_msg>Copy over tests from aospy-obj-lib<commit_after>import numpy as np
import pytest
import xray
from aospy_user import SpharmInterface
@pytest.fixture
def compute_vrtdiv(u, v):
sphint = SpharmInterface(u, v)
sphint.make_vectorwind()
sphint.make_spharmt()
vort, divg = sphint.v... | |
bbd3b1939712d9784fe61884d9b06faa95c36006 | tests/test_project/test_app/models.py | tests/test_project/test_app/models.py | from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length=63, unique=True, verbose_name='Name')
image = models.ImageField(verbose_name='Image')
| from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length=63, unique=True, verbose_name='Name')
image = models.ImageField(verbose_name='Image', upload_to='uploads/')
| Test compatibility with older Django versions. | Test compatibility with older Django versions.
| Python | mit | dessibelle/sorl-thumbnail-serializer-field | from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length=63, unique=True, verbose_name='Name')
image = models.ImageField(verbose_name='Image')
Test compatibility with older Django versions. | from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length=63, unique=True, verbose_name='Name')
image = models.ImageField(verbose_name='Image', upload_to='uploads/')
| <commit_before>from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length=63, unique=True, verbose_name='Name')
image = models.ImageField(verbose_name='Image')
<commit_msg>Test compatibility with older Django versions.<commit_after> | from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length=63, unique=True, verbose_name='Name')
image = models.ImageField(verbose_name='Image', upload_to='uploads/')
| from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length=63, unique=True, verbose_name='Name')
image = models.ImageField(verbose_name='Image')
Test compatibility with older Django versions.from django.db import models
class TestModel(models.Model):
name = models.C... | <commit_before>from django.db import models
class TestModel(models.Model):
name = models.CharField(max_length=63, unique=True, verbose_name='Name')
image = models.ImageField(verbose_name='Image')
<commit_msg>Test compatibility with older Django versions.<commit_after>from django.db import models
class Test... |
59ce3ca9c1572dcf71aa5de5cdb354def594a36c | downloads/urls.py | downloads/urls.py | from django.conf.urls import patterns, url
from functools import partial
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(r'solutions/(?P<path>.*)$', partial(download_protected_file,
path_prefix='solutio... | from django.conf.urls import patterns, url
from functools import partial
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(r'solutions/(?P<path>.*)$', download_protected_file,
dict(path_prefix='solutions/', model_class=UserSolution),
... | Remove unnecessary usage of functools.partial | downloads: Remove unnecessary usage of functools.partial
| Python | mit | matus-stehlik/roots,rtrembecky/roots,matus-stehlik/roots,tbabej/roots,rtrembecky/roots,tbabej/roots,tbabej/roots,rtrembecky/roots,matus-stehlik/roots | from django.conf.urls import patterns, url
from functools import partial
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(r'solutions/(?P<path>.*)$', partial(download_protected_file,
path_prefix='solutio... | from django.conf.urls import patterns, url
from functools import partial
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(r'solutions/(?P<path>.*)$', download_protected_file,
dict(path_prefix='solutions/', model_class=UserSolution),
... | <commit_before>from django.conf.urls import patterns, url
from functools import partial
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(r'solutions/(?P<path>.*)$', partial(download_protected_file,
path_... | from django.conf.urls import patterns, url
from functools import partial
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(r'solutions/(?P<path>.*)$', download_protected_file,
dict(path_prefix='solutions/', model_class=UserSolution),
... | from django.conf.urls import patterns, url
from functools import partial
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(r'solutions/(?P<path>.*)$', partial(download_protected_file,
path_prefix='solutio... | <commit_before>from django.conf.urls import patterns, url
from functools import partial
from problems.models import UserSolution
from .views import download_protected_file
urlpatterns = patterns('',
url(r'solutions/(?P<path>.*)$', partial(download_protected_file,
path_... |
8cd2c9a4b9cf69a97e758d1e6416d2efbbf7028a | misc/python/botan/__init__.py | misc/python/botan/__init__.py | from _botan import *
init = LibraryInitializer()
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return make_filter(name, key, iv, dir)
elif key != None and dir != None:
return make_filter(name, key, dir)
elif key != None:
return ... | from _botan import *
init = LibraryInitializer()
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return make_filter(name, key, iv, dir)
elif key != None and dir != None:
return make_filter(name, key, dir)
elif key != None:
return ... | Remove a semicolon that didn't need to be there | Remove a semicolon that didn't need to be there
| Python | bsd-2-clause | randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,webmaster128/botan,webmaster128/botan,webmaster1... | from _botan import *
init = LibraryInitializer()
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return make_filter(name, key, iv, dir)
elif key != None and dir != None:
return make_filter(name, key, dir)
elif key != None:
return ... | from _botan import *
init = LibraryInitializer()
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return make_filter(name, key, iv, dir)
elif key != None and dir != None:
return make_filter(name, key, dir)
elif key != None:
return ... | <commit_before>from _botan import *
init = LibraryInitializer()
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return make_filter(name, key, iv, dir)
elif key != None and dir != None:
return make_filter(name, key, dir)
elif key != None:
... | from _botan import *
init = LibraryInitializer()
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return make_filter(name, key, iv, dir)
elif key != None and dir != None:
return make_filter(name, key, dir)
elif key != None:
return ... | from _botan import *
init = LibraryInitializer()
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return make_filter(name, key, iv, dir)
elif key != None and dir != None:
return make_filter(name, key, dir)
elif key != None:
return ... | <commit_before>from _botan import *
init = LibraryInitializer()
def Filter(name, key = None, iv = None, dir = None):
if key != None and iv != None and dir != None:
return make_filter(name, key, iv, dir)
elif key != None and dir != None:
return make_filter(name, key, dir)
elif key != None:
... |
6cb9008ee2ed49d9630735378bd84727aef3caef | dipy/core/tests/test_qball.py | dipy/core/tests/test_qball.py | """ Testing qball
"""
import numpy as np
import dipy.core.qball as qball
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
from numpy.testing import assert_array_equal, assert_array_almost_equal
from dipy.testing import parametric
@parametric
def test_real_sph_harm():
rea... | """ Testing qball
"""
import numpy as np
import dipy.core.qball as qball
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
from numpy.testing import assert_array_equal, assert_array_almost_equal
from dipy.testing import parametric
@parametric
def test_sph_harm_ind_list():
... | TEST - some real_sph_harm tests | TEST - some real_sph_harm tests
| Python | bsd-3-clause | villalonreina/dipy,samuelstjean/dipy,jyeatman/dipy,sinkpoint/dipy,mdesco/dipy,Messaoud-Boudjada/dipy,maurozucchelli/dipy,villalonreina/dipy,nilgoyyou/dipy,beni55/dipy,demianw/dipy,FrancoisRheaultUS/dipy,rfdougherty/dipy,JohnGriffiths/dipy,mdesco/dipy,Messaoud-Boudjada/dipy,JohnGriffiths/dipy,samuelstjean/dipy,samuelstj... | """ Testing qball
"""
import numpy as np
import dipy.core.qball as qball
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
from numpy.testing import assert_array_equal, assert_array_almost_equal
from dipy.testing import parametric
@parametric
def test_real_sph_harm():
rea... | """ Testing qball
"""
import numpy as np
import dipy.core.qball as qball
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
from numpy.testing import assert_array_equal, assert_array_almost_equal
from dipy.testing import parametric
@parametric
def test_sph_harm_ind_list():
... | <commit_before>""" Testing qball
"""
import numpy as np
import dipy.core.qball as qball
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
from numpy.testing import assert_array_equal, assert_array_almost_equal
from dipy.testing import parametric
@parametric
def test_real_sph_... | """ Testing qball
"""
import numpy as np
import dipy.core.qball as qball
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
from numpy.testing import assert_array_equal, assert_array_almost_equal
from dipy.testing import parametric
@parametric
def test_sph_harm_ind_list():
... | """ Testing qball
"""
import numpy as np
import dipy.core.qball as qball
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
from numpy.testing import assert_array_equal, assert_array_almost_equal
from dipy.testing import parametric
@parametric
def test_real_sph_harm():
rea... | <commit_before>""" Testing qball
"""
import numpy as np
import dipy.core.qball as qball
from nose.tools import assert_true, assert_false, \
assert_equal, assert_raises
from numpy.testing import assert_array_equal, assert_array_almost_equal
from dipy.testing import parametric
@parametric
def test_real_sph_... |
46ab8d71824f80ba5d02349a9f89328e5c47f434 | app/views.py | app/views.py | from app import app, \
cors_header
from flask import request, \
make_response, \
send_from_directory
import json
import os
@app.route('/', methods=['GET'])
@cors_header
def index():
if 'X-Forwarded-For' in request.headers:
ipAddress = request.headers['X-... | from app import app, \
cors_header
from flask import request, \
make_response, \
send_from_directory
import json
import re
import os
@app.route('/', methods=['GET'])
@cors_header
def index():
if 'X-Forwarded-For' in request.headers:
ipAddress = request.h... | Handle instance where we get multiple IP addresess in the response | Handle instance where we get multiple IP addresess in the response
| Python | mit | taeram/gipsy | from app import app, \
cors_header
from flask import request, \
make_response, \
send_from_directory
import json
import os
@app.route('/', methods=['GET'])
@cors_header
def index():
if 'X-Forwarded-For' in request.headers:
ipAddress = request.headers['X-... | from app import app, \
cors_header
from flask import request, \
make_response, \
send_from_directory
import json
import re
import os
@app.route('/', methods=['GET'])
@cors_header
def index():
if 'X-Forwarded-For' in request.headers:
ipAddress = request.h... | <commit_before>from app import app, \
cors_header
from flask import request, \
make_response, \
send_from_directory
import json
import os
@app.route('/', methods=['GET'])
@cors_header
def index():
if 'X-Forwarded-For' in request.headers:
ipAddress = requ... | from app import app, \
cors_header
from flask import request, \
make_response, \
send_from_directory
import json
import re
import os
@app.route('/', methods=['GET'])
@cors_header
def index():
if 'X-Forwarded-For' in request.headers:
ipAddress = request.h... | from app import app, \
cors_header
from flask import request, \
make_response, \
send_from_directory
import json
import os
@app.route('/', methods=['GET'])
@cors_header
def index():
if 'X-Forwarded-For' in request.headers:
ipAddress = request.headers['X-... | <commit_before>from app import app, \
cors_header
from flask import request, \
make_response, \
send_from_directory
import json
import os
@app.route('/', methods=['GET'])
@cors_header
def index():
if 'X-Forwarded-For' in request.headers:
ipAddress = requ... |
3439eb09916212cd71650aecc49ae1c22f650274 | apps/package/templatetags/package_tags.py | apps/package/templatetags/package_tags.py | from datetime import timedelta
from datetime import datetime
from django import template
from github2.client import Github
from package.models import Package, Commit
register = template.Library()
github = Github()
@register.filter
def commits_over_52(package):
current = datetime.now()
weeks = []
comm... | from datetime import datetime, timedelta
from django import template
from package.models import Commit
register = template.Library()
@register.filter
def commits_over_52(package):
current = datetime.now()
weeks = []
commits = Commit.objects.filter(package=package).values_list('commit_date', flat=True)
... | Clean up some imports in the package app's template_tags.py file. | Clean up some imports in the package app's template_tags.py file.
| Python | mit | nanuxbe/djangopackages,QLGu/djangopackages,cartwheelweb/packaginator,nanuxbe/djangopackages,nanuxbe/djangopackages,miketheman/opencomparison,QLGu/djangopackages,benracine/opencomparison,cartwheelweb/packaginator,audreyr/opencomparison,pydanny/djangopackages,miketheman/opencomparison,QLGu/djangopackages,benracine/openco... | from datetime import timedelta
from datetime import datetime
from django import template
from github2.client import Github
from package.models import Package, Commit
register = template.Library()
github = Github()
@register.filter
def commits_over_52(package):
current = datetime.now()
weeks = []
comm... | from datetime import datetime, timedelta
from django import template
from package.models import Commit
register = template.Library()
@register.filter
def commits_over_52(package):
current = datetime.now()
weeks = []
commits = Commit.objects.filter(package=package).values_list('commit_date', flat=True)
... | <commit_before>from datetime import timedelta
from datetime import datetime
from django import template
from github2.client import Github
from package.models import Package, Commit
register = template.Library()
github = Github()
@register.filter
def commits_over_52(package):
current = datetime.now()
week... | from datetime import datetime, timedelta
from django import template
from package.models import Commit
register = template.Library()
@register.filter
def commits_over_52(package):
current = datetime.now()
weeks = []
commits = Commit.objects.filter(package=package).values_list('commit_date', flat=True)
... | from datetime import timedelta
from datetime import datetime
from django import template
from github2.client import Github
from package.models import Package, Commit
register = template.Library()
github = Github()
@register.filter
def commits_over_52(package):
current = datetime.now()
weeks = []
comm... | <commit_before>from datetime import timedelta
from datetime import datetime
from django import template
from github2.client import Github
from package.models import Package, Commit
register = template.Library()
github = Github()
@register.filter
def commits_over_52(package):
current = datetime.now()
week... |
b034eeda25fcf55e7da018f3c91a23a5e252ae2f | bm/app/models.py | bm/app/models.py | from django.db import models
from django.conf import settings
class Category(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
name = models.CharField(max_length=21)
row_number = models.IntegerField(default=0)
column_number = models.IntegerField(default=0)
progress_bar_color = models.CharField(max... | from django.db import models
from django.conf import settings
class Category(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
name = models.CharField(max_length=21)
row_number = models.IntegerField(default=0)
column_number = models.IntegerField(default=0)
progress_bar_color = models.CharField(max... | Change str() of Category for easier form handling | Change str() of Category for easier form handling
| Python | mit | GSC-RNSIT/bookmark-manager,rohithpr/bookmark-manager,rohithpr/bookmark-manager,GSC-RNSIT/bookmark-manager | from django.db import models
from django.conf import settings
class Category(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
name = models.CharField(max_length=21)
row_number = models.IntegerField(default=0)
column_number = models.IntegerField(default=0)
progress_bar_color = models.CharField(max... | from django.db import models
from django.conf import settings
class Category(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
name = models.CharField(max_length=21)
row_number = models.IntegerField(default=0)
column_number = models.IntegerField(default=0)
progress_bar_color = models.CharField(max... | <commit_before>from django.db import models
from django.conf import settings
class Category(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
name = models.CharField(max_length=21)
row_number = models.IntegerField(default=0)
column_number = models.IntegerField(default=0)
progress_bar_color = model... | from django.db import models
from django.conf import settings
class Category(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
name = models.CharField(max_length=21)
row_number = models.IntegerField(default=0)
column_number = models.IntegerField(default=0)
progress_bar_color = models.CharField(max... | from django.db import models
from django.conf import settings
class Category(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
name = models.CharField(max_length=21)
row_number = models.IntegerField(default=0)
column_number = models.IntegerField(default=0)
progress_bar_color = models.CharField(max... | <commit_before>from django.db import models
from django.conf import settings
class Category(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
name = models.CharField(max_length=21)
row_number = models.IntegerField(default=0)
column_number = models.IntegerField(default=0)
progress_bar_color = model... |
f0b705f1fde5ac33a58ccd56ed67bfcbecf0daf3 | djstripe/management/commands/djstripe_sync_customers.py | djstripe/management/commands/djstripe_sync_customers.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from ...settings import get_user_model
from ...sync import sync_customer
User = get_user_model()
class Command(BaseCommand):
help = "Sync customer data with stripe"
def handle(self, *args, ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from ...settings import get_user_model
from ...sync import sync_customer
User = get_user_model()
class Command(BaseCommand):
help = "Sync customer data with stripe"
def handle(self, *args, ... | Use user.get_username() instead of user.username | Use user.get_username() instead of user.username
To support custom User models
| Python | bsd-3-clause | andrewyoung1991/dj-stripe,areski/dj-stripe,benmurden/dj-stripe,koobs/dj-stripe,areski/dj-stripe,tkwon/dj-stripe,kavdev/dj-stripe,aliev/dj-stripe,ctrengove/dj-stripe,cjrh/dj-stripe,StErMi/dj-stripe,mthornhill/dj-stripe,ctrengove/dj-stripe,cjrh/dj-stripe,iddqd1/dj-stripe,dj-stripe/dj-stripe,maxmalynowsky/django-stripe-re... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from ...settings import get_user_model
from ...sync import sync_customer
User = get_user_model()
class Command(BaseCommand):
help = "Sync customer data with stripe"
def handle(self, *args, ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from ...settings import get_user_model
from ...sync import sync_customer
User = get_user_model()
class Command(BaseCommand):
help = "Sync customer data with stripe"
def handle(self, *args, ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from ...settings import get_user_model
from ...sync import sync_customer
User = get_user_model()
class Command(BaseCommand):
help = "Sync customer data with stripe"
def handl... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from ...settings import get_user_model
from ...sync import sync_customer
User = get_user_model()
class Command(BaseCommand):
help = "Sync customer data with stripe"
def handle(self, *args, ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from ...settings import get_user_model
from ...sync import sync_customer
User = get_user_model()
class Command(BaseCommand):
help = "Sync customer data with stripe"
def handle(self, *args, ... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from ...settings import get_user_model
from ...sync import sync_customer
User = get_user_model()
class Command(BaseCommand):
help = "Sync customer data with stripe"
def handl... |
bf17a86bccf25ead90d11dd15a900cb784d9cb9f | raco/myrial/myrial_test.py | raco/myrial/myrial_test.py |
import collections
import math
import unittest
import raco.fakedb
import raco.myrial.interpreter as interpreter
import raco.myrial.parser as parser
from raco.myrialang import compile_to_json
class MyrialTestCase(unittest.TestCase):
def setUp(self):
self.db = raco.fakedb.FakeDatabase()
self.parse... |
import collections
import math
import unittest
import raco.fakedb
import raco.myrial.interpreter as interpreter
import raco.myrial.parser as parser
class MyrialTestCase(unittest.TestCase):
def setUp(self):
self.db = raco.fakedb.FakeDatabase()
self.parser = parser.Parser()
self.processor ... | Revert "Add compile_to_json invocation in Myrial test fixture" | Revert "Add compile_to_json invocation in Myrial test fixture"
This reverts commit ceb848021d5323b5bad8518ac7ed850a51fc89ca.
| Python | bsd-3-clause | uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco,uwescience/raco |
import collections
import math
import unittest
import raco.fakedb
import raco.myrial.interpreter as interpreter
import raco.myrial.parser as parser
from raco.myrialang import compile_to_json
class MyrialTestCase(unittest.TestCase):
def setUp(self):
self.db = raco.fakedb.FakeDatabase()
self.parse... |
import collections
import math
import unittest
import raco.fakedb
import raco.myrial.interpreter as interpreter
import raco.myrial.parser as parser
class MyrialTestCase(unittest.TestCase):
def setUp(self):
self.db = raco.fakedb.FakeDatabase()
self.parser = parser.Parser()
self.processor ... | <commit_before>
import collections
import math
import unittest
import raco.fakedb
import raco.myrial.interpreter as interpreter
import raco.myrial.parser as parser
from raco.myrialang import compile_to_json
class MyrialTestCase(unittest.TestCase):
def setUp(self):
self.db = raco.fakedb.FakeDatabase()
... |
import collections
import math
import unittest
import raco.fakedb
import raco.myrial.interpreter as interpreter
import raco.myrial.parser as parser
class MyrialTestCase(unittest.TestCase):
def setUp(self):
self.db = raco.fakedb.FakeDatabase()
self.parser = parser.Parser()
self.processor ... |
import collections
import math
import unittest
import raco.fakedb
import raco.myrial.interpreter as interpreter
import raco.myrial.parser as parser
from raco.myrialang import compile_to_json
class MyrialTestCase(unittest.TestCase):
def setUp(self):
self.db = raco.fakedb.FakeDatabase()
self.parse... | <commit_before>
import collections
import math
import unittest
import raco.fakedb
import raco.myrial.interpreter as interpreter
import raco.myrial.parser as parser
from raco.myrialang import compile_to_json
class MyrialTestCase(unittest.TestCase):
def setUp(self):
self.db = raco.fakedb.FakeDatabase()
... |
2bdc5c33b1e9eb394eb62533f4ae4df081ea1452 | numpy/setup.py | numpy/setup.py | #!/usr/bin/env python3
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_subpackage('distutils')
config.add_s... | #!/usr/bin/env python3
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('_array_api')
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_... | Make the _array_api submodule install correctly | Make the _array_api submodule install correctly
| Python | bsd-3-clause | seberg/numpy,mhvk/numpy,mattip/numpy,endolith/numpy,seberg/numpy,mattip/numpy,numpy/numpy,simongibbons/numpy,simongibbons/numpy,charris/numpy,endolith/numpy,charris/numpy,rgommers/numpy,rgommers/numpy,simongibbons/numpy,anntzer/numpy,pdebuyl/numpy,jakirkham/numpy,endolith/numpy,mattip/numpy,anntzer/numpy,jakirkham/nump... | #!/usr/bin/env python3
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_subpackage('distutils')
config.add_s... | #!/usr/bin/env python3
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('_array_api')
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_... | <commit_before>#!/usr/bin/env python3
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_subpackage('distutils')
... | #!/usr/bin/env python3
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('_array_api')
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_... | #!/usr/bin/env python3
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_subpackage('distutils')
config.add_s... | <commit_before>#!/usr/bin/env python3
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_subpackage('distutils')
... |
29cc95bbdb12e50d09e8079bfae5841a7e734743 | plinth/modules/help/urls.py | plinth/modules/help/urls.py | #
# This file is part of Plinth.
#
# 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... | #
# This file is part of Plinth.
#
# 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... | Make help accessible for logged-in non-admin users | Make help accessible for logged-in non-admin users
Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>
Reviewed-by: Johannes Keyser <187051b70230423a457adbc3e507f9e4fff08d4b@posteo.de>
| Python | agpl-3.0 | vignanl/Plinth,vignanl/Plinth,kkampardi/Plinth,vignanl/Plinth,harry-7/Plinth,harry-7/Plinth,kkampardi/Plinth,kkampardi/Plinth,vignanl/Plinth,kkampardi/Plinth,harry-7/Plinth,kkampardi/Plinth,vignanl/Plinth,harry-7/Plinth,harry-7/Plinth | #
# This file is part of Plinth.
#
# 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... | #
# This file is part of Plinth.
#
# 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>#
# This file is part of Plinth.
#
# 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... | #
# This file is part of Plinth.
#
# 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... | #
# This file is part of Plinth.
#
# 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>#
# This file is part of Plinth.
#
# 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... |
5edddcc85b0e21bb576b71db63d082c8ace5cf70 | examples/boilerplates/samples/google_test.py | examples/boilerplates/samples/google_test.py | '''
Google.com testing example
'''
from seleniumbase import BaseCase
from google_objects import HomePage, ResultsPage
class GoogleTests(BaseCase):
def test_google_dot_com(self):
self.open('http://www.google.com')
self.assert_element(HomePage.search_button)
self.assert_element(HomePage.fe... | '''
Google.com testing example
'''
from seleniumbase import BaseCase
from google_objects import HomePage, ResultsPage
class GoogleTests(BaseCase):
def test_google_dot_com(self):
self.open('http://www.google.com')
self.assert_element(HomePage.search_button)
self.assert_element(HomePage.fe... | Update Google boilerplate test. (Logo frequently changes) | Update Google boilerplate test. (Logo frequently changes)
| Python | mit | seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase | '''
Google.com testing example
'''
from seleniumbase import BaseCase
from google_objects import HomePage, ResultsPage
class GoogleTests(BaseCase):
def test_google_dot_com(self):
self.open('http://www.google.com')
self.assert_element(HomePage.search_button)
self.assert_element(HomePage.fe... | '''
Google.com testing example
'''
from seleniumbase import BaseCase
from google_objects import HomePage, ResultsPage
class GoogleTests(BaseCase):
def test_google_dot_com(self):
self.open('http://www.google.com')
self.assert_element(HomePage.search_button)
self.assert_element(HomePage.fe... | <commit_before>'''
Google.com testing example
'''
from seleniumbase import BaseCase
from google_objects import HomePage, ResultsPage
class GoogleTests(BaseCase):
def test_google_dot_com(self):
self.open('http://www.google.com')
self.assert_element(HomePage.search_button)
self.assert_elem... | '''
Google.com testing example
'''
from seleniumbase import BaseCase
from google_objects import HomePage, ResultsPage
class GoogleTests(BaseCase):
def test_google_dot_com(self):
self.open('http://www.google.com')
self.assert_element(HomePage.search_button)
self.assert_element(HomePage.fe... | '''
Google.com testing example
'''
from seleniumbase import BaseCase
from google_objects import HomePage, ResultsPage
class GoogleTests(BaseCase):
def test_google_dot_com(self):
self.open('http://www.google.com')
self.assert_element(HomePage.search_button)
self.assert_element(HomePage.fe... | <commit_before>'''
Google.com testing example
'''
from seleniumbase import BaseCase
from google_objects import HomePage, ResultsPage
class GoogleTests(BaseCase):
def test_google_dot_com(self):
self.open('http://www.google.com')
self.assert_element(HomePage.search_button)
self.assert_elem... |
4b065401e3679d479163bd825c0a3526f0ba1bdf | conf-template.py | conf-template.py |
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
|
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
debug = False
| Add default for debug in conf template | Add default for debug in conf template
| Python | bsd-3-clause | TimSC/auxgis |
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
Add default for debug in conf template |
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
debug = False
| <commit_before>
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
<commit_msg>Add default for debug in conf template<commit_after> |
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
debug = False
|
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
Add default for debug in conf template
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
debug = False
| <commit_before>
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
<commit_msg>Add default for debug in conf template<commit_after>
flickrKey = ""
flickrSecret = ""
recaptchaEnabled = False
recaptchaKey = ""
recaptchaSecret = ""
debug = False
|
2c87cc9a864cbcd0ff0668a348fda1ba82b8a74c | gensysinfo.py | gensysinfo.py | #!/usr/bin/env python
import psutil
import os
import time
def create_bar(filled):
low = '.'
high = '|'
if filled > 1:
low = str(int(filled))
high = str(int(filled + 1))
filled = filled - int(filled)
filled = int(filled * 10)
if filled < 5:
color = "green"
elif fi... | #!/usr/bin/env python3
import psutil
import os
import time
def create_bar(filled):
low = '.'
high = '|'
if filled > 1:
low = str(int(filled))
high = str(int(filled + 1))
filled = filled - int(filled)
filled = int(filled * 10)
if filled < 5:
color = "green"
elif f... | Convert percentage to a value between 0 and 1 | Convert percentage to a value between 0 and 1
| Python | mit | wilfriedvanasten/miscvar,wilfriedvanasten/miscvar,wilfriedvanasten/miscvar | #!/usr/bin/env python
import psutil
import os
import time
def create_bar(filled):
low = '.'
high = '|'
if filled > 1:
low = str(int(filled))
high = str(int(filled + 1))
filled = filled - int(filled)
filled = int(filled * 10)
if filled < 5:
color = "green"
elif fi... | #!/usr/bin/env python3
import psutil
import os
import time
def create_bar(filled):
low = '.'
high = '|'
if filled > 1:
low = str(int(filled))
high = str(int(filled + 1))
filled = filled - int(filled)
filled = int(filled * 10)
if filled < 5:
color = "green"
elif f... | <commit_before>#!/usr/bin/env python
import psutil
import os
import time
def create_bar(filled):
low = '.'
high = '|'
if filled > 1:
low = str(int(filled))
high = str(int(filled + 1))
filled = filled - int(filled)
filled = int(filled * 10)
if filled < 5:
color = "gre... | #!/usr/bin/env python3
import psutil
import os
import time
def create_bar(filled):
low = '.'
high = '|'
if filled > 1:
low = str(int(filled))
high = str(int(filled + 1))
filled = filled - int(filled)
filled = int(filled * 10)
if filled < 5:
color = "green"
elif f... | #!/usr/bin/env python
import psutil
import os
import time
def create_bar(filled):
low = '.'
high = '|'
if filled > 1:
low = str(int(filled))
high = str(int(filled + 1))
filled = filled - int(filled)
filled = int(filled * 10)
if filled < 5:
color = "green"
elif fi... | <commit_before>#!/usr/bin/env python
import psutil
import os
import time
def create_bar(filled):
low = '.'
high = '|'
if filled > 1:
low = str(int(filled))
high = str(int(filled + 1))
filled = filled - int(filled)
filled = int(filled * 10)
if filled < 5:
color = "gre... |
50fc79e1231eeb59f66a79c29abe2b843e6fd893 | atlas/api/__init__.py | atlas/api/__init__.py | #!/usr/bin/env python
import logging
from flask import Blueprint, current_app, request
api_v1_blueprint = Blueprint("api_v1", __name__, url_prefix='/api/v1')
log = logging.getLogger('api')
@api_v1_blueprint.after_request
def log_response(response):
"""Log any requests/responses with an error code"""
if cu... | #!/usr/bin/env python
import logging
from flask import Blueprint, current_app, request
api_v1_blueprint = Blueprint("api_v1", __name__, url_prefix='/api/v1')
log = logging.getLogger('api')
@api_v1_blueprint.after_request
def log_response(response):
"""Log any requests/responses with an error code"""
if lo... | Use LOG_LEVEL to enable/disable request logging | Use LOG_LEVEL to enable/disable request logging
| Python | mit | joshfriend/atlas,joshfriend/atlas | #!/usr/bin/env python
import logging
from flask import Blueprint, current_app, request
api_v1_blueprint = Blueprint("api_v1", __name__, url_prefix='/api/v1')
log = logging.getLogger('api')
@api_v1_blueprint.after_request
def log_response(response):
"""Log any requests/responses with an error code"""
if cu... | #!/usr/bin/env python
import logging
from flask import Blueprint, current_app, request
api_v1_blueprint = Blueprint("api_v1", __name__, url_prefix='/api/v1')
log = logging.getLogger('api')
@api_v1_blueprint.after_request
def log_response(response):
"""Log any requests/responses with an error code"""
if lo... | <commit_before>#!/usr/bin/env python
import logging
from flask import Blueprint, current_app, request
api_v1_blueprint = Blueprint("api_v1", __name__, url_prefix='/api/v1')
log = logging.getLogger('api')
@api_v1_blueprint.after_request
def log_response(response):
"""Log any requests/responses with an error co... | #!/usr/bin/env python
import logging
from flask import Blueprint, current_app, request
api_v1_blueprint = Blueprint("api_v1", __name__, url_prefix='/api/v1')
log = logging.getLogger('api')
@api_v1_blueprint.after_request
def log_response(response):
"""Log any requests/responses with an error code"""
if lo... | #!/usr/bin/env python
import logging
from flask import Blueprint, current_app, request
api_v1_blueprint = Blueprint("api_v1", __name__, url_prefix='/api/v1')
log = logging.getLogger('api')
@api_v1_blueprint.after_request
def log_response(response):
"""Log any requests/responses with an error code"""
if cu... | <commit_before>#!/usr/bin/env python
import logging
from flask import Blueprint, current_app, request
api_v1_blueprint = Blueprint("api_v1", __name__, url_prefix='/api/v1')
log = logging.getLogger('api')
@api_v1_blueprint.after_request
def log_response(response):
"""Log any requests/responses with an error co... |
92c58061d4460addbe75081090371814e1a5f580 | working_waterfronts/working_waterfronts_api/views/pointsofinterest.py | working_waterfronts/working_waterfronts_api/views/pointsofinterest.py | from django.http import (HttpResponse,
HttpResponseNotFound)
from django.contrib.gis.measure import D
from working_waterfronts.working_waterfronts_api.models import PointOfInterest
from working_waterfronts.working_waterfronts_api.functions import get_lat_long_prox
import json
from .serializer ... | from django.http import (HttpResponse,
HttpResponseNotFound)
from django.contrib.gis.measure import D
from working_waterfronts.working_waterfronts_api.models import PointOfInterest
from working_waterfronts.working_waterfronts_api.functions import get_lat_long_prox
import json
from .serializer ... | Change docstrong to reflect actual endpoint | Change docstrong to reflect actual endpoint
| Python | apache-2.0 | osu-cass/working-waterfronts-api,osu-cass/working-waterfronts-api,osu-cass/working-waterfronts-api | from django.http import (HttpResponse,
HttpResponseNotFound)
from django.contrib.gis.measure import D
from working_waterfronts.working_waterfronts_api.models import PointOfInterest
from working_waterfronts.working_waterfronts_api.functions import get_lat_long_prox
import json
from .serializer ... | from django.http import (HttpResponse,
HttpResponseNotFound)
from django.contrib.gis.measure import D
from working_waterfronts.working_waterfronts_api.models import PointOfInterest
from working_waterfronts.working_waterfronts_api.functions import get_lat_long_prox
import json
from .serializer ... | <commit_before>from django.http import (HttpResponse,
HttpResponseNotFound)
from django.contrib.gis.measure import D
from working_waterfronts.working_waterfronts_api.models import PointOfInterest
from working_waterfronts.working_waterfronts_api.functions import get_lat_long_prox
import json
fr... | from django.http import (HttpResponse,
HttpResponseNotFound)
from django.contrib.gis.measure import D
from working_waterfronts.working_waterfronts_api.models import PointOfInterest
from working_waterfronts.working_waterfronts_api.functions import get_lat_long_prox
import json
from .serializer ... | from django.http import (HttpResponse,
HttpResponseNotFound)
from django.contrib.gis.measure import D
from working_waterfronts.working_waterfronts_api.models import PointOfInterest
from working_waterfronts.working_waterfronts_api.functions import get_lat_long_prox
import json
from .serializer ... | <commit_before>from django.http import (HttpResponse,
HttpResponseNotFound)
from django.contrib.gis.measure import D
from working_waterfronts.working_waterfronts_api.models import PointOfInterest
from working_waterfronts.working_waterfronts_api.functions import get_lat_long_prox
import json
fr... |
7b88a2e65b0010ceef49fdbce61949ee10420cd8 | desertbot/modules/utils/CommandHandler.py | desertbot/modules/utils/CommandHandler.py | """
Created on Feb 28, 2018
@author: StarlitGhost
"""
from twisted.plugin import IPlugin
from desertbot.moduleinterface import IModule, BotModule
from zope.interface import implementer
@implementer(IPlugin, IModule)
class CommandHandler(BotModule):
def actions(self):
return super(CommandHandler, self).a... | """
Created on Feb 28, 2018
@author: StarlitGhost
"""
from twisted.plugin import IPlugin
from desertbot.moduleinterface import IModule, BotModule
from zope.interface import implementer
@implementer(IPlugin, IModule)
class CommandHandler(BotModule):
def __init__(self):
BotModule.__init__(self)
se... | Load the command handler before the commands | Load the command handler before the commands
| Python | mit | DesertBot/DesertBot | """
Created on Feb 28, 2018
@author: StarlitGhost
"""
from twisted.plugin import IPlugin
from desertbot.moduleinterface import IModule, BotModule
from zope.interface import implementer
@implementer(IPlugin, IModule)
class CommandHandler(BotModule):
def actions(self):
return super(CommandHandler, self).a... | """
Created on Feb 28, 2018
@author: StarlitGhost
"""
from twisted.plugin import IPlugin
from desertbot.moduleinterface import IModule, BotModule
from zope.interface import implementer
@implementer(IPlugin, IModule)
class CommandHandler(BotModule):
def __init__(self):
BotModule.__init__(self)
se... | <commit_before>"""
Created on Feb 28, 2018
@author: StarlitGhost
"""
from twisted.plugin import IPlugin
from desertbot.moduleinterface import IModule, BotModule
from zope.interface import implementer
@implementer(IPlugin, IModule)
class CommandHandler(BotModule):
def actions(self):
return super(CommandH... | """
Created on Feb 28, 2018
@author: StarlitGhost
"""
from twisted.plugin import IPlugin
from desertbot.moduleinterface import IModule, BotModule
from zope.interface import implementer
@implementer(IPlugin, IModule)
class CommandHandler(BotModule):
def __init__(self):
BotModule.__init__(self)
se... | """
Created on Feb 28, 2018
@author: StarlitGhost
"""
from twisted.plugin import IPlugin
from desertbot.moduleinterface import IModule, BotModule
from zope.interface import implementer
@implementer(IPlugin, IModule)
class CommandHandler(BotModule):
def actions(self):
return super(CommandHandler, self).a... | <commit_before>"""
Created on Feb 28, 2018
@author: StarlitGhost
"""
from twisted.plugin import IPlugin
from desertbot.moduleinterface import IModule, BotModule
from zope.interface import implementer
@implementer(IPlugin, IModule)
class CommandHandler(BotModule):
def actions(self):
return super(CommandH... |
31921ce5ca7ccbaa2db8b8fa11b2b9a6caa14aeb | daisyproducer/settings.py | daisyproducer/settings.py | from settings_common import *
PACKAGE_VERSION = "0.5"
DEBUG = TEMPLATE_DEBUG = True
DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline')
EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp')
SERVE_STATIC_FILES = True
# the following is an idea from https://code.djangopr... | from settings_common import *
PACKAGE_VERSION = "0.5"
DEBUG = TEMPLATE_DEBUG = True
DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline')
EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp')
SERVE_STATIC_FILES = True
# the following is an idea from https://code.djangopr... | Use django.contrib.staticfiles when running locally | Use django.contrib.staticfiles when running locally
so that the admin interface uses the proper css when running on the
dev machine
| Python | agpl-3.0 | sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer | from settings_common import *
PACKAGE_VERSION = "0.5"
DEBUG = TEMPLATE_DEBUG = True
DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline')
EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp')
SERVE_STATIC_FILES = True
# the following is an idea from https://code.djangopr... | from settings_common import *
PACKAGE_VERSION = "0.5"
DEBUG = TEMPLATE_DEBUG = True
DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline')
EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp')
SERVE_STATIC_FILES = True
# the following is an idea from https://code.djangopr... | <commit_before>from settings_common import *
PACKAGE_VERSION = "0.5"
DEBUG = TEMPLATE_DEBUG = True
DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline')
EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp')
SERVE_STATIC_FILES = True
# the following is an idea from https:... | from settings_common import *
PACKAGE_VERSION = "0.5"
DEBUG = TEMPLATE_DEBUG = True
DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline')
EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp')
SERVE_STATIC_FILES = True
# the following is an idea from https://code.djangopr... | from settings_common import *
PACKAGE_VERSION = "0.5"
DEBUG = TEMPLATE_DEBUG = True
DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline')
EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp')
SERVE_STATIC_FILES = True
# the following is an idea from https://code.djangopr... | <commit_before>from settings_common import *
PACKAGE_VERSION = "0.5"
DEBUG = TEMPLATE_DEBUG = True
DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp', 'pipeline')
EXTERNAL_PATH = os.path.join(PROJECT_DIR, '..', '..', '..', 'tmp')
SERVE_STATIC_FILES = True
# the following is an idea from https:... |
3b75a6f3654e8f325060779ca56b6df93fe0cabe | genome_designer/main/demo_view_overrides.py | genome_designer/main/demo_view_overrides.py | """View overrides for demo mode.
"""
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect
def login_demo_account(request):
new_user = authenticate(username='gmcdev',
password='g3n3d3z')
login(request, new_user)
return ... | """View overrides for demo mode.
"""
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect
def login_demo_account(request):
new_user = authenticate(username='gmcdev',
password='g3n3d3z')
login(request, new_user)
redirec... | Handle redirect_url in demo login bypass. | Handle redirect_url in demo login bypass.
| Python | mit | churchlab/millstone,churchlab/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,woodymit/millstone,woodymit/millstone,churchlab/millstone | """View overrides for demo mode.
"""
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect
def login_demo_account(request):
new_user = authenticate(username='gmcdev',
password='g3n3d3z')
login(request, new_user)
return ... | """View overrides for demo mode.
"""
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect
def login_demo_account(request):
new_user = authenticate(username='gmcdev',
password='g3n3d3z')
login(request, new_user)
redirec... | <commit_before>"""View overrides for demo mode.
"""
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect
def login_demo_account(request):
new_user = authenticate(username='gmcdev',
password='g3n3d3z')
login(request, new_us... | """View overrides for demo mode.
"""
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect
def login_demo_account(request):
new_user = authenticate(username='gmcdev',
password='g3n3d3z')
login(request, new_user)
redirec... | """View overrides for demo mode.
"""
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect
def login_demo_account(request):
new_user = authenticate(username='gmcdev',
password='g3n3d3z')
login(request, new_user)
return ... | <commit_before>"""View overrides for demo mode.
"""
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect
def login_demo_account(request):
new_user = authenticate(username='gmcdev',
password='g3n3d3z')
login(request, new_us... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.