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
6de5612c0e92b4e7c7ca56b59d7fd5859aeb3409
apps/polls/urls.py
apps/polls/urls.py
from django.conf.urls import patterns, url from apps.polls import views urlpatterns = patterns('', # ex: /polls/ url(r'^$', views.index, name='index'), # ex: /polls/5 url(r'^(?P<poll_id>\d+)/$', views.detail, name='detail'), # ex: /polls/5/results/ url(r'^(?P<poll_id>\d+)/results/$', views.results, name='res...
from django.conf.urls import patterns, url from apps.polls import views urlpatterns = patterns('', # ex: /polls/ url(r'^$', views.IndexView.as_view(), name='index'), # ex: /polls/5 url(r'^(?P<poll_id>\d+)/$', views.DetailView.as_view(), name='detail'), # ex: /polls/5/results/ url(r'^(?P<poll_id>\d+)/results/...
Use generic views: Less code is better
Use generic views: Less code is better
Python
bsd-3-clause
hoale/teracy-tutorial,hoale/teracy-tutorial
from django.conf.urls import patterns, url from apps.polls import views urlpatterns = patterns('', # ex: /polls/ url(r'^$', views.index, name='index'), # ex: /polls/5 url(r'^(?P<poll_id>\d+)/$', views.detail, name='detail'), # ex: /polls/5/results/ url(r'^(?P<poll_id>\d+)/results/$', views.results, name='res...
from django.conf.urls import patterns, url from apps.polls import views urlpatterns = patterns('', # ex: /polls/ url(r'^$', views.IndexView.as_view(), name='index'), # ex: /polls/5 url(r'^(?P<poll_id>\d+)/$', views.DetailView.as_view(), name='detail'), # ex: /polls/5/results/ url(r'^(?P<poll_id>\d+)/results/...
<commit_before>from django.conf.urls import patterns, url from apps.polls import views urlpatterns = patterns('', # ex: /polls/ url(r'^$', views.index, name='index'), # ex: /polls/5 url(r'^(?P<poll_id>\d+)/$', views.detail, name='detail'), # ex: /polls/5/results/ url(r'^(?P<poll_id>\d+)/results/$', views.res...
from django.conf.urls import patterns, url from apps.polls import views urlpatterns = patterns('', # ex: /polls/ url(r'^$', views.IndexView.as_view(), name='index'), # ex: /polls/5 url(r'^(?P<poll_id>\d+)/$', views.DetailView.as_view(), name='detail'), # ex: /polls/5/results/ url(r'^(?P<poll_id>\d+)/results/...
from django.conf.urls import patterns, url from apps.polls import views urlpatterns = patterns('', # ex: /polls/ url(r'^$', views.index, name='index'), # ex: /polls/5 url(r'^(?P<poll_id>\d+)/$', views.detail, name='detail'), # ex: /polls/5/results/ url(r'^(?P<poll_id>\d+)/results/$', views.results, name='res...
<commit_before>from django.conf.urls import patterns, url from apps.polls import views urlpatterns = patterns('', # ex: /polls/ url(r'^$', views.index, name='index'), # ex: /polls/5 url(r'^(?P<poll_id>\d+)/$', views.detail, name='detail'), # ex: /polls/5/results/ url(r'^(?P<poll_id>\d+)/results/$', views.res...
8849f78d8e9d63942162264d4223e9db277142d7
aligot/tests/test_user.py
aligot/tests/test_user.py
# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_without_params(se...
# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_without_params(se...
Add test to delete user in DB
Add test to delete user in DB
Python
mit
aligot-project/aligot,aligot-project/aligot,aligot-project/aligot,skitoo/aligot
# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_without_params(se...
# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_without_params(se...
<commit_before># coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_wi...
# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_without_params(se...
# coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_without_params(se...
<commit_before># coding: utf-8 from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from ..models import User class TestUser(TestCase): def setUp(self): self.client = APIClient() def test_create_wi...
55e0c877dbe1a073534c9cf445ffe58715160b8e
metadata/RomsLite/hooks/post-stage.py
metadata/RomsLite/hooks/post-stage.py
import os import shutil from wmt.utils.hook import find_simulation_input_file def execute(env): """Perform post-stage tasks for running a component. Parameters ---------- env : dict A dict of component parameter values from WMT. """ for name in ('river_forcing_file', 'waves_forcing_fi...
import os import shutil from wmt.utils.hook import find_simulation_input_file _DEFAULT_FILES = { 'river_forcing_file': 'river.nc', 'waves_forcing_file': 'waves.nc', } def execute(env): """Perform post-stage tasks for running a component. Parameters ---------- env : dict A dict of comp...
Remove default forcing files if not being used.
Remove default forcing files if not being used.
Python
mit
csdms/wmt-metadata
import os import shutil from wmt.utils.hook import find_simulation_input_file def execute(env): """Perform post-stage tasks for running a component. Parameters ---------- env : dict A dict of component parameter values from WMT. """ for name in ('river_forcing_file', 'waves_forcing_fi...
import os import shutil from wmt.utils.hook import find_simulation_input_file _DEFAULT_FILES = { 'river_forcing_file': 'river.nc', 'waves_forcing_file': 'waves.nc', } def execute(env): """Perform post-stage tasks for running a component. Parameters ---------- env : dict A dict of comp...
<commit_before>import os import shutil from wmt.utils.hook import find_simulation_input_file def execute(env): """Perform post-stage tasks for running a component. Parameters ---------- env : dict A dict of component parameter values from WMT. """ for name in ('river_forcing_file', 'w...
import os import shutil from wmt.utils.hook import find_simulation_input_file _DEFAULT_FILES = { 'river_forcing_file': 'river.nc', 'waves_forcing_file': 'waves.nc', } def execute(env): """Perform post-stage tasks for running a component. Parameters ---------- env : dict A dict of comp...
import os import shutil from wmt.utils.hook import find_simulation_input_file def execute(env): """Perform post-stage tasks for running a component. Parameters ---------- env : dict A dict of component parameter values from WMT. """ for name in ('river_forcing_file', 'waves_forcing_fi...
<commit_before>import os import shutil from wmt.utils.hook import find_simulation_input_file def execute(env): """Perform post-stage tasks for running a component. Parameters ---------- env : dict A dict of component parameter values from WMT. """ for name in ('river_forcing_file', 'w...
6d68d07f30f2244b13207c6eaf9d4662492b04e2
run.py
run.py
#!/usr/bin/env python from flask_debugtoolbar import DebugToolbarExtension from app import app from app.models import connect_to_db if __name__ == '__main__': # debug = True as DebugToolbarExtension is invoked connect_to_db(app) # User the DebugToolbar # DebugToolbarExtension(app) PORT = int(os...
#!/usr/bin/env python from flask_debugtoolbar import DebugToolbarExtension from app import app from app.models import connect_to_db if __name__ == '__main__': # debug = True as DebugToolbarExtension is invoked connect_to_db(app) # User the DebugToolbar # DebugToolbarExtension(app) PORT = int...
Change indentation tab to spaces.
Change indentation tab to spaces.
Python
bsd-3-clause
vanesa/kid-o,vanesa/kid-o,vanesa/kid-o,vanesa/kid-o
#!/usr/bin/env python from flask_debugtoolbar import DebugToolbarExtension from app import app from app.models import connect_to_db if __name__ == '__main__': # debug = True as DebugToolbarExtension is invoked connect_to_db(app) # User the DebugToolbar # DebugToolbarExtension(app) PORT = int(os...
#!/usr/bin/env python from flask_debugtoolbar import DebugToolbarExtension from app import app from app.models import connect_to_db if __name__ == '__main__': # debug = True as DebugToolbarExtension is invoked connect_to_db(app) # User the DebugToolbar # DebugToolbarExtension(app) PORT = int...
<commit_before>#!/usr/bin/env python from flask_debugtoolbar import DebugToolbarExtension from app import app from app.models import connect_to_db if __name__ == '__main__': # debug = True as DebugToolbarExtension is invoked connect_to_db(app) # User the DebugToolbar # DebugToolbarExtension(app) ...
#!/usr/bin/env python from flask_debugtoolbar import DebugToolbarExtension from app import app from app.models import connect_to_db if __name__ == '__main__': # debug = True as DebugToolbarExtension is invoked connect_to_db(app) # User the DebugToolbar # DebugToolbarExtension(app) PORT = int...
#!/usr/bin/env python from flask_debugtoolbar import DebugToolbarExtension from app import app from app.models import connect_to_db if __name__ == '__main__': # debug = True as DebugToolbarExtension is invoked connect_to_db(app) # User the DebugToolbar # DebugToolbarExtension(app) PORT = int(os...
<commit_before>#!/usr/bin/env python from flask_debugtoolbar import DebugToolbarExtension from app import app from app.models import connect_to_db if __name__ == '__main__': # debug = True as DebugToolbarExtension is invoked connect_to_db(app) # User the DebugToolbar # DebugToolbarExtension(app) ...
442136bb1d32baa1be50c3b88caed344e3979cd3
website/project/taxonomies/__init__.py
website/project/taxonomies/__init__.py
from modularodm import fields from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique_on(['id', '_id']) class Subject(StoredObject): _id = fields.StringField(primary=True, default=lambda: str(ObjectId())) type = fields.StringField(required=True) text =...
from modularodm import fields from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) from website.util import api_v2_url @mongo_utils.unique_on(['text']) class Subject(StoredObject): _id = fields.StringField(primary=True, default=lambda: str(ObjectId())) text = fields.String...
Update Subject model -remove superfluous type field -fix parents field type -update url building
Update Subject model -remove superfluous type field -fix parents field type -update url building
Python
apache-2.0
TomBaxter/osf.io,Johnetordoff/osf.io,samchrisinger/osf.io,sloria/osf.io,alexschiller/osf.io,emetsger/osf.io,laurenrevere/osf.io,cwisecarver/osf.io,adlius/osf.io,CenterForOpenScience/osf.io,chennan47/osf.io,rdhyee/osf.io,chennan47/osf.io,HalcyonChimera/osf.io,mluo613/osf.io,chrisseto/osf.io,hmoco/osf.io,felliott/osf.io,...
from modularodm import fields from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique_on(['id', '_id']) class Subject(StoredObject): _id = fields.StringField(primary=True, default=lambda: str(ObjectId())) type = fields.StringField(required=True) text =...
from modularodm import fields from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) from website.util import api_v2_url @mongo_utils.unique_on(['text']) class Subject(StoredObject): _id = fields.StringField(primary=True, default=lambda: str(ObjectId())) text = fields.String...
<commit_before>from modularodm import fields from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique_on(['id', '_id']) class Subject(StoredObject): _id = fields.StringField(primary=True, default=lambda: str(ObjectId())) type = fields.StringField(required=T...
from modularodm import fields from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) from website.util import api_v2_url @mongo_utils.unique_on(['text']) class Subject(StoredObject): _id = fields.StringField(primary=True, default=lambda: str(ObjectId())) text = fields.String...
from modularodm import fields from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique_on(['id', '_id']) class Subject(StoredObject): _id = fields.StringField(primary=True, default=lambda: str(ObjectId())) type = fields.StringField(required=True) text =...
<commit_before>from modularodm import fields from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique_on(['id', '_id']) class Subject(StoredObject): _id = fields.StringField(primary=True, default=lambda: str(ObjectId())) type = fields.StringField(required=T...
e391aa732eb0e713e7dc6bb9c767998425bc987b
src/server/__init__.py
src/server/__init__.py
""" telepathy-python - Base classes defining the interfaces of the Telepathy framework Copyright (C) 2005, 2006 Collabora Limited Copyright (C) 2005, 2006 Nokia Corporation Copyright (C) 2006 INdT This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public ...
""" telepathy-python - Base classes defining the interfaces of the Telepathy framework Copyright (C) 2005, 2006 Collabora Limited Copyright (C) 2005, 2006 Nokia Corporation Copyright (C) 2006 INdT This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public ...
Add the generated Client interfaces to the telepathy.server namespace
Add the generated Client interfaces to the telepathy.server namespace
Python
lgpl-2.1
PabloCastellano/telepathy-python,freedesktop-unofficial-mirror/telepathy__telepathy-python,PabloCastellano/telepathy-python,detrout/telepathy-python,epage/telepathy-python,max-posedon/telepathy-python,epage/telepathy-python,max-posedon/telepathy-python,freedesktop-unofficial-mirror/telepathy__telepathy-python,detrout/t...
""" telepathy-python - Base classes defining the interfaces of the Telepathy framework Copyright (C) 2005, 2006 Collabora Limited Copyright (C) 2005, 2006 Nokia Corporation Copyright (C) 2006 INdT This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public ...
""" telepathy-python - Base classes defining the interfaces of the Telepathy framework Copyright (C) 2005, 2006 Collabora Limited Copyright (C) 2005, 2006 Nokia Corporation Copyright (C) 2006 INdT This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public ...
<commit_before>""" telepathy-python - Base classes defining the interfaces of the Telepathy framework Copyright (C) 2005, 2006 Collabora Limited Copyright (C) 2005, 2006 Nokia Corporation Copyright (C) 2006 INdT This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser ...
""" telepathy-python - Base classes defining the interfaces of the Telepathy framework Copyright (C) 2005, 2006 Collabora Limited Copyright (C) 2005, 2006 Nokia Corporation Copyright (C) 2006 INdT This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public ...
""" telepathy-python - Base classes defining the interfaces of the Telepathy framework Copyright (C) 2005, 2006 Collabora Limited Copyright (C) 2005, 2006 Nokia Corporation Copyright (C) 2006 INdT This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public ...
<commit_before>""" telepathy-python - Base classes defining the interfaces of the Telepathy framework Copyright (C) 2005, 2006 Collabora Limited Copyright (C) 2005, 2006 Nokia Corporation Copyright (C) 2006 INdT This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser ...
f980e56d583f1669d56bef6e15df8c2818f99467
ejpi/constants.py
ejpi/constants.py
__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 2 __app_magic__ = 0xdeadbeef IS_MAEMO = True
__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 3 __app_magic__ = 0xdeadbeef IS_MAEMO = True
Bump for icon harmattan build
Bump for icon harmattan build
Python
lgpl-2.1
epage/ejpi,epage/ejpi,epage/ejpi
__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 2 __app_magic__ = 0xdeadbeef IS_MAEMO = True Bump for icon harmattan build
__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 3 __app_magic__ = 0xdeadbeef IS_MAEMO = True
<commit_before>__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 2 __app_magic__ = 0xdeadbeef IS_MAEMO = True <commit_msg>Bump for icon harmattan build<commit_after>
__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 3 __app_magic__ = 0xdeadbeef IS_MAEMO = True
__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 2 __app_magic__ = 0xdeadbeef IS_MAEMO = True Bump for icon harmattan build__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 3 __app_magic__ = 0xdeadbeef IS_MAEMO = True
<commit_before>__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 2 __app_magic__ = 0xdeadbeef IS_MAEMO = True <commit_msg>Bump for icon harmattan build<commit_after>__pretty_app_name__ = "e**(j pi) + 1 = 0" __app_name__ = "ejpi" __version__ = "1.0.7" __build__ = 3 __app_...
d3428d9bb8baf67176e1bd6a22b96845ebcdf42e
indico/migrations/versions/201705221530_3ca338ed5192_remove_background_image_and_add.py
indico/migrations/versions/201705221530_3ca338ed5192_remove_background_image_and_add.py
"""Add backside_template column Revision ID: 3ca338ed5192 Revises: 35d76c40ca48 Create Date: 2017-05-17 11:33:30.295538 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '3ca338ed5192' down_revision = '35d76c40ca48' branch_labels = None depends_on = None def up...
"""Add backside_template column Revision ID: 3ca338ed5192 Revises: 35d76c40ca48 Create Date: 2017-05-17 11:33:30.295538 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '3ca338ed5192' down_revision = '35d76c40ca48' branch_labels = None depends_on = None def up...
Add missing index command in revision
Designer: Add missing index command in revision
Python
mit
pferreir/indico,pferreir/indico,OmeGak/indico,mvidalgarcia/indico,mvidalgarcia/indico,indico/indico,indico/indico,OmeGak/indico,mvidalgarcia/indico,pferreir/indico,pferreir/indico,ThiefMaster/indico,mic4ael/indico,indico/indico,OmeGak/indico,mic4ael/indico,mvidalgarcia/indico,mic4ael/indico,ThiefMaster/indico,ThiefMast...
"""Add backside_template column Revision ID: 3ca338ed5192 Revises: 35d76c40ca48 Create Date: 2017-05-17 11:33:30.295538 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '3ca338ed5192' down_revision = '35d76c40ca48' branch_labels = None depends_on = None def up...
"""Add backside_template column Revision ID: 3ca338ed5192 Revises: 35d76c40ca48 Create Date: 2017-05-17 11:33:30.295538 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '3ca338ed5192' down_revision = '35d76c40ca48' branch_labels = None depends_on = None def up...
<commit_before>"""Add backside_template column Revision ID: 3ca338ed5192 Revises: 35d76c40ca48 Create Date: 2017-05-17 11:33:30.295538 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '3ca338ed5192' down_revision = '35d76c40ca48' branch_labels = None depends_on ...
"""Add backside_template column Revision ID: 3ca338ed5192 Revises: 35d76c40ca48 Create Date: 2017-05-17 11:33:30.295538 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '3ca338ed5192' down_revision = '35d76c40ca48' branch_labels = None depends_on = None def up...
"""Add backside_template column Revision ID: 3ca338ed5192 Revises: 35d76c40ca48 Create Date: 2017-05-17 11:33:30.295538 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '3ca338ed5192' down_revision = '35d76c40ca48' branch_labels = None depends_on = None def up...
<commit_before>"""Add backside_template column Revision ID: 3ca338ed5192 Revises: 35d76c40ca48 Create Date: 2017-05-17 11:33:30.295538 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '3ca338ed5192' down_revision = '35d76c40ca48' branch_labels = None depends_on ...
abc1d8c52b9893f1695b2f81126b22820cddfc67
src/argon2/__init__.py
src/argon2/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from . import exceptions, low_level from ._legacy import ( hash_password, hash_password_raw, verify_password, ) from ._password_hasher import ( DEFAULT_HASH_LENGTH, DEFAULT_MEMORY_COST, DEFAULT_PARALLELISM...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from . import exceptions, low_level from ._legacy import ( hash_password, hash_password_raw, verify_password, ) from ._password_hasher import ( DEFAULT_HASH_LENGTH, DEFAULT_MEMORY_COST, DEFAULT_PARALLELISM...
Remove unimported symbols from __all__
Remove unimported symbols from __all__ I don't quite understand, why flake8 didn't catch this...
Python
mit
hynek/argon2_cffi,hynek/argon2_cffi
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from . import exceptions, low_level from ._legacy import ( hash_password, hash_password_raw, verify_password, ) from ._password_hasher import ( DEFAULT_HASH_LENGTH, DEFAULT_MEMORY_COST, DEFAULT_PARALLELISM...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from . import exceptions, low_level from ._legacy import ( hash_password, hash_password_raw, verify_password, ) from ._password_hasher import ( DEFAULT_HASH_LENGTH, DEFAULT_MEMORY_COST, DEFAULT_PARALLELISM...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from . import exceptions, low_level from ._legacy import ( hash_password, hash_password_raw, verify_password, ) from ._password_hasher import ( DEFAULT_HASH_LENGTH, DEFAULT_MEMORY_COST, DEFA...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from . import exceptions, low_level from ._legacy import ( hash_password, hash_password_raw, verify_password, ) from ._password_hasher import ( DEFAULT_HASH_LENGTH, DEFAULT_MEMORY_COST, DEFAULT_PARALLELISM...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from . import exceptions, low_level from ._legacy import ( hash_password, hash_password_raw, verify_password, ) from ._password_hasher import ( DEFAULT_HASH_LENGTH, DEFAULT_MEMORY_COST, DEFAULT_PARALLELISM...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from . import exceptions, low_level from ._legacy import ( hash_password, hash_password_raw, verify_password, ) from ._password_hasher import ( DEFAULT_HASH_LENGTH, DEFAULT_MEMORY_COST, DEFA...
98cd52a2c635a50b6664212ace5e98090246aba2
python/bracket-push/bracket_push.py
python/bracket-push/bracket_push.py
class CheckBrackets: OPENERS = {'{': '}', '[': ']', '(': ')'} CLOSERS = set(OPENERS.values()) def __init__(self, inp): self.check_brackets = self.build_stack(inp) def build_stack(self, inp): stack = [] for char in list(inp): if char in ...
class CheckBrackets: OPENERS = {'{': '}', '[': ']', '(': ')'} CLOSERS = set(OPENERS.values()) def __init__(self, inp): self.check_brackets = self.build_stack(inp) def build_stack(self, inp): stack = [] for char in list(inp): if char in ...
Fix method name to conform to tests
Fix method name to conform to tests
Python
mit
rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism
class CheckBrackets: OPENERS = {'{': '}', '[': ']', '(': ')'} CLOSERS = set(OPENERS.values()) def __init__(self, inp): self.check_brackets = self.build_stack(inp) def build_stack(self, inp): stack = [] for char in list(inp): if char in ...
class CheckBrackets: OPENERS = {'{': '}', '[': ']', '(': ')'} CLOSERS = set(OPENERS.values()) def __init__(self, inp): self.check_brackets = self.build_stack(inp) def build_stack(self, inp): stack = [] for char in list(inp): if char in ...
<commit_before>class CheckBrackets: OPENERS = {'{': '}', '[': ']', '(': ')'} CLOSERS = set(OPENERS.values()) def __init__(self, inp): self.check_brackets = self.build_stack(inp) def build_stack(self, inp): stack = [] for char in list(inp): ...
class CheckBrackets: OPENERS = {'{': '}', '[': ']', '(': ')'} CLOSERS = set(OPENERS.values()) def __init__(self, inp): self.check_brackets = self.build_stack(inp) def build_stack(self, inp): stack = [] for char in list(inp): if char in ...
class CheckBrackets: OPENERS = {'{': '}', '[': ']', '(': ')'} CLOSERS = set(OPENERS.values()) def __init__(self, inp): self.check_brackets = self.build_stack(inp) def build_stack(self, inp): stack = [] for char in list(inp): if char in ...
<commit_before>class CheckBrackets: OPENERS = {'{': '}', '[': ']', '(': ')'} CLOSERS = set(OPENERS.values()) def __init__(self, inp): self.check_brackets = self.build_stack(inp) def build_stack(self, inp): stack = [] for char in list(inp): ...
830119c570ed9ec3693d9e002b07777c5542bb1f
modelToParseFile/parseFileBacteriaList.py
modelToParseFile/parseFileBacteriaList.py
class parseFileBacteriaList: 'Class for read and print information from text file' bacteriaName = [] fileName = "" def __init__(self,fileName): self.fileName = fileName def readFile(self): file = open(self.fileName).readlines() for linia in file: print linia
class parseFileBacteriaList: 'Class for read and print information from text file' bacteriaName = [] fileName = "" def __init__(self,fileName): self.fileName = fileName def readFile(self): file = open(self.fileName).readlines() listBacteria = [] listDeseases = [] ...
Split text by \t, and added lists of bacteria and diseases
Split text by \t, and added lists of bacteria and diseases
Python
apache-2.0
kgruba/oop_python
class parseFileBacteriaList: 'Class for read and print information from text file' bacteriaName = [] fileName = "" def __init__(self,fileName): self.fileName = fileName def readFile(self): file = open(self.fileName).readlines() for linia in file: print liniaSpli...
class parseFileBacteriaList: 'Class for read and print information from text file' bacteriaName = [] fileName = "" def __init__(self,fileName): self.fileName = fileName def readFile(self): file = open(self.fileName).readlines() listBacteria = [] listDeseases = [] ...
<commit_before>class parseFileBacteriaList: 'Class for read and print information from text file' bacteriaName = [] fileName = "" def __init__(self,fileName): self.fileName = fileName def readFile(self): file = open(self.fileName).readlines() for linia in file: ...
class parseFileBacteriaList: 'Class for read and print information from text file' bacteriaName = [] fileName = "" def __init__(self,fileName): self.fileName = fileName def readFile(self): file = open(self.fileName).readlines() listBacteria = [] listDeseases = [] ...
class parseFileBacteriaList: 'Class for read and print information from text file' bacteriaName = [] fileName = "" def __init__(self,fileName): self.fileName = fileName def readFile(self): file = open(self.fileName).readlines() for linia in file: print liniaSpli...
<commit_before>class parseFileBacteriaList: 'Class for read and print information from text file' bacteriaName = [] fileName = "" def __init__(self,fileName): self.fileName = fileName def readFile(self): file = open(self.fileName).readlines() for linia in file: ...
cd359f8487ee5aab3645a0089695967802e485d0
samples/python/uppercase/py/func.py
samples/python/uppercase/py/func.py
import os,sys sys.path.insert(0, os.path.abspath('.')) import grpc import time import function_pb2_grpc as function import fntypes_pb2 as types from concurrent import futures class StringFunctionServicer(function.StringFunctionServicer): def Call(self, request, context): reply = types.Reply() rep...
import os,sys sys.path.insert(0, os.path.abspath('.')) import grpc import time import function_pb2_grpc as function import fntypes_pb2 as types from concurrent import futures ''' This method’s semantics are a combination of those of the request-streaming method and the response-streaming method. It is passed an iter...
Enable GRPC Streaming in Python uppercase sample
Enable GRPC Streaming in Python uppercase sample
Python
apache-2.0
markfisher/sk8s,markfisher/sk8s,markfisher/sk8s,markfisher/sk8s
import os,sys sys.path.insert(0, os.path.abspath('.')) import grpc import time import function_pb2_grpc as function import fntypes_pb2 as types from concurrent import futures class StringFunctionServicer(function.StringFunctionServicer): def Call(self, request, context): reply = types.Reply() rep...
import os,sys sys.path.insert(0, os.path.abspath('.')) import grpc import time import function_pb2_grpc as function import fntypes_pb2 as types from concurrent import futures ''' This method’s semantics are a combination of those of the request-streaming method and the response-streaming method. It is passed an iter...
<commit_before>import os,sys sys.path.insert(0, os.path.abspath('.')) import grpc import time import function_pb2_grpc as function import fntypes_pb2 as types from concurrent import futures class StringFunctionServicer(function.StringFunctionServicer): def Call(self, request, context): reply = types.Repl...
import os,sys sys.path.insert(0, os.path.abspath('.')) import grpc import time import function_pb2_grpc as function import fntypes_pb2 as types from concurrent import futures ''' This method’s semantics are a combination of those of the request-streaming method and the response-streaming method. It is passed an iter...
import os,sys sys.path.insert(0, os.path.abspath('.')) import grpc import time import function_pb2_grpc as function import fntypes_pb2 as types from concurrent import futures class StringFunctionServicer(function.StringFunctionServicer): def Call(self, request, context): reply = types.Reply() rep...
<commit_before>import os,sys sys.path.insert(0, os.path.abspath('.')) import grpc import time import function_pb2_grpc as function import fntypes_pb2 as types from concurrent import futures class StringFunctionServicer(function.StringFunctionServicer): def Call(self, request, context): reply = types.Repl...
34fdb69aa6a414c65a05ee25a0cb1b09e3196221
packages/cardpay-subgraph-extraction/export.py
packages/cardpay-subgraph-extraction/export.py
from subgraph_extractor.cli import extract_from_config import click from cloudpathlib import AnyPath @click.command() @click.option( "--subgraph-config-folder", help="The folder containing the subgraph config files", default='config', ) @click.option( "--database-string", default="postgresql://grap...
from subgraph_extractor.cli import extract_from_config import click from cloudpathlib import AnyPath import os @click.command() @click.option( "--subgraph-config-folder", help="The folder containing the subgraph config files", default="config", ) @click.option( "--database-string", default=os.envi...
Support environment variables for the extraction
Support environment variables for the extraction
Python
mit
cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack
from subgraph_extractor.cli import extract_from_config import click from cloudpathlib import AnyPath @click.command() @click.option( "--subgraph-config-folder", help="The folder containing the subgraph config files", default='config', ) @click.option( "--database-string", default="postgresql://grap...
from subgraph_extractor.cli import extract_from_config import click from cloudpathlib import AnyPath import os @click.command() @click.option( "--subgraph-config-folder", help="The folder containing the subgraph config files", default="config", ) @click.option( "--database-string", default=os.envi...
<commit_before>from subgraph_extractor.cli import extract_from_config import click from cloudpathlib import AnyPath @click.command() @click.option( "--subgraph-config-folder", help="The folder containing the subgraph config files", default='config', ) @click.option( "--database-string", default="po...
from subgraph_extractor.cli import extract_from_config import click from cloudpathlib import AnyPath import os @click.command() @click.option( "--subgraph-config-folder", help="The folder containing the subgraph config files", default="config", ) @click.option( "--database-string", default=os.envi...
from subgraph_extractor.cli import extract_from_config import click from cloudpathlib import AnyPath @click.command() @click.option( "--subgraph-config-folder", help="The folder containing the subgraph config files", default='config', ) @click.option( "--database-string", default="postgresql://grap...
<commit_before>from subgraph_extractor.cli import extract_from_config import click from cloudpathlib import AnyPath @click.command() @click.option( "--subgraph-config-folder", help="The folder containing the subgraph config files", default='config', ) @click.option( "--database-string", default="po...
1e980277f53d12686264b8ce816e65ffea16a2dd
examples/basic.py
examples/basic.py
from simpleflow import ( activity, Workflow, ) @activity.with_attributes(task_list='quickstart') def increment(x): return x + 1 @activity.with_attributes(task_list='quickstart') def double(x): return x * 2 class BasicWorkflow(Workflow): name = 'basic' version = 'example' def run(self,...
import time from simpleflow import ( activity, Workflow, ) @activity.with_attributes(task_list='quickstart') def increment(x): return x + 1 @activity.with_attributes(task_list='quickstart') def double(x): return x * 2 @activity.with_attributes(task_list='quickstart', version='example') def delay(...
Update example: add a delay task
Update example: add a delay task
Python
mit
botify-labs/simpleflow,botify-labs/simpleflow
from simpleflow import ( activity, Workflow, ) @activity.with_attributes(task_list='quickstart') def increment(x): return x + 1 @activity.with_attributes(task_list='quickstart') def double(x): return x * 2 class BasicWorkflow(Workflow): name = 'basic' version = 'example' def run(self,...
import time from simpleflow import ( activity, Workflow, ) @activity.with_attributes(task_list='quickstart') def increment(x): return x + 1 @activity.with_attributes(task_list='quickstart') def double(x): return x * 2 @activity.with_attributes(task_list='quickstart', version='example') def delay(...
<commit_before>from simpleflow import ( activity, Workflow, ) @activity.with_attributes(task_list='quickstart') def increment(x): return x + 1 @activity.with_attributes(task_list='quickstart') def double(x): return x * 2 class BasicWorkflow(Workflow): name = 'basic' version = 'example' ...
import time from simpleflow import ( activity, Workflow, ) @activity.with_attributes(task_list='quickstart') def increment(x): return x + 1 @activity.with_attributes(task_list='quickstart') def double(x): return x * 2 @activity.with_attributes(task_list='quickstart', version='example') def delay(...
from simpleflow import ( activity, Workflow, ) @activity.with_attributes(task_list='quickstart') def increment(x): return x + 1 @activity.with_attributes(task_list='quickstart') def double(x): return x * 2 class BasicWorkflow(Workflow): name = 'basic' version = 'example' def run(self,...
<commit_before>from simpleflow import ( activity, Workflow, ) @activity.with_attributes(task_list='quickstart') def increment(x): return x + 1 @activity.with_attributes(task_list='quickstart') def double(x): return x * 2 class BasicWorkflow(Workflow): name = 'basic' version = 'example' ...
2548c8a46b04a34db218e522704fa171d8d6f7b7
nephele.py
nephele.py
"""Nephele - Finding movies to watch on the internet is easy, finding GOOD movies to watch is hard. Let Nephele, the greek nymph of the clouds, help you. Usage: nephele.py get_popular [--debug] nephele.py get_grades <directory> [--debug] Options: -h --help Show this screen. --debug Print debug infor...
"""Nephele - Finding movies to watch on the internet is easy, finding GOOD movies to watch is hard. Let Nephele, the greek nymph of the clouds, help you. Usage: nephele.py get_popular [--debug] nephele.py get_grades <directory> [--debug] Options: -h --help Show this screen. --debug Print deb...
Use four spaces, just like in Python.
Use four spaces, just like in Python.
Python
mit
EmilStenstrom/nephele
"""Nephele - Finding movies to watch on the internet is easy, finding GOOD movies to watch is hard. Let Nephele, the greek nymph of the clouds, help you. Usage: nephele.py get_popular [--debug] nephele.py get_grades <directory> [--debug] Options: -h --help Show this screen. --debug Print debug infor...
"""Nephele - Finding movies to watch on the internet is easy, finding GOOD movies to watch is hard. Let Nephele, the greek nymph of the clouds, help you. Usage: nephele.py get_popular [--debug] nephele.py get_grades <directory> [--debug] Options: -h --help Show this screen. --debug Print deb...
<commit_before>"""Nephele - Finding movies to watch on the internet is easy, finding GOOD movies to watch is hard. Let Nephele, the greek nymph of the clouds, help you. Usage: nephele.py get_popular [--debug] nephele.py get_grades <directory> [--debug] Options: -h --help Show this screen. --debug Pr...
"""Nephele - Finding movies to watch on the internet is easy, finding GOOD movies to watch is hard. Let Nephele, the greek nymph of the clouds, help you. Usage: nephele.py get_popular [--debug] nephele.py get_grades <directory> [--debug] Options: -h --help Show this screen. --debug Print deb...
"""Nephele - Finding movies to watch on the internet is easy, finding GOOD movies to watch is hard. Let Nephele, the greek nymph of the clouds, help you. Usage: nephele.py get_popular [--debug] nephele.py get_grades <directory> [--debug] Options: -h --help Show this screen. --debug Print debug infor...
<commit_before>"""Nephele - Finding movies to watch on the internet is easy, finding GOOD movies to watch is hard. Let Nephele, the greek nymph of the clouds, help you. Usage: nephele.py get_popular [--debug] nephele.py get_grades <directory> [--debug] Options: -h --help Show this screen. --debug Pr...
942044eeab89d81b75836268b3635d49a4dbb3ee
ynr/apps/parties/management/commands/parties_import_from_ec.py
ynr/apps/parties/management/commands/parties_import_from_ec.py
from django.core.management.base import BaseCommand from parties.importer import ECPartyImporter from parties.models import PartyEmblem class Command(BaseCommand): help = "My shiny new management command." def add_arguments(self, parser): parser.add_argument("--clear-emblems", action="store_true") ...
from django.core.management.base import BaseCommand from parties.importer import ECPartyImporter from parties.models import PartyEmblem class Command(BaseCommand): help = """ Import policital parties that can stand candidates from The Electoral Commission's API in to the Parties app. This ...
Document the party importer command
Document the party importer command
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
from django.core.management.base import BaseCommand from parties.importer import ECPartyImporter from parties.models import PartyEmblem class Command(BaseCommand): help = "My shiny new management command." def add_arguments(self, parser): parser.add_argument("--clear-emblems", action="store_true") ...
from django.core.management.base import BaseCommand from parties.importer import ECPartyImporter from parties.models import PartyEmblem class Command(BaseCommand): help = """ Import policital parties that can stand candidates from The Electoral Commission's API in to the Parties app. This ...
<commit_before>from django.core.management.base import BaseCommand from parties.importer import ECPartyImporter from parties.models import PartyEmblem class Command(BaseCommand): help = "My shiny new management command." def add_arguments(self, parser): parser.add_argument("--clear-emblems", action=...
from django.core.management.base import BaseCommand from parties.importer import ECPartyImporter from parties.models import PartyEmblem class Command(BaseCommand): help = """ Import policital parties that can stand candidates from The Electoral Commission's API in to the Parties app. This ...
from django.core.management.base import BaseCommand from parties.importer import ECPartyImporter from parties.models import PartyEmblem class Command(BaseCommand): help = "My shiny new management command." def add_arguments(self, parser): parser.add_argument("--clear-emblems", action="store_true") ...
<commit_before>from django.core.management.base import BaseCommand from parties.importer import ECPartyImporter from parties.models import PartyEmblem class Command(BaseCommand): help = "My shiny new management command." def add_arguments(self, parser): parser.add_argument("--clear-emblems", action=...
08afe7e2946f4343d016f55bfacb4f7bac1d3cb2
herana/urls.py
herana/urls.py
from django.conf.urls import patterns, include, url from django.contrib.auth import views as auth_views from django.contrib import admin from django.views.generic.base import RedirectView urlpatterns = patterns('', url(r'^$', 'herana.views.home', name='home'), url(r'^grappelli/', include('grappelli.urls')), ...
from django.conf.urls import patterns, include, url from django.contrib.auth import views as auth_views from django.contrib import admin admin.site.index_title = 'Dashboard' urlpatterns = patterns('', url(r'^$', 'herana.views.home', name='home'), url(r'^grappelli/', include('grappelli.urls')), url(r'^acco...
Change admin index title: 'Dashboard'
Change admin index title: 'Dashboard'
Python
mit
Code4SA/herana,Code4SA/herana,Code4SA/herana,Code4SA/herana
from django.conf.urls import patterns, include, url from django.contrib.auth import views as auth_views from django.contrib import admin from django.views.generic.base import RedirectView urlpatterns = patterns('', url(r'^$', 'herana.views.home', name='home'), url(r'^grappelli/', include('grappelli.urls')), ...
from django.conf.urls import patterns, include, url from django.contrib.auth import views as auth_views from django.contrib import admin admin.site.index_title = 'Dashboard' urlpatterns = patterns('', url(r'^$', 'herana.views.home', name='home'), url(r'^grappelli/', include('grappelli.urls')), url(r'^acco...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib.auth import views as auth_views from django.contrib import admin from django.views.generic.base import RedirectView urlpatterns = patterns('', url(r'^$', 'herana.views.home', name='home'), url(r'^grappelli/', include('grapp...
from django.conf.urls import patterns, include, url from django.contrib.auth import views as auth_views from django.contrib import admin admin.site.index_title = 'Dashboard' urlpatterns = patterns('', url(r'^$', 'herana.views.home', name='home'), url(r'^grappelli/', include('grappelli.urls')), url(r'^acco...
from django.conf.urls import patterns, include, url from django.contrib.auth import views as auth_views from django.contrib import admin from django.views.generic.base import RedirectView urlpatterns = patterns('', url(r'^$', 'herana.views.home', name='home'), url(r'^grappelli/', include('grappelli.urls')), ...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib.auth import views as auth_views from django.contrib import admin from django.views.generic.base import RedirectView urlpatterns = patterns('', url(r'^$', 'herana.views.home', name='home'), url(r'^grappelli/', include('grapp...
e388e3490502acac90ef4c249ba1af63b5698ab7
print_web_django/api/views.py
print_web_django/api/views.py
from rest_framework import viewsets from . import serializers, models class PrintJobViewSet(viewsets.ModelViewSet): serializer_class = serializers.PrintJobSerializer def get_queryset(self): return self.request.user.printjobs.all()
from rest_framework import viewsets from . import serializers, models class PrintJobViewSet(viewsets.ModelViewSet): serializer_class = serializers.PrintJobSerializer def get_queryset(self): return self.request.user.printjobs.all() def perform_create(self, serializer): # need to also pass...
Add user to posted print object
Add user to posted print object
Python
mit
aabmass/print-web,aabmass/print-web,aabmass/print-web
from rest_framework import viewsets from . import serializers, models class PrintJobViewSet(viewsets.ModelViewSet): serializer_class = serializers.PrintJobSerializer def get_queryset(self): return self.request.user.printjobs.all() Add user to posted print object
from rest_framework import viewsets from . import serializers, models class PrintJobViewSet(viewsets.ModelViewSet): serializer_class = serializers.PrintJobSerializer def get_queryset(self): return self.request.user.printjobs.all() def perform_create(self, serializer): # need to also pass...
<commit_before>from rest_framework import viewsets from . import serializers, models class PrintJobViewSet(viewsets.ModelViewSet): serializer_class = serializers.PrintJobSerializer def get_queryset(self): return self.request.user.printjobs.all() <commit_msg>Add user to posted print object<commit_afte...
from rest_framework import viewsets from . import serializers, models class PrintJobViewSet(viewsets.ModelViewSet): serializer_class = serializers.PrintJobSerializer def get_queryset(self): return self.request.user.printjobs.all() def perform_create(self, serializer): # need to also pass...
from rest_framework import viewsets from . import serializers, models class PrintJobViewSet(viewsets.ModelViewSet): serializer_class = serializers.PrintJobSerializer def get_queryset(self): return self.request.user.printjobs.all() Add user to posted print objectfrom rest_framework import viewsets fro...
<commit_before>from rest_framework import viewsets from . import serializers, models class PrintJobViewSet(viewsets.ModelViewSet): serializer_class = serializers.PrintJobSerializer def get_queryset(self): return self.request.user.printjobs.all() <commit_msg>Add user to posted print object<commit_afte...
be915a11ebd0d9c4e8a0a52b1bdcc7ca2abfbfb1
sms_sender.py
sms_sender.py
from kafka import KafkaConsumer import os import nexmo import json client = nexmo.Client( key=os.environ["API_KEY"], secret=os.environ["API_SECRET"]) consumer = KafkaConsumer(bootstrap_servers=os.environ["KAFKA"], value_deserializer=lambda m: json.loads(m...
from kafka import KafkaConsumer import os import nexmo import json client = nexmo.Client( key=os.environ["API_KEY"], secret=os.environ["API_SECRET"]) consumer = KafkaConsumer(bootstrap_servers=os.environ["KAFKA"], value_deserializer=lambda m: json.loads(m...
Change topic + add exception handling
Change topic + add exception handling
Python
apache-2.0
antongorshkov/kafkasms
from kafka import KafkaConsumer import os import nexmo import json client = nexmo.Client( key=os.environ["API_KEY"], secret=os.environ["API_SECRET"]) consumer = KafkaConsumer(bootstrap_servers=os.environ["KAFKA"], value_deserializer=lambda m: json.loads(m...
from kafka import KafkaConsumer import os import nexmo import json client = nexmo.Client( key=os.environ["API_KEY"], secret=os.environ["API_SECRET"]) consumer = KafkaConsumer(bootstrap_servers=os.environ["KAFKA"], value_deserializer=lambda m: json.loads(m...
<commit_before>from kafka import KafkaConsumer import os import nexmo import json client = nexmo.Client( key=os.environ["API_KEY"], secret=os.environ["API_SECRET"]) consumer = KafkaConsumer(bootstrap_servers=os.environ["KAFKA"], value_deserializer=lambda ...
from kafka import KafkaConsumer import os import nexmo import json client = nexmo.Client( key=os.environ["API_KEY"], secret=os.environ["API_SECRET"]) consumer = KafkaConsumer(bootstrap_servers=os.environ["KAFKA"], value_deserializer=lambda m: json.loads(m...
from kafka import KafkaConsumer import os import nexmo import json client = nexmo.Client( key=os.environ["API_KEY"], secret=os.environ["API_SECRET"]) consumer = KafkaConsumer(bootstrap_servers=os.environ["KAFKA"], value_deserializer=lambda m: json.loads(m...
<commit_before>from kafka import KafkaConsumer import os import nexmo import json client = nexmo.Client( key=os.environ["API_KEY"], secret=os.environ["API_SECRET"]) consumer = KafkaConsumer(bootstrap_servers=os.environ["KAFKA"], value_deserializer=lambda ...
9792b1a03af3a3a3c0b9d517cefaee4c137c2a2d
pyirt/utl/__init__.py
pyirt/utl/__init__.py
__all__ = ["tools", "loader", "clib"] from . import tools from . import loader import pyximport pyximport.install(build_in_temp=True) from . import clib
__all__ = ["tools", "loader", "clib"] from . import tools from . import loader import pyximport pyximport.install(build_dir="/tmp/pyximport/", build_in_temp=True) from . import clib
Add custom build_dir opt for pyximport.install
Add custom build_dir opt for pyximport.install
Python
mit
17zuoye/pyirt,arunlodhi/pyirt,wlbksy/pyirt
__all__ = ["tools", "loader", "clib"] from . import tools from . import loader import pyximport pyximport.install(build_in_temp=True) from . import clib Add custom build_dir opt for pyximport.install
__all__ = ["tools", "loader", "clib"] from . import tools from . import loader import pyximport pyximport.install(build_dir="/tmp/pyximport/", build_in_temp=True) from . import clib
<commit_before>__all__ = ["tools", "loader", "clib"] from . import tools from . import loader import pyximport pyximport.install(build_in_temp=True) from . import clib <commit_msg>Add custom build_dir opt for pyximport.install<commit_after>
__all__ = ["tools", "loader", "clib"] from . import tools from . import loader import pyximport pyximport.install(build_dir="/tmp/pyximport/", build_in_temp=True) from . import clib
__all__ = ["tools", "loader", "clib"] from . import tools from . import loader import pyximport pyximport.install(build_in_temp=True) from . import clib Add custom build_dir opt for pyximport.install__all__ = ["tools", "loader", "clib"] from . import tools from . import loader import pyximport pyximport.install(bui...
<commit_before>__all__ = ["tools", "loader", "clib"] from . import tools from . import loader import pyximport pyximport.install(build_in_temp=True) from . import clib <commit_msg>Add custom build_dir opt for pyximport.install<commit_after>__all__ = ["tools", "loader", "clib"] from . import tools from . import loade...
002a598afbdf86472611c018d17d0eff8a9690aa
flocker/provision/_sphinx.py
flocker/provision/_sphinx.py
from docutils.parsers.rst import Directive from twisted.python.reflect import namedAny from docutils import nodes from docutils.statemachine import StringList class FakeRunner(object): def __init__(self): self.commands = [] def run(self, command): self.commands.extend(command.splitlines()) ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. from inspect import getsourcefile from docutils.parsers.rst import Directive from docutils import nodes from docutils.statemachine import StringList from twisted.python.reflect import namedAny class FakeRunner(object): def __init__(self): self...
Add state change to sphinx plugin.
Add state change to sphinx plugin.
Python
apache-2.0
jml/flocker,wallnerryan/flocker-profiles,runcom/flocker,adamtheturtle/flocker,lukemarsden/flocker,1d4Nf6/flocker,mbrukman/flocker,Azulinho/flocker,moypray/flocker,AndyHuu/flocker,lukemarsden/flocker,agonzalezro/flocker,jml/flocker,1d4Nf6/flocker,runcom/flocker,agonzalezro/flocker,hackday-profilers/flocker,achanda/flock...
from docutils.parsers.rst import Directive from twisted.python.reflect import namedAny from docutils import nodes from docutils.statemachine import StringList class FakeRunner(object): def __init__(self): self.commands = [] def run(self, command): self.commands.extend(command.splitlines()) ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. from inspect import getsourcefile from docutils.parsers.rst import Directive from docutils import nodes from docutils.statemachine import StringList from twisted.python.reflect import namedAny class FakeRunner(object): def __init__(self): self...
<commit_before>from docutils.parsers.rst import Directive from twisted.python.reflect import namedAny from docutils import nodes from docutils.statemachine import StringList class FakeRunner(object): def __init__(self): self.commands = [] def run(self, command): self.commands.extend(command.s...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. from inspect import getsourcefile from docutils.parsers.rst import Directive from docutils import nodes from docutils.statemachine import StringList from twisted.python.reflect import namedAny class FakeRunner(object): def __init__(self): self...
from docutils.parsers.rst import Directive from twisted.python.reflect import namedAny from docutils import nodes from docutils.statemachine import StringList class FakeRunner(object): def __init__(self): self.commands = [] def run(self, command): self.commands.extend(command.splitlines()) ...
<commit_before>from docutils.parsers.rst import Directive from twisted.python.reflect import namedAny from docutils import nodes from docutils.statemachine import StringList class FakeRunner(object): def __init__(self): self.commands = [] def run(self, command): self.commands.extend(command.s...
e5bf18be1ad32a39f0eef2bbc8f5bd4674cef7a5
tests/test_dump.py
tests/test_dump.py
""" Testing gitwash dumper """ from os.path import join as pjoin, dirname, split as psplit import shutil from tempfile import mkdtemp from subprocess import call from nose.tools import assert_true, assert_equal, assert_raises _downpath, _ = psplit(dirname(__file__)) EXE_PTH = pjoin(_downpath, 'gitwash_dumper.py') TM...
""" Testing gitwash dumper """ import os from os.path import join as pjoin, dirname, split as psplit import shutil from tempfile import mkdtemp from subprocess import call from nose.tools import assert_true, assert_false, assert_equal, assert_raises _downpath, _ = psplit(dirname(__file__)) _downpath = os.path.abspat...
TEST - add test for replacement in files
TEST - add test for replacement in files
Python
bsd-2-clause
QuLogic/gitwash,QuLogic/gitwash
""" Testing gitwash dumper """ from os.path import join as pjoin, dirname, split as psplit import shutil from tempfile import mkdtemp from subprocess import call from nose.tools import assert_true, assert_equal, assert_raises _downpath, _ = psplit(dirname(__file__)) EXE_PTH = pjoin(_downpath, 'gitwash_dumper.py') TM...
""" Testing gitwash dumper """ import os from os.path import join as pjoin, dirname, split as psplit import shutil from tempfile import mkdtemp from subprocess import call from nose.tools import assert_true, assert_false, assert_equal, assert_raises _downpath, _ = psplit(dirname(__file__)) _downpath = os.path.abspat...
<commit_before>""" Testing gitwash dumper """ from os.path import join as pjoin, dirname, split as psplit import shutil from tempfile import mkdtemp from subprocess import call from nose.tools import assert_true, assert_equal, assert_raises _downpath, _ = psplit(dirname(__file__)) EXE_PTH = pjoin(_downpath, 'gitwash...
""" Testing gitwash dumper """ import os from os.path import join as pjoin, dirname, split as psplit import shutil from tempfile import mkdtemp from subprocess import call from nose.tools import assert_true, assert_false, assert_equal, assert_raises _downpath, _ = psplit(dirname(__file__)) _downpath = os.path.abspat...
""" Testing gitwash dumper """ from os.path import join as pjoin, dirname, split as psplit import shutil from tempfile import mkdtemp from subprocess import call from nose.tools import assert_true, assert_equal, assert_raises _downpath, _ = psplit(dirname(__file__)) EXE_PTH = pjoin(_downpath, 'gitwash_dumper.py') TM...
<commit_before>""" Testing gitwash dumper """ from os.path import join as pjoin, dirname, split as psplit import shutil from tempfile import mkdtemp from subprocess import call from nose.tools import assert_true, assert_equal, assert_raises _downpath, _ = psplit(dirname(__file__)) EXE_PTH = pjoin(_downpath, 'gitwash...
d2438a4f3618a2f087ddf49380c5753a4b9805d5
zou/app/models/attachment_file.py
zou/app/models/attachment_file.py
from sqlalchemy_utils import UUIDType from zou.app import db from zou.app.models.serializer import SerializerMixin from zou.app.models.base import BaseMixin class AttachmentFile(db.Model, BaseMixin, SerializerMixin): """ Describes a file which is attached to a comment. """ name = db.Column(db.String...
from sqlalchemy_utils import UUIDType from zou.app import db from zou.app.models.serializer import SerializerMixin from zou.app.models.base import BaseMixin class AttachmentFile(db.Model, BaseMixin, SerializerMixin): """ Describes a file which is attached to a comment. """ name = db.Column(db.String...
Fix import for attachment files
[sync] Fix import for attachment files
Python
agpl-3.0
cgwire/zou
from sqlalchemy_utils import UUIDType from zou.app import db from zou.app.models.serializer import SerializerMixin from zou.app.models.base import BaseMixin class AttachmentFile(db.Model, BaseMixin, SerializerMixin): """ Describes a file which is attached to a comment. """ name = db.Column(db.String...
from sqlalchemy_utils import UUIDType from zou.app import db from zou.app.models.serializer import SerializerMixin from zou.app.models.base import BaseMixin class AttachmentFile(db.Model, BaseMixin, SerializerMixin): """ Describes a file which is attached to a comment. """ name = db.Column(db.String...
<commit_before>from sqlalchemy_utils import UUIDType from zou.app import db from zou.app.models.serializer import SerializerMixin from zou.app.models.base import BaseMixin class AttachmentFile(db.Model, BaseMixin, SerializerMixin): """ Describes a file which is attached to a comment. """ name = db.C...
from sqlalchemy_utils import UUIDType from zou.app import db from zou.app.models.serializer import SerializerMixin from zou.app.models.base import BaseMixin class AttachmentFile(db.Model, BaseMixin, SerializerMixin): """ Describes a file which is attached to a comment. """ name = db.Column(db.String...
from sqlalchemy_utils import UUIDType from zou.app import db from zou.app.models.serializer import SerializerMixin from zou.app.models.base import BaseMixin class AttachmentFile(db.Model, BaseMixin, SerializerMixin): """ Describes a file which is attached to a comment. """ name = db.Column(db.String...
<commit_before>from sqlalchemy_utils import UUIDType from zou.app import db from zou.app.models.serializer import SerializerMixin from zou.app.models.base import BaseMixin class AttachmentFile(db.Model, BaseMixin, SerializerMixin): """ Describes a file which is attached to a comment. """ name = db.C...
fea9c44be08719f0fcca98a1d531a83c9db4c6af
tests/test_urls.py
tests/test_urls.py
import pytest from django.conf import settings from pytest_django_test.compat import force_text pytestmark = pytest.mark.urls('pytest_django_test.urls_overridden') try: from django.core.urlresolvers import is_valid_path except ImportError: from django.core.urlresolvers import resolve, Resolver404 def is...
import pytest from django.conf import settings from pytest_django_test.compat import force_text try: from django.core.urlresolvers import is_valid_path except ImportError: from django.core.urlresolvers import resolve, Resolver404 def is_valid_path(path, urlconf=None): """Return True if path reso...
Add test to confirm url cache is cleared
Add test to confirm url cache is cleared
Python
bsd-3-clause
pombredanne/pytest_django,thedrow/pytest-django,ktosiek/pytest-django,tomviner/pytest-django
import pytest from django.conf import settings from pytest_django_test.compat import force_text pytestmark = pytest.mark.urls('pytest_django_test.urls_overridden') try: from django.core.urlresolvers import is_valid_path except ImportError: from django.core.urlresolvers import resolve, Resolver404 def is...
import pytest from django.conf import settings from pytest_django_test.compat import force_text try: from django.core.urlresolvers import is_valid_path except ImportError: from django.core.urlresolvers import resolve, Resolver404 def is_valid_path(path, urlconf=None): """Return True if path reso...
<commit_before>import pytest from django.conf import settings from pytest_django_test.compat import force_text pytestmark = pytest.mark.urls('pytest_django_test.urls_overridden') try: from django.core.urlresolvers import is_valid_path except ImportError: from django.core.urlresolvers import resolve, Resolver...
import pytest from django.conf import settings from pytest_django_test.compat import force_text try: from django.core.urlresolvers import is_valid_path except ImportError: from django.core.urlresolvers import resolve, Resolver404 def is_valid_path(path, urlconf=None): """Return True if path reso...
import pytest from django.conf import settings from pytest_django_test.compat import force_text pytestmark = pytest.mark.urls('pytest_django_test.urls_overridden') try: from django.core.urlresolvers import is_valid_path except ImportError: from django.core.urlresolvers import resolve, Resolver404 def is...
<commit_before>import pytest from django.conf import settings from pytest_django_test.compat import force_text pytestmark = pytest.mark.urls('pytest_django_test.urls_overridden') try: from django.core.urlresolvers import is_valid_path except ImportError: from django.core.urlresolvers import resolve, Resolver...
9f0b9b68a3c9dfaa64942e55fc97e435b8eb6f50
bayespy/nodes/__init__.py
bayespy/nodes/__init__.py
################################################################################ # Copyright (C) 2013 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Package for nodes used to construct the model. Stochastic nodes =...
################################################################################ # Copyright (C) 2013 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Package for nodes used to construct the model. Stochastic nodes =...
Include Add node in user API documentation
DOC: Include Add node in user API documentation
Python
mit
bayespy/bayespy,jluttine/bayespy
################################################################################ # Copyright (C) 2013 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Package for nodes used to construct the model. Stochastic nodes =...
################################################################################ # Copyright (C) 2013 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Package for nodes used to construct the model. Stochastic nodes =...
<commit_before>################################################################################ # Copyright (C) 2013 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Package for nodes used to construct the model. Sto...
################################################################################ # Copyright (C) 2013 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Package for nodes used to construct the model. Stochastic nodes =...
################################################################################ # Copyright (C) 2013 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Package for nodes used to construct the model. Stochastic nodes =...
<commit_before>################################################################################ # Copyright (C) 2013 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Package for nodes used to construct the model. Sto...
30f0b99a2233c6009a3c41d9b22e3f946c40c3cf
kitchen/urls.py
kitchen/urls.py
"""Root URL routing""" from django.conf.urls.defaults import patterns from django.conf.urls.static import static from django.views.generic import TemplateView from kitchen.dashboard import api import kitchen.settings as settings urlpatterns = patterns('', (r'^$', 'kitchen.dashboard.views.list'), (r'^virt/$',...
"""Root URL routing""" from django.conf.urls.defaults import patterns from django.conf.urls.static import static from django.views.generic import TemplateView from kitchen.dashboard import api import kitchen.settings as settings if settings.SHOW_LIST_VIEW: root_view = 'kitchen.dashboard.views.list' elif settings...
Set root view depending on what views are enabled
Set root view depending on what views are enabled
Python
apache-2.0
edelight/kitchen,edelight/kitchen,edelight/kitchen,edelight/kitchen
"""Root URL routing""" from django.conf.urls.defaults import patterns from django.conf.urls.static import static from django.views.generic import TemplateView from kitchen.dashboard import api import kitchen.settings as settings urlpatterns = patterns('', (r'^$', 'kitchen.dashboard.views.list'), (r'^virt/$',...
"""Root URL routing""" from django.conf.urls.defaults import patterns from django.conf.urls.static import static from django.views.generic import TemplateView from kitchen.dashboard import api import kitchen.settings as settings if settings.SHOW_LIST_VIEW: root_view = 'kitchen.dashboard.views.list' elif settings...
<commit_before>"""Root URL routing""" from django.conf.urls.defaults import patterns from django.conf.urls.static import static from django.views.generic import TemplateView from kitchen.dashboard import api import kitchen.settings as settings urlpatterns = patterns('', (r'^$', 'kitchen.dashboard.views.list'), ...
"""Root URL routing""" from django.conf.urls.defaults import patterns from django.conf.urls.static import static from django.views.generic import TemplateView from kitchen.dashboard import api import kitchen.settings as settings if settings.SHOW_LIST_VIEW: root_view = 'kitchen.dashboard.views.list' elif settings...
"""Root URL routing""" from django.conf.urls.defaults import patterns from django.conf.urls.static import static from django.views.generic import TemplateView from kitchen.dashboard import api import kitchen.settings as settings urlpatterns = patterns('', (r'^$', 'kitchen.dashboard.views.list'), (r'^virt/$',...
<commit_before>"""Root URL routing""" from django.conf.urls.defaults import patterns from django.conf.urls.static import static from django.views.generic import TemplateView from kitchen.dashboard import api import kitchen.settings as settings urlpatterns = patterns('', (r'^$', 'kitchen.dashboard.views.list'), ...
8c05a08d3d0a9a759c7bbbca6a975d5dfc0e166b
apps/auth/db/db.py
apps/auth/db/db.py
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import bcryp...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import bcryp...
Check that the session is the right one
[SD-1422] Check that the session is the right one
Python
agpl-3.0
fritzSF/superdesk,verifiedpixel/superdesk,fritzSF/superdesk,akintolga/superdesk,fritzSF/superdesk,superdesk/superdesk-aap,ancafarcas/superdesk,darconny/superdesk,ancafarcas/superdesk,darconny/superdesk,verifiedpixel/superdesk,akintolga/superdesk-aap,Aca-jov/superdesk,sivakuna-aap/superdesk,mugurrus/superdesk,ioanpocol/...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import bcryp...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import bcryp...
<commit_before># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/licens...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import bcryp...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import bcryp...
<commit_before># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/licens...
6ff11990b7d22be537eb6cbf4f373e1e416ecaf2
spiralgalaxygame/tests/test_callee.py
spiralgalaxygame/tests/test_callee.py
import unittest from spiralgalaxygame import callee class calleeTests (unittest.TestCase): def test_str_of_func(self): def my_func(): pass self.assertEqual(callee.name_of(my_func), 'my_func') def test_str_of_type(self): class MyType (object): pass self.assertEqual(callee.na...
import unittest from spiralgalaxygame import callee class calleeTests (unittest.TestCase): def test_str_of_func(self): def my_func(): pass self.assertEqual(callee.name_of(my_func), 'my_func') def test_str_of_type(self): class MyType (object): pass self.assertEqu...
Break an empty func definition into multiple lines for clearer coverage output.
Break an empty func definition into multiple lines for clearer coverage output.
Python
agpl-3.0
nejucomo/sgg,nejucomo/sgg,nejucomo/sgg
import unittest from spiralgalaxygame import callee class calleeTests (unittest.TestCase): def test_str_of_func(self): def my_func(): pass self.assertEqual(callee.name_of(my_func), 'my_func') def test_str_of_type(self): class MyType (object): pass self.assertEqual(callee.na...
import unittest from spiralgalaxygame import callee class calleeTests (unittest.TestCase): def test_str_of_func(self): def my_func(): pass self.assertEqual(callee.name_of(my_func), 'my_func') def test_str_of_type(self): class MyType (object): pass self.assertEqu...
<commit_before>import unittest from spiralgalaxygame import callee class calleeTests (unittest.TestCase): def test_str_of_func(self): def my_func(): pass self.assertEqual(callee.name_of(my_func), 'my_func') def test_str_of_type(self): class MyType (object): pass self.assert...
import unittest from spiralgalaxygame import callee class calleeTests (unittest.TestCase): def test_str_of_func(self): def my_func(): pass self.assertEqual(callee.name_of(my_func), 'my_func') def test_str_of_type(self): class MyType (object): pass self.assertEqu...
import unittest from spiralgalaxygame import callee class calleeTests (unittest.TestCase): def test_str_of_func(self): def my_func(): pass self.assertEqual(callee.name_of(my_func), 'my_func') def test_str_of_type(self): class MyType (object): pass self.assertEqual(callee.na...
<commit_before>import unittest from spiralgalaxygame import callee class calleeTests (unittest.TestCase): def test_str_of_func(self): def my_func(): pass self.assertEqual(callee.name_of(my_func), 'my_func') def test_str_of_type(self): class MyType (object): pass self.assert...
ad813973421ed828f724a999fabbc12c4e429247
src/nodeconductor_paas_oracle/filters.py
src/nodeconductor_paas_oracle/filters.py
import django_filters from .models import Deployment class DeploymentFilter(django_filters.FilterSet): db_name = django_filters.CharFilter() state = django_filters.CharFilter() class Meta(object): model = Deployment fields = [ 'db_name', 'state', ] ...
import django_filters from nodeconductor.structure.filters import BaseResourceStateFilter from .models import Deployment class DeploymentFilter(BaseResourceStateFilter): db_name = django_filters.CharFilter() class Meta(BaseResourceStateFilter.Meta): model = Deployment fields = [ ...
Use generic state filter instead of custom one
Use generic state filter instead of custom one - ITACLOUD-6837
Python
mit
opennode/nodeconductor-paas-oracle
import django_filters from .models import Deployment class DeploymentFilter(django_filters.FilterSet): db_name = django_filters.CharFilter() state = django_filters.CharFilter() class Meta(object): model = Deployment fields = [ 'db_name', 'state', ] ...
import django_filters from nodeconductor.structure.filters import BaseResourceStateFilter from .models import Deployment class DeploymentFilter(BaseResourceStateFilter): db_name = django_filters.CharFilter() class Meta(BaseResourceStateFilter.Meta): model = Deployment fields = [ ...
<commit_before>import django_filters from .models import Deployment class DeploymentFilter(django_filters.FilterSet): db_name = django_filters.CharFilter() state = django_filters.CharFilter() class Meta(object): model = Deployment fields = [ 'db_name', 'state', ...
import django_filters from nodeconductor.structure.filters import BaseResourceStateFilter from .models import Deployment class DeploymentFilter(BaseResourceStateFilter): db_name = django_filters.CharFilter() class Meta(BaseResourceStateFilter.Meta): model = Deployment fields = [ ...
import django_filters from .models import Deployment class DeploymentFilter(django_filters.FilterSet): db_name = django_filters.CharFilter() state = django_filters.CharFilter() class Meta(object): model = Deployment fields = [ 'db_name', 'state', ] ...
<commit_before>import django_filters from .models import Deployment class DeploymentFilter(django_filters.FilterSet): db_name = django_filters.CharFilter() state = django_filters.CharFilter() class Meta(object): model = Deployment fields = [ 'db_name', 'state', ...
d4da069b43174482f3a75e9553e8283be905fa16
cla_public/apps/base/filters.py
cla_public/apps/base/filters.py
# -*- coding: utf-8 -*- "Jinja custom filters" import re from cla_public.apps.base import base from babel.dates import format_datetime @base.app_template_filter() def datetime(dt, format='medium', locale='en_GB'): if format == 'full': format = "EEEE, d MMMM y 'at' HH:mm" elif format == 'medium': ...
# -*- coding: utf-8 -*- "Jinja custom filters" import re from urlparse import urlparse, parse_qs from cla_public.apps.base import base from babel.dates import format_datetime @base.app_template_filter() def datetime(dt, format='medium', locale='en_GB'): if format == 'full': format = "EEEE, d MMMM y 'at' ...
Add Jinja filter to convert URL params to dict
BE: Add Jinja filter to convert URL params to dict
Python
mit
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
# -*- coding: utf-8 -*- "Jinja custom filters" import re from cla_public.apps.base import base from babel.dates import format_datetime @base.app_template_filter() def datetime(dt, format='medium', locale='en_GB'): if format == 'full': format = "EEEE, d MMMM y 'at' HH:mm" elif format == 'medium': ...
# -*- coding: utf-8 -*- "Jinja custom filters" import re from urlparse import urlparse, parse_qs from cla_public.apps.base import base from babel.dates import format_datetime @base.app_template_filter() def datetime(dt, format='medium', locale='en_GB'): if format == 'full': format = "EEEE, d MMMM y 'at' ...
<commit_before># -*- coding: utf-8 -*- "Jinja custom filters" import re from cla_public.apps.base import base from babel.dates import format_datetime @base.app_template_filter() def datetime(dt, format='medium', locale='en_GB'): if format == 'full': format = "EEEE, d MMMM y 'at' HH:mm" elif format ==...
# -*- coding: utf-8 -*- "Jinja custom filters" import re from urlparse import urlparse, parse_qs from cla_public.apps.base import base from babel.dates import format_datetime @base.app_template_filter() def datetime(dt, format='medium', locale='en_GB'): if format == 'full': format = "EEEE, d MMMM y 'at' ...
# -*- coding: utf-8 -*- "Jinja custom filters" import re from cla_public.apps.base import base from babel.dates import format_datetime @base.app_template_filter() def datetime(dt, format='medium', locale='en_GB'): if format == 'full': format = "EEEE, d MMMM y 'at' HH:mm" elif format == 'medium': ...
<commit_before># -*- coding: utf-8 -*- "Jinja custom filters" import re from cla_public.apps.base import base from babel.dates import format_datetime @base.app_template_filter() def datetime(dt, format='medium', locale='en_GB'): if format == 'full': format = "EEEE, d MMMM y 'at' HH:mm" elif format ==...
cd374366dc6d49cc543a037fba8398e5b724c382
tabula/util.py
tabula/util.py
import warnings import platform def deprecated(func): """This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used.""" def newFunc(*args, **kwargs): warnings.warn("Call to deprecated function {}.".format(func.__n...
import warnings import platform def deprecated(func): """This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used.""" def newFunc(*args, **kwargs): warnings.warn("Call to deprecated function {}.".format(func.__n...
Remove textwrap because python 2.7 lacks indent() function
Remove textwrap because python 2.7 lacks indent() function
Python
mit
chezou/tabula-py
import warnings import platform def deprecated(func): """This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used.""" def newFunc(*args, **kwargs): warnings.warn("Call to deprecated function {}.".format(func.__n...
import warnings import platform def deprecated(func): """This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used.""" def newFunc(*args, **kwargs): warnings.warn("Call to deprecated function {}.".format(func.__n...
<commit_before>import warnings import platform def deprecated(func): """This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used.""" def newFunc(*args, **kwargs): warnings.warn("Call to deprecated function {}."....
import warnings import platform def deprecated(func): """This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used.""" def newFunc(*args, **kwargs): warnings.warn("Call to deprecated function {}.".format(func.__n...
import warnings import platform def deprecated(func): """This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used.""" def newFunc(*args, **kwargs): warnings.warn("Call to deprecated function {}.".format(func.__n...
<commit_before>import warnings import platform def deprecated(func): """This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used.""" def newFunc(*args, **kwargs): warnings.warn("Call to deprecated function {}."....
ab640dc35ff87bc32e1e3b54012f69610e73d8d0
sync_scheduler.py
sync_scheduler.py
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync import kombu from datetime import datetime import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queueing_at = datetime.utcnow() users = db.users.find( ...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queuein...
Make scheduler do primary reads only
Make scheduler do primary reads only
Python
apache-2.0
cmgrote/tapiriik,niosus/tapiriik,gavioto/tapiriik,dlenski/tapiriik,olamy/tapiriik,cmgrote/tapiriik,olamy/tapiriik,cheatos101/tapiriik,gavioto/tapiriik,marxin/tapiriik,niosus/tapiriik,cheatos101/tapiriik,cheatos101/tapiriik,mduggan/tapiriik,campbellr/tapiriik,abs0/tapiriik,mjnbike/tapiriik,niosus/tapiriik,marxin/tapirii...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync import kombu from datetime import datetime import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queueing_at = datetime.utcnow() users = db.users.find( ...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queuein...
<commit_before>from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync import kombu from datetime import datetime import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queueing_at = datetime.utcnow() users = db....
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync from datetime import datetime from pymongo.read_preferences import ReadPreference import kombu import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queuein...
from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync import kombu from datetime import datetime import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queueing_at = datetime.utcnow() users = db.users.find( ...
<commit_before>from tapiriik.database import db from tapiriik.messagequeue import mq from tapiriik.sync import Sync import kombu from datetime import datetime import time Sync.InitializeWorkerBindings() producer = kombu.Producer(Sync._channel, Sync._exchange) while True: queueing_at = datetime.utcnow() users = db....
a7328bd229070126ca5b09bb1c9fe4c5e319bb04
members/urls.py
members/urls.py
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
Add url for user's profile
Add url for user's profile
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
<commit_before>from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_stu...
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
<commit_before>from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_stu...
dbc7ad0dad6161d19f65bbf186d84d23628cfd16
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
Add entry point for the CLI script
Add entry point for the CLI script
Python
mit
jcollado/pic2map,jcollado/pic2map,jcollado/pic2map
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.....
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.....
d94853ee368fdf4a8ef80c72dd22a9f2b2074ab3
setup.py
setup.py
from setuptools import setup, find_packages import account setup( name="django-user-accounts", version=account.__version__, author="Brian Rosner", author_email="[email protected]", description="a Django user account app", long_description=open("README.rst").read(), license="MIT", url=...
from setuptools import setup, find_packages import account setup( name="django-user-accounts", version=account.__version__, author="Brian Rosner", author_email="[email protected]", description="a Django user account app", long_description=open("README.rst").read(), license="MIT", url=...
Set new minimum django-appconf version
Set new minimum django-appconf version
Python
mit
GeoNode/geonode-user-accounts,mysociety/django-user-accounts,nderituedwin/django-user-accounts,nderituedwin/django-user-accounts,pinax/django-user-accounts,ntucker/django-user-accounts,jpotterm/django-user-accounts,jawed123/django-user-accounts,GeoNode/geonode-user-accounts,jawed123/django-user-accounts,pinax/django-us...
from setuptools import setup, find_packages import account setup( name="django-user-accounts", version=account.__version__, author="Brian Rosner", author_email="[email protected]", description="a Django user account app", long_description=open("README.rst").read(), license="MIT", url=...
from setuptools import setup, find_packages import account setup( name="django-user-accounts", version=account.__version__, author="Brian Rosner", author_email="[email protected]", description="a Django user account app", long_description=open("README.rst").read(), license="MIT", url=...
<commit_before>from setuptools import setup, find_packages import account setup( name="django-user-accounts", version=account.__version__, author="Brian Rosner", author_email="[email protected]", description="a Django user account app", long_description=open("README.rst").read(), license=...
from setuptools import setup, find_packages import account setup( name="django-user-accounts", version=account.__version__, author="Brian Rosner", author_email="[email protected]", description="a Django user account app", long_description=open("README.rst").read(), license="MIT", url=...
from setuptools import setup, find_packages import account setup( name="django-user-accounts", version=account.__version__, author="Brian Rosner", author_email="[email protected]", description="a Django user account app", long_description=open("README.rst").read(), license="MIT", url=...
<commit_before>from setuptools import setup, find_packages import account setup( name="django-user-accounts", version=account.__version__, author="Brian Rosner", author_email="[email protected]", description="a Django user account app", long_description=open("README.rst").read(), license=...
4d83306f89710d70571e2b2fc2f3a61af8b5793b
setup.py
setup.py
from setuptools import setup setup( name='aws-helpers', description='Set of AWS helper scripts', url='https://github.com/otype/aws-helpers', author='Hans-Gunther Schmidt', author_email='[email protected]', version='0.1', install_requires=['awscli', 'boto'], scripts=['src/aws-instances', 'src...
from setuptools import setup setup( name='aws-helpers', description='Set of AWS helper scripts', url='https://github.com/otype/aws-helpers', author='Hans-Gunther Schmidt', author_email='[email protected]', version='0.1', install_requires=['awscli==1.12.2'], scripts=['src/aws-instances', 'src...
Fix awscli to 1.12.2 as there are errors in later versions
Fix awscli to 1.12.2 as there are errors in later versions
Python
mit
otype/aws-helpers,otype/aws-helpers
from setuptools import setup setup( name='aws-helpers', description='Set of AWS helper scripts', url='https://github.com/otype/aws-helpers', author='Hans-Gunther Schmidt', author_email='[email protected]', version='0.1', install_requires=['awscli', 'boto'], scripts=['src/aws-instances', 'src...
from setuptools import setup setup( name='aws-helpers', description='Set of AWS helper scripts', url='https://github.com/otype/aws-helpers', author='Hans-Gunther Schmidt', author_email='[email protected]', version='0.1', install_requires=['awscli==1.12.2'], scripts=['src/aws-instances', 'src...
<commit_before>from setuptools import setup setup( name='aws-helpers', description='Set of AWS helper scripts', url='https://github.com/otype/aws-helpers', author='Hans-Gunther Schmidt', author_email='[email protected]', version='0.1', install_requires=['awscli', 'boto'], scripts=['src/aws-i...
from setuptools import setup setup( name='aws-helpers', description='Set of AWS helper scripts', url='https://github.com/otype/aws-helpers', author='Hans-Gunther Schmidt', author_email='[email protected]', version='0.1', install_requires=['awscli==1.12.2'], scripts=['src/aws-instances', 'src...
from setuptools import setup setup( name='aws-helpers', description='Set of AWS helper scripts', url='https://github.com/otype/aws-helpers', author='Hans-Gunther Schmidt', author_email='[email protected]', version='0.1', install_requires=['awscli', 'boto'], scripts=['src/aws-instances', 'src...
<commit_before>from setuptools import setup setup( name='aws-helpers', description='Set of AWS helper scripts', url='https://github.com/otype/aws-helpers', author='Hans-Gunther Schmidt', author_email='[email protected]', version='0.1', install_requires=['awscli', 'boto'], scripts=['src/aws-i...
49b13a33d37daa513345f629f5466f9807e24b49
setup.py
setup.py
from setuptools import setup def read(f): try: with open(f) as file: return file.read() except: return "" setup(name='shellvars-py', version='0.1.2', description='Read environment variables defined in a shell script into Python.', author_email='aneil.mallavar@gmai...
from setuptools import setup def read(f): try: with open(f) as file: return file.read() except: return "" setup(name='shellvars-py', version='0.1.2', description='Read environment variables defined in a shell script into Python.', author_email='aneil.mallavar@gmai...
Add POSIX as supported OS type
Add POSIX as supported OS type
Python
apache-2.0
aneilbaboo/shellvars-py
from setuptools import setup def read(f): try: with open(f) as file: return file.read() except: return "" setup(name='shellvars-py', version='0.1.2', description='Read environment variables defined in a shell script into Python.', author_email='aneil.mallavar@gmai...
from setuptools import setup def read(f): try: with open(f) as file: return file.read() except: return "" setup(name='shellvars-py', version='0.1.2', description='Read environment variables defined in a shell script into Python.', author_email='aneil.mallavar@gmai...
<commit_before>from setuptools import setup def read(f): try: with open(f) as file: return file.read() except: return "" setup(name='shellvars-py', version='0.1.2', description='Read environment variables defined in a shell script into Python.', author_email='anei...
from setuptools import setup def read(f): try: with open(f) as file: return file.read() except: return "" setup(name='shellvars-py', version='0.1.2', description='Read environment variables defined in a shell script into Python.', author_email='aneil.mallavar@gmai...
from setuptools import setup def read(f): try: with open(f) as file: return file.read() except: return "" setup(name='shellvars-py', version='0.1.2', description='Read environment variables defined in a shell script into Python.', author_email='aneil.mallavar@gmai...
<commit_before>from setuptools import setup def read(f): try: with open(f) as file: return file.read() except: return "" setup(name='shellvars-py', version='0.1.2', description='Read environment variables defined in a shell script into Python.', author_email='anei...
166f3d59e40ac795bc929235f8da8e192d25ed93
setup.py
setup.py
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_packa...
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_packa...
Revert "Pin to same version as on production."
Revert "Pin to same version as on production." This reverts commit cd93e130ada22ae66c406ad67101e3b1bf892053.
Python
apache-2.0
uw-it-aca/mdot,charlon/mdot,charlon/mdot,uw-it-aca/mdot,charlon/mdot,uw-it-aca/mdot,uw-it-aca/mdot
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_packa...
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_packa...
<commit_before>import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], ...
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_packa...
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], include_packa...
<commit_before>import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='mdot', version='0.1', packages=['mdot'], ...
701e1ca3f71653fe472a010b1f1ef0ec2be1eaf1
setup.py
setup.py
"""Setuptools configuration for rpmvenv.""" from setuptools import setup from setuptools import find_packages with open('README.rst', 'r') as readmefile: README = readmefile.read() setup( name='rpmvenv', version='0.1.1', url='https://github.com/kevinconway/rpmvenv', description='RPM packager fo...
"""Setuptools configuration for rpmvenv.""" from setuptools import setup from setuptools import find_packages with open('README.rst', 'r') as readmefile: README = readmefile.read() setup( name='rpmvenv', version='0.1.2', url='https://github.com/kevinconway/rpmvenv', description='RPM packager fo...
Fix missing templates in source packages
Fix missing templates in source packages Signed-off-by: Kevin Conway <[email protected]>
Python
mit
kevinconway/rpmvenv
"""Setuptools configuration for rpmvenv.""" from setuptools import setup from setuptools import find_packages with open('README.rst', 'r') as readmefile: README = readmefile.read() setup( name='rpmvenv', version='0.1.1', url='https://github.com/kevinconway/rpmvenv', description='RPM packager fo...
"""Setuptools configuration for rpmvenv.""" from setuptools import setup from setuptools import find_packages with open('README.rst', 'r') as readmefile: README = readmefile.read() setup( name='rpmvenv', version='0.1.2', url='https://github.com/kevinconway/rpmvenv', description='RPM packager fo...
<commit_before>"""Setuptools configuration for rpmvenv.""" from setuptools import setup from setuptools import find_packages with open('README.rst', 'r') as readmefile: README = readmefile.read() setup( name='rpmvenv', version='0.1.1', url='https://github.com/kevinconway/rpmvenv', description='...
"""Setuptools configuration for rpmvenv.""" from setuptools import setup from setuptools import find_packages with open('README.rst', 'r') as readmefile: README = readmefile.read() setup( name='rpmvenv', version='0.1.2', url='https://github.com/kevinconway/rpmvenv', description='RPM packager fo...
"""Setuptools configuration for rpmvenv.""" from setuptools import setup from setuptools import find_packages with open('README.rst', 'r') as readmefile: README = readmefile.read() setup( name='rpmvenv', version='0.1.1', url='https://github.com/kevinconway/rpmvenv', description='RPM packager fo...
<commit_before>"""Setuptools configuration for rpmvenv.""" from setuptools import setup from setuptools import find_packages with open('README.rst', 'r') as readmefile: README = readmefile.read() setup( name='rpmvenv', version='0.1.1', url='https://github.com/kevinconway/rpmvenv', description='...
66dcfe1561f7ab2424aec58801f547001575b885
setup.py
setup.py
from distutils.core import setup with open('README.rst') as readme: long_description = readme.read() VERSION = '0.1.1' setup( install_requires=['gmusicapi', 'colorama', 'requests', 'tqdm', 'eyed3'], name='gmusicsync', version=VERSION, py_modules=['gmusicsync'], url='https://github.com/sashgor...
from distutils.core import setup with open('README.rst') as readme: long_description = readme.read() VERSION = '0.1.2' setup( install_requires=['gmusicapi', 'colorama', 'requests', 'tqdm', 'eyed3'], name='gmusicsync', version=VERSION, py_modules=['gmusicsync'], url='https://github.com/sashgor...
Fix script name Bump to 0.1.2
Fix script name Bump to 0.1.2
Python
mit
sashgorokhov/gmusicsync
from distutils.core import setup with open('README.rst') as readme: long_description = readme.read() VERSION = '0.1.1' setup( install_requires=['gmusicapi', 'colorama', 'requests', 'tqdm', 'eyed3'], name='gmusicsync', version=VERSION, py_modules=['gmusicsync'], url='https://github.com/sashgor...
from distutils.core import setup with open('README.rst') as readme: long_description = readme.read() VERSION = '0.1.2' setup( install_requires=['gmusicapi', 'colorama', 'requests', 'tqdm', 'eyed3'], name='gmusicsync', version=VERSION, py_modules=['gmusicsync'], url='https://github.com/sashgor...
<commit_before>from distutils.core import setup with open('README.rst') as readme: long_description = readme.read() VERSION = '0.1.1' setup( install_requires=['gmusicapi', 'colorama', 'requests', 'tqdm', 'eyed3'], name='gmusicsync', version=VERSION, py_modules=['gmusicsync'], url='https://git...
from distutils.core import setup with open('README.rst') as readme: long_description = readme.read() VERSION = '0.1.2' setup( install_requires=['gmusicapi', 'colorama', 'requests', 'tqdm', 'eyed3'], name='gmusicsync', version=VERSION, py_modules=['gmusicsync'], url='https://github.com/sashgor...
from distutils.core import setup with open('README.rst') as readme: long_description = readme.read() VERSION = '0.1.1' setup( install_requires=['gmusicapi', 'colorama', 'requests', 'tqdm', 'eyed3'], name='gmusicsync', version=VERSION, py_modules=['gmusicsync'], url='https://github.com/sashgor...
<commit_before>from distutils.core import setup with open('README.rst') as readme: long_description = readme.read() VERSION = '0.1.1' setup( install_requires=['gmusicapi', 'colorama', 'requests', 'tqdm', 'eyed3'], name='gmusicsync', version=VERSION, py_modules=['gmusicsync'], url='https://git...
0793f8dcb6ed27832e7d0adfb920d9c70813f3c7
tasks.py
tasks.py
# -*- coding: utf-8 -*- from invoke import task, run @task def clean(): run("rm -rf .coverage dist build") @task(clean, default=True) def test(): run("py.test") @task(test) def install(): run("pandoc --from=markdown --to=rst README.md -o README.rst") run("python setup.py develop") @task(test) d...
# -*- coding: utf-8 -*- from invoke import task @task def clean(context): context.run("rm -rf .coverage dist build") @task(clean, default=True) def test(context): context.run("py.test") @task(test) def install(context): context.run("pandoc --from=markdown --to=rst README.md -o README.rst") contex...
Use new invoke's context parameter
Use new invoke's context parameter
Python
apache-2.0
miso-belica/sumy,miso-belica/sumy
# -*- coding: utf-8 -*- from invoke import task, run @task def clean(): run("rm -rf .coverage dist build") @task(clean, default=True) def test(): run("py.test") @task(test) def install(): run("pandoc --from=markdown --to=rst README.md -o README.rst") run("python setup.py develop") @task(test) d...
# -*- coding: utf-8 -*- from invoke import task @task def clean(context): context.run("rm -rf .coverage dist build") @task(clean, default=True) def test(context): context.run("py.test") @task(test) def install(context): context.run("pandoc --from=markdown --to=rst README.md -o README.rst") contex...
<commit_before># -*- coding: utf-8 -*- from invoke import task, run @task def clean(): run("rm -rf .coverage dist build") @task(clean, default=True) def test(): run("py.test") @task(test) def install(): run("pandoc --from=markdown --to=rst README.md -o README.rst") run("python setup.py develop") ...
# -*- coding: utf-8 -*- from invoke import task @task def clean(context): context.run("rm -rf .coverage dist build") @task(clean, default=True) def test(context): context.run("py.test") @task(test) def install(context): context.run("pandoc --from=markdown --to=rst README.md -o README.rst") contex...
# -*- coding: utf-8 -*- from invoke import task, run @task def clean(): run("rm -rf .coverage dist build") @task(clean, default=True) def test(): run("py.test") @task(test) def install(): run("pandoc --from=markdown --to=rst README.md -o README.rst") run("python setup.py develop") @task(test) d...
<commit_before># -*- coding: utf-8 -*- from invoke import task, run @task def clean(): run("rm -rf .coverage dist build") @task(clean, default=True) def test(): run("py.test") @task(test) def install(): run("pandoc --from=markdown --to=rst README.md -o README.rst") run("python setup.py develop") ...
f108da5ab277187fa146fc7db060f706b5e3f0ed
rest/authorView.py
rest/authorView.py
# Author: Braedy Kuzma from rest_framework.views import APIView from .serializers import AuthorSerializer from .dataUtils import getAuthor from .httpUtils import JSONResponse class AuthorView(APIView): """ This view gets authors. """ def get(self, request, aid): # Get author author = ...
# Author: Braedy Kuzma from rest_framework.views import APIView from .serializers import AuthorSerializer from .dataUtils import getAuthor from .httpUtils import JSONResponse class AuthorView(APIView): """ This view gets authors. """ def get(self, request, aid): # Get author author = ...
Add friends to author view.
Add friends to author view.
Python
apache-2.0
CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project,CMPUT404W17T06/CMPUT404-project
# Author: Braedy Kuzma from rest_framework.views import APIView from .serializers import AuthorSerializer from .dataUtils import getAuthor from .httpUtils import JSONResponse class AuthorView(APIView): """ This view gets authors. """ def get(self, request, aid): # Get author author = ...
# Author: Braedy Kuzma from rest_framework.views import APIView from .serializers import AuthorSerializer from .dataUtils import getAuthor from .httpUtils import JSONResponse class AuthorView(APIView): """ This view gets authors. """ def get(self, request, aid): # Get author author = ...
<commit_before># Author: Braedy Kuzma from rest_framework.views import APIView from .serializers import AuthorSerializer from .dataUtils import getAuthor from .httpUtils import JSONResponse class AuthorView(APIView): """ This view gets authors. """ def get(self, request, aid): # Get author ...
# Author: Braedy Kuzma from rest_framework.views import APIView from .serializers import AuthorSerializer from .dataUtils import getAuthor from .httpUtils import JSONResponse class AuthorView(APIView): """ This view gets authors. """ def get(self, request, aid): # Get author author = ...
# Author: Braedy Kuzma from rest_framework.views import APIView from .serializers import AuthorSerializer from .dataUtils import getAuthor from .httpUtils import JSONResponse class AuthorView(APIView): """ This view gets authors. """ def get(self, request, aid): # Get author author = ...
<commit_before># Author: Braedy Kuzma from rest_framework.views import APIView from .serializers import AuthorSerializer from .dataUtils import getAuthor from .httpUtils import JSONResponse class AuthorView(APIView): """ This view gets authors. """ def get(self, request, aid): # Get author ...
62f9bf4cb8d02b80c0589c68a308bcba28524d14
bootstrap_paginator/templatetags/paginator.py
bootstrap_paginator/templatetags/paginator.py
import urllib from django import template register = template.Library() @register.inclusion_tag('bootstrap_paginator/paginator.html', takes_context=True) def paginator(context, page=None): """ Based on: http://djangosnippets.org/snippets/2680/ To be used in conjunction with the object_list generic view....
from django.utils.six.moves.urllib.parse import urlencode from django import template register = template.Library() @register.inclusion_tag('bootstrap_paginator/paginator.html', takes_context=True) def paginator(context, page=None): """ Based on: http://djangosnippets.org/snippets/2680/ To be used in co...
Use a py3 compatible urlencode
Use a py3 compatible urlencode
Python
mit
defrex/django-bootstrap-paginator
import urllib from django import template register = template.Library() @register.inclusion_tag('bootstrap_paginator/paginator.html', takes_context=True) def paginator(context, page=None): """ Based on: http://djangosnippets.org/snippets/2680/ To be used in conjunction with the object_list generic view....
from django.utils.six.moves.urllib.parse import urlencode from django import template register = template.Library() @register.inclusion_tag('bootstrap_paginator/paginator.html', takes_context=True) def paginator(context, page=None): """ Based on: http://djangosnippets.org/snippets/2680/ To be used in co...
<commit_before> import urllib from django import template register = template.Library() @register.inclusion_tag('bootstrap_paginator/paginator.html', takes_context=True) def paginator(context, page=None): """ Based on: http://djangosnippets.org/snippets/2680/ To be used in conjunction with the object_lis...
from django.utils.six.moves.urllib.parse import urlencode from django import template register = template.Library() @register.inclusion_tag('bootstrap_paginator/paginator.html', takes_context=True) def paginator(context, page=None): """ Based on: http://djangosnippets.org/snippets/2680/ To be used in co...
import urllib from django import template register = template.Library() @register.inclusion_tag('bootstrap_paginator/paginator.html', takes_context=True) def paginator(context, page=None): """ Based on: http://djangosnippets.org/snippets/2680/ To be used in conjunction with the object_list generic view....
<commit_before> import urllib from django import template register = template.Library() @register.inclusion_tag('bootstrap_paginator/paginator.html', takes_context=True) def paginator(context, page=None): """ Based on: http://djangosnippets.org/snippets/2680/ To be used in conjunction with the object_lis...
547bc6520652b02dcbe908c98b7483869c9ee831
mysite/context_processors.py
mysite/context_processors.py
from django.conf import settings SETTINGS_TO_ADD = ( 'GOOGLE_ANALYTICS_ACCOUNT', 'SOURCE_HINTS', ) def add_settings(request): """Add some selected settings values to the context""" return { 'settings': { k: getattr(settings, k) for k in SETTINGS_TO_ADD } }
from django.conf import settings SETTINGS_TO_ADD = ( 'GOOGLE_ANALYTICS_ACCOUNT', 'SOURCE_HINTS', 'MEDIA_URL', ) def add_settings(request): """Add some selected settings values to the context""" return { 'settings': { k: getattr(settings, k) for k in SETTINGS_TO_ADD ...
Make sure MEDIA_URL is available in the context of every template
Make sure MEDIA_URL is available in the context of every template
Python
agpl-3.0
mysociety/yournextrepresentative,mysociety/yournextmp-popit,datamade/yournextmp-popit,neavouli/yournextrepresentative,neavouli/yournextrepresentative,mysociety/yournextrepresentative,neavouli/yournextrepresentative,datamade/yournextmp-popit,mysociety/yournextmp-popit,YoQuieroSaber/yournextrepresentative,YoQuieroSaber/y...
from django.conf import settings SETTINGS_TO_ADD = ( 'GOOGLE_ANALYTICS_ACCOUNT', 'SOURCE_HINTS', ) def add_settings(request): """Add some selected settings values to the context""" return { 'settings': { k: getattr(settings, k) for k in SETTINGS_TO_ADD } } Make sur...
from django.conf import settings SETTINGS_TO_ADD = ( 'GOOGLE_ANALYTICS_ACCOUNT', 'SOURCE_HINTS', 'MEDIA_URL', ) def add_settings(request): """Add some selected settings values to the context""" return { 'settings': { k: getattr(settings, k) for k in SETTINGS_TO_ADD ...
<commit_before>from django.conf import settings SETTINGS_TO_ADD = ( 'GOOGLE_ANALYTICS_ACCOUNT', 'SOURCE_HINTS', ) def add_settings(request): """Add some selected settings values to the context""" return { 'settings': { k: getattr(settings, k) for k in SETTINGS_TO_ADD }...
from django.conf import settings SETTINGS_TO_ADD = ( 'GOOGLE_ANALYTICS_ACCOUNT', 'SOURCE_HINTS', 'MEDIA_URL', ) def add_settings(request): """Add some selected settings values to the context""" return { 'settings': { k: getattr(settings, k) for k in SETTINGS_TO_ADD ...
from django.conf import settings SETTINGS_TO_ADD = ( 'GOOGLE_ANALYTICS_ACCOUNT', 'SOURCE_HINTS', ) def add_settings(request): """Add some selected settings values to the context""" return { 'settings': { k: getattr(settings, k) for k in SETTINGS_TO_ADD } } Make sur...
<commit_before>from django.conf import settings SETTINGS_TO_ADD = ( 'GOOGLE_ANALYTICS_ACCOUNT', 'SOURCE_HINTS', ) def add_settings(request): """Add some selected settings values to the context""" return { 'settings': { k: getattr(settings, k) for k in SETTINGS_TO_ADD }...
f974e39c216067de5af68b3016fb35f129556e44
mscgen/setup.py
mscgen/setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages long_desc = ''' This package contains the mscgen Sphinx extension. Allow mscgen-formatted Message Sequence Chart graphs to be included in Sphinx-generated documents inline. ''' requires = ['Sphinx>=0.6'] setup( name='sphinxcontrib-mscgen', ...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages long_desc = ''' This package contains the mscgen_ Sphinx_ extension. .. _mscgen: http://www.mcternan.me.uk/mscgen/ .. _Sphinx: http://sphinx.pocoo.org/ Allow mscgen-formatted Message Sequence Chart (MSC) graphs to be included in Sphinx-generated do...
Improve package short and long descriptions
mscgen: Improve package short and long descriptions
Python
bsd-2-clause
sphinx-contrib/spelling,sphinx-contrib/spelling
# -*- coding: utf-8 -*- from setuptools import setup, find_packages long_desc = ''' This package contains the mscgen Sphinx extension. Allow mscgen-formatted Message Sequence Chart graphs to be included in Sphinx-generated documents inline. ''' requires = ['Sphinx>=0.6'] setup( name='sphinxcontrib-mscgen', ...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages long_desc = ''' This package contains the mscgen_ Sphinx_ extension. .. _mscgen: http://www.mcternan.me.uk/mscgen/ .. _Sphinx: http://sphinx.pocoo.org/ Allow mscgen-formatted Message Sequence Chart (MSC) graphs to be included in Sphinx-generated do...
<commit_before># -*- coding: utf-8 -*- from setuptools import setup, find_packages long_desc = ''' This package contains the mscgen Sphinx extension. Allow mscgen-formatted Message Sequence Chart graphs to be included in Sphinx-generated documents inline. ''' requires = ['Sphinx>=0.6'] setup( name='sphinxcontr...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages long_desc = ''' This package contains the mscgen_ Sphinx_ extension. .. _mscgen: http://www.mcternan.me.uk/mscgen/ .. _Sphinx: http://sphinx.pocoo.org/ Allow mscgen-formatted Message Sequence Chart (MSC) graphs to be included in Sphinx-generated do...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages long_desc = ''' This package contains the mscgen Sphinx extension. Allow mscgen-formatted Message Sequence Chart graphs to be included in Sphinx-generated documents inline. ''' requires = ['Sphinx>=0.6'] setup( name='sphinxcontrib-mscgen', ...
<commit_before># -*- coding: utf-8 -*- from setuptools import setup, find_packages long_desc = ''' This package contains the mscgen Sphinx extension. Allow mscgen-formatted Message Sequence Chart graphs to be included in Sphinx-generated documents inline. ''' requires = ['Sphinx>=0.6'] setup( name='sphinxcontr...
169eb4826ee823b28fc98477af81a69c6c521acc
client/__init__.py
client/__init__.py
__version__ = 'v1.4.3' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
__version__ = 'v1.4.4' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
Bump version number to v1.4.4.
Bump version number to v1.4.4.
Python
apache-2.0
jathak/ok-client,Cal-CS-61A-Staff/ok-client
__version__ = 'v1.4.3' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) Bump version number to v1.4.4.
__version__ = 'v1.4.4' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
<commit_before>__version__ = 'v1.4.3' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) <commit_msg>Bump version number to v1.4.4.<commit_after>
__version__ = 'v1.4.4' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
__version__ = 'v1.4.3' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) Bump version number to v1.4.4.__version__ = 'v1.4.4' FILE_NAME = 'ok' import os import sys sys.p...
<commit_before>__version__ = 'v1.4.3' FILE_NAME = 'ok' import os import sys sys.path.insert(0, '') # Add directory in which the ok.zip is stored to sys.path. sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) <commit_msg>Bump version number to v1.4.4.<commit_after>__version__ = 'v1.4.4' FILE...
465b39b97ec1fa619e96a0c811a496216c275aaf
src/gui/Gui.py
src/gui/Gui.py
import pygame LEFT = 1 class Gui: def __init__(self): self.gui_elements = list() def update(self, mouse, events): curr_element = None for element in self.gui_elements: if element.contains(mouse.get_pos): curr_element = element element.on_hov...
import pygame LEFT = 1 class Gui: def __init__(self): self.gui_elements = list() def update(self, mouse, events): curr_element = None for element in self.gui_elements: if element.contains(mouse.get_pos()[0], mouse.get_pos()[1]): curr_element = element ...
Fix error in getting mouse posititions.
Fix error in getting mouse posititions.
Python
mit
cthit/CodeIT
import pygame LEFT = 1 class Gui: def __init__(self): self.gui_elements = list() def update(self, mouse, events): curr_element = None for element in self.gui_elements: if element.contains(mouse.get_pos): curr_element = element element.on_hov...
import pygame LEFT = 1 class Gui: def __init__(self): self.gui_elements = list() def update(self, mouse, events): curr_element = None for element in self.gui_elements: if element.contains(mouse.get_pos()[0], mouse.get_pos()[1]): curr_element = element ...
<commit_before>import pygame LEFT = 1 class Gui: def __init__(self): self.gui_elements = list() def update(self, mouse, events): curr_element = None for element in self.gui_elements: if element.contains(mouse.get_pos): curr_element = element ...
import pygame LEFT = 1 class Gui: def __init__(self): self.gui_elements = list() def update(self, mouse, events): curr_element = None for element in self.gui_elements: if element.contains(mouse.get_pos()[0], mouse.get_pos()[1]): curr_element = element ...
import pygame LEFT = 1 class Gui: def __init__(self): self.gui_elements = list() def update(self, mouse, events): curr_element = None for element in self.gui_elements: if element.contains(mouse.get_pos): curr_element = element element.on_hov...
<commit_before>import pygame LEFT = 1 class Gui: def __init__(self): self.gui_elements = list() def update(self, mouse, events): curr_element = None for element in self.gui_elements: if element.contains(mouse.get_pos): curr_element = element ...
9c086abd428732080257d073bb6b36f04171f7d1
utils.py
utils.py
from datetime import date from django.db.models import Max, Min def worklog_period(obj): activity_period = obj.worklogentries.aggregate(Max('date'), Min('date')) article_period = obj.articleentries.aggregate(Max('date'), Min('date')) min_date = date(1, 1, 1) max_date = date(3000, 1, 1) if not (...
from datetime import date from django.db.models import Max, Min def worklog_period(obj): activity_period = obj.worklogentries.aggregate(Max('date'), Min('date')) article_period = obj.articleentries.aggregate(Max('date'), Min('date')) min_date = date(1900, 1, 1) max_date = date(3000, 1, 1) if no...
Fix date range in worklog_period
Fix date range in worklog_period
Python
bsd-3-clause
dongguangming/pdfdocument,matthiask/pdfdocument
from datetime import date from django.db.models import Max, Min def worklog_period(obj): activity_period = obj.worklogentries.aggregate(Max('date'), Min('date')) article_period = obj.articleentries.aggregate(Max('date'), Min('date')) min_date = date(1, 1, 1) max_date = date(3000, 1, 1) if not (...
from datetime import date from django.db.models import Max, Min def worklog_period(obj): activity_period = obj.worklogentries.aggregate(Max('date'), Min('date')) article_period = obj.articleentries.aggregate(Max('date'), Min('date')) min_date = date(1900, 1, 1) max_date = date(3000, 1, 1) if no...
<commit_before>from datetime import date from django.db.models import Max, Min def worklog_period(obj): activity_period = obj.worklogentries.aggregate(Max('date'), Min('date')) article_period = obj.articleentries.aggregate(Max('date'), Min('date')) min_date = date(1, 1, 1) max_date = date(3000, 1, 1...
from datetime import date from django.db.models import Max, Min def worklog_period(obj): activity_period = obj.worklogentries.aggregate(Max('date'), Min('date')) article_period = obj.articleentries.aggregate(Max('date'), Min('date')) min_date = date(1900, 1, 1) max_date = date(3000, 1, 1) if no...
from datetime import date from django.db.models import Max, Min def worklog_period(obj): activity_period = obj.worklogentries.aggregate(Max('date'), Min('date')) article_period = obj.articleentries.aggregate(Max('date'), Min('date')) min_date = date(1, 1, 1) max_date = date(3000, 1, 1) if not (...
<commit_before>from datetime import date from django.db.models import Max, Min def worklog_period(obj): activity_period = obj.worklogentries.aggregate(Max('date'), Min('date')) article_period = obj.articleentries.aggregate(Max('date'), Min('date')) min_date = date(1, 1, 1) max_date = date(3000, 1, 1...
ea2d72473c958de90582e1d4ccfc77af1d578b24
test_stack.py
test_stack.py
from stack import Stack import pytest def test_stack_push(): stack = Stack() stack.push("bacon") assert stack.top.value == "bacon" assert stack.peek() == "bacon" def test_stack_push_multi(): stack = Stack() stack.push("bacon") stack.push("steak") stack.push("grilled cheese") stac...
from stack import Stack import pytest def test_stack_push(): stack = Stack() stack.push("bacon") assert stack.top.value == "bacon" assert stack.peek() == "bacon" def test_stack_push_multi(): stack = Stack() stack.push("bacon") stack.push("steak") stack.push("grilled cheese") asse...
Add test for peek on empty stack
Add test for peek on empty stack
Python
mit
jwarren116/data-structures-deux
from stack import Stack import pytest def test_stack_push(): stack = Stack() stack.push("bacon") assert stack.top.value == "bacon" assert stack.peek() == "bacon" def test_stack_push_multi(): stack = Stack() stack.push("bacon") stack.push("steak") stack.push("grilled cheese") stac...
from stack import Stack import pytest def test_stack_push(): stack = Stack() stack.push("bacon") assert stack.top.value == "bacon" assert stack.peek() == "bacon" def test_stack_push_multi(): stack = Stack() stack.push("bacon") stack.push("steak") stack.push("grilled cheese") asse...
<commit_before>from stack import Stack import pytest def test_stack_push(): stack = Stack() stack.push("bacon") assert stack.top.value == "bacon" assert stack.peek() == "bacon" def test_stack_push_multi(): stack = Stack() stack.push("bacon") stack.push("steak") stack.push("grilled ch...
from stack import Stack import pytest def test_stack_push(): stack = Stack() stack.push("bacon") assert stack.top.value == "bacon" assert stack.peek() == "bacon" def test_stack_push_multi(): stack = Stack() stack.push("bacon") stack.push("steak") stack.push("grilled cheese") asse...
from stack import Stack import pytest def test_stack_push(): stack = Stack() stack.push("bacon") assert stack.top.value == "bacon" assert stack.peek() == "bacon" def test_stack_push_multi(): stack = Stack() stack.push("bacon") stack.push("steak") stack.push("grilled cheese") stac...
<commit_before>from stack import Stack import pytest def test_stack_push(): stack = Stack() stack.push("bacon") assert stack.top.value == "bacon" assert stack.peek() == "bacon" def test_stack_push_multi(): stack = Stack() stack.push("bacon") stack.push("steak") stack.push("grilled ch...
65b4cca13c16e9de0d469ec036c1440dd598b3a0
learning_journal/__init__.py
learning_journal/__init__.py
from pyramid.config import Configurator from sqlalchemy import engine_from_config from .models import ( DBSession, Base, ) def make_session(settings): from sqlalchemy.orm import sessionmaker engine = engine_from_config(settings, 'sqlalchemy') Session = sessionmaker(bind=engine) return Ses...
from pyramid.config import Configurator from sqlalchemy import engine_from_config from pyramid.authorization import ACLAuthorizationPolicy from pyramid.authentication import AuthTktAuthenticationPolicy import os from .models import ( DBSession, Base, ) def make_session(settings): from sqlalchemy.orm ...
Add authN/authZ. Start auth process in main()
Add authN/authZ. Start auth process in main()
Python
mit
DZwell/learning_journal,DZwell/learning_journal,DZwell/learning_journal
from pyramid.config import Configurator from sqlalchemy import engine_from_config from .models import ( DBSession, Base, ) def make_session(settings): from sqlalchemy.orm import sessionmaker engine = engine_from_config(settings, 'sqlalchemy') Session = sessionmaker(bind=engine) return Ses...
from pyramid.config import Configurator from sqlalchemy import engine_from_config from pyramid.authorization import ACLAuthorizationPolicy from pyramid.authentication import AuthTktAuthenticationPolicy import os from .models import ( DBSession, Base, ) def make_session(settings): from sqlalchemy.orm ...
<commit_before>from pyramid.config import Configurator from sqlalchemy import engine_from_config from .models import ( DBSession, Base, ) def make_session(settings): from sqlalchemy.orm import sessionmaker engine = engine_from_config(settings, 'sqlalchemy') Session = sessionmaker(bind=engine)...
from pyramid.config import Configurator from sqlalchemy import engine_from_config from pyramid.authorization import ACLAuthorizationPolicy from pyramid.authentication import AuthTktAuthenticationPolicy import os from .models import ( DBSession, Base, ) def make_session(settings): from sqlalchemy.orm ...
from pyramid.config import Configurator from sqlalchemy import engine_from_config from .models import ( DBSession, Base, ) def make_session(settings): from sqlalchemy.orm import sessionmaker engine = engine_from_config(settings, 'sqlalchemy') Session = sessionmaker(bind=engine) return Ses...
<commit_before>from pyramid.config import Configurator from sqlalchemy import engine_from_config from .models import ( DBSession, Base, ) def make_session(settings): from sqlalchemy.orm import sessionmaker engine = engine_from_config(settings, 'sqlalchemy') Session = sessionmaker(bind=engine)...
0158579b9a6c729e7af9a543caeef25018e07834
conda_build/ldd.py
conda_build/ldd.py
from __future__ import absolute_import, division, print_function import re import subprocess from conda_build import post LDD_RE = re.compile(r'\s*(.*?)\s*=>\s*(.*?)\s*\(.*\)') LDD_NOT_FOUND_RE = re.compile(r'\s*(.*?)\s*=>\s*not found') def ldd(path): "thin wrapper around ldd" lines = subprocess.check_outpu...
from __future__ import absolute_import, division, print_function import re import subprocess import json from os.path import join from conda.install import rm_rf from conda_build import post from conda_build.config import config from conda_build.build import create_env LDD_RE = re.compile(r'\s*(.*?)\s*=>\s*(.*?)\s...
Add first pass at a get_package_linkages function
Add first pass at a get_package_linkages function
Python
bsd-3-clause
takluyver/conda-build,takluyver/conda-build,sandhujasmine/conda-build,frol/conda-build,frol/conda-build,ilastik/conda-build,dan-blanchard/conda-build,mwcraig/conda-build,rmcgibbo/conda-build,dan-blanchard/conda-build,sandhujasmine/conda-build,ilastik/conda-build,ilastik/conda-build,shastings517/conda-build,sandhujasmin...
from __future__ import absolute_import, division, print_function import re import subprocess from conda_build import post LDD_RE = re.compile(r'\s*(.*?)\s*=>\s*(.*?)\s*\(.*\)') LDD_NOT_FOUND_RE = re.compile(r'\s*(.*?)\s*=>\s*not found') def ldd(path): "thin wrapper around ldd" lines = subprocess.check_outpu...
from __future__ import absolute_import, division, print_function import re import subprocess import json from os.path import join from conda.install import rm_rf from conda_build import post from conda_build.config import config from conda_build.build import create_env LDD_RE = re.compile(r'\s*(.*?)\s*=>\s*(.*?)\s...
<commit_before>from __future__ import absolute_import, division, print_function import re import subprocess from conda_build import post LDD_RE = re.compile(r'\s*(.*?)\s*=>\s*(.*?)\s*\(.*\)') LDD_NOT_FOUND_RE = re.compile(r'\s*(.*?)\s*=>\s*not found') def ldd(path): "thin wrapper around ldd" lines = subproc...
from __future__ import absolute_import, division, print_function import re import subprocess import json from os.path import join from conda.install import rm_rf from conda_build import post from conda_build.config import config from conda_build.build import create_env LDD_RE = re.compile(r'\s*(.*?)\s*=>\s*(.*?)\s...
from __future__ import absolute_import, division, print_function import re import subprocess from conda_build import post LDD_RE = re.compile(r'\s*(.*?)\s*=>\s*(.*?)\s*\(.*\)') LDD_NOT_FOUND_RE = re.compile(r'\s*(.*?)\s*=>\s*not found') def ldd(path): "thin wrapper around ldd" lines = subprocess.check_outpu...
<commit_before>from __future__ import absolute_import, division, print_function import re import subprocess from conda_build import post LDD_RE = re.compile(r'\s*(.*?)\s*=>\s*(.*?)\s*\(.*\)') LDD_NOT_FOUND_RE = re.compile(r'\s*(.*?)\s*=>\s*not found') def ldd(path): "thin wrapper around ldd" lines = subproc...
b2b939e13a5bcdabe09e85d7f940052f4fec8f27
events/urls.py
events/urls.py
from django.conf.urls.defaults import * from django.views.generic import list_detail from django.views.generic import date_based from agenda.events.models import Event general_info = { "queryset" : Event.objects.filter(moderated=True), "template_object_name" : "event", } list_info = { "paginate_by": 25, }...
from django.conf.urls.defaults import * from django.views.generic import list_detail from django.views.generic import date_based from agenda.events.models import Event general_info = { "queryset" : Event.objects.filter(moderated=True), "template_object_name" : "event", } list_info = { "paginate_by": 25, }...
Allow empty calendar to be drawn
Allow empty calendar to be drawn
Python
agpl-3.0
mlhamel/agendadulibre,mlhamel/agendadulibre,mlhamel/agendadulibre,vcorreze/agendaEteAccoord,vcorreze/agendaEteAccoord,vcorreze/agendaEteAccoord
from django.conf.urls.defaults import * from django.views.generic import list_detail from django.views.generic import date_based from agenda.events.models import Event general_info = { "queryset" : Event.objects.filter(moderated=True), "template_object_name" : "event", } list_info = { "paginate_by": 25, }...
from django.conf.urls.defaults import * from django.views.generic import list_detail from django.views.generic import date_based from agenda.events.models import Event general_info = { "queryset" : Event.objects.filter(moderated=True), "template_object_name" : "event", } list_info = { "paginate_by": 25, }...
<commit_before>from django.conf.urls.defaults import * from django.views.generic import list_detail from django.views.generic import date_based from agenda.events.models import Event general_info = { "queryset" : Event.objects.filter(moderated=True), "template_object_name" : "event", } list_info = { "pagi...
from django.conf.urls.defaults import * from django.views.generic import list_detail from django.views.generic import date_based from agenda.events.models import Event general_info = { "queryset" : Event.objects.filter(moderated=True), "template_object_name" : "event", } list_info = { "paginate_by": 25, }...
from django.conf.urls.defaults import * from django.views.generic import list_detail from django.views.generic import date_based from agenda.events.models import Event general_info = { "queryset" : Event.objects.filter(moderated=True), "template_object_name" : "event", } list_info = { "paginate_by": 25, }...
<commit_before>from django.conf.urls.defaults import * from django.views.generic import list_detail from django.views.generic import date_based from agenda.events.models import Event general_info = { "queryset" : Event.objects.filter(moderated=True), "template_object_name" : "event", } list_info = { "pagi...
fe225e4f4d9df8c913ad3ed7a6f18f51ca6a0d2a
LiSE/setup.py
LiSE/setup.py
# This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, [email protected] import sys if sys.version_info[0] < 3 or ( sys.version_info[0] == 3 and sys.version_info[1] < 3 ): raise RuntimeError("LiSE requires Python 3.3 or later") from setuptools i...
# This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, [email protected] import sys if sys.version_info[0] < 3 or ( sys.version_info[0] == 3 and sys.version_info[1] < 3 ): raise RuntimeError("LiSE requires Python 3.3 or later") from setuptools i...
Include the examples in the LiSE package
Include the examples in the LiSE package
Python
agpl-3.0
LogicalDash/LiSE,LogicalDash/LiSE
# This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, [email protected] import sys if sys.version_info[0] < 3 or ( sys.version_info[0] == 3 and sys.version_info[1] < 3 ): raise RuntimeError("LiSE requires Python 3.3 or later") from setuptools i...
# This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, [email protected] import sys if sys.version_info[0] < 3 or ( sys.version_info[0] == 3 and sys.version_info[1] < 3 ): raise RuntimeError("LiSE requires Python 3.3 or later") from setuptools i...
<commit_before># This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, [email protected] import sys if sys.version_info[0] < 3 or ( sys.version_info[0] == 3 and sys.version_info[1] < 3 ): raise RuntimeError("LiSE requires Python 3.3 or later") fr...
# This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, [email protected] import sys if sys.version_info[0] < 3 or ( sys.version_info[0] == 3 and sys.version_info[1] < 3 ): raise RuntimeError("LiSE requires Python 3.3 or later") from setuptools i...
# This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, [email protected] import sys if sys.version_info[0] < 3 or ( sys.version_info[0] == 3 and sys.version_info[1] < 3 ): raise RuntimeError("LiSE requires Python 3.3 or later") from setuptools i...
<commit_before># This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, [email protected] import sys if sys.version_info[0] < 3 or ( sys.version_info[0] == 3 and sys.version_info[1] < 3 ): raise RuntimeError("LiSE requires Python 3.3 or later") fr...
298cae5d7f15a667195b96c92c4b4320487c922c
tests/test_backends.py
tests/test_backends.py
# -*- coding: utf-8 -*- import unittest from thumbnails.backends import generate_filename, get_thumbnail from thumbnails.images import SourceFile, Thumbnail from .compat import mock class BackendTestCase(unittest.TestCase): def test_generate_filename(self): self.assertEqual( generate_filenam...
# -*- coding: utf-8 -*- import unittest from thumbnails.backends import generate_filename, get_thumbnail from thumbnails.conf import settings from thumbnails.images import SourceFile, Thumbnail from .compat import mock class BackendTestCase(unittest.TestCase): def test_generate_filename(self): self.asse...
Fix failing mock of cache backend
Fix failing mock of cache backend
Python
mit
relekang/python-thumbnails,python-thumbnails/python-thumbnails
# -*- coding: utf-8 -*- import unittest from thumbnails.backends import generate_filename, get_thumbnail from thumbnails.images import SourceFile, Thumbnail from .compat import mock class BackendTestCase(unittest.TestCase): def test_generate_filename(self): self.assertEqual( generate_filenam...
# -*- coding: utf-8 -*- import unittest from thumbnails.backends import generate_filename, get_thumbnail from thumbnails.conf import settings from thumbnails.images import SourceFile, Thumbnail from .compat import mock class BackendTestCase(unittest.TestCase): def test_generate_filename(self): self.asse...
<commit_before># -*- coding: utf-8 -*- import unittest from thumbnails.backends import generate_filename, get_thumbnail from thumbnails.images import SourceFile, Thumbnail from .compat import mock class BackendTestCase(unittest.TestCase): def test_generate_filename(self): self.assertEqual( g...
# -*- coding: utf-8 -*- import unittest from thumbnails.backends import generate_filename, get_thumbnail from thumbnails.conf import settings from thumbnails.images import SourceFile, Thumbnail from .compat import mock class BackendTestCase(unittest.TestCase): def test_generate_filename(self): self.asse...
# -*- coding: utf-8 -*- import unittest from thumbnails.backends import generate_filename, get_thumbnail from thumbnails.images import SourceFile, Thumbnail from .compat import mock class BackendTestCase(unittest.TestCase): def test_generate_filename(self): self.assertEqual( generate_filenam...
<commit_before># -*- coding: utf-8 -*- import unittest from thumbnails.backends import generate_filename, get_thumbnail from thumbnails.images import SourceFile, Thumbnail from .compat import mock class BackendTestCase(unittest.TestCase): def test_generate_filename(self): self.assertEqual( g...
60c7476f63cbeb64284ef8192e686b473cf0863d
wordcloud/wordcloud.py
wordcloud/wordcloud.py
import os from operator import itemgetter import re from haystack.query import SearchQuerySet from pombola.hansard import models as hansard_models BASEDIR = os.path.dirname(__file__) # normal english stop words and hansard-centric words to ignore STOP_WORDS = open(os.path.join(BASEDIR, 'stopwords.txt'), 'rU').read()...
import os from operator import itemgetter import re from haystack.query import SearchQuerySet from pombola.hansard import models as hansard_models BASEDIR = os.path.dirname(__file__) # normal english stop words and hansard-centric words to ignore with open(os.path.join(BASEDIR, 'stopwords.txt'), 'rU') as f: STOP...
Make stop words a set for speed optimization.
Make stop words a set for speed optimization.
Python
agpl-3.0
geoffkilpin/pombola,geoffkilpin/pombola,mysociety/pombola,geoffkilpin/pombola,mysociety/pombola,mysociety/pombola,geoffkilpin/pombola,mysociety/pombola,geoffkilpin/pombola,mysociety/pombola,geoffkilpin/pombola,mysociety/pombola
import os from operator import itemgetter import re from haystack.query import SearchQuerySet from pombola.hansard import models as hansard_models BASEDIR = os.path.dirname(__file__) # normal english stop words and hansard-centric words to ignore STOP_WORDS = open(os.path.join(BASEDIR, 'stopwords.txt'), 'rU').read()...
import os from operator import itemgetter import re from haystack.query import SearchQuerySet from pombola.hansard import models as hansard_models BASEDIR = os.path.dirname(__file__) # normal english stop words and hansard-centric words to ignore with open(os.path.join(BASEDIR, 'stopwords.txt'), 'rU') as f: STOP...
<commit_before>import os from operator import itemgetter import re from haystack.query import SearchQuerySet from pombola.hansard import models as hansard_models BASEDIR = os.path.dirname(__file__) # normal english stop words and hansard-centric words to ignore STOP_WORDS = open(os.path.join(BASEDIR, 'stopwords.txt'...
import os from operator import itemgetter import re from haystack.query import SearchQuerySet from pombola.hansard import models as hansard_models BASEDIR = os.path.dirname(__file__) # normal english stop words and hansard-centric words to ignore with open(os.path.join(BASEDIR, 'stopwords.txt'), 'rU') as f: STOP...
import os from operator import itemgetter import re from haystack.query import SearchQuerySet from pombola.hansard import models as hansard_models BASEDIR = os.path.dirname(__file__) # normal english stop words and hansard-centric words to ignore STOP_WORDS = open(os.path.join(BASEDIR, 'stopwords.txt'), 'rU').read()...
<commit_before>import os from operator import itemgetter import re from haystack.query import SearchQuerySet from pombola.hansard import models as hansard_models BASEDIR = os.path.dirname(__file__) # normal english stop words and hansard-centric words to ignore STOP_WORDS = open(os.path.join(BASEDIR, 'stopwords.txt'...
8ed94e1fb93252eed47239d8c6a5f28796802a36
src/cclib/__init__.py
src/cclib/__init__.py
# This file is part of cclib (http://cclib.sf.net), a library for parsing # and interpreting the results of computational chemistry packages. # # Copyright (C) 2006-2013 the cclib development team # # The library is free software, distributed under the terms of # the GNU Lesser General Public version 2.1 or later. You ...
"""cclib is a library for parsing and interpreting results from computational chemistry packages. The goals of cclib are centered around the reuse of data obtained from various computational chemistry programs and typically contained in output files. Specifically, cclib extracts (parses) data from the output files gen...
Add a descriptive docstring to main cclib module
Add a descriptive docstring to main cclib module
Python
bsd-3-clause
berquist/cclib,jchodera/cclib,ghutchis/cclib,ben-albrecht/cclib,andersx/cclib,gaursagar/cclib,Clyde-fare/cclib,ghutchis/cclib,langner/cclib,andersx/cclib,cclib/cclib,Schamnad/cclib,ATenderholt/cclib,berquist/cclib,cclib/cclib,ATenderholt/cclib,langner/cclib,berquist/cclib,cclib/cclib,langner/cclib,gaursagar/cclib,jchod...
# This file is part of cclib (http://cclib.sf.net), a library for parsing # and interpreting the results of computational chemistry packages. # # Copyright (C) 2006-2013 the cclib development team # # The library is free software, distributed under the terms of # the GNU Lesser General Public version 2.1 or later. You ...
"""cclib is a library for parsing and interpreting results from computational chemistry packages. The goals of cclib are centered around the reuse of data obtained from various computational chemistry programs and typically contained in output files. Specifically, cclib extracts (parses) data from the output files gen...
<commit_before># This file is part of cclib (http://cclib.sf.net), a library for parsing # and interpreting the results of computational chemistry packages. # # Copyright (C) 2006-2013 the cclib development team # # The library is free software, distributed under the terms of # the GNU Lesser General Public version 2.1...
"""cclib is a library for parsing and interpreting results from computational chemistry packages. The goals of cclib are centered around the reuse of data obtained from various computational chemistry programs and typically contained in output files. Specifically, cclib extracts (parses) data from the output files gen...
# This file is part of cclib (http://cclib.sf.net), a library for parsing # and interpreting the results of computational chemistry packages. # # Copyright (C) 2006-2013 the cclib development team # # The library is free software, distributed under the terms of # the GNU Lesser General Public version 2.1 or later. You ...
<commit_before># This file is part of cclib (http://cclib.sf.net), a library for parsing # and interpreting the results of computational chemistry packages. # # Copyright (C) 2006-2013 the cclib development team # # The library is free software, distributed under the terms of # the GNU Lesser General Public version 2.1...
e2c8c71114692b99f50936dceab77dfd0329a5e0
accelerator/tests/factories/community_factory.py
accelerator/tests/factories/community_factory.py
from factory import Sequence from factory.django import DjangoModelFactory from accelerator.models import Community class CommunityFactory(DjangoModelFactory): class Meta: model = Community name = Sequence(lambda n: "name {0}".format(n)) email = Sequence(lambda n: "user_{0}@example.com".format(n)...
from factory import Sequence from factory.django import DjangoModelFactory from accelerator.models import Community class CommunityFactory(DjangoModelFactory): class Meta: model = Community name = Sequence(lambda n: "name {0}".format(n)) email = Sequence(lambda n: "user_{0}@example.com".format(n)...
Implement feedback - remove deletion
[AC-9653]: Implement feedback - remove deletion
Python
mit
masschallenge/django-accelerator,masschallenge/django-accelerator
from factory import Sequence from factory.django import DjangoModelFactory from accelerator.models import Community class CommunityFactory(DjangoModelFactory): class Meta: model = Community name = Sequence(lambda n: "name {0}".format(n)) email = Sequence(lambda n: "user_{0}@example.com".format(n)...
from factory import Sequence from factory.django import DjangoModelFactory from accelerator.models import Community class CommunityFactory(DjangoModelFactory): class Meta: model = Community name = Sequence(lambda n: "name {0}".format(n)) email = Sequence(lambda n: "user_{0}@example.com".format(n)...
<commit_before>from factory import Sequence from factory.django import DjangoModelFactory from accelerator.models import Community class CommunityFactory(DjangoModelFactory): class Meta: model = Community name = Sequence(lambda n: "name {0}".format(n)) email = Sequence(lambda n: "user_{0}@example...
from factory import Sequence from factory.django import DjangoModelFactory from accelerator.models import Community class CommunityFactory(DjangoModelFactory): class Meta: model = Community name = Sequence(lambda n: "name {0}".format(n)) email = Sequence(lambda n: "user_{0}@example.com".format(n)...
from factory import Sequence from factory.django import DjangoModelFactory from accelerator.models import Community class CommunityFactory(DjangoModelFactory): class Meta: model = Community name = Sequence(lambda n: "name {0}".format(n)) email = Sequence(lambda n: "user_{0}@example.com".format(n)...
<commit_before>from factory import Sequence from factory.django import DjangoModelFactory from accelerator.models import Community class CommunityFactory(DjangoModelFactory): class Meta: model = Community name = Sequence(lambda n: "name {0}".format(n)) email = Sequence(lambda n: "user_{0}@example...
6e46b79b837f61e6fa56c19d59786f6d83e6470a
pages/tests.py
pages/tests.py
from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed via the admin """ c = Client() c.l...
from django.test import TestCase import settings from pages.models import * from django.test.client import Client page_data = {'title':'test page', 'slug':'test-page', 'language':'en', 'sites':[1], 'status':1} class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ ...
Add a test for slug collision
Add a test for slug collision
Python
bsd-3-clause
Alwnikrotikz/django-page-cms,google-code-export/django-page-cms,google-code-export/django-page-cms,PiRSquared17/django-page-cms,Alwnikrotikz/django-page-cms,odyaka341/django-page-cms,Alwnikrotikz/django-page-cms,PiRSquared17/django-page-cms,Alwnikrotikz/django-page-cms,PiRSquared17/django-page-cms,odyaka341/django-page...
from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed via the admin """ c = Client() c.l...
from django.test import TestCase import settings from pages.models import * from django.test.client import Client page_data = {'title':'test page', 'slug':'test-page', 'language':'en', 'sites':[1], 'status':1} class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ ...
<commit_before>from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed via the admin """ c = Clien...
from django.test import TestCase import settings from pages.models import * from django.test.client import Client page_data = {'title':'test page', 'slug':'test-page', 'language':'en', 'sites':[1], 'status':1} class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ ...
from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed via the admin """ c = Client() c.l...
<commit_before>from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed via the admin """ c = Clien...
07f50c1b01cce4550b3b4ecb369932166412063b
tests/commands.py
tests/commands.py
from sublime import Region from sublime_plugin import TextCommand class PhpunitTestSetupFixtureCommand(TextCommand): def run(self, edit, text): self.view.replace(edit, Region(0, self.view.size()), text) if '|' in text: cursor_placeholders = self.view.find_all('\\|') if cur...
from sublime_plugin import TextCommand class PhpunitTestSetupFixtureCommand(TextCommand): def run(self, edit, text): # This fixes an issue where an exception is thrown when reloading the # test commands. I don't know why this is needed, but it works. It's # most likely a bug in ST. The e...
Fix TypeError: 'NoneType' object is not callable when running tests
Fix TypeError: 'NoneType' object is not callable when running tests
Python
bsd-3-clause
gerardroche/sublime-phpunit
from sublime import Region from sublime_plugin import TextCommand class PhpunitTestSetupFixtureCommand(TextCommand): def run(self, edit, text): self.view.replace(edit, Region(0, self.view.size()), text) if '|' in text: cursor_placeholders = self.view.find_all('\\|') if cur...
from sublime_plugin import TextCommand class PhpunitTestSetupFixtureCommand(TextCommand): def run(self, edit, text): # This fixes an issue where an exception is thrown when reloading the # test commands. I don't know why this is needed, but it works. It's # most likely a bug in ST. The e...
<commit_before>from sublime import Region from sublime_plugin import TextCommand class PhpunitTestSetupFixtureCommand(TextCommand): def run(self, edit, text): self.view.replace(edit, Region(0, self.view.size()), text) if '|' in text: cursor_placeholders = self.view.find_all('\\|') ...
from sublime_plugin import TextCommand class PhpunitTestSetupFixtureCommand(TextCommand): def run(self, edit, text): # This fixes an issue where an exception is thrown when reloading the # test commands. I don't know why this is needed, but it works. It's # most likely a bug in ST. The e...
from sublime import Region from sublime_plugin import TextCommand class PhpunitTestSetupFixtureCommand(TextCommand): def run(self, edit, text): self.view.replace(edit, Region(0, self.view.size()), text) if '|' in text: cursor_placeholders = self.view.find_all('\\|') if cur...
<commit_before>from sublime import Region from sublime_plugin import TextCommand class PhpunitTestSetupFixtureCommand(TextCommand): def run(self, edit, text): self.view.replace(edit, Region(0, self.view.size()), text) if '|' in text: cursor_placeholders = self.view.find_all('\\|') ...
2f4141311af549b6d57e72534b4da0a6ce950629
src/waldur_mastermind/analytics/serializers.py
src/waldur_mastermind/analytics/serializers.py
from __future__ import unicode_literals from datetime import timedelta from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from waldur_core.core.serializers import GenericRelatedField from waldur_core.structure.models import Customer, Proje...
from __future__ import unicode_literals from datetime import timedelta from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from waldur_core.core.serializers import GenericRelatedField from waldur_core.structure.models import Customer, Proje...
Fix period validation in daily quota serializer.
Fix period validation in daily quota serializer.
Python
mit
opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind
from __future__ import unicode_literals from datetime import timedelta from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from waldur_core.core.serializers import GenericRelatedField from waldur_core.structure.models import Customer, Proje...
from __future__ import unicode_literals from datetime import timedelta from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from waldur_core.core.serializers import GenericRelatedField from waldur_core.structure.models import Customer, Proje...
<commit_before>from __future__ import unicode_literals from datetime import timedelta from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from waldur_core.core.serializers import GenericRelatedField from waldur_core.structure.models import ...
from __future__ import unicode_literals from datetime import timedelta from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from waldur_core.core.serializers import GenericRelatedField from waldur_core.structure.models import Customer, Proje...
from __future__ import unicode_literals from datetime import timedelta from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from waldur_core.core.serializers import GenericRelatedField from waldur_core.structure.models import Customer, Proje...
<commit_before>from __future__ import unicode_literals from datetime import timedelta from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from waldur_core.core.serializers import GenericRelatedField from waldur_core.structure.models import ...
9a4cb482cbe0f5dc2de8f6ae89dd0b78a1564a0d
pbxplore/structure/loader.py
pbxplore/structure/loader.py
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all__ keyword acco...
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all__ keyword acco...
Create only one MDAnalysis selection
Create only one MDAnalysis selection
Python
mit
pierrepo/PBxplore,pierrepo/PBxplore,jbarnoud/PBxplore,jbarnoud/PBxplore,HubLot/PBxplore,HubLot/PBxplore
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all__ keyword acco...
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all__ keyword acco...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all...
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all__ keyword acco...
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all__ keyword acco...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import # Local module from .structure import Chain, Atom from .PDB import PDB # Conditional import try: import MDAnalysis except ImportError: IS_MDANALYSIS = False else: IS_MDANALYSIS = True # Create the __all...
92e0724f28ce0e6802237b13656064c6add63b85
fuzzers/019-ndi1mux/generate.py
fuzzers/019-ndi1mux/generate.py
#!/usr/bin/env python3 # FIXME: getting two bits # 00_40 31_46 # Can we find instance where they are not aliased? WA7USED = 0 from prjxray.segmaker import Segmaker segmk = Segmaker("design.bits") print("Loading tags") ''' module,loc,c31,b31,a31 my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0 my_NDI1MUX_NI_NMC31,SLICE_X12Y1...
#!/usr/bin/env python3 # FIXME: getting two bits # 00_40 31_46 # Can we find instance where they are not aliased? WA7USED = 0 from prjxray.segmaker import Segmaker segmk = Segmaker("design.bits") print("Loading tags") ''' module,loc,c31,b31,a31 my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0 my_NDI1MUX_NI_NMC31,SLICE_X12Y1...
Rename DI1MUX to be underneith the *LUT.
Rename DI1MUX to be underneith the *LUT. Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>
Python
isc
SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray
#!/usr/bin/env python3 # FIXME: getting two bits # 00_40 31_46 # Can we find instance where they are not aliased? WA7USED = 0 from prjxray.segmaker import Segmaker segmk = Segmaker("design.bits") print("Loading tags") ''' module,loc,c31,b31,a31 my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0 my_NDI1MUX_NI_NMC31,SLICE_X12Y1...
#!/usr/bin/env python3 # FIXME: getting two bits # 00_40 31_46 # Can we find instance where they are not aliased? WA7USED = 0 from prjxray.segmaker import Segmaker segmk = Segmaker("design.bits") print("Loading tags") ''' module,loc,c31,b31,a31 my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0 my_NDI1MUX_NI_NMC31,SLICE_X12Y1...
<commit_before>#!/usr/bin/env python3 # FIXME: getting two bits # 00_40 31_46 # Can we find instance where they are not aliased? WA7USED = 0 from prjxray.segmaker import Segmaker segmk = Segmaker("design.bits") print("Loading tags") ''' module,loc,c31,b31,a31 my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0 my_NDI1MUX_NI_NM...
#!/usr/bin/env python3 # FIXME: getting two bits # 00_40 31_46 # Can we find instance where they are not aliased? WA7USED = 0 from prjxray.segmaker import Segmaker segmk = Segmaker("design.bits") print("Loading tags") ''' module,loc,c31,b31,a31 my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0 my_NDI1MUX_NI_NMC31,SLICE_X12Y1...
#!/usr/bin/env python3 # FIXME: getting two bits # 00_40 31_46 # Can we find instance where they are not aliased? WA7USED = 0 from prjxray.segmaker import Segmaker segmk = Segmaker("design.bits") print("Loading tags") ''' module,loc,c31,b31,a31 my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0 my_NDI1MUX_NI_NMC31,SLICE_X12Y1...
<commit_before>#!/usr/bin/env python3 # FIXME: getting two bits # 00_40 31_46 # Can we find instance where they are not aliased? WA7USED = 0 from prjxray.segmaker import Segmaker segmk = Segmaker("design.bits") print("Loading tags") ''' module,loc,c31,b31,a31 my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0 my_NDI1MUX_NI_NM...
93dee6a3ff44fb7470b3008e8fbbaf99822bbe82
designate/cmd/__init__.py
designate/cmd/__init__.py
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
Fix Redis connection over TLS
Fix Redis connection over TLS When Designate is configured to use Redis for coordination over a TLS connection, it will fail to connect with "ssl.SSLError: ('timed out',)". This is caused by eventlet raising ssl.SSLError instead of the expected socket timeout the core libraries return. This patch monkey-patches eventl...
Python
apache-2.0
openstack/designate,openstack/designate,openstack/designate
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
<commit_before># Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[email protected]> # # 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...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
<commit_before># Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[email protected]> # # 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...
a54a2e735950c5c31ec71613750bdf1ce194389f
django_datastream/urls.py
django_datastream/urls.py
from django.conf import urls from tastypie import api from . import resources v1_api = api.Api(api_name='v1') v1_api.register(resources.StreamResource()) urlpatterns = urls.patterns( '', urls.url(r'^', urls.include(v1_api.urls)), )
from django.conf import urls from tastypie import api from . import resources v1_api = api.Api(api_name='v1') v1_api.register(resources.StreamResource()) urlpatterns = [ urls.url(r'^', urls.include(v1_api.urls)), ]
Fix urlpatterns for Django 1.10.
Fix urlpatterns for Django 1.10.
Python
agpl-3.0
wlanslovenija/django-datastream,wlanslovenija/django-datastream,wlanslovenija/django-datastream
from django.conf import urls from tastypie import api from . import resources v1_api = api.Api(api_name='v1') v1_api.register(resources.StreamResource()) urlpatterns = urls.patterns( '', urls.url(r'^', urls.include(v1_api.urls)), ) Fix urlpatterns for Django 1.10.
from django.conf import urls from tastypie import api from . import resources v1_api = api.Api(api_name='v1') v1_api.register(resources.StreamResource()) urlpatterns = [ urls.url(r'^', urls.include(v1_api.urls)), ]
<commit_before>from django.conf import urls from tastypie import api from . import resources v1_api = api.Api(api_name='v1') v1_api.register(resources.StreamResource()) urlpatterns = urls.patterns( '', urls.url(r'^', urls.include(v1_api.urls)), ) <commit_msg>Fix urlpatterns for Django 1.10.<commit_after>
from django.conf import urls from tastypie import api from . import resources v1_api = api.Api(api_name='v1') v1_api.register(resources.StreamResource()) urlpatterns = [ urls.url(r'^', urls.include(v1_api.urls)), ]
from django.conf import urls from tastypie import api from . import resources v1_api = api.Api(api_name='v1') v1_api.register(resources.StreamResource()) urlpatterns = urls.patterns( '', urls.url(r'^', urls.include(v1_api.urls)), ) Fix urlpatterns for Django 1.10.from django.conf import urls from tastypie...
<commit_before>from django.conf import urls from tastypie import api from . import resources v1_api = api.Api(api_name='v1') v1_api.register(resources.StreamResource()) urlpatterns = urls.patterns( '', urls.url(r'^', urls.include(v1_api.urls)), ) <commit_msg>Fix urlpatterns for Django 1.10.<commit_after>fr...
6903f63e76ac5e7686ae55348225d06e3757a64b
giphy_magic.py
giphy_magic.py
from IPython.display import Image import requests API_ENDPOINT = 'http://api.giphy.com/v1/gifs/random' # This is the Giphy API's public beta key, see https://github.com/Giphy/GiphyAPI API_KEY = 'dc6zaTOxFJmzC' def giphy(tag): params = { 'api_key': API_KEY, 'tag': tag } r = requests.get(...
from IPython.display import Image import requests API_ENDPOINT = 'http://api.giphy.com/v1/gifs/random' # This is the Giphy API's public beta key, see https://github.com/Giphy/GiphyAPI API_KEY = 'dc6zaTOxFJmzC' RANDOM_ON_NO_MATCH = False def get_params(tag): params = {'api_key': API_KEY} if tag is not None...
Add a constant that determines the response when no results are found
Add a constant that determines the response when no results are found
Python
mit
AustinRochford/giphy-ipython-magic,AustinRochford/giphy-ipython-magic
from IPython.display import Image import requests API_ENDPOINT = 'http://api.giphy.com/v1/gifs/random' # This is the Giphy API's public beta key, see https://github.com/Giphy/GiphyAPI API_KEY = 'dc6zaTOxFJmzC' def giphy(tag): params = { 'api_key': API_KEY, 'tag': tag } r = requests.get(...
from IPython.display import Image import requests API_ENDPOINT = 'http://api.giphy.com/v1/gifs/random' # This is the Giphy API's public beta key, see https://github.com/Giphy/GiphyAPI API_KEY = 'dc6zaTOxFJmzC' RANDOM_ON_NO_MATCH = False def get_params(tag): params = {'api_key': API_KEY} if tag is not None...
<commit_before>from IPython.display import Image import requests API_ENDPOINT = 'http://api.giphy.com/v1/gifs/random' # This is the Giphy API's public beta key, see https://github.com/Giphy/GiphyAPI API_KEY = 'dc6zaTOxFJmzC' def giphy(tag): params = { 'api_key': API_KEY, 'tag': tag } r ...
from IPython.display import Image import requests API_ENDPOINT = 'http://api.giphy.com/v1/gifs/random' # This is the Giphy API's public beta key, see https://github.com/Giphy/GiphyAPI API_KEY = 'dc6zaTOxFJmzC' RANDOM_ON_NO_MATCH = False def get_params(tag): params = {'api_key': API_KEY} if tag is not None...
from IPython.display import Image import requests API_ENDPOINT = 'http://api.giphy.com/v1/gifs/random' # This is the Giphy API's public beta key, see https://github.com/Giphy/GiphyAPI API_KEY = 'dc6zaTOxFJmzC' def giphy(tag): params = { 'api_key': API_KEY, 'tag': tag } r = requests.get(...
<commit_before>from IPython.display import Image import requests API_ENDPOINT = 'http://api.giphy.com/v1/gifs/random' # This is the Giphy API's public beta key, see https://github.com/Giphy/GiphyAPI API_KEY = 'dc6zaTOxFJmzC' def giphy(tag): params = { 'api_key': API_KEY, 'tag': tag } r ...
02160f46d5e28c394915d44c42e4e1b09e750717
utils/rest.py
utils/rest.py
import json import logging import requests import plugins.settings as settings headers = {'accept': 'application/json'} def get(config, path, data=None): request = requests.get( url=__format_url(config, path), params=data, headers=headers, auth=(config['username'], config['passwor...
import json import requests import plugins.settings as settings headers = {'accept': 'application/json'} def get(config, path, data=None): auth = None if 'username' in config and 'password' in config: auth = (config['username'], config['password']) request = requests.get( url=__format_ur...
Remove logging and allow anonymous access (for Crucible for example)
Remove logging and allow anonymous access (for Crucible for example)
Python
mit
gpailler/AtlassianBot
import json import logging import requests import plugins.settings as settings headers = {'accept': 'application/json'} def get(config, path, data=None): request = requests.get( url=__format_url(config, path), params=data, headers=headers, auth=(config['username'], config['passwor...
import json import requests import plugins.settings as settings headers = {'accept': 'application/json'} def get(config, path, data=None): auth = None if 'username' in config and 'password' in config: auth = (config['username'], config['password']) request = requests.get( url=__format_ur...
<commit_before>import json import logging import requests import plugins.settings as settings headers = {'accept': 'application/json'} def get(config, path, data=None): request = requests.get( url=__format_url(config, path), params=data, headers=headers, auth=(config['username'], ...
import json import requests import plugins.settings as settings headers = {'accept': 'application/json'} def get(config, path, data=None): auth = None if 'username' in config and 'password' in config: auth = (config['username'], config['password']) request = requests.get( url=__format_ur...
import json import logging import requests import plugins.settings as settings headers = {'accept': 'application/json'} def get(config, path, data=None): request = requests.get( url=__format_url(config, path), params=data, headers=headers, auth=(config['username'], config['passwor...
<commit_before>import json import logging import requests import plugins.settings as settings headers = {'accept': 'application/json'} def get(config, path, data=None): request = requests.get( url=__format_url(config, path), params=data, headers=headers, auth=(config['username'], ...
107ecde6c2373deedcb788115811bcbb50de6851
uwiki/auth.py
uwiki/auth.py
import logging from flask import request from flask.ext.login import current_user, UserMixin, AnonymousUserMixin from .core import app, auth log = logging.getLogger(__name__) app.login_manager.login_view = 'login' @auth.context_processor def provide_user(): return dict(user=current_user) @app.before_request...
import logging from flask import request from flask.ext.login import current_user, UserMixin, AnonymousUserMixin from .core import app, auth log = logging.getLogger(__name__) app.login_manager.login_view = 'login' @auth.context_processor def provide_user(): return dict(user=current_user) @app.before_request...
Allow static files to go through (for now)
Allow static files to go through (for now)
Python
bsd-3-clause
mikeboers/uWiki,mikeboers/uWiki,mikeboers/uWiki,mikeboers/uWiki
import logging from flask import request from flask.ext.login import current_user, UserMixin, AnonymousUserMixin from .core import app, auth log = logging.getLogger(__name__) app.login_manager.login_view = 'login' @auth.context_processor def provide_user(): return dict(user=current_user) @app.before_request...
import logging from flask import request from flask.ext.login import current_user, UserMixin, AnonymousUserMixin from .core import app, auth log = logging.getLogger(__name__) app.login_manager.login_view = 'login' @auth.context_processor def provide_user(): return dict(user=current_user) @app.before_request...
<commit_before>import logging from flask import request from flask.ext.login import current_user, UserMixin, AnonymousUserMixin from .core import app, auth log = logging.getLogger(__name__) app.login_manager.login_view = 'login' @auth.context_processor def provide_user(): return dict(user=current_user) @app...
import logging from flask import request from flask.ext.login import current_user, UserMixin, AnonymousUserMixin from .core import app, auth log = logging.getLogger(__name__) app.login_manager.login_view = 'login' @auth.context_processor def provide_user(): return dict(user=current_user) @app.before_request...
import logging from flask import request from flask.ext.login import current_user, UserMixin, AnonymousUserMixin from .core import app, auth log = logging.getLogger(__name__) app.login_manager.login_view = 'login' @auth.context_processor def provide_user(): return dict(user=current_user) @app.before_request...
<commit_before>import logging from flask import request from flask.ext.login import current_user, UserMixin, AnonymousUserMixin from .core import app, auth log = logging.getLogger(__name__) app.login_manager.login_view = 'login' @auth.context_processor def provide_user(): return dict(user=current_user) @app...
a1effed87a8e90483f1ab850c77aff7c827b7f48
install_packages.py
install_packages.py
#!/usr/bin/python # -*- coding: utf-8 -*- import weka.core.jvm as jvm import weka.core.packages as packages jvm.start() # checking for installed packages installed_packages = packages.installed_packages() for item in installed_packages: print item.name, item.url, "is installed\n" # Search for GridSearch and Lib...
#!/usr/bin/python # -*- coding: utf-8 -*- import weka.core.jvm as jvm import weka.core.packages as packages jvm.start() # checking for installed packages installed_packages = packages.installed_packages() for item in installed_packages: print item.name, item.url, "is installed\n" # # Search for GridSearch and L...
Add other options to install packages
Add other options to install packages
Python
mit
srvanrell/libsvm-weka-python
#!/usr/bin/python # -*- coding: utf-8 -*- import weka.core.jvm as jvm import weka.core.packages as packages jvm.start() # checking for installed packages installed_packages = packages.installed_packages() for item in installed_packages: print item.name, item.url, "is installed\n" # Search for GridSearch and Lib...
#!/usr/bin/python # -*- coding: utf-8 -*- import weka.core.jvm as jvm import weka.core.packages as packages jvm.start() # checking for installed packages installed_packages = packages.installed_packages() for item in installed_packages: print item.name, item.url, "is installed\n" # # Search for GridSearch and L...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import weka.core.jvm as jvm import weka.core.packages as packages jvm.start() # checking for installed packages installed_packages = packages.installed_packages() for item in installed_packages: print item.name, item.url, "is installed\n" # Search for Gri...
#!/usr/bin/python # -*- coding: utf-8 -*- import weka.core.jvm as jvm import weka.core.packages as packages jvm.start() # checking for installed packages installed_packages = packages.installed_packages() for item in installed_packages: print item.name, item.url, "is installed\n" # # Search for GridSearch and L...
#!/usr/bin/python # -*- coding: utf-8 -*- import weka.core.jvm as jvm import weka.core.packages as packages jvm.start() # checking for installed packages installed_packages = packages.installed_packages() for item in installed_packages: print item.name, item.url, "is installed\n" # Search for GridSearch and Lib...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import weka.core.jvm as jvm import weka.core.packages as packages jvm.start() # checking for installed packages installed_packages = packages.installed_packages() for item in installed_packages: print item.name, item.url, "is installed\n" # Search for Gri...
2533aa96b189eb5aaea293c57f928d594ef92eba
utils/language.py
utils/language.py
from utils.synonyms import cached_synonyms from nltk.corpus import wordnet as wn def semantic_similarity(word1, word2): if fast_semantic_similarity(word1, word2) == 1: return 1 max_p = 0 for s1 in wn.synsets(word1): for st1 in [s1] + s1.similar_tos(): for s2 in wn.synsets(word2...
from utils.synonyms import cached_synonyms from nltk.corpus import wordnet as wn def semantic_similarity(word1, word2): words1 = word1.split('_') words2 = word2.split('_') if len(words1) > 1 or len(words2) > 1: sub_similarity = .9 * semantic_similarity(words1[-1], words2[-1]) else: sub...
Check semantic similarity of last word in phrase as well as entire phrase
Check semantic similarity of last word in phrase as well as entire phrase
Python
mit
rdeits/cryptics,rdeits/cryptics,rdeits/cryptics,rdeits/cryptics,rdeits/cryptics,rdeits/cryptics,rdeits/cryptics
from utils.synonyms import cached_synonyms from nltk.corpus import wordnet as wn def semantic_similarity(word1, word2): if fast_semantic_similarity(word1, word2) == 1: return 1 max_p = 0 for s1 in wn.synsets(word1): for st1 in [s1] + s1.similar_tos(): for s2 in wn.synsets(word2...
from utils.synonyms import cached_synonyms from nltk.corpus import wordnet as wn def semantic_similarity(word1, word2): words1 = word1.split('_') words2 = word2.split('_') if len(words1) > 1 or len(words2) > 1: sub_similarity = .9 * semantic_similarity(words1[-1], words2[-1]) else: sub...
<commit_before>from utils.synonyms import cached_synonyms from nltk.corpus import wordnet as wn def semantic_similarity(word1, word2): if fast_semantic_similarity(word1, word2) == 1: return 1 max_p = 0 for s1 in wn.synsets(word1): for st1 in [s1] + s1.similar_tos(): for s2 in w...
from utils.synonyms import cached_synonyms from nltk.corpus import wordnet as wn def semantic_similarity(word1, word2): words1 = word1.split('_') words2 = word2.split('_') if len(words1) > 1 or len(words2) > 1: sub_similarity = .9 * semantic_similarity(words1[-1], words2[-1]) else: sub...
from utils.synonyms import cached_synonyms from nltk.corpus import wordnet as wn def semantic_similarity(word1, word2): if fast_semantic_similarity(word1, word2) == 1: return 1 max_p = 0 for s1 in wn.synsets(word1): for st1 in [s1] + s1.similar_tos(): for s2 in wn.synsets(word2...
<commit_before>from utils.synonyms import cached_synonyms from nltk.corpus import wordnet as wn def semantic_similarity(word1, word2): if fast_semantic_similarity(word1, word2) == 1: return 1 max_p = 0 for s1 in wn.synsets(word1): for st1 in [s1] + s1.similar_tos(): for s2 in w...
fe32099bf1b6aa387c98dd6afdfc31557fc4e1f9
volpy/__init__.py
volpy/__init__.py
from .camera import Camera from .scene import Scene, Element, Light from .version import __version__ from .grid import Grid from .homogeneous import (translate, scale, rotatex, rotatey, rotatez, rotatexyz, rotate_axis, cross) from .geometry import Geometry, BBox
''' Volpy ===== A fast volume rendering implementation for Python. Volpy has support for: 1. Multithreading or multiprocessing at the rendering step 2. Native implementation of ray casting 3. Native access to NumPy arrays during rendering 4. Support for ambient and diffuse lighting terms How to use this pack...
Write a docstring for the package
Write a docstring for the package
Python
mit
OEP/volpy,OEP/volpy
from .camera import Camera from .scene import Scene, Element, Light from .version import __version__ from .grid import Grid from .homogeneous import (translate, scale, rotatex, rotatey, rotatez, rotatexyz, rotate_axis, cross) from .geometry import Geometry, BBox Write a docstring for the packa...
''' Volpy ===== A fast volume rendering implementation for Python. Volpy has support for: 1. Multithreading or multiprocessing at the rendering step 2. Native implementation of ray casting 3. Native access to NumPy arrays during rendering 4. Support for ambient and diffuse lighting terms How to use this pack...
<commit_before>from .camera import Camera from .scene import Scene, Element, Light from .version import __version__ from .grid import Grid from .homogeneous import (translate, scale, rotatex, rotatey, rotatez, rotatexyz, rotate_axis, cross) from .geometry import Geometry, BBox <commit_msg>Writ...
''' Volpy ===== A fast volume rendering implementation for Python. Volpy has support for: 1. Multithreading or multiprocessing at the rendering step 2. Native implementation of ray casting 3. Native access to NumPy arrays during rendering 4. Support for ambient and diffuse lighting terms How to use this pack...
from .camera import Camera from .scene import Scene, Element, Light from .version import __version__ from .grid import Grid from .homogeneous import (translate, scale, rotatex, rotatey, rotatez, rotatexyz, rotate_axis, cross) from .geometry import Geometry, BBox Write a docstring for the packa...
<commit_before>from .camera import Camera from .scene import Scene, Element, Light from .version import __version__ from .grid import Grid from .homogeneous import (translate, scale, rotatex, rotatey, rotatez, rotatexyz, rotate_axis, cross) from .geometry import Geometry, BBox <commit_msg>Writ...
5e2bcc9ae44d0155be1cc72b3728c3869377e02f
website/addons/osfstorage/__init__.py
website/addons/osfstorage/__init__.py
#!/usr/bin/env python # encoding: utf-8 from . import routes, views, model MODELS = [ model.OsfStorageNodeSettings, model.OsfStorageFileTree, model.OsfStorageFileRecord, model.OsfStorageFileVersion, model.OsfStorageGuidFile, ] NODE_SETTINGS_MODEL = model.OsfStorageNodeSettings ROUTES = [ rout...
#!/usr/bin/env python # encoding: utf-8 from . import routes, views, model MODELS = [ model.OsfStorageNodeSettings, model.OsfStorageFileTree, model.OsfStorageFileRecord, model.OsfStorageFileVersion, model.OsfStorageGuidFile, ] NODE_SETTINGS_MODEL = model.OsfStorageNodeSettings ROUTES = [ rout...
Remove storageRubeusConfig.js from osfstorage init.py
Remove storageRubeusConfig.js from osfstorage init.py
Python
apache-2.0
mfraezz/osf.io,caseyrollins/osf.io,leb2dg/osf.io,caseyrygt/osf.io,kushG/osf.io,jmcarp/osf.io,billyhunt/osf.io,Nesiehr/osf.io,haoyuchen1992/osf.io,zkraime/osf.io,HalcyonChimera/osf.io,monikagrabowska/osf.io,lamdnhan/osf.io,HalcyonChimera/osf.io,kushG/osf.io,wearpants/osf.io,samanehsan/osf.io,cwisecarver/osf.io,arpitar/o...
#!/usr/bin/env python # encoding: utf-8 from . import routes, views, model MODELS = [ model.OsfStorageNodeSettings, model.OsfStorageFileTree, model.OsfStorageFileRecord, model.OsfStorageFileVersion, model.OsfStorageGuidFile, ] NODE_SETTINGS_MODEL = model.OsfStorageNodeSettings ROUTES = [ rout...
#!/usr/bin/env python # encoding: utf-8 from . import routes, views, model MODELS = [ model.OsfStorageNodeSettings, model.OsfStorageFileTree, model.OsfStorageFileRecord, model.OsfStorageFileVersion, model.OsfStorageGuidFile, ] NODE_SETTINGS_MODEL = model.OsfStorageNodeSettings ROUTES = [ rout...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from . import routes, views, model MODELS = [ model.OsfStorageNodeSettings, model.OsfStorageFileTree, model.OsfStorageFileRecord, model.OsfStorageFileVersion, model.OsfStorageGuidFile, ] NODE_SETTINGS_MODEL = model.OsfStorageNodeSettings ROUT...
#!/usr/bin/env python # encoding: utf-8 from . import routes, views, model MODELS = [ model.OsfStorageNodeSettings, model.OsfStorageFileTree, model.OsfStorageFileRecord, model.OsfStorageFileVersion, model.OsfStorageGuidFile, ] NODE_SETTINGS_MODEL = model.OsfStorageNodeSettings ROUTES = [ rout...
#!/usr/bin/env python # encoding: utf-8 from . import routes, views, model MODELS = [ model.OsfStorageNodeSettings, model.OsfStorageFileTree, model.OsfStorageFileRecord, model.OsfStorageFileVersion, model.OsfStorageGuidFile, ] NODE_SETTINGS_MODEL = model.OsfStorageNodeSettings ROUTES = [ rout...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from . import routes, views, model MODELS = [ model.OsfStorageNodeSettings, model.OsfStorageFileTree, model.OsfStorageFileRecord, model.OsfStorageFileVersion, model.OsfStorageGuidFile, ] NODE_SETTINGS_MODEL = model.OsfStorageNodeSettings ROUT...
51e985119e3b62df69f806426b928053ddbac9d7
db/base/templatetags/tags.py
db/base/templatetags/tags.py
from django import template from django.core.urlresolvers import reverse from django.utils.html import format_html register = template.Library() @register.simple_tag def active(request, urls): if request.path in (reverse(url) for url in urls.split()): return 'active' return None @register.filter de...
from django import template from django.core.urlresolvers import reverse from django.utils.html import format_html register = template.Library() @register.simple_tag def active(request, urls): if request.path in (reverse(url) for url in urls.split()): return 'active' return None @register.filter de...
Fix frequency formating and handling
Fix frequency formating and handling
Python
agpl-3.0
Roboneet/satnogs-db,Roboneet/satnogs-db,Roboneet/satnogs-db,Roboneet/satnogs-db
from django import template from django.core.urlresolvers import reverse from django.utils.html import format_html register = template.Library() @register.simple_tag def active(request, urls): if request.path in (reverse(url) for url in urls.split()): return 'active' return None @register.filter de...
from django import template from django.core.urlresolvers import reverse from django.utils.html import format_html register = template.Library() @register.simple_tag def active(request, urls): if request.path in (reverse(url) for url in urls.split()): return 'active' return None @register.filter de...
<commit_before>from django import template from django.core.urlresolvers import reverse from django.utils.html import format_html register = template.Library() @register.simple_tag def active(request, urls): if request.path in (reverse(url) for url in urls.split()): return 'active' return None @reg...
from django import template from django.core.urlresolvers import reverse from django.utils.html import format_html register = template.Library() @register.simple_tag def active(request, urls): if request.path in (reverse(url) for url in urls.split()): return 'active' return None @register.filter de...
from django import template from django.core.urlresolvers import reverse from django.utils.html import format_html register = template.Library() @register.simple_tag def active(request, urls): if request.path in (reverse(url) for url in urls.split()): return 'active' return None @register.filter de...
<commit_before>from django import template from django.core.urlresolvers import reverse from django.utils.html import format_html register = template.Library() @register.simple_tag def active(request, urls): if request.path in (reverse(url) for url in urls.split()): return 'active' return None @reg...
837a0e822905fa8c4e0dda33a03f8423b2f9cdb1
nova/policies/hosts.py
nova/policies/hosts.py
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
Add policy description for os-host
Add policy description for os-host This commit adds policy doc for os-host policies. Partial implement blueprint policy-docs Change-Id: Ie15125f025dbb4982ff27cfed12047e8fce3a3cf
Python
apache-2.0
rahulunair/nova,mahak/nova,gooddata/openstack-nova,Juniper/nova,gooddata/openstack-nova,rahulunair/nova,klmitch/nova,phenoxim/nova,phenoxim/nova,openstack/nova,openstack/nova,Juniper/nova,rahulunair/nova,mikalstill/nova,mahak/nova,vmturbo/nova,vmturbo/nova,openstack/nova,klmitch/nova,vmturbo/nova,mikalstill/nova,klmitc...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
<commit_before># Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
<commit_before># Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
d0fb729183f702711127b63b1e0898a9a601a7f4
bitbucket/tests/private/private.py
bitbucket/tests/private/private.py
# -*- coding: utf-8 -*- import unittest from bitbucket.bitbucket import Bitbucket from bitbucket.tests.private import USERNAME, PASSWORD TEST_REPO_SLUG = 'test_bitbucket_api' class AuthenticatedBitbucketTest(unittest.TestCase): """ Bitbucket test base class for authenticated methods.""" def setUp(self): ...
# -*- coding: utf-8 -*- import unittest from bitbucket.bitbucket import Bitbucket from bitbucket.tests.private import USERNAME, PASSWORD TEST_REPO_SLUG = 'test_bitbucket_api' class AuthenticatedBitbucketTest(unittest.TestCase): """ Bitbucket test base class for authenticated methods.""" def setUp(self): ...
Update BitbucketAuthenticatedMethodsTest's test_get_tags and test_get_branches methods.
Update BitbucketAuthenticatedMethodsTest's test_get_tags and test_get_branches methods. Signed-off-by: Baptiste Millou <[email protected]>
Python
isc
robwilkerson/BitBucket-api,wadevries/BitBucket-api,chaiapodi/BitBucket-api,affinitic/BitBucket-api,Sheeprider/BitBucket-api,CBitLabs/BitBucket-api,Sheeprider/BitBucket-api,kubilayeksioglu/BitBucket-api,chaiapodi/BitBucket-api
# -*- coding: utf-8 -*- import unittest from bitbucket.bitbucket import Bitbucket from bitbucket.tests.private import USERNAME, PASSWORD TEST_REPO_SLUG = 'test_bitbucket_api' class AuthenticatedBitbucketTest(unittest.TestCase): """ Bitbucket test base class for authenticated methods.""" def setUp(self): ...
# -*- coding: utf-8 -*- import unittest from bitbucket.bitbucket import Bitbucket from bitbucket.tests.private import USERNAME, PASSWORD TEST_REPO_SLUG = 'test_bitbucket_api' class AuthenticatedBitbucketTest(unittest.TestCase): """ Bitbucket test base class for authenticated methods.""" def setUp(self): ...
<commit_before># -*- coding: utf-8 -*- import unittest from bitbucket.bitbucket import Bitbucket from bitbucket.tests.private import USERNAME, PASSWORD TEST_REPO_SLUG = 'test_bitbucket_api' class AuthenticatedBitbucketTest(unittest.TestCase): """ Bitbucket test base class for authenticated methods.""" def s...
# -*- coding: utf-8 -*- import unittest from bitbucket.bitbucket import Bitbucket from bitbucket.tests.private import USERNAME, PASSWORD TEST_REPO_SLUG = 'test_bitbucket_api' class AuthenticatedBitbucketTest(unittest.TestCase): """ Bitbucket test base class for authenticated methods.""" def setUp(self): ...
# -*- coding: utf-8 -*- import unittest from bitbucket.bitbucket import Bitbucket from bitbucket.tests.private import USERNAME, PASSWORD TEST_REPO_SLUG = 'test_bitbucket_api' class AuthenticatedBitbucketTest(unittest.TestCase): """ Bitbucket test base class for authenticated methods.""" def setUp(self): ...
<commit_before># -*- coding: utf-8 -*- import unittest from bitbucket.bitbucket import Bitbucket from bitbucket.tests.private import USERNAME, PASSWORD TEST_REPO_SLUG = 'test_bitbucket_api' class AuthenticatedBitbucketTest(unittest.TestCase): """ Bitbucket test base class for authenticated methods.""" def s...
c8db390195641c33f84ccd1f645a5af73debc2bd
xapi/tasks.py
xapi/tasks.py
from celery.task import task from django.conf import settings from xapi.sender import TinCanSender @task def send_2_tin_can(): options = settings.TRACKING_BACKENDS['xapi']['OPTIONS'] if options.get("SEND_CRON_ENABLED"): TinCanSender.send_2_tincan_by_settings()
from celery.task import task from django.conf import settings from xapi.sender import TinCanSender @task(name='xapi.send_2_tin_can') def send_2_tin_can(): options = settings.TRACKING_BACKENDS['xapi']['OPTIONS'] TinCanSender.send_2_tincan_by_settings()
Add a name to present task in djcelery options
Add a name to present task in djcelery options
Python
agpl-3.0
marcore/pok-eco,marcore/pok-eco
from celery.task import task from django.conf import settings from xapi.sender import TinCanSender @task def send_2_tin_can(): options = settings.TRACKING_BACKENDS['xapi']['OPTIONS'] if options.get("SEND_CRON_ENABLED"): TinCanSender.send_2_tincan_by_settings() Add a name to present task in djcelery o...
from celery.task import task from django.conf import settings from xapi.sender import TinCanSender @task(name='xapi.send_2_tin_can') def send_2_tin_can(): options = settings.TRACKING_BACKENDS['xapi']['OPTIONS'] TinCanSender.send_2_tincan_by_settings()
<commit_before>from celery.task import task from django.conf import settings from xapi.sender import TinCanSender @task def send_2_tin_can(): options = settings.TRACKING_BACKENDS['xapi']['OPTIONS'] if options.get("SEND_CRON_ENABLED"): TinCanSender.send_2_tincan_by_settings() <commit_msg>Add a name to ...
from celery.task import task from django.conf import settings from xapi.sender import TinCanSender @task(name='xapi.send_2_tin_can') def send_2_tin_can(): options = settings.TRACKING_BACKENDS['xapi']['OPTIONS'] TinCanSender.send_2_tincan_by_settings()
from celery.task import task from django.conf import settings from xapi.sender import TinCanSender @task def send_2_tin_can(): options = settings.TRACKING_BACKENDS['xapi']['OPTIONS'] if options.get("SEND_CRON_ENABLED"): TinCanSender.send_2_tincan_by_settings() Add a name to present task in djcelery o...
<commit_before>from celery.task import task from django.conf import settings from xapi.sender import TinCanSender @task def send_2_tin_can(): options = settings.TRACKING_BACKENDS['xapi']['OPTIONS'] if options.get("SEND_CRON_ENABLED"): TinCanSender.send_2_tincan_by_settings() <commit_msg>Add a name to ...
11b0608f2cab4f9c804d5a2e67edfc4270448b71
ectoken.py
ectoken.py
from ctypes import CDLL, create_string_buffer, byref import pkg_resources bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so')) def ectoken_generate(key, string): if isinstance(string, unicode): string = string.encode('utf-8') string = 'ec_secure=%03d&%s' % (len(string) + 14, string)...
from ctypes import CDLL, create_string_buffer, byref import pkg_resources bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so')) def ectoken_generate(key, string): if len(string) > 512: raise ValueError( '%r exceeds maximum length of 512 characters' % string) if isinstance...
Add check for maximum length (taken from the original Edgecast ec_encrypt.c example)
Add check for maximum length (taken from the original Edgecast ec_encrypt.c example)
Python
bsd-3-clause
sebest/ectoken-py,sebest/ectoken-py
from ctypes import CDLL, create_string_buffer, byref import pkg_resources bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so')) def ectoken_generate(key, string): if isinstance(string, unicode): string = string.encode('utf-8') string = 'ec_secure=%03d&%s' % (len(string) + 14, string)...
from ctypes import CDLL, create_string_buffer, byref import pkg_resources bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so')) def ectoken_generate(key, string): if len(string) > 512: raise ValueError( '%r exceeds maximum length of 512 characters' % string) if isinstance...
<commit_before>from ctypes import CDLL, create_string_buffer, byref import pkg_resources bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so')) def ectoken_generate(key, string): if isinstance(string, unicode): string = string.encode('utf-8') string = 'ec_secure=%03d&%s' % (len(string...
from ctypes import CDLL, create_string_buffer, byref import pkg_resources bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so')) def ectoken_generate(key, string): if len(string) > 512: raise ValueError( '%r exceeds maximum length of 512 characters' % string) if isinstance...
from ctypes import CDLL, create_string_buffer, byref import pkg_resources bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so')) def ectoken_generate(key, string): if isinstance(string, unicode): string = string.encode('utf-8') string = 'ec_secure=%03d&%s' % (len(string) + 14, string)...
<commit_before>from ctypes import CDLL, create_string_buffer, byref import pkg_resources bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so')) def ectoken_generate(key, string): if isinstance(string, unicode): string = string.encode('utf-8') string = 'ec_secure=%03d&%s' % (len(string...
68e9015d846c08ed331cdca219648d60f6d65737
ynr/apps/candidates/search_indexes.py
ynr/apps/candidates/search_indexes.py
from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from popolo.models import Person class PersonIndex(CelerySearchIndex, indexes.Indexable): # FIXME: this doesn't seem to work for partial names despite what # docs say text = indexes.EdgeNgramField(document=True, use_templa...
from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from popolo.models import Person class PersonIndex(CelerySearchIndex, indexes.Indexable): # FIXME: this doesn't seem to work for partial names despite what # docs say text = indexes.EdgeNgramField(document=True, use_templa...
Add get_updated_field to search index
Add get_updated_field to search index This will allow us to only update the search index for models updated in a given timedelta.
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from popolo.models import Person class PersonIndex(CelerySearchIndex, indexes.Indexable): # FIXME: this doesn't seem to work for partial names despite what # docs say text = indexes.EdgeNgramField(document=True, use_templa...
from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from popolo.models import Person class PersonIndex(CelerySearchIndex, indexes.Indexable): # FIXME: this doesn't seem to work for partial names despite what # docs say text = indexes.EdgeNgramField(document=True, use_templa...
<commit_before>from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from popolo.models import Person class PersonIndex(CelerySearchIndex, indexes.Indexable): # FIXME: this doesn't seem to work for partial names despite what # docs say text = indexes.EdgeNgramField(document=T...
from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from popolo.models import Person class PersonIndex(CelerySearchIndex, indexes.Indexable): # FIXME: this doesn't seem to work for partial names despite what # docs say text = indexes.EdgeNgramField(document=True, use_templa...
from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from popolo.models import Person class PersonIndex(CelerySearchIndex, indexes.Indexable): # FIXME: this doesn't seem to work for partial names despite what # docs say text = indexes.EdgeNgramField(document=True, use_templa...
<commit_before>from haystack import indexes from celery_haystack.indexes import CelerySearchIndex from popolo.models import Person class PersonIndex(CelerySearchIndex, indexes.Indexable): # FIXME: this doesn't seem to work for partial names despite what # docs say text = indexes.EdgeNgramField(document=T...
bb8506feb44eaa0b38a3d38956bf85c49f54bc5a
fabfile.py
fabfile.py
#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, tornado_test_runner, tornado_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trinity" env.path = ...
#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, nose_test_runner, webpy_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trinity" env.path = "/var/tornado...
Switch to nose test runners - probably shouldn't use fabric in this project.
Switch to nose test runners - probably shouldn't use fabric in this project.
Python
mit
peplin/trinity
#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, tornado_test_runner, tornado_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trinity" env.path = ...
#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, nose_test_runner, webpy_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trinity" env.path = "/var/tornado...
<commit_before>#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, tornado_test_runner, tornado_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trini...
#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, nose_test_runner, webpy_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trinity" env.path = "/var/tornado...
#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, tornado_test_runner, tornado_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trinity" env.path = ...
<commit_before>#!/usr/bin/env python import os from fabric.api import * from fab_shared import (test, tornado_test_runner, tornado_deploy as deploy, setup, development, production, localhost, staging, restart_webserver, rollback, lint, enable, disable, maintenancemode, rechef) env.unit = "trini...
900b4c02a2ae1570083bb23e562208331ea2a651
python/ecep/portal/widgets.py
python/ecep/portal/widgets.py
from django.forms import widgets from django.utils.safestring import mark_safe class MapWidget(widgets.HiddenInput): def render(self, name, value, attrs=None): widget = super(MapWidget, self).render(name, value, attrs) return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="tex...
from django.forms import widgets from django.utils.safestring import mark_safe class MapWidget(widgets.HiddenInput): """Custom map widget for displaying interactive google map to geocode addresses of learning centers. This widget displays a readonly input box to store lat+lng data, an empty help div,...
Add comments to MapWidget class and MapWidget.render method
Add comments to MapWidget class and MapWidget.render method
Python
mit
smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning
from django.forms import widgets from django.utils.safestring import mark_safe class MapWidget(widgets.HiddenInput): def render(self, name, value, attrs=None): widget = super(MapWidget, self).render(name, value, attrs) return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="tex...
from django.forms import widgets from django.utils.safestring import mark_safe class MapWidget(widgets.HiddenInput): """Custom map widget for displaying interactive google map to geocode addresses of learning centers. This widget displays a readonly input box to store lat+lng data, an empty help div,...
<commit_before>from django.forms import widgets from django.utils.safestring import mark_safe class MapWidget(widgets.HiddenInput): def render(self, name, value, attrs=None): widget = super(MapWidget, self).render(name, value, attrs) return mark_safe("""<input name="geom" readonly="readonly" value...
from django.forms import widgets from django.utils.safestring import mark_safe class MapWidget(widgets.HiddenInput): """Custom map widget for displaying interactive google map to geocode addresses of learning centers. This widget displays a readonly input box to store lat+lng data, an empty help div,...
from django.forms import widgets from django.utils.safestring import mark_safe class MapWidget(widgets.HiddenInput): def render(self, name, value, attrs=None): widget = super(MapWidget, self).render(name, value, attrs) return mark_safe("""<input name="geom" readonly="readonly" value="%s" type="tex...
<commit_before>from django.forms import widgets from django.utils.safestring import mark_safe class MapWidget(widgets.HiddenInput): def render(self, name, value, attrs=None): widget = super(MapWidget, self).render(name, value, attrs) return mark_safe("""<input name="geom" readonly="readonly" value...
53a6e81b6a269589df5c6ce199b6248d838f9180
pythonpic/configs/run_wave.py
pythonpic/configs/run_wave.py
""" Run wave propagation""" # coding=utf-8 import numpy as np from ..algorithms import BoundaryCondition from ..classes import Grid, Simulation class wave_propagation(Simulation): def __init__(self, filename, bc = BoundaryCondition.Laser(1, 1, 10, 3).laser_pulse, ): ...
""" Run wave propagation""" # coding=utf-8 import numpy as np from ..algorithms import BoundaryCondition from ..classes import Grid, Simulation class wave_propagation(Simulation): def __init__(self, filename, bc = BoundaryCondition.Laser(1, 1, 10, 3).laser_pulse, ): ...
Fix super bug in wave
Fix super bug in wave
Python
bsd-3-clause
StanczakDominik/PythonPIC
""" Run wave propagation""" # coding=utf-8 import numpy as np from ..algorithms import BoundaryCondition from ..classes import Grid, Simulation class wave_propagation(Simulation): def __init__(self, filename, bc = BoundaryCondition.Laser(1, 1, 10, 3).laser_pulse, ): ...
""" Run wave propagation""" # coding=utf-8 import numpy as np from ..algorithms import BoundaryCondition from ..classes import Grid, Simulation class wave_propagation(Simulation): def __init__(self, filename, bc = BoundaryCondition.Laser(1, 1, 10, 3).laser_pulse, ): ...
<commit_before>""" Run wave propagation""" # coding=utf-8 import numpy as np from ..algorithms import BoundaryCondition from ..classes import Grid, Simulation class wave_propagation(Simulation): def __init__(self, filename, bc = BoundaryCondition.Laser(1, 1, 10, 3).laser_pulse, ...
""" Run wave propagation""" # coding=utf-8 import numpy as np from ..algorithms import BoundaryCondition from ..classes import Grid, Simulation class wave_propagation(Simulation): def __init__(self, filename, bc = BoundaryCondition.Laser(1, 1, 10, 3).laser_pulse, ): ...
""" Run wave propagation""" # coding=utf-8 import numpy as np from ..algorithms import BoundaryCondition from ..classes import Grid, Simulation class wave_propagation(Simulation): def __init__(self, filename, bc = BoundaryCondition.Laser(1, 1, 10, 3).laser_pulse, ): ...
<commit_before>""" Run wave propagation""" # coding=utf-8 import numpy as np from ..algorithms import BoundaryCondition from ..classes import Grid, Simulation class wave_propagation(Simulation): def __init__(self, filename, bc = BoundaryCondition.Laser(1, 1, 10, 3).laser_pulse, ...
f2c5210b771728ba60ffe81993617b8af07bbaeb
koans/about_none.py
koans/about_none.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(__, isinstance(None, object)) def test_none_is_universal(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(True, isinstance(None, object)) def test_none_is_universal(self): ...
Add first pass at "none" koan. One test left.
Add first pass at "none" koan. One test left.
Python
mit
javierjulio/python-koans-completed,javierjulio/python-koans-completed
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(__, isinstance(None, object)) def test_none_is_universal(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(True, isinstance(None, object)) def test_none_is_universal(self): ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(__, isinstance(None, object)) def test_none_is_unive...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(True, isinstance(None, object)) def test_none_is_universal(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(__, isinstance(None, object)) def test_none_is_universal(self): ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(__, isinstance(None, object)) def test_none_is_unive...
54fc2329fa597739ed7d4e2efb859718f25b255d
pysat/_constellation.py
pysat/_constellation.py
class Constellation(object): """Manage and analyze data from multiple pysat Instruments. FIXME document this. """ def __init__(self, instruments=None, name=None): if instruments and name: raise ValueError('When creating a constellation, please specify a ' ...
class Constellation(object): """Manage and analyze data from multiple pysat Instruments. FIXME document this. """ def __init__(self, instruments=None, name=None): if instruments and name: raise ValueError('When creating a constellation, please specify ' ...
Change line wrap to appease pycodestyle.
Change line wrap to appease pycodestyle.
Python
bsd-3-clause
rstoneback/pysat,jklenzing/pysat
class Constellation(object): """Manage and analyze data from multiple pysat Instruments. FIXME document this. """ def __init__(self, instruments=None, name=None): if instruments and name: raise ValueError('When creating a constellation, please specify a ' ...
class Constellation(object): """Manage and analyze data from multiple pysat Instruments. FIXME document this. """ def __init__(self, instruments=None, name=None): if instruments and name: raise ValueError('When creating a constellation, please specify ' ...
<commit_before> class Constellation(object): """Manage and analyze data from multiple pysat Instruments. FIXME document this. """ def __init__(self, instruments=None, name=None): if instruments and name: raise ValueError('When creating a constellation, please specify a ' ...
class Constellation(object): """Manage and analyze data from multiple pysat Instruments. FIXME document this. """ def __init__(self, instruments=None, name=None): if instruments and name: raise ValueError('When creating a constellation, please specify ' ...
class Constellation(object): """Manage and analyze data from multiple pysat Instruments. FIXME document this. """ def __init__(self, instruments=None, name=None): if instruments and name: raise ValueError('When creating a constellation, please specify a ' ...
<commit_before> class Constellation(object): """Manage and analyze data from multiple pysat Instruments. FIXME document this. """ def __init__(self, instruments=None, name=None): if instruments and name: raise ValueError('When creating a constellation, please specify a ' ...
c57fd21ca62f9217a943cec5111b64403e968ab5
kimochi/scripts/initializedb.py
kimochi/scripts/initializedb.py
import os import sys import transaction from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, Base, ) def usage(argv): cmd = os.path.basename(argv[0]) ...
import os import sys import transaction from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, Base, User, ) def usage(argv): cmd = os.path.basename(argv[0]...
Add temporary default admin user
Add temporary default admin user
Python
mit
matslindh/kimochi,matslindh/kimochi
import os import sys import transaction from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, Base, ) def usage(argv): cmd = os.path.basename(argv[0]) ...
import os import sys import transaction from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, Base, User, ) def usage(argv): cmd = os.path.basename(argv[0]...
<commit_before>import os import sys import transaction from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, Base, ) def usage(argv): cmd = os.path.basenam...
import os import sys import transaction from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, Base, User, ) def usage(argv): cmd = os.path.basename(argv[0]...
import os import sys import transaction from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, Base, ) def usage(argv): cmd = os.path.basename(argv[0]) ...
<commit_before>import os import sys import transaction from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, Base, ) def usage(argv): cmd = os.path.basenam...
884a06ea0bd2021bfc298a93495433a28a717a3e
reportlab/test/test_tools_pythonpoint.py
reportlab/test/test_tools_pythonpoint.py
"""Tests for the PythonPoint tool. """ import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonp...
"""Tests for the PythonPoint tool. """ import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonp...
Fix buglet in compact testing
Fix buglet in compact testing
Python
bsd-3-clause
makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile
"""Tests for the PythonPoint tool. """ import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonp...
"""Tests for the PythonPoint tool. """ import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonp...
<commit_before>"""Tests for the PythonPoint tool. """ import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "...
"""Tests for the PythonPoint tool. """ import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonp...
"""Tests for the PythonPoint tool. """ import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonp...
<commit_before>"""Tests for the PythonPoint tool. """ import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "...
1da1000d7bade80a0f68dbacc93ad1e73463c605
linkedevents/api.py
linkedevents/api.py
import copy from rest_framework.routers import DefaultRouter, SimpleRouter from events.api import all_views as events_views from helevents.api import all_views as users_views class LinkedEventsAPIRouter(DefaultRouter): # these are from Django REST Framework bulk BulkRouter with 'delete' excluded routes = copy...
import copy from rest_framework.routers import DefaultRouter, SimpleRouter from events.api import all_views as events_views from helevents.api import all_views as users_views class LinkedEventsAPIRouter(DefaultRouter): # these are from Django REST Framework bulk BulkRouter with 'delete' excluded routes = copy...
Replace base_name with basename base_name is deprecated
Replace base_name with basename base_name is deprecated
Python
mit
City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents
import copy from rest_framework.routers import DefaultRouter, SimpleRouter from events.api import all_views as events_views from helevents.api import all_views as users_views class LinkedEventsAPIRouter(DefaultRouter): # these are from Django REST Framework bulk BulkRouter with 'delete' excluded routes = copy...
import copy from rest_framework.routers import DefaultRouter, SimpleRouter from events.api import all_views as events_views from helevents.api import all_views as users_views class LinkedEventsAPIRouter(DefaultRouter): # these are from Django REST Framework bulk BulkRouter with 'delete' excluded routes = copy...
<commit_before>import copy from rest_framework.routers import DefaultRouter, SimpleRouter from events.api import all_views as events_views from helevents.api import all_views as users_views class LinkedEventsAPIRouter(DefaultRouter): # these are from Django REST Framework bulk BulkRouter with 'delete' excluded ...
import copy from rest_framework.routers import DefaultRouter, SimpleRouter from events.api import all_views as events_views from helevents.api import all_views as users_views class LinkedEventsAPIRouter(DefaultRouter): # these are from Django REST Framework bulk BulkRouter with 'delete' excluded routes = copy...
import copy from rest_framework.routers import DefaultRouter, SimpleRouter from events.api import all_views as events_views from helevents.api import all_views as users_views class LinkedEventsAPIRouter(DefaultRouter): # these are from Django REST Framework bulk BulkRouter with 'delete' excluded routes = copy...
<commit_before>import copy from rest_framework.routers import DefaultRouter, SimpleRouter from events.api import all_views as events_views from helevents.api import all_views as users_views class LinkedEventsAPIRouter(DefaultRouter): # these are from Django REST Framework bulk BulkRouter with 'delete' excluded ...
07c2bdab605eb00bcc59a5540477819d1339e563
examples/minimal/views.py
examples/minimal/views.py
from cruditor.mixins import CruditorMixin from django.views.generic import TemplateView from examples.mixins import ExamplesMixin class DemoView(ExamplesMixin, CruditorMixin, TemplateView): title = 'Demo view' template_name = 'minimal/demo.html'
from cruditor.mixins import CruditorMixin from django.views.generic import TemplateView from examples.mixins import ExamplesMixin class DemoView(ExamplesMixin, CruditorMixin, TemplateView): title = 'Demo view' template_name = 'minimal/demo.html' def get_breadcrumb(self): return super().get_bread...
Add example for additional breadcrumb items.
Add example for additional breadcrumb items.
Python
mit
moccu/django-cruditor,moccu/django-cruditor,moccu/django-cruditor
from cruditor.mixins import CruditorMixin from django.views.generic import TemplateView from examples.mixins import ExamplesMixin class DemoView(ExamplesMixin, CruditorMixin, TemplateView): title = 'Demo view' template_name = 'minimal/demo.html' Add example for additional breadcrumb items.
from cruditor.mixins import CruditorMixin from django.views.generic import TemplateView from examples.mixins import ExamplesMixin class DemoView(ExamplesMixin, CruditorMixin, TemplateView): title = 'Demo view' template_name = 'minimal/demo.html' def get_breadcrumb(self): return super().get_bread...
<commit_before>from cruditor.mixins import CruditorMixin from django.views.generic import TemplateView from examples.mixins import ExamplesMixin class DemoView(ExamplesMixin, CruditorMixin, TemplateView): title = 'Demo view' template_name = 'minimal/demo.html' <commit_msg>Add example for additional breadcrum...
from cruditor.mixins import CruditorMixin from django.views.generic import TemplateView from examples.mixins import ExamplesMixin class DemoView(ExamplesMixin, CruditorMixin, TemplateView): title = 'Demo view' template_name = 'minimal/demo.html' def get_breadcrumb(self): return super().get_bread...
from cruditor.mixins import CruditorMixin from django.views.generic import TemplateView from examples.mixins import ExamplesMixin class DemoView(ExamplesMixin, CruditorMixin, TemplateView): title = 'Demo view' template_name = 'minimal/demo.html' Add example for additional breadcrumb items.from cruditor.mixin...
<commit_before>from cruditor.mixins import CruditorMixin from django.views.generic import TemplateView from examples.mixins import ExamplesMixin class DemoView(ExamplesMixin, CruditorMixin, TemplateView): title = 'Demo view' template_name = 'minimal/demo.html' <commit_msg>Add example for additional breadcrum...
2539b08770bb5cf5e7cb5dcab3aeef17b163de83
resrc/utils/construct_body.py
resrc/utils/construct_body.py
# -*- coding: utf-8 -*-: import urllib2 import hashlib import os def construct_body(link): if link.content == u'˘': # this signals that content generation previously failed return try: opener = urllib2.build_opener() opener.addheaders = [('Accept-Charset', 'utf-8'), ('User-agen...
# -*- coding: utf-8 -*-: import urllib2 import hashlib import os def construct_body(link): if link.content == u'˘': # this signals that content generation previously failed return try: opener = urllib2.build_opener() opener.addheaders = [('Accept-Charset', 'utf-8'), ('User-agen...
Move from ps2ascii to ps2txt, for better results
Move from ps2ascii to ps2txt, for better results
Python
mit
vhf/resrc,mrbitsdcf/resrc,janez-svetin/resrc,mrbitsdcf/resrc,janez-svetin/resrc,janez-svetin/resrc,mrbitsdcf/resrc,vhf/resrc,vhf/resrc,janez-svetin/resrc,mrbitsdcf/resrc,mrbitsdcf/resrc,vhf/resrc,vhf/resrc,janez-svetin/resrc
# -*- coding: utf-8 -*-: import urllib2 import hashlib import os def construct_body(link): if link.content == u'˘': # this signals that content generation previously failed return try: opener = urllib2.build_opener() opener.addheaders = [('Accept-Charset', 'utf-8'), ('User-agen...
# -*- coding: utf-8 -*-: import urllib2 import hashlib import os def construct_body(link): if link.content == u'˘': # this signals that content generation previously failed return try: opener = urllib2.build_opener() opener.addheaders = [('Accept-Charset', 'utf-8'), ('User-agen...
<commit_before># -*- coding: utf-8 -*-: import urllib2 import hashlib import os def construct_body(link): if link.content == u'˘': # this signals that content generation previously failed return try: opener = urllib2.build_opener() opener.addheaders = [('Accept-Charset', 'utf-8...
# -*- coding: utf-8 -*-: import urllib2 import hashlib import os def construct_body(link): if link.content == u'˘': # this signals that content generation previously failed return try: opener = urllib2.build_opener() opener.addheaders = [('Accept-Charset', 'utf-8'), ('User-agen...
# -*- coding: utf-8 -*-: import urllib2 import hashlib import os def construct_body(link): if link.content == u'˘': # this signals that content generation previously failed return try: opener = urllib2.build_opener() opener.addheaders = [('Accept-Charset', 'utf-8'), ('User-agen...
<commit_before># -*- coding: utf-8 -*-: import urllib2 import hashlib import os def construct_body(link): if link.content == u'˘': # this signals that content generation previously failed return try: opener = urllib2.build_opener() opener.addheaders = [('Accept-Charset', 'utf-8...
78689cba80d507cc6706ebf5d1981b738837f767
knox/crypto.py
knox/crypto.py
import binascii from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from os import urandom as generate_bytes from knox.settings import knox_settings, CONSTANTS sha = knox_settings.SECURE_HASH_ALGORITHM def create_token_string(): return binascii.hexlify( ...
import binascii from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from os import urandom as generate_bytes from knox.settings import knox_settings, CONSTANTS sha = knox_settings.SECURE_HASH_ALGORITHM def create_token_string(): return binascii.hexlify( ...
Document unhexlify requirements in hash_token()
Document unhexlify requirements in hash_token()
Python
mit
James1345/django-rest-knox,James1345/django-rest-knox
import binascii from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from os import urandom as generate_bytes from knox.settings import knox_settings, CONSTANTS sha = knox_settings.SECURE_HASH_ALGORITHM def create_token_string(): return binascii.hexlify( ...
import binascii from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from os import urandom as generate_bytes from knox.settings import knox_settings, CONSTANTS sha = knox_settings.SECURE_HASH_ALGORITHM def create_token_string(): return binascii.hexlify( ...
<commit_before>import binascii from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from os import urandom as generate_bytes from knox.settings import knox_settings, CONSTANTS sha = knox_settings.SECURE_HASH_ALGORITHM def create_token_string(): return binas...
import binascii from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from os import urandom as generate_bytes from knox.settings import knox_settings, CONSTANTS sha = knox_settings.SECURE_HASH_ALGORITHM def create_token_string(): return binascii.hexlify( ...
import binascii from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from os import urandom as generate_bytes from knox.settings import knox_settings, CONSTANTS sha = knox_settings.SECURE_HASH_ALGORITHM def create_token_string(): return binascii.hexlify( ...
<commit_before>import binascii from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from os import urandom as generate_bytes from knox.settings import knox_settings, CONSTANTS sha = knox_settings.SECURE_HASH_ALGORITHM def create_token_string(): return binas...
ffd3d61f24a48048ddb562b731ff134a6fc0d924
django/__init__.py
django/__init__.py
VERSION = (1, 1, 0, 'beta', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3]) if V...
VERSION = (1, 1, 0, 'rc', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3]) if VER...
Bump django.VERSION for RC 1.
Bump django.VERSION for RC 1. git-svn-id: 4f9f921b081c523744c7bf24d959a0db39629563@11289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Python
bsd-3-clause
aparo/django-nonrel,FlaPer87/django-nonrel,aparo/django-nonrel,aparo/django-nonrel,FlaPer87/django-nonrel,FlaPer87/django-nonrel
VERSION = (1, 1, 0, 'beta', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3]) if V...
VERSION = (1, 1, 0, 'rc', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3]) if VER...
<commit_before>VERSION = (1, 1, 0, 'beta', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3...
VERSION = (1, 1, 0, 'rc', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3]) if VER...
VERSION = (1, 1, 0, 'beta', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3]) if V...
<commit_before>VERSION = (1, 1, 0, 'beta', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3...
c9e2c70e05ade220e5aa6a4790ee2a9b720cc46e
sorting_test.py
sorting_test.py
import mergesort.merge_sort import quicksort.quicksort import sys import time from random import randint def main(max_len): for n in [2**(n+1) for n in range(max_len)]: print 'Array size: %d' % n arr = [randint(0, 2**max_len) for n in range(n)] current_time = time.time() quicksort.quicksort.check(mergesor...
import mergesort.merge_sort import quicksort.quicksort import sys import time from random import randint def multi_size(max_len): for n in [2**(n+1) for n in range(max_len)]: print 'Array size: %d' % n arr = [randint(0, 2**max_len) for n in range(n)] current_time = time.time() quicksort.quicksort.check(me...
Allow comparison within a fixed time period
Allow comparison within a fixed time period To get an idea of average run-time, I wanted to be able to test mergesort and quicksort with the same inputs many times over; now by specifying a time limit and array length, the script will run each algorithm on as many times as possible on random arrays and report how many...
Python
mit
timpel/stanford-algs,timpel/stanford-algs
import mergesort.merge_sort import quicksort.quicksort import sys import time from random import randint def main(max_len): for n in [2**(n+1) for n in range(max_len)]: print 'Array size: %d' % n arr = [randint(0, 2**max_len) for n in range(n)] current_time = time.time() quicksort.quicksort.check(mergesor...
import mergesort.merge_sort import quicksort.quicksort import sys import time from random import randint def multi_size(max_len): for n in [2**(n+1) for n in range(max_len)]: print 'Array size: %d' % n arr = [randint(0, 2**max_len) for n in range(n)] current_time = time.time() quicksort.quicksort.check(me...
<commit_before>import mergesort.merge_sort import quicksort.quicksort import sys import time from random import randint def main(max_len): for n in [2**(n+1) for n in range(max_len)]: print 'Array size: %d' % n arr = [randint(0, 2**max_len) for n in range(n)] current_time = time.time() quicksort.quicksort...
import mergesort.merge_sort import quicksort.quicksort import sys import time from random import randint def multi_size(max_len): for n in [2**(n+1) for n in range(max_len)]: print 'Array size: %d' % n arr = [randint(0, 2**max_len) for n in range(n)] current_time = time.time() quicksort.quicksort.check(me...
import mergesort.merge_sort import quicksort.quicksort import sys import time from random import randint def main(max_len): for n in [2**(n+1) for n in range(max_len)]: print 'Array size: %d' % n arr = [randint(0, 2**max_len) for n in range(n)] current_time = time.time() quicksort.quicksort.check(mergesor...
<commit_before>import mergesort.merge_sort import quicksort.quicksort import sys import time from random import randint def main(max_len): for n in [2**(n+1) for n in range(max_len)]: print 'Array size: %d' % n arr = [randint(0, 2**max_len) for n in range(n)] current_time = time.time() quicksort.quicksort...
29a57097fb903f2849fe21647dd99e06509c364a
dmoj/utils/ansi.py
dmoj/utils/ansi.py
from collections import OrderedDict from termcolor import colored import re def strip_ansi(s): # http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s) try: import ansi2html def format_ansi(s)...
import re from termcolor import colored import ansi2html def strip_ansi(s): # http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s) def format_ansi(s): # TODO: supposedly, the decode isn't necessa...
Stop maintaining old code paths
Stop maintaining old code paths
Python
agpl-3.0
DMOJ/judge,DMOJ/judge,DMOJ/judge
from collections import OrderedDict from termcolor import colored import re def strip_ansi(s): # http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s) try: import ansi2html def format_ansi(s)...
import re from termcolor import colored import ansi2html def strip_ansi(s): # http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s) def format_ansi(s): # TODO: supposedly, the decode isn't necessa...
<commit_before>from collections import OrderedDict from termcolor import colored import re def strip_ansi(s): # http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s) try: import ansi2html def...
import re from termcolor import colored import ansi2html def strip_ansi(s): # http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s) def format_ansi(s): # TODO: supposedly, the decode isn't necessa...
from collections import OrderedDict from termcolor import colored import re def strip_ansi(s): # http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s) try: import ansi2html def format_ansi(s)...
<commit_before>from collections import OrderedDict from termcolor import colored import re def strip_ansi(s): # http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s) try: import ansi2html def...
c1e5e6a5c34f1d4617be3053d87af8e95045ad77
query/views.py
query/views.py
""" Views for the rdap_explorer project, query app. """ import ipwhois from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_protect from json import dumps fro...
""" Views for the rdap_explorer project, query app. """ import ipwhois from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_protect from json import dumps fro...
Remove raw results from IPWhois object.
Remove raw results from IPWhois object.
Python
mit
cdubz/rdap-explorer,cdubz/rdap-explorer
""" Views for the rdap_explorer project, query app. """ import ipwhois from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_protect from json import dumps fro...
""" Views for the rdap_explorer project, query app. """ import ipwhois from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_protect from json import dumps fro...
<commit_before>""" Views for the rdap_explorer project, query app. """ import ipwhois from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_protect from json im...
""" Views for the rdap_explorer project, query app. """ import ipwhois from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_protect from json import dumps fro...
""" Views for the rdap_explorer project, query app. """ import ipwhois from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_protect from json import dumps fro...
<commit_before>""" Views for the rdap_explorer project, query app. """ import ipwhois from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.views.decorators.cache import cache_page from django.views.decorators.csrf import csrf_protect from json im...
16c457faae6ace57afdc9c11c6f76c6d11a53764
moksha/lib/utils.py
moksha/lib/utils.py
from decorator import decorator @decorator def trace(f, *args, **kw): r = f(*args, **kw) print "%s(%s, %s) = %s" % (f.func_name, args, kw, r) return r
from decorator import decorator @decorator def trace(f, *args, **kw): try: r = f(*args, **kw) finally: print "%s(%s, %s) = %s" % (f.func_name, args, kw, r) return r
Make our trace decorator a bit more robust
Make our trace decorator a bit more robust
Python
apache-2.0
pombredanne/moksha,ralphbean/moksha,mokshaproject/moksha,pombredanne/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,pombredanne/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,mokshaproject/moksha,lmacken/moksha,pombredanne/moksha
from decorator import decorator @decorator def trace(f, *args, **kw): r = f(*args, **kw) print "%s(%s, %s) = %s" % (f.func_name, args, kw, r) return r Make our trace decorator a bit more robust
from decorator import decorator @decorator def trace(f, *args, **kw): try: r = f(*args, **kw) finally: print "%s(%s, %s) = %s" % (f.func_name, args, kw, r) return r
<commit_before>from decorator import decorator @decorator def trace(f, *args, **kw): r = f(*args, **kw) print "%s(%s, %s) = %s" % (f.func_name, args, kw, r) return r <commit_msg>Make our trace decorator a bit more robust<commit_after>
from decorator import decorator @decorator def trace(f, *args, **kw): try: r = f(*args, **kw) finally: print "%s(%s, %s) = %s" % (f.func_name, args, kw, r) return r
from decorator import decorator @decorator def trace(f, *args, **kw): r = f(*args, **kw) print "%s(%s, %s) = %s" % (f.func_name, args, kw, r) return r Make our trace decorator a bit more robustfrom decorator import decorator @decorator def trace(f, *args, **kw): try: r = f(*args, **kw) fin...
<commit_before>from decorator import decorator @decorator def trace(f, *args, **kw): r = f(*args, **kw) print "%s(%s, %s) = %s" % (f.func_name, args, kw, r) return r <commit_msg>Make our trace decorator a bit more robust<commit_after>from decorator import decorator @decorator def trace(f, *args, **kw): ...
6afb6134b24f233cac3dd5fe44599eb95cc4cc33
bika/lims/upgrade/to1115.py
bika/lims/upgrade/to1115.py
from Acquisition import aq_inner from Acquisition import aq_parent from Products.CMFCore.utils import getToolByName def upgrade(tool): """ Just some catalog indexes to update """ portal = aq_parent(aq_inner(tool)) portal_catalog = getToolByName(portal, 'portal_catalog') typestool = getToolByName(p...
from Acquisition import aq_inner from Acquisition import aq_parent from Products.CMFCore.utils import getToolByName def upgrade(tool): """ Just some catalog indexes to update """ portal = aq_parent(aq_inner(tool)) portal_catalog = getToolByName(portal, 'portal_catalog') typestool = getToolByName(p...
Fix upgrade step 1115: rebuild catalog
Fix upgrade step 1115: rebuild catalog
Python
agpl-3.0
DeBortoliWines/Bika-LIMS,anneline/Bika-LIMS,rockfruit/bika.lims,rockfruit/bika.lims,veroc/Bika-LIMS,DeBortoliWines/Bika-LIMS,veroc/Bika-LIMS,labsanmartin/Bika-LIMS,anneline/Bika-LIMS,DeBortoliWines/Bika-LIMS,anneline/Bika-LIMS,veroc/Bika-LIMS,labsanmartin/Bika-LIMS,labsanmartin/Bika-LIMS
from Acquisition import aq_inner from Acquisition import aq_parent from Products.CMFCore.utils import getToolByName def upgrade(tool): """ Just some catalog indexes to update """ portal = aq_parent(aq_inner(tool)) portal_catalog = getToolByName(portal, 'portal_catalog') typestool = getToolByName(p...
from Acquisition import aq_inner from Acquisition import aq_parent from Products.CMFCore.utils import getToolByName def upgrade(tool): """ Just some catalog indexes to update """ portal = aq_parent(aq_inner(tool)) portal_catalog = getToolByName(portal, 'portal_catalog') typestool = getToolByName(p...
<commit_before>from Acquisition import aq_inner from Acquisition import aq_parent from Products.CMFCore.utils import getToolByName def upgrade(tool): """ Just some catalog indexes to update """ portal = aq_parent(aq_inner(tool)) portal_catalog = getToolByName(portal, 'portal_catalog') typestool = ...
from Acquisition import aq_inner from Acquisition import aq_parent from Products.CMFCore.utils import getToolByName def upgrade(tool): """ Just some catalog indexes to update """ portal = aq_parent(aq_inner(tool)) portal_catalog = getToolByName(portal, 'portal_catalog') typestool = getToolByName(p...
from Acquisition import aq_inner from Acquisition import aq_parent from Products.CMFCore.utils import getToolByName def upgrade(tool): """ Just some catalog indexes to update """ portal = aq_parent(aq_inner(tool)) portal_catalog = getToolByName(portal, 'portal_catalog') typestool = getToolByName(p...
<commit_before>from Acquisition import aq_inner from Acquisition import aq_parent from Products.CMFCore.utils import getToolByName def upgrade(tool): """ Just some catalog indexes to update """ portal = aq_parent(aq_inner(tool)) portal_catalog = getToolByName(portal, 'portal_catalog') typestool = ...
1e6e1eae154008a1dddf12a9c7225054ddcf3d15
corehq/apps/app_manager/xpath_validator/wrapper.py
corehq/apps/app_manager/xpath_validator/wrapper.py
from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple from corehq.apps.app_manager.xpath_validator.config import get_xpath_validator_path from corehq.apps.app_manager.xpath_validator.exceptions import XpathValidationError from dimagi.utils.subprocess_manager i...
from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple from corehq.apps.app_manager.xpath_validator.config import get_xpath_validator_path from corehq.apps.app_manager.xpath_validator.exceptions import XpathValidationError from dimagi.utils.subprocess_manager i...
Revert "Added comment and used more generic code in xpath validator"
Revert "Added comment and used more generic code in xpath validator"
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple from corehq.apps.app_manager.xpath_validator.config import get_xpath_validator_path from corehq.apps.app_manager.xpath_validator.exceptions import XpathValidationError from dimagi.utils.subprocess_manager i...
from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple from corehq.apps.app_manager.xpath_validator.config import get_xpath_validator_path from corehq.apps.app_manager.xpath_validator.exceptions import XpathValidationError from dimagi.utils.subprocess_manager i...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple from corehq.apps.app_manager.xpath_validator.config import get_xpath_validator_path from corehq.apps.app_manager.xpath_validator.exceptions import XpathValidationError from dimagi.utils.subpr...
from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple from corehq.apps.app_manager.xpath_validator.config import get_xpath_validator_path from corehq.apps.app_manager.xpath_validator.exceptions import XpathValidationError from dimagi.utils.subprocess_manager i...
from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple from corehq.apps.app_manager.xpath_validator.config import get_xpath_validator_path from corehq.apps.app_manager.xpath_validator.exceptions import XpathValidationError from dimagi.utils.subprocess_manager i...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple from corehq.apps.app_manager.xpath_validator.config import get_xpath_validator_path from corehq.apps.app_manager.xpath_validator.exceptions import XpathValidationError from dimagi.utils.subpr...
638901243c060b243ebf046304c06ea14a98dbe8
dynochemy/errors.py
dynochemy/errors.py
# -*- coding: utf-8 -*- """ This module contains the set of Dynochemy's exceptions :copyright: (c) 2012 by Rhett Garber. :license: ISC, see LICENSE for more details. """ import json class Error(Exception): """This is an ambiguous error that occured.""" pass class SyncUnallowedError(Error): pass class Dup...
# -*- coding: utf-8 -*- """ This module contains the set of Dynochemy's exceptions :copyright: (c) 2012 by Rhett Garber. :license: ISC, see LICENSE for more details. """ import json class Error(Exception): """This is an ambiguous error that occured.""" pass class SyncUnallowedError(Error): pass class Dup...
Handle updated boto exception format.
Handle updated boto exception format. See https://github.com/boto/boto/issues/625
Python
isc
rhettg/Dynochemy
# -*- coding: utf-8 -*- """ This module contains the set of Dynochemy's exceptions :copyright: (c) 2012 by Rhett Garber. :license: ISC, see LICENSE for more details. """ import json class Error(Exception): """This is an ambiguous error that occured.""" pass class SyncUnallowedError(Error): pass class Dup...
# -*- coding: utf-8 -*- """ This module contains the set of Dynochemy's exceptions :copyright: (c) 2012 by Rhett Garber. :license: ISC, see LICENSE for more details. """ import json class Error(Exception): """This is an ambiguous error that occured.""" pass class SyncUnallowedError(Error): pass class Dup...
<commit_before># -*- coding: utf-8 -*- """ This module contains the set of Dynochemy's exceptions :copyright: (c) 2012 by Rhett Garber. :license: ISC, see LICENSE for more details. """ import json class Error(Exception): """This is an ambiguous error that occured.""" pass class SyncUnallowedError(Error): ...
# -*- coding: utf-8 -*- """ This module contains the set of Dynochemy's exceptions :copyright: (c) 2012 by Rhett Garber. :license: ISC, see LICENSE for more details. """ import json class Error(Exception): """This is an ambiguous error that occured.""" pass class SyncUnallowedError(Error): pass class Dup...
# -*- coding: utf-8 -*- """ This module contains the set of Dynochemy's exceptions :copyright: (c) 2012 by Rhett Garber. :license: ISC, see LICENSE for more details. """ import json class Error(Exception): """This is an ambiguous error that occured.""" pass class SyncUnallowedError(Error): pass class Dup...
<commit_before># -*- coding: utf-8 -*- """ This module contains the set of Dynochemy's exceptions :copyright: (c) 2012 by Rhett Garber. :license: ISC, see LICENSE for more details. """ import json class Error(Exception): """This is an ambiguous error that occured.""" pass class SyncUnallowedError(Error): ...
4761d359a28630d0fe378d50e52aad66e88d3a36
DeepFried2/utils.py
DeepFried2/utils.py
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
Make the compression optional, as it slows down.
Make the compression optional, as it slows down.
Python
mit
elPistolero/DeepFried2,lucasb-eyer/DeepFried2,Pandoro/DeepFried2,yobibyte/DeepFried2
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
<commit_before>import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(t...
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
<commit_before>import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(t...
7d54cf820a76340f47f2b55ae1b7ff474810ce2b
openelex/tests/test_transform_registry.py
openelex/tests/test_transform_registry.py
from unittest import TestCase from mock import Mock from openelex.base.transform import registry class TestTransformRegistry(TestCase): def test_register_with_validators(self): mock_transform = Mock(return_value=None) mock_transform.__name__ = 'mock_transform' mock_validator1 = Mock(retur...
from unittest import TestCase from mock import Mock from openelex.base.transform import registry class TestTransformRegistry(TestCase): def test_register_with_validators(self): mock_transform = Mock(return_value=None) mock_transform.__name__ = 'mock_transform' mock_validator1 = Mock(retur...
Fix test for transform registry.
Fix test for transform registry. In 24016ce74afc83b18197c89f95d260b388e6e309, the value of transform.validators was changed from a list to an OrderedDict. Update the tests to reflect this change.
Python
mit
datamade/openelections-core,datamade/openelections-core,openelections/openelections-core,cathydeng/openelections-core,openelections/openelections-core,cathydeng/openelections-core
from unittest import TestCase from mock import Mock from openelex.base.transform import registry class TestTransformRegistry(TestCase): def test_register_with_validators(self): mock_transform = Mock(return_value=None) mock_transform.__name__ = 'mock_transform' mock_validator1 = Mock(retur...
from unittest import TestCase from mock import Mock from openelex.base.transform import registry class TestTransformRegistry(TestCase): def test_register_with_validators(self): mock_transform = Mock(return_value=None) mock_transform.__name__ = 'mock_transform' mock_validator1 = Mock(retur...
<commit_before>from unittest import TestCase from mock import Mock from openelex.base.transform import registry class TestTransformRegistry(TestCase): def test_register_with_validators(self): mock_transform = Mock(return_value=None) mock_transform.__name__ = 'mock_transform' mock_validato...
from unittest import TestCase from mock import Mock from openelex.base.transform import registry class TestTransformRegistry(TestCase): def test_register_with_validators(self): mock_transform = Mock(return_value=None) mock_transform.__name__ = 'mock_transform' mock_validator1 = Mock(retur...
from unittest import TestCase from mock import Mock from openelex.base.transform import registry class TestTransformRegistry(TestCase): def test_register_with_validators(self): mock_transform = Mock(return_value=None) mock_transform.__name__ = 'mock_transform' mock_validator1 = Mock(retur...
<commit_before>from unittest import TestCase from mock import Mock from openelex.base.transform import registry class TestTransformRegistry(TestCase): def test_register_with_validators(self): mock_transform = Mock(return_value=None) mock_transform.__name__ = 'mock_transform' mock_validato...
220953f4f8136e9c5eff21426421e6ac7f6f502d
tssim/functions/wrapper.py
tssim/functions/wrapper.py
"""This module contains the main wrapper class.""" class BaseWrapper: """Define base template for function wrapper classes. """ def __init__(self, func): self.func = func self.__doc__ = func.__doc__ def __call__(self, *args, **kwargs): raise NotImplementedError class NumpyWrapp...
"""This module contains the main wrapper class.""" class BaseWrapper: """Define base template for function wrapper classes. """ def __init__(self, func): self.func = func self.__doc__ = func.__doc__ def __call__(self, *args, **kwargs): raise NotImplementedError class NumpyWrapp...
Fix bug due to wrong arguments order.
Fix bug due to wrong arguments order.
Python
mit
mansenfranzen/tssim
"""This module contains the main wrapper class.""" class BaseWrapper: """Define base template for function wrapper classes. """ def __init__(self, func): self.func = func self.__doc__ = func.__doc__ def __call__(self, *args, **kwargs): raise NotImplementedError class NumpyWrapp...
"""This module contains the main wrapper class.""" class BaseWrapper: """Define base template for function wrapper classes. """ def __init__(self, func): self.func = func self.__doc__ = func.__doc__ def __call__(self, *args, **kwargs): raise NotImplementedError class NumpyWrapp...
<commit_before>"""This module contains the main wrapper class.""" class BaseWrapper: """Define base template for function wrapper classes. """ def __init__(self, func): self.func = func self.__doc__ = func.__doc__ def __call__(self, *args, **kwargs): raise NotImplementedError c...
"""This module contains the main wrapper class.""" class BaseWrapper: """Define base template for function wrapper classes. """ def __init__(self, func): self.func = func self.__doc__ = func.__doc__ def __call__(self, *args, **kwargs): raise NotImplementedError class NumpyWrapp...
"""This module contains the main wrapper class.""" class BaseWrapper: """Define base template for function wrapper classes. """ def __init__(self, func): self.func = func self.__doc__ = func.__doc__ def __call__(self, *args, **kwargs): raise NotImplementedError class NumpyWrapp...
<commit_before>"""This module contains the main wrapper class.""" class BaseWrapper: """Define base template for function wrapper classes. """ def __init__(self, func): self.func = func self.__doc__ = func.__doc__ def __call__(self, *args, **kwargs): raise NotImplementedError c...
c95085fd43825a57476f8a962563561b42385bd8
ImgProcessingCLI/setup.py
ImgProcessingCLI/setup.py
# This is the setup file for pip from setuptools import setup, find_packages import os, sys from os import path setup( name = 'ImgProcessingCLI', version = '0.0.1', description = 'Image Processing for SUAS Competition', url = 'https://github.com/FlintHill/SUAS-Competition', author = 'Peter Husi...
# This is the setup file for pip from setuptools import setup, find_packages import os, sys from os import path setup( name = 'ImgProcessingCLI', version = '0.0.1', description = 'Image Processing for SUAS Competition', url = 'https://github.com/FlintHill/SUAS-Competition', author = 'Peter Husi...
Add sklearn as a dependency for ImgProcessingCLI
Add sklearn as a dependency for ImgProcessingCLI
Python
mit
FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition
# This is the setup file for pip from setuptools import setup, find_packages import os, sys from os import path setup( name = 'ImgProcessingCLI', version = '0.0.1', description = 'Image Processing for SUAS Competition', url = 'https://github.com/FlintHill/SUAS-Competition', author = 'Peter Husi...
# This is the setup file for pip from setuptools import setup, find_packages import os, sys from os import path setup( name = 'ImgProcessingCLI', version = '0.0.1', description = 'Image Processing for SUAS Competition', url = 'https://github.com/FlintHill/SUAS-Competition', author = 'Peter Husi...
<commit_before># This is the setup file for pip from setuptools import setup, find_packages import os, sys from os import path setup( name = 'ImgProcessingCLI', version = '0.0.1', description = 'Image Processing for SUAS Competition', url = 'https://github.com/FlintHill/SUAS-Competition', autho...
# This is the setup file for pip from setuptools import setup, find_packages import os, sys from os import path setup( name = 'ImgProcessingCLI', version = '0.0.1', description = 'Image Processing for SUAS Competition', url = 'https://github.com/FlintHill/SUAS-Competition', author = 'Peter Husi...
# This is the setup file for pip from setuptools import setup, find_packages import os, sys from os import path setup( name = 'ImgProcessingCLI', version = '0.0.1', description = 'Image Processing for SUAS Competition', url = 'https://github.com/FlintHill/SUAS-Competition', author = 'Peter Husi...
<commit_before># This is the setup file for pip from setuptools import setup, find_packages import os, sys from os import path setup( name = 'ImgProcessingCLI', version = '0.0.1', description = 'Image Processing for SUAS Competition', url = 'https://github.com/FlintHill/SUAS-Competition', autho...