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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
52e12dac4a341ddb7bbbf8bcbf5ee8a0d9dc5ec4 | treq/test/test_api.py | treq/test/test_api.py | import mock
from treq.test.util import TestCase
import treq
from treq._utils import set_global_pool
class TreqAPITests(TestCase):
def setUp(self):
set_global_pool(None)
client_patcher = mock.patch('treq.api.HTTPClient')
self.HTTPClient = client_patcher.start()
self.addCleanup(cl... | import mock
from treq.test.util import TestCase
import treq
from treq._utils import set_global_pool
class TreqAPITests(TestCase):
def setUp(self):
set_global_pool(None)
agent_patcher = mock.patch('treq.api.Agent')
self.Agent = agent_patcher.start()
self.addCleanup(agent_patcher.... | Update default_pool tests for new call tree (mocks are fragile). | Update default_pool tests for new call tree (mocks are fragile).
| Python | mit | hawkowl/treq,hawkowl/treq,habnabit/treq,glyph/treq,cyli/treq,mithrandi/treq,ldanielburr/treq,FxIII/treq,inspectlabs/treq | import mock
from treq.test.util import TestCase
import treq
from treq._utils import set_global_pool
class TreqAPITests(TestCase):
def setUp(self):
set_global_pool(None)
client_patcher = mock.patch('treq.api.HTTPClient')
self.HTTPClient = client_patcher.start()
self.addCleanup(cl... | import mock
from treq.test.util import TestCase
import treq
from treq._utils import set_global_pool
class TreqAPITests(TestCase):
def setUp(self):
set_global_pool(None)
agent_patcher = mock.patch('treq.api.Agent')
self.Agent = agent_patcher.start()
self.addCleanup(agent_patcher.... | <commit_before>import mock
from treq.test.util import TestCase
import treq
from treq._utils import set_global_pool
class TreqAPITests(TestCase):
def setUp(self):
set_global_pool(None)
client_patcher = mock.patch('treq.api.HTTPClient')
self.HTTPClient = client_patcher.start()
sel... | import mock
from treq.test.util import TestCase
import treq
from treq._utils import set_global_pool
class TreqAPITests(TestCase):
def setUp(self):
set_global_pool(None)
agent_patcher = mock.patch('treq.api.Agent')
self.Agent = agent_patcher.start()
self.addCleanup(agent_patcher.... | import mock
from treq.test.util import TestCase
import treq
from treq._utils import set_global_pool
class TreqAPITests(TestCase):
def setUp(self):
set_global_pool(None)
client_patcher = mock.patch('treq.api.HTTPClient')
self.HTTPClient = client_patcher.start()
self.addCleanup(cl... | <commit_before>import mock
from treq.test.util import TestCase
import treq
from treq._utils import set_global_pool
class TreqAPITests(TestCase):
def setUp(self):
set_global_pool(None)
client_patcher = mock.patch('treq.api.HTTPClient')
self.HTTPClient = client_patcher.start()
sel... |
69924be13f6b4303304c86fa56a802b6d358e7b2 | instance/configuration_example.py | instance/configuration_example.py | # -*- coding: utf-8 -*-
"""
Instance configuration, possibly overwriting default values.
"""
class Configuration:
"""
Instance specific configurations for |projectname| that should not be shared with anyone
else (e.g. because of passwords).
You can overwrite any of the values from :m... | # -*- coding: utf-8 -*-
"""
Instance configuration, possibly overwriting default values.
"""
class Configuration:
"""
Instance specific configurations for |projectname| that should not be shared with anyone
else (e.g. because of passwords).
You can overwrite any of the values from :m... | Add admin email list to instance configuration. | Add admin email list to instance configuration.
| Python | mit | BMeu/Orchard,BMeu/Orchard | # -*- coding: utf-8 -*-
"""
Instance configuration, possibly overwriting default values.
"""
class Configuration:
"""
Instance specific configurations for |projectname| that should not be shared with anyone
else (e.g. because of passwords).
You can overwrite any of the values from :m... | # -*- coding: utf-8 -*-
"""
Instance configuration, possibly overwriting default values.
"""
class Configuration:
"""
Instance specific configurations for |projectname| that should not be shared with anyone
else (e.g. because of passwords).
You can overwrite any of the values from :m... | <commit_before># -*- coding: utf-8 -*-
"""
Instance configuration, possibly overwriting default values.
"""
class Configuration:
"""
Instance specific configurations for |projectname| that should not be shared with anyone
else (e.g. because of passwords).
You can overwrite any of the... | # -*- coding: utf-8 -*-
"""
Instance configuration, possibly overwriting default values.
"""
class Configuration:
"""
Instance specific configurations for |projectname| that should not be shared with anyone
else (e.g. because of passwords).
You can overwrite any of the values from :m... | # -*- coding: utf-8 -*-
"""
Instance configuration, possibly overwriting default values.
"""
class Configuration:
"""
Instance specific configurations for |projectname| that should not be shared with anyone
else (e.g. because of passwords).
You can overwrite any of the values from :m... | <commit_before># -*- coding: utf-8 -*-
"""
Instance configuration, possibly overwriting default values.
"""
class Configuration:
"""
Instance specific configurations for |projectname| that should not be shared with anyone
else (e.g. because of passwords).
You can overwrite any of the... |
b00f9ae056ccab2020a016d2f0f1189f7ac0a788 | src/satosa/logging_util.py | src/satosa/logging_util.py | from uuid import uuid4
# The state key for saving the session id in the state
LOGGER_STATE_KEY = "SESSION_ID"
LOG_FMT = "[{id}] {message}"
def get_session_id(state):
session_id = (
"UNKNOWN"
if state is None
else state.get(LOGGER_STATE_KEY, uuid4().urn)
)
return session_id
def ... | from uuid import uuid4
# The state key for saving the session id in the state
LOGGER_STATE_KEY = "SESSION_ID"
LOG_FMT = "[{id}] {message}"
def get_session_id(state):
session_id = (
"UNKNOWN"
if state is None
else state.get(LOGGER_STATE_KEY, uuid4().urn)
)
return session_id
def ... | Set state session-id only when state is present | Set state session-id only when state is present
Signed-off-by: Ivan Kanakarakis <[email protected]>
| Python | apache-2.0 | SUNET/SATOSA,SUNET/SATOSA,its-dirg/SATOSA | from uuid import uuid4
# The state key for saving the session id in the state
LOGGER_STATE_KEY = "SESSION_ID"
LOG_FMT = "[{id}] {message}"
def get_session_id(state):
session_id = (
"UNKNOWN"
if state is None
else state.get(LOGGER_STATE_KEY, uuid4().urn)
)
return session_id
def ... | from uuid import uuid4
# The state key for saving the session id in the state
LOGGER_STATE_KEY = "SESSION_ID"
LOG_FMT = "[{id}] {message}"
def get_session_id(state):
session_id = (
"UNKNOWN"
if state is None
else state.get(LOGGER_STATE_KEY, uuid4().urn)
)
return session_id
def ... | <commit_before>from uuid import uuid4
# The state key for saving the session id in the state
LOGGER_STATE_KEY = "SESSION_ID"
LOG_FMT = "[{id}] {message}"
def get_session_id(state):
session_id = (
"UNKNOWN"
if state is None
else state.get(LOGGER_STATE_KEY, uuid4().urn)
)
return se... | from uuid import uuid4
# The state key for saving the session id in the state
LOGGER_STATE_KEY = "SESSION_ID"
LOG_FMT = "[{id}] {message}"
def get_session_id(state):
session_id = (
"UNKNOWN"
if state is None
else state.get(LOGGER_STATE_KEY, uuid4().urn)
)
return session_id
def ... | from uuid import uuid4
# The state key for saving the session id in the state
LOGGER_STATE_KEY = "SESSION_ID"
LOG_FMT = "[{id}] {message}"
def get_session_id(state):
session_id = (
"UNKNOWN"
if state is None
else state.get(LOGGER_STATE_KEY, uuid4().urn)
)
return session_id
def ... | <commit_before>from uuid import uuid4
# The state key for saving the session id in the state
LOGGER_STATE_KEY = "SESSION_ID"
LOG_FMT = "[{id}] {message}"
def get_session_id(state):
session_id = (
"UNKNOWN"
if state is None
else state.get(LOGGER_STATE_KEY, uuid4().urn)
)
return se... |
36df0d8f2878a1b51b4d9461f1ee64ef90a826a3 | tailor/listeners/mainlistener.py | tailor/listeners/mainlistener.py | from tailor.swift.swiftlistener import SwiftListener
from tailor.utils.charformat import isUpperCamelCase
class MainListener(SwiftListener):
def enterClassName(self, ctx):
self.__verify_upper_camel_case(ctx, 'Class names should be in UpperCamelCase')
def enterEnumName(self, ctx):
self.__veri... | from tailor.swift.swiftlistener import SwiftListener
from tailor.utils.charformat import isUpperCamelCase
class MainListener(SwiftListener):
def enterClassName(self, ctx):
self.__verify_upper_camel_case(ctx, 'Class names should be in UpperCamelCase')
def enterEnumName(self, ctx):
self.__veri... | Implement UpperCamelCase name check for enum case | Implement UpperCamelCase name check for enum case
| Python | mit | sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor | from tailor.swift.swiftlistener import SwiftListener
from tailor.utils.charformat import isUpperCamelCase
class MainListener(SwiftListener):
def enterClassName(self, ctx):
self.__verify_upper_camel_case(ctx, 'Class names should be in UpperCamelCase')
def enterEnumName(self, ctx):
self.__veri... | from tailor.swift.swiftlistener import SwiftListener
from tailor.utils.charformat import isUpperCamelCase
class MainListener(SwiftListener):
def enterClassName(self, ctx):
self.__verify_upper_camel_case(ctx, 'Class names should be in UpperCamelCase')
def enterEnumName(self, ctx):
self.__veri... | <commit_before>from tailor.swift.swiftlistener import SwiftListener
from tailor.utils.charformat import isUpperCamelCase
class MainListener(SwiftListener):
def enterClassName(self, ctx):
self.__verify_upper_camel_case(ctx, 'Class names should be in UpperCamelCase')
def enterEnumName(self, ctx):
... | from tailor.swift.swiftlistener import SwiftListener
from tailor.utils.charformat import isUpperCamelCase
class MainListener(SwiftListener):
def enterClassName(self, ctx):
self.__verify_upper_camel_case(ctx, 'Class names should be in UpperCamelCase')
def enterEnumName(self, ctx):
self.__veri... | from tailor.swift.swiftlistener import SwiftListener
from tailor.utils.charformat import isUpperCamelCase
class MainListener(SwiftListener):
def enterClassName(self, ctx):
self.__verify_upper_camel_case(ctx, 'Class names should be in UpperCamelCase')
def enterEnumName(self, ctx):
self.__veri... | <commit_before>from tailor.swift.swiftlistener import SwiftListener
from tailor.utils.charformat import isUpperCamelCase
class MainListener(SwiftListener):
def enterClassName(self, ctx):
self.__verify_upper_camel_case(ctx, 'Class names should be in UpperCamelCase')
def enterEnumName(self, ctx):
... |
ab7eb6891ff0f6a574708267f166bc27c7b7e95b | orderedmodel/models.py | orderedmodel/models.py | from django.db import models
from django.core.exceptions import ValidationError
class OrderedModel(models.Model):
order = models.PositiveIntegerField(blank=True, default=1)
class Meta:
abstract = True
ordering = ['order']
def save(self, swapping=False, *args, **kwargs):
if not se... | from django.db import models
from django.core.exceptions import ValidationError
class OrderedModel(models.Model):
order = models.PositiveIntegerField(blank=True, default=1, db_index=True)
class Meta:
abstract = True
ordering = ['order']
def save(self, swapping=False, *args, **kwargs):
... | Enable index for order column | Enable index for order column
Ordering will be faster
| Python | bsd-3-clause | MagicSolutions/django-orderedmodel,MagicSolutions/django-orderedmodel | from django.db import models
from django.core.exceptions import ValidationError
class OrderedModel(models.Model):
order = models.PositiveIntegerField(blank=True, default=1)
class Meta:
abstract = True
ordering = ['order']
def save(self, swapping=False, *args, **kwargs):
if not se... | from django.db import models
from django.core.exceptions import ValidationError
class OrderedModel(models.Model):
order = models.PositiveIntegerField(blank=True, default=1, db_index=True)
class Meta:
abstract = True
ordering = ['order']
def save(self, swapping=False, *args, **kwargs):
... | <commit_before>from django.db import models
from django.core.exceptions import ValidationError
class OrderedModel(models.Model):
order = models.PositiveIntegerField(blank=True, default=1)
class Meta:
abstract = True
ordering = ['order']
def save(self, swapping=False, *args, **kwargs):
... | from django.db import models
from django.core.exceptions import ValidationError
class OrderedModel(models.Model):
order = models.PositiveIntegerField(blank=True, default=1, db_index=True)
class Meta:
abstract = True
ordering = ['order']
def save(self, swapping=False, *args, **kwargs):
... | from django.db import models
from django.core.exceptions import ValidationError
class OrderedModel(models.Model):
order = models.PositiveIntegerField(blank=True, default=1)
class Meta:
abstract = True
ordering = ['order']
def save(self, swapping=False, *args, **kwargs):
if not se... | <commit_before>from django.db import models
from django.core.exceptions import ValidationError
class OrderedModel(models.Model):
order = models.PositiveIntegerField(blank=True, default=1)
class Meta:
abstract = True
ordering = ['order']
def save(self, swapping=False, *args, **kwargs):
... |
817b597f3a45a8b16de84d480458a66499604f5a | owned_models/models.py | owned_models/models.py | from django.conf import settings
from django.db import models
class UserOwnedModelManager(models.Manager):
def filter_for_user(self, user, *args, **kwargs):
return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs)
def get_for_user(self, user, *args, **kwargs):
... | from django.conf import settings
from django.db import models
class UserOwnedModelManager(models.Manager):
def filter_for_user(self, user, *args, **kwargs):
return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs)
def get_for_user(self, user, *args, **kwargs):
... | Add `get_or_create_for_user` method to default Manager. | Add `get_or_create_for_user` method to default Manager. | Python | mit | discolabs/django-owned-models | from django.conf import settings
from django.db import models
class UserOwnedModelManager(models.Manager):
def filter_for_user(self, user, *args, **kwargs):
return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs)
def get_for_user(self, user, *args, **kwargs):
... | from django.conf import settings
from django.db import models
class UserOwnedModelManager(models.Manager):
def filter_for_user(self, user, *args, **kwargs):
return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs)
def get_for_user(self, user, *args, **kwargs):
... | <commit_before>from django.conf import settings
from django.db import models
class UserOwnedModelManager(models.Manager):
def filter_for_user(self, user, *args, **kwargs):
return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs)
def get_for_user(self, user, *args... | from django.conf import settings
from django.db import models
class UserOwnedModelManager(models.Manager):
def filter_for_user(self, user, *args, **kwargs):
return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs)
def get_for_user(self, user, *args, **kwargs):
... | from django.conf import settings
from django.db import models
class UserOwnedModelManager(models.Manager):
def filter_for_user(self, user, *args, **kwargs):
return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs)
def get_for_user(self, user, *args, **kwargs):
... | <commit_before>from django.conf import settings
from django.db import models
class UserOwnedModelManager(models.Manager):
def filter_for_user(self, user, *args, **kwargs):
return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs)
def get_for_user(self, user, *args... |
10f48f8a8d71a237b97f7952cf8164d0c5138886 | budget_proj/budget_app/urls.py | budget_proj/budget_app/urls.py | from django.conf.urls import url
from . import views
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='hackoregon_budget')
# Listed in alphabetical order.
urlpatterns = [
url(r'^$', schema_view),
url(r'^kpm/$', views.ListKpm.as_view()),
url(r'^ocrb/$', views.List... | from django.conf.urls import url
from . import views
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='hackoregon_budget')
# Listed in alphabetical order.
urlpatterns = [
url(r'^$', schema_view),
url(r'^kpm/$', views.ListKpm.as_view()),
url(r'^ocrb/$', views.List... | Add endpoints for AWS production feeds | Add endpoints for AWS production feeds
Added endpoints for pulling the data from AWS (vs pulling from CSV)
| Python | mit | hackoregon/team-budget,jimtyhurst/team-budget,hackoregon/team-budget,hackoregon/team-budget,jimtyhurst/team-budget,jimtyhurst/team-budget | from django.conf.urls import url
from . import views
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='hackoregon_budget')
# Listed in alphabetical order.
urlpatterns = [
url(r'^$', schema_view),
url(r'^kpm/$', views.ListKpm.as_view()),
url(r'^ocrb/$', views.List... | from django.conf.urls import url
from . import views
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='hackoregon_budget')
# Listed in alphabetical order.
urlpatterns = [
url(r'^$', schema_view),
url(r'^kpm/$', views.ListKpm.as_view()),
url(r'^ocrb/$', views.List... | <commit_before>from django.conf.urls import url
from . import views
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='hackoregon_budget')
# Listed in alphabetical order.
urlpatterns = [
url(r'^$', schema_view),
url(r'^kpm/$', views.ListKpm.as_view()),
url(r'^ocrb... | from django.conf.urls import url
from . import views
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='hackoregon_budget')
# Listed in alphabetical order.
urlpatterns = [
url(r'^$', schema_view),
url(r'^kpm/$', views.ListKpm.as_view()),
url(r'^ocrb/$', views.List... | from django.conf.urls import url
from . import views
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='hackoregon_budget')
# Listed in alphabetical order.
urlpatterns = [
url(r'^$', schema_view),
url(r'^kpm/$', views.ListKpm.as_view()),
url(r'^ocrb/$', views.List... | <commit_before>from django.conf.urls import url
from . import views
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='hackoregon_budget')
# Listed in alphabetical order.
urlpatterns = [
url(r'^$', schema_view),
url(r'^kpm/$', views.ListKpm.as_view()),
url(r'^ocrb... |
ea87538d29e4d6e9d3904e6ead86ebe4eb958aff | lib/reinteract/about_dialog.py | lib/reinteract/about_dialog.py | import gtk
import os
def _find_program_in_path(progname):
try:
path = os.environ['PATH']
except KeyError:
path = os.defpath
for dir in path.split(os.pathsep):
p = os.path.join(dir, progname)
if os.path.exists(p):
return p
return None
def _find_url_open_pr... | import gtk
import os
import sys
def _find_program_in_path(progname):
try:
path = os.environ['PATH']
except KeyError:
path = os.defpath
for dir in path.split(os.pathsep):
p = os.path.join(dir, progname)
if os.path.exists(p):
return p
return None
def _find_... | Use 'open' to open about dialog URLs on OS X | Use 'open' to open about dialog URLs on OS X
| Python | bsd-2-clause | johnrizzo1/reinteract,alexey4petrov/reinteract,alexey4petrov/reinteract,rschroll/reinteract,johnrizzo1/reinteract,rschroll/reinteract,jbaayen/reinteract,alexey4petrov/reinteract,jbaayen/reinteract,jbaayen/reinteract,johnrizzo1/reinteract,rschroll/reinteract | import gtk
import os
def _find_program_in_path(progname):
try:
path = os.environ['PATH']
except KeyError:
path = os.defpath
for dir in path.split(os.pathsep):
p = os.path.join(dir, progname)
if os.path.exists(p):
return p
return None
def _find_url_open_pr... | import gtk
import os
import sys
def _find_program_in_path(progname):
try:
path = os.environ['PATH']
except KeyError:
path = os.defpath
for dir in path.split(os.pathsep):
p = os.path.join(dir, progname)
if os.path.exists(p):
return p
return None
def _find_... | <commit_before>import gtk
import os
def _find_program_in_path(progname):
try:
path = os.environ['PATH']
except KeyError:
path = os.defpath
for dir in path.split(os.pathsep):
p = os.path.join(dir, progname)
if os.path.exists(p):
return p
return None
def _f... | import gtk
import os
import sys
def _find_program_in_path(progname):
try:
path = os.environ['PATH']
except KeyError:
path = os.defpath
for dir in path.split(os.pathsep):
p = os.path.join(dir, progname)
if os.path.exists(p):
return p
return None
def _find_... | import gtk
import os
def _find_program_in_path(progname):
try:
path = os.environ['PATH']
except KeyError:
path = os.defpath
for dir in path.split(os.pathsep):
p = os.path.join(dir, progname)
if os.path.exists(p):
return p
return None
def _find_url_open_pr... | <commit_before>import gtk
import os
def _find_program_in_path(progname):
try:
path = os.environ['PATH']
except KeyError:
path = os.defpath
for dir in path.split(os.pathsep):
p = os.path.join(dir, progname)
if os.path.exists(p):
return p
return None
def _f... |
95508fca6683220b52fb4853c3073b054775a377 | activities/models.py | activities/models.py | from __future__ import unicode_literals
from django.db import models
class Activity(models.Model):
datetime = models.DateTimeField(auto_now_add=True)
detail = models.TextField(editable=False)
to_user = models.ForeignKey('employees.Employee',
related_name='%(class)s_to',
... | from __future__ import unicode_literals
from django.db import models
class Activity(models.Model):
datetime = models.DateTimeField(auto_now_add=True)
detail = models.TextField(editable=False)
to_user = models.ForeignKey('employees.Employee',
related_name='%(class)s_to',
... | Change to_user to CharField for message model | Change to_user to CharField for message model
| Python | apache-2.0 | belatrix/BackendAllStars | from __future__ import unicode_literals
from django.db import models
class Activity(models.Model):
datetime = models.DateTimeField(auto_now_add=True)
detail = models.TextField(editable=False)
to_user = models.ForeignKey('employees.Employee',
related_name='%(class)s_to',
... | from __future__ import unicode_literals
from django.db import models
class Activity(models.Model):
datetime = models.DateTimeField(auto_now_add=True)
detail = models.TextField(editable=False)
to_user = models.ForeignKey('employees.Employee',
related_name='%(class)s_to',
... | <commit_before>from __future__ import unicode_literals
from django.db import models
class Activity(models.Model):
datetime = models.DateTimeField(auto_now_add=True)
detail = models.TextField(editable=False)
to_user = models.ForeignKey('employees.Employee',
related_name='%(... | from __future__ import unicode_literals
from django.db import models
class Activity(models.Model):
datetime = models.DateTimeField(auto_now_add=True)
detail = models.TextField(editable=False)
to_user = models.ForeignKey('employees.Employee',
related_name='%(class)s_to',
... | from __future__ import unicode_literals
from django.db import models
class Activity(models.Model):
datetime = models.DateTimeField(auto_now_add=True)
detail = models.TextField(editable=False)
to_user = models.ForeignKey('employees.Employee',
related_name='%(class)s_to',
... | <commit_before>from __future__ import unicode_literals
from django.db import models
class Activity(models.Model):
datetime = models.DateTimeField(auto_now_add=True)
detail = models.TextField(editable=False)
to_user = models.ForeignKey('employees.Employee',
related_name='%(... |
e21693f8c08e805421cc9b207dd901ed0fcd85a7 | tuskar_ui/infrastructure/history/views.py | tuskar_ui/infrastructure/history/views.py | # -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | # -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | Fix error in History table if stack does not exist | Fix error in History table if stack does not exist
Change-Id: Ic47761ddff23207a30eae0b7b523a996c545b3ba
| Python | apache-2.0 | rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui | # -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | # -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | <commit_before># -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | # -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | # -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | <commit_before># -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
09bc3137328fbefe41044b5124f3c6a7abaa8982 | wqflask/tests/base/test_general_object.py | wqflask/tests/base/test_general_object.py | import unittest
from base.GeneralObject import GeneralObject
class TestGeneralObjectTests(unittest.TestCase):
"""
Test the GeneralObject base class
"""
def test_object_contents(self):
"""Test whether base contents are stored properly"""
test_obj = GeneralObject("a", "b", "c")
... | import unittest
from base.GeneralObject import GeneralObject
class TestGeneralObjectTests(unittest.TestCase):
"""
Test the GeneralObject base class
"""
def test_object_contents(self):
"""Test whether base contents are stored properly"""
test_obj = GeneralObject("a", "b", "c")
... | Add more tests for general_object | Add more tests for general_object
* wqflask/tests/base/test_general_object.py: test getattr() and `==`
| Python | agpl-3.0 | genenetwork/genenetwork2,pjotrp/genenetwork2,genenetwork/genenetwork2,pjotrp/genenetwork2,pjotrp/genenetwork2,genenetwork/genenetwork2,pjotrp/genenetwork2,genenetwork/genenetwork2,pjotrp/genenetwork2,zsloan/genenetwork2,zsloan/genenetwork2,zsloan/genenetwork2,zsloan/genenetwork2 | import unittest
from base.GeneralObject import GeneralObject
class TestGeneralObjectTests(unittest.TestCase):
"""
Test the GeneralObject base class
"""
def test_object_contents(self):
"""Test whether base contents are stored properly"""
test_obj = GeneralObject("a", "b", "c")
... | import unittest
from base.GeneralObject import GeneralObject
class TestGeneralObjectTests(unittest.TestCase):
"""
Test the GeneralObject base class
"""
def test_object_contents(self):
"""Test whether base contents are stored properly"""
test_obj = GeneralObject("a", "b", "c")
... | <commit_before>import unittest
from base.GeneralObject import GeneralObject
class TestGeneralObjectTests(unittest.TestCase):
"""
Test the GeneralObject base class
"""
def test_object_contents(self):
"""Test whether base contents are stored properly"""
test_obj = GeneralObject("a", "b... | import unittest
from base.GeneralObject import GeneralObject
class TestGeneralObjectTests(unittest.TestCase):
"""
Test the GeneralObject base class
"""
def test_object_contents(self):
"""Test whether base contents are stored properly"""
test_obj = GeneralObject("a", "b", "c")
... | import unittest
from base.GeneralObject import GeneralObject
class TestGeneralObjectTests(unittest.TestCase):
"""
Test the GeneralObject base class
"""
def test_object_contents(self):
"""Test whether base contents are stored properly"""
test_obj = GeneralObject("a", "b", "c")
... | <commit_before>import unittest
from base.GeneralObject import GeneralObject
class TestGeneralObjectTests(unittest.TestCase):
"""
Test the GeneralObject base class
"""
def test_object_contents(self):
"""Test whether base contents are stored properly"""
test_obj = GeneralObject("a", "b... |
36916009198abca34c4457d93bc65abea6193d75 | yunity/tests/unit/test__utils__session.py | yunity/tests/unit/test__utils__session.py | from django.test import TestCase
from yunity.utils.session import RealtimeClientData
class TestSharedSession(TestCase):
def test_session_key(self):
self.assertEqual(RealtimeClientData.session_key('123'), 'session-store-123')
def test_set_get_django_redis(self):
RealtimeClientData.set_user_s... | from django.test import TestCase
from yunity.utils.session import RealtimeClientData
class TestSharedSession(TestCase):
def test_session_key(self):
self.assertEqual(RealtimeClientData.session_key('123'), 'session-store-123')
def test_set_get_django_redis(self):
RealtimeClientData.set_user_s... | Fix missing refactorization in unit test | Fix missing refactorization in unit test
send_to_users unit test was not modified after parameter change.
| Python | agpl-3.0 | yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core | from django.test import TestCase
from yunity.utils.session import RealtimeClientData
class TestSharedSession(TestCase):
def test_session_key(self):
self.assertEqual(RealtimeClientData.session_key('123'), 'session-store-123')
def test_set_get_django_redis(self):
RealtimeClientData.set_user_s... | from django.test import TestCase
from yunity.utils.session import RealtimeClientData
class TestSharedSession(TestCase):
def test_session_key(self):
self.assertEqual(RealtimeClientData.session_key('123'), 'session-store-123')
def test_set_get_django_redis(self):
RealtimeClientData.set_user_s... | <commit_before>from django.test import TestCase
from yunity.utils.session import RealtimeClientData
class TestSharedSession(TestCase):
def test_session_key(self):
self.assertEqual(RealtimeClientData.session_key('123'), 'session-store-123')
def test_set_get_django_redis(self):
RealtimeClient... | from django.test import TestCase
from yunity.utils.session import RealtimeClientData
class TestSharedSession(TestCase):
def test_session_key(self):
self.assertEqual(RealtimeClientData.session_key('123'), 'session-store-123')
def test_set_get_django_redis(self):
RealtimeClientData.set_user_s... | from django.test import TestCase
from yunity.utils.session import RealtimeClientData
class TestSharedSession(TestCase):
def test_session_key(self):
self.assertEqual(RealtimeClientData.session_key('123'), 'session-store-123')
def test_set_get_django_redis(self):
RealtimeClientData.set_user_s... | <commit_before>from django.test import TestCase
from yunity.utils.session import RealtimeClientData
class TestSharedSession(TestCase):
def test_session_key(self):
self.assertEqual(RealtimeClientData.session_key('123'), 'session-store-123')
def test_set_get_django_redis(self):
RealtimeClient... |
a52bd5acd50d37314247e4ffaed501ba08e0eca3 | tests/test_simple_model.py | tests/test_simple_model.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for creating a simple tight-binding model."""
import pytest
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t1', T_VALUES)
@pytest.mark.para... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for creating a simple tight-binding model."""
import pytest
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t1', T_VALUES)
@pytest.mark.para... | Fix test broken by previous commit. | Fix test broken by previous commit.
| Python | apache-2.0 | Z2PackDev/TBmodels,Z2PackDev/TBmodels | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for creating a simple tight-binding model."""
import pytest
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t1', T_VALUES)
@pytest.mark.para... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for creating a simple tight-binding model."""
import pytest
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t1', T_VALUES)
@pytest.mark.para... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for creating a simple tight-binding model."""
import pytest
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t1', T_VALUES)
@p... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for creating a simple tight-binding model."""
import pytest
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t1', T_VALUES)
@pytest.mark.para... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for creating a simple tight-binding model."""
import pytest
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t1', T_VALUES)
@pytest.mark.para... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
"""Tests for creating a simple tight-binding model."""
import pytest
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t1', T_VALUES)
@p... |
941ccc65bd14e65f7e877d107f67ee3bfe8e68a3 | thecure/sprites/enemies.py | thecure/sprites/enemies.py | from pygame.locals import *
from thecure import get_engine
from thecure.sprites.base import WalkingSprite
class Enemy(WalkingSprite):
DEFAULT_HEALTH = 10
class InfectedHuman(Enemy):
MOVE_SPEED = 2
def tick(self):
super(InfectedHuman, self).tick()
if self.started:
# Figure ... | from pygame.locals import *
from thecure import get_engine
from thecure.sprites.base import Direction, WalkingSprite
class Enemy(WalkingSprite):
DEFAULT_HEALTH = 10
class InfectedHuman(Enemy):
MOVE_SPEED = 2
APPROACH_DISTANCE = 400
def tick(self):
super(InfectedHuman, self).tick()
... | Improve infected human approach AI. | Improve infected human approach AI.
The approach AI now only kicks in when the player is within 400 pixels
of the enemy.
The direction it chooses to look in is a bit more sane now. It will
figure out whether the distance is greater in the X or Y location, and
pick a direction based on that. Now they actually appear t... | Python | mit | chipx86/the-cure | from pygame.locals import *
from thecure import get_engine
from thecure.sprites.base import WalkingSprite
class Enemy(WalkingSprite):
DEFAULT_HEALTH = 10
class InfectedHuman(Enemy):
MOVE_SPEED = 2
def tick(self):
super(InfectedHuman, self).tick()
if self.started:
# Figure ... | from pygame.locals import *
from thecure import get_engine
from thecure.sprites.base import Direction, WalkingSprite
class Enemy(WalkingSprite):
DEFAULT_HEALTH = 10
class InfectedHuman(Enemy):
MOVE_SPEED = 2
APPROACH_DISTANCE = 400
def tick(self):
super(InfectedHuman, self).tick()
... | <commit_before>from pygame.locals import *
from thecure import get_engine
from thecure.sprites.base import WalkingSprite
class Enemy(WalkingSprite):
DEFAULT_HEALTH = 10
class InfectedHuman(Enemy):
MOVE_SPEED = 2
def tick(self):
super(InfectedHuman, self).tick()
if self.started:
... | from pygame.locals import *
from thecure import get_engine
from thecure.sprites.base import Direction, WalkingSprite
class Enemy(WalkingSprite):
DEFAULT_HEALTH = 10
class InfectedHuman(Enemy):
MOVE_SPEED = 2
APPROACH_DISTANCE = 400
def tick(self):
super(InfectedHuman, self).tick()
... | from pygame.locals import *
from thecure import get_engine
from thecure.sprites.base import WalkingSprite
class Enemy(WalkingSprite):
DEFAULT_HEALTH = 10
class InfectedHuman(Enemy):
MOVE_SPEED = 2
def tick(self):
super(InfectedHuman, self).tick()
if self.started:
# Figure ... | <commit_before>from pygame.locals import *
from thecure import get_engine
from thecure.sprites.base import WalkingSprite
class Enemy(WalkingSprite):
DEFAULT_HEALTH = 10
class InfectedHuman(Enemy):
MOVE_SPEED = 2
def tick(self):
super(InfectedHuman, self).tick()
if self.started:
... |
6af918668cddf30c12a10fe46bc174e110bf04c3 | red_api.py | red_api.py | import os
from pymongo import MongoClient
MONGO_USER = os.getenv('MONGO_USER')
MONGO_PASSWORD = os.getenv('MONGO_PASSWORD')
MONGO_URI = 'mongodb://{0}:{1}@paulo.mongohq.com:10039/redjohn'.format(MONGO_USER, MONGO_PASSWORD)
# Open a connection to Mongo once
#
mongo_client = MongoClient(MONGO_URI)
red_john_tweets = mo... | import os
from pymongo import DESCENDING
from pymongo import MongoClient
from bson.json_util import dumps
MONGO_USER = os.getenv('MONGO_USER')
MONGO_PASSWORD = os.getenv('MONGO_PASSWORD')
MONGO_URI = 'mongodb://{0}:{1}@paulo.mongohq.com:10039/redjohn'.format(MONGO_USER, MONGO_PASSWORD)
# Open a connection to Mongo on... | Use bson's JSON util to handle ObjectIds in a JSON context | Use bson's JSON util to handle ObjectIds in a JSON context
| Python | mit | AnSavvides/redjohn,AnSavvides/redjohn | import os
from pymongo import MongoClient
MONGO_USER = os.getenv('MONGO_USER')
MONGO_PASSWORD = os.getenv('MONGO_PASSWORD')
MONGO_URI = 'mongodb://{0}:{1}@paulo.mongohq.com:10039/redjohn'.format(MONGO_USER, MONGO_PASSWORD)
# Open a connection to Mongo once
#
mongo_client = MongoClient(MONGO_URI)
red_john_tweets = mo... | import os
from pymongo import DESCENDING
from pymongo import MongoClient
from bson.json_util import dumps
MONGO_USER = os.getenv('MONGO_USER')
MONGO_PASSWORD = os.getenv('MONGO_PASSWORD')
MONGO_URI = 'mongodb://{0}:{1}@paulo.mongohq.com:10039/redjohn'.format(MONGO_USER, MONGO_PASSWORD)
# Open a connection to Mongo on... | <commit_before>import os
from pymongo import MongoClient
MONGO_USER = os.getenv('MONGO_USER')
MONGO_PASSWORD = os.getenv('MONGO_PASSWORD')
MONGO_URI = 'mongodb://{0}:{1}@paulo.mongohq.com:10039/redjohn'.format(MONGO_USER, MONGO_PASSWORD)
# Open a connection to Mongo once
#
mongo_client = MongoClient(MONGO_URI)
red_j... | import os
from pymongo import DESCENDING
from pymongo import MongoClient
from bson.json_util import dumps
MONGO_USER = os.getenv('MONGO_USER')
MONGO_PASSWORD = os.getenv('MONGO_PASSWORD')
MONGO_URI = 'mongodb://{0}:{1}@paulo.mongohq.com:10039/redjohn'.format(MONGO_USER, MONGO_PASSWORD)
# Open a connection to Mongo on... | import os
from pymongo import MongoClient
MONGO_USER = os.getenv('MONGO_USER')
MONGO_PASSWORD = os.getenv('MONGO_PASSWORD')
MONGO_URI = 'mongodb://{0}:{1}@paulo.mongohq.com:10039/redjohn'.format(MONGO_USER, MONGO_PASSWORD)
# Open a connection to Mongo once
#
mongo_client = MongoClient(MONGO_URI)
red_john_tweets = mo... | <commit_before>import os
from pymongo import MongoClient
MONGO_USER = os.getenv('MONGO_USER')
MONGO_PASSWORD = os.getenv('MONGO_PASSWORD')
MONGO_URI = 'mongodb://{0}:{1}@paulo.mongohq.com:10039/redjohn'.format(MONGO_USER, MONGO_PASSWORD)
# Open a connection to Mongo once
#
mongo_client = MongoClient(MONGO_URI)
red_j... |
48c63eb527b92d22fcdc3eba6e9b52bd2ee54f8e | Build/POSIXEnvironment.py | Build/POSIXEnvironment.py | import BaseEnvironment
import os
class Environment(BaseEnvironment.Environment):
def __init__(self, **kw):
apply(BaseEnvironment.Environment.__init__, (self,), kw)
self.ConfigureCompiler()
def ConfigureCompiler(self):
cxx = os.path.basename(self['CXX'])
if cxx.startswith("clang") or cx... | import BaseEnvironment
import os
class Environment(BaseEnvironment.Environment):
def __init__(self, **kw):
apply(BaseEnvironment.Environment.__init__, (self,), kw)
self.ConfigureCompiler()
def ConfigureCompiler(self):
cxx = os.path.basename(self['CXX'])
if cxx.startswith("clang") or cx... | Use '-pedantic' to fix build with old GCC versions. | Use '-pedantic' to fix build with old GCC versions.
| Python | mit | matthargett/mockitopp,matthargett/mockitopp,tpounds/mockitopp,tpounds/mockitopp | import BaseEnvironment
import os
class Environment(BaseEnvironment.Environment):
def __init__(self, **kw):
apply(BaseEnvironment.Environment.__init__, (self,), kw)
self.ConfigureCompiler()
def ConfigureCompiler(self):
cxx = os.path.basename(self['CXX'])
if cxx.startswith("clang") or cx... | import BaseEnvironment
import os
class Environment(BaseEnvironment.Environment):
def __init__(self, **kw):
apply(BaseEnvironment.Environment.__init__, (self,), kw)
self.ConfigureCompiler()
def ConfigureCompiler(self):
cxx = os.path.basename(self['CXX'])
if cxx.startswith("clang") or cx... | <commit_before>import BaseEnvironment
import os
class Environment(BaseEnvironment.Environment):
def __init__(self, **kw):
apply(BaseEnvironment.Environment.__init__, (self,), kw)
self.ConfigureCompiler()
def ConfigureCompiler(self):
cxx = os.path.basename(self['CXX'])
if cxx.startswith... | import BaseEnvironment
import os
class Environment(BaseEnvironment.Environment):
def __init__(self, **kw):
apply(BaseEnvironment.Environment.__init__, (self,), kw)
self.ConfigureCompiler()
def ConfigureCompiler(self):
cxx = os.path.basename(self['CXX'])
if cxx.startswith("clang") or cx... | import BaseEnvironment
import os
class Environment(BaseEnvironment.Environment):
def __init__(self, **kw):
apply(BaseEnvironment.Environment.__init__, (self,), kw)
self.ConfigureCompiler()
def ConfigureCompiler(self):
cxx = os.path.basename(self['CXX'])
if cxx.startswith("clang") or cx... | <commit_before>import BaseEnvironment
import os
class Environment(BaseEnvironment.Environment):
def __init__(self, **kw):
apply(BaseEnvironment.Environment.__init__, (self,), kw)
self.ConfigureCompiler()
def ConfigureCompiler(self):
cxx = os.path.basename(self['CXX'])
if cxx.startswith... |
8f70981f93da9648a618fb529629e5bdd88a1f7d | tests/test_command_line_tool.py | tests/test_command_line_tool.py | import unittest
import os
from performance_testing.command_line import Tool
from performance_testing.result import Result
from performance_testing.config import Config
class CommandLineToolTest(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
... | import unittest
import os
from performance_testing.command_line import Tool
from performance_testing.result import Result
from performance_testing.config import Config
import config
class CommandLineToolTest(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__fi... | Remove yaml config and use config object | Remove yaml config and use config object
| Python | mit | BakeCode/performance-testing,BakeCode/performance-testing | import unittest
import os
from performance_testing.command_line import Tool
from performance_testing.result import Result
from performance_testing.config import Config
class CommandLineToolTest(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
... | import unittest
import os
from performance_testing.command_line import Tool
from performance_testing.result import Result
from performance_testing.config import Config
import config
class CommandLineToolTest(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__fi... | <commit_before>import unittest
import os
from performance_testing.command_line import Tool
from performance_testing.result import Result
from performance_testing.config import Config
class CommandLineToolTest(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__f... | import unittest
import os
from performance_testing.command_line import Tool
from performance_testing.result import Result
from performance_testing.config import Config
import config
class CommandLineToolTest(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__fi... | import unittest
import os
from performance_testing.command_line import Tool
from performance_testing.result import Result
from performance_testing.config import Config
class CommandLineToolTest(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
... | <commit_before>import unittest
import os
from performance_testing.command_line import Tool
from performance_testing.result import Result
from performance_testing.config import Config
class CommandLineToolTest(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__f... |
25f69d929af9ef600f067343524272bcaef54a6b | KerbalStuff/celery.py | KerbalStuff/celery.py | import smtplib
from celery import Celery
from email.mime.text import MIMEText
from KerbalStuff.config import _cfg, _cfgi, _cfgb
app = Celery("tasks", broker="redis://localhost:6379/0")
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in range(0, len(l), n):
yield l[i:i+n]
@... | import smtplib
from celery import Celery
from email.mime.text import MIMEText
from KerbalStuff.config import _cfg, _cfgi, _cfgb
app = Celery("tasks", broker="redis://localhost:6379/0")
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in range(0, len(l), n):
yield l[i:i+n]
@... | Remove addresses from "To" field, BCC instead. | [proposal] Remove addresses from "To" field, BCC instead.
Closing privacy issue by hiding the "To" field altogether. Just commented out the "To" line. For issue #68 | Python | mit | EIREXE/SpaceDock,EIREXE/SpaceDock,EIREXE/SpaceDock,EIREXE/SpaceDock | import smtplib
from celery import Celery
from email.mime.text import MIMEText
from KerbalStuff.config import _cfg, _cfgi, _cfgb
app = Celery("tasks", broker="redis://localhost:6379/0")
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in range(0, len(l), n):
yield l[i:i+n]
@... | import smtplib
from celery import Celery
from email.mime.text import MIMEText
from KerbalStuff.config import _cfg, _cfgi, _cfgb
app = Celery("tasks", broker="redis://localhost:6379/0")
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in range(0, len(l), n):
yield l[i:i+n]
@... | <commit_before>import smtplib
from celery import Celery
from email.mime.text import MIMEText
from KerbalStuff.config import _cfg, _cfgi, _cfgb
app = Celery("tasks", broker="redis://localhost:6379/0")
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in range(0, len(l), n):
yi... | import smtplib
from celery import Celery
from email.mime.text import MIMEText
from KerbalStuff.config import _cfg, _cfgi, _cfgb
app = Celery("tasks", broker="redis://localhost:6379/0")
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in range(0, len(l), n):
yield l[i:i+n]
@... | import smtplib
from celery import Celery
from email.mime.text import MIMEText
from KerbalStuff.config import _cfg, _cfgi, _cfgb
app = Celery("tasks", broker="redis://localhost:6379/0")
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in range(0, len(l), n):
yield l[i:i+n]
@... | <commit_before>import smtplib
from celery import Celery
from email.mime.text import MIMEText
from KerbalStuff.config import _cfg, _cfgi, _cfgb
app = Celery("tasks", broker="redis://localhost:6379/0")
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in range(0, len(l), n):
yi... |
2d8a3b8c9ca6196317758e58cefc76163b88607f | falcom/table.py | falcom/table.py | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class Table:
class InputStrContainsCarriageReturn (RuntimeError):
pass
def __init__ (self, tab_separated_text = None):
... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class Table:
class InputStrContainsCarriageReturn (RuntimeError):
pass
def __init__ (self, tab_separated_text = None):
... | Move assignments in Table.__init__ around | Move assignments in Table.__init__ around
| Python | bsd-3-clause | mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class Table:
class InputStrContainsCarriageReturn (RuntimeError):
pass
def __init__ (self, tab_separated_text = None):
... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class Table:
class InputStrContainsCarriageReturn (RuntimeError):
pass
def __init__ (self, tab_separated_text = None):
... | <commit_before># Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class Table:
class InputStrContainsCarriageReturn (RuntimeError):
pass
def __init__ (self, tab_separated_tex... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class Table:
class InputStrContainsCarriageReturn (RuntimeError):
pass
def __init__ (self, tab_separated_text = None):
... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class Table:
class InputStrContainsCarriageReturn (RuntimeError):
pass
def __init__ (self, tab_separated_text = None):
... | <commit_before># Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
class Table:
class InputStrContainsCarriageReturn (RuntimeError):
pass
def __init__ (self, tab_separated_tex... |
6b36fcd7bdc64c914a800a4c4d8381e59adff6f7 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
from distutils.core import Command
from sys import stdout, version_info
import logging
VERSION = '0.9'
DESCRIPTION = "A wrapper for comicvine.com"
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
extra = {}
if version_info >= (3,):
extra['use_2to... | #!/usr/bin/env python
from setuptools import setup
from distutils.core import Command
from sys import stdout, version_info
import logging
VERSION = '0.9'
DESCRIPTION = "A wrapper for comicvine.com"
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
extra = {}
if version_info >= (3,):
extra['use_2to... | Remove simplejson for Python 3.2.x since there is no support | Remove simplejson for Python 3.2.x since there is no support
| Python | mit | authmillenon/pycomicvine | #!/usr/bin/env python
from setuptools import setup
from distutils.core import Command
from sys import stdout, version_info
import logging
VERSION = '0.9'
DESCRIPTION = "A wrapper for comicvine.com"
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
extra = {}
if version_info >= (3,):
extra['use_2to... | #!/usr/bin/env python
from setuptools import setup
from distutils.core import Command
from sys import stdout, version_info
import logging
VERSION = '0.9'
DESCRIPTION = "A wrapper for comicvine.com"
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
extra = {}
if version_info >= (3,):
extra['use_2to... | <commit_before>#!/usr/bin/env python
from setuptools import setup
from distutils.core import Command
from sys import stdout, version_info
import logging
VERSION = '0.9'
DESCRIPTION = "A wrapper for comicvine.com"
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
extra = {}
if version_info >= (3,):
... | #!/usr/bin/env python
from setuptools import setup
from distutils.core import Command
from sys import stdout, version_info
import logging
VERSION = '0.9'
DESCRIPTION = "A wrapper for comicvine.com"
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
extra = {}
if version_info >= (3,):
extra['use_2to... | #!/usr/bin/env python
from setuptools import setup
from distutils.core import Command
from sys import stdout, version_info
import logging
VERSION = '0.9'
DESCRIPTION = "A wrapper for comicvine.com"
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
extra = {}
if version_info >= (3,):
extra['use_2to... | <commit_before>#!/usr/bin/env python
from setuptools import setup
from distutils.core import Command
from sys import stdout, version_info
import logging
VERSION = '0.9'
DESCRIPTION = "A wrapper for comicvine.com"
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
extra = {}
if version_info >= (3,):
... |
016cb79166bfaeb28f5d1a0c540f7e0632d485a1 | setup.py | setup.py | from distutils.core import setup
VERSION = '0.0.2.8'
setup(
name='jpp',
version=VERSION,
packages=['jpp', 'jpp.parser', 'jpp.cli_test', 'jpp.cli_test.sub_path'],
url='https://github.com/asherbar/json-plus-plus/archive/{}.tar.gz'.format(VERSION),
license='MIT',
author='asherbar',
author_em... | from distutils.core import setup
VERSION = '0.0.2.8'
setup(
name='jpp',
version=VERSION,
packages=['jpp', 'jpp.parser', 'jpp.cli_test'],
url='https://github.com/asherbar/json-plus-plus/archive/{}.tar.gz'.format(VERSION),
license='MIT',
author='asherbar',
author_email='[email protected]'... | Fix error due to missing package in packages list | Fix error due to missing package in packages list
| Python | mit | asherbar/json-plus-plus | from distutils.core import setup
VERSION = '0.0.2.8'
setup(
name='jpp',
version=VERSION,
packages=['jpp', 'jpp.parser', 'jpp.cli_test', 'jpp.cli_test.sub_path'],
url='https://github.com/asherbar/json-plus-plus/archive/{}.tar.gz'.format(VERSION),
license='MIT',
author='asherbar',
author_em... | from distutils.core import setup
VERSION = '0.0.2.8'
setup(
name='jpp',
version=VERSION,
packages=['jpp', 'jpp.parser', 'jpp.cli_test'],
url='https://github.com/asherbar/json-plus-plus/archive/{}.tar.gz'.format(VERSION),
license='MIT',
author='asherbar',
author_email='[email protected]'... | <commit_before>from distutils.core import setup
VERSION = '0.0.2.8'
setup(
name='jpp',
version=VERSION,
packages=['jpp', 'jpp.parser', 'jpp.cli_test', 'jpp.cli_test.sub_path'],
url='https://github.com/asherbar/json-plus-plus/archive/{}.tar.gz'.format(VERSION),
license='MIT',
author='asherbar'... | from distutils.core import setup
VERSION = '0.0.2.8'
setup(
name='jpp',
version=VERSION,
packages=['jpp', 'jpp.parser', 'jpp.cli_test'],
url='https://github.com/asherbar/json-plus-plus/archive/{}.tar.gz'.format(VERSION),
license='MIT',
author='asherbar',
author_email='[email protected]'... | from distutils.core import setup
VERSION = '0.0.2.8'
setup(
name='jpp',
version=VERSION,
packages=['jpp', 'jpp.parser', 'jpp.cli_test', 'jpp.cli_test.sub_path'],
url='https://github.com/asherbar/json-plus-plus/archive/{}.tar.gz'.format(VERSION),
license='MIT',
author='asherbar',
author_em... | <commit_before>from distutils.core import setup
VERSION = '0.0.2.8'
setup(
name='jpp',
version=VERSION,
packages=['jpp', 'jpp.parser', 'jpp.cli_test', 'jpp.cli_test.sub_path'],
url='https://github.com/asherbar/json-plus-plus/archive/{}.tar.gz'.format(VERSION),
license='MIT',
author='asherbar'... |
b7ab1cb1cf4f19c0537be9a59bbf4af8ced9f0ec | setup.py | setup.py | from setuptools import setup
import species_separator
setup(
name="species_separator",
version=species_separator.__version__,
url='https://github.com/statbio/Sargasso',
license='MIT License',
author='Owen Dando',
author_email='[email protected]',
packages=['species_separator'],
insta... | from setuptools import setup
import species_separator
setup(
name="species_separator",
version=species_separator.__version__,
url='https://github.com/statbio/Sargasso',
license='MIT License',
author='Owen Dando',
author_email='[email protected]',
packages=['species_separator'],
insta... | Remove old packages only needed by Sphinx. | Remove old packages only needed by Sphinx.
| Python | mit | statbio/Sargasso,statbio/Sargasso | from setuptools import setup
import species_separator
setup(
name="species_separator",
version=species_separator.__version__,
url='https://github.com/statbio/Sargasso',
license='MIT License',
author='Owen Dando',
author_email='[email protected]',
packages=['species_separator'],
insta... | from setuptools import setup
import species_separator
setup(
name="species_separator",
version=species_separator.__version__,
url='https://github.com/statbio/Sargasso',
license='MIT License',
author='Owen Dando',
author_email='[email protected]',
packages=['species_separator'],
insta... | <commit_before>from setuptools import setup
import species_separator
setup(
name="species_separator",
version=species_separator.__version__,
url='https://github.com/statbio/Sargasso',
license='MIT License',
author='Owen Dando',
author_email='[email protected]',
packages=['species_separat... | from setuptools import setup
import species_separator
setup(
name="species_separator",
version=species_separator.__version__,
url='https://github.com/statbio/Sargasso',
license='MIT License',
author='Owen Dando',
author_email='[email protected]',
packages=['species_separator'],
insta... | from setuptools import setup
import species_separator
setup(
name="species_separator",
version=species_separator.__version__,
url='https://github.com/statbio/Sargasso',
license='MIT License',
author='Owen Dando',
author_email='[email protected]',
packages=['species_separator'],
insta... | <commit_before>from setuptools import setup
import species_separator
setup(
name="species_separator",
version=species_separator.__version__,
url='https://github.com/statbio/Sargasso',
license='MIT License',
author='Owen Dando',
author_email='[email protected]',
packages=['species_separat... |
0d300b0f7f1efd208d7e7bcb341ece39a3d7daab | setup.py | setup.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='rotunicode',
version='0.1.3',
description='Python codec for converting between a string o... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='rotunicode',
version='0.1.3',
description='Python codec for converting between a string o... | Update URL to point to GitHub. | Update URL to point to GitHub.
| Python | apache-2.0 | box/rotunicode,box/rotunicode | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='rotunicode',
version='0.1.3',
description='Python codec for converting between a string o... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='rotunicode',
version='0.1.3',
description='Python codec for converting between a string o... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='rotunicode',
version='0.1.3',
description='Python codec for converting bet... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='rotunicode',
version='0.1.3',
description='Python codec for converting between a string o... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='rotunicode',
version='0.1.3',
description='Python codec for converting between a string o... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from os.path import dirname, join
def main():
base_dir = dirname(__file__)
setup(
name='rotunicode',
version='0.1.3',
description='Python codec for converting bet... |
cb6d0ea6c05eb62fafe97ac13d5665cb00b2db3c | setup.py | setup.py | #!/usr/bin/env python
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE>
from distutils.core import setup
setup(name='spherical_functions',
version='1.0',
description='Python/numba implementation of Wigner D Matrices, spi... | #!/usr/bin/env python
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE>
from distutils.core import setup
setup(name='spherical_functions',
version='1.0',
description='Python/numba implementation of Wigner D Matrices, spi... | Copy data files for numpy | Copy data files for numpy
| Python | mit | moble/spherical_functions | #!/usr/bin/env python
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE>
from distutils.core import setup
setup(name='spherical_functions',
version='1.0',
description='Python/numba implementation of Wigner D Matrices, spi... | #!/usr/bin/env python
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE>
from distutils.core import setup
setup(name='spherical_functions',
version='1.0',
description='Python/numba implementation of Wigner D Matrices, spi... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE>
from distutils.core import setup
setup(name='spherical_functions',
version='1.0',
description='Python/numba implementation of Wigner ... | #!/usr/bin/env python
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE>
from distutils.core import setup
setup(name='spherical_functions',
version='1.0',
description='Python/numba implementation of Wigner D Matrices, spi... | #!/usr/bin/env python
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE>
from distutils.core import setup
setup(name='spherical_functions',
version='1.0',
description='Python/numba implementation of Wigner D Matrices, spi... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2014, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE>
from distutils.core import setup
setup(name='spherical_functions',
version='1.0',
description='Python/numba implementation of Wigner ... |
d2a6bbb824c6a0be5402ddb304f2fa629513a910 | setup.py | setup.py | from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='portstat',
version='0.0.1',
keywords=('port', 'monitor', 'traffic'),
url='https://gi... | from setuptools import setup, find_packages
from os import path
from codecs import open
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='portstat',
version='0.0.1',
keywords=('port', 'monitor', 'traffi... | Fix the problem in Python 2.x | Fix the problem in Python 2.x
| Python | apache-2.0 | imlonghao/portstat | from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='portstat',
version='0.0.1',
keywords=('port', 'monitor', 'traffic'),
url='https://gi... | from setuptools import setup, find_packages
from os import path
from codecs import open
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='portstat',
version='0.0.1',
keywords=('port', 'monitor', 'traffi... | <commit_before>from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='portstat',
version='0.0.1',
keywords=('port', 'monitor', 'traffic'),
... | from setuptools import setup, find_packages
from os import path
from codecs import open
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='portstat',
version='0.0.1',
keywords=('port', 'monitor', 'traffi... | from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='portstat',
version='0.0.1',
keywords=('port', 'monitor', 'traffic'),
url='https://gi... | <commit_before>from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='portstat',
version='0.0.1',
keywords=('port', 'monitor', 'traffic'),
... |
1449dbb7dd769b0d806bdfd8c7e3bfda632af5b9 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='pyop',
version='2.0.8',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/IdentityPython/pyop',
license='Apache 2.0',
author='Rebecka Gulliksson',
author_email='[email protected]',
descrip... | from setuptools import setup, find_packages
setup(
name='pyop',
version='2.0.8',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/IdentityPython/pyop',
license='Apache 2.0',
author='Rebecka Gulliksson',
author_email='[email protected]',
descrip... | Use the latest version of pyoidc/oic dependency | Use the latest version of pyoidc/oic dependency
Signed-off-by: Ivan Kanakarakis <[email protected]>
| Python | apache-2.0 | its-dirg/pyop | from setuptools import setup, find_packages
setup(
name='pyop',
version='2.0.8',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/IdentityPython/pyop',
license='Apache 2.0',
author='Rebecka Gulliksson',
author_email='[email protected]',
descrip... | from setuptools import setup, find_packages
setup(
name='pyop',
version='2.0.8',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/IdentityPython/pyop',
license='Apache 2.0',
author='Rebecka Gulliksson',
author_email='[email protected]',
descrip... | <commit_before>from setuptools import setup, find_packages
setup(
name='pyop',
version='2.0.8',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/IdentityPython/pyop',
license='Apache 2.0',
author='Rebecka Gulliksson',
author_email='[email protected]... | from setuptools import setup, find_packages
setup(
name='pyop',
version='2.0.8',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/IdentityPython/pyop',
license='Apache 2.0',
author='Rebecka Gulliksson',
author_email='[email protected]',
descrip... | from setuptools import setup, find_packages
setup(
name='pyop',
version='2.0.8',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/IdentityPython/pyop',
license='Apache 2.0',
author='Rebecka Gulliksson',
author_email='[email protected]',
descrip... | <commit_before>from setuptools import setup, find_packages
setup(
name='pyop',
version='2.0.8',
packages=find_packages('src'),
package_dir={'': 'src'},
url='https://github.com/IdentityPython/pyop',
license='Apache 2.0',
author='Rebecka Gulliksson',
author_email='[email protected]... |
3552fc831813477fa8ceebafe7358fddf59d881a | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys, os
import django_throttling
setup(
name='django-throttling',
version=django_throttling.get_version(),
description="Basic throttling app for Django",
long_description=open('README.rst', 'r').read(),
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys, os
import django_throttling
setup(
name='django-throttling',
version=django_throttling.get_version(),
description="Basic throttling app for Django",
long_description=open('README.rst', 'r').read(),
... | Fix a mistake in a git url | Fix a mistake in a git url
| Python | mit | night-crawler/django-throttling | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys, os
import django_throttling
setup(
name='django-throttling',
version=django_throttling.get_version(),
description="Basic throttling app for Django",
long_description=open('README.rst', 'r').read(),
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys, os
import django_throttling
setup(
name='django-throttling',
version=django_throttling.get_version(),
description="Basic throttling app for Django",
long_description=open('README.rst', 'r').read(),
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys, os
import django_throttling
setup(
name='django-throttling',
version=django_throttling.get_version(),
description="Basic throttling app for Django",
long_description=open('README.rst', ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys, os
import django_throttling
setup(
name='django-throttling',
version=django_throttling.get_version(),
description="Basic throttling app for Django",
long_description=open('README.rst', 'r').read(),
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys, os
import django_throttling
setup(
name='django-throttling',
version=django_throttling.get_version(),
description="Basic throttling app for Django",
long_description=open('README.rst', 'r').read(),
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys, os
import django_throttling
setup(
name='django-throttling',
version=django_throttling.get_version(),
description="Basic throttling app for Django",
long_description=open('README.rst', ... |
339ea0bdb831d7f5f91d503a09c73e3b63e3a972 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='django-remote-forms',
version='0.0.1',
description='A platform independent form serializer for D... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='django-remote-forms',
version='0.0.2',
description='A platform independent form serializer for D... | Upgrade the version to force reinstall by wheels | Upgrade the version to force reinstall by wheels | Python | mit | 360youlun/django-remote-forms | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='django-remote-forms',
version='0.0.1',
description='A platform independent form serializer for D... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='django-remote-forms',
version='0.0.2',
description='A platform independent form serializer for D... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='django-remote-forms',
version='0.0.1',
description='A platform independent form s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='django-remote-forms',
version='0.0.2',
description='A platform independent form serializer for D... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='django-remote-forms',
version='0.0.1',
description='A platform independent form serializer for D... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='django-remote-forms',
version='0.0.1',
description='A platform independent form s... |
391d03c332633f26da92769d442913f76a9e2f50 | setup.py | setup.py | from setuptools import find_packages, setup
version = '2.3'
setup(name='op_robot_tests',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
author_email... | from setuptools import find_packages, setup
version = '2.3'
setup(name='op_robot_tests',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
author_email... | Add a short alias for bin/openprocurement_tests | Add a short alias for bin/openprocurement_tests
Alias is: bin/op_tests
| Python | apache-2.0 | kosaniak/robot_tests,openprocurement/robot_tests,mykhaly/robot_tests,selurvedu/robot_tests,cleardevice/robot_tests,VadimShurhal/robot_tests.broker.aps,SlaOne/robot_tests,bubanoid/robot_tests,Rzaporozhets/robot_tests,Leits/robot_tests | from setuptools import find_packages, setup
version = '2.3'
setup(name='op_robot_tests',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
author_email... | from setuptools import find_packages, setup
version = '2.3'
setup(name='op_robot_tests',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
author_email... | <commit_before>from setuptools import find_packages, setup
version = '2.3'
setup(name='op_robot_tests',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
... | from setuptools import find_packages, setup
version = '2.3'
setup(name='op_robot_tests',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
author_email... | from setuptools import find_packages, setup
version = '2.3'
setup(name='op_robot_tests',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
author_email... | <commit_before>from setuptools import find_packages, setup
version = '2.3'
setup(name='op_robot_tests',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
... |
4b2a68638a9045d3a15219d41c7d9981d29e601a | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name='parmap',
version='1.2.1',
description=('map and starmap implementations passing additional',
'arguments and parallelizing if possible'),
long_des... | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name='parmap',
version='1.2.1',
description=('map and starmap implementations passing additional '
'arguments and parallelizing if possible'),
long_des... | Make description a string, not a tuple. | Make description a string, not a tuple.
Fixes #1
| Python | apache-2.0 | zeehio/parmap | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name='parmap',
version='1.2.1',
description=('map and starmap implementations passing additional',
'arguments and parallelizing if possible'),
long_des... | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name='parmap',
version='1.2.1',
description=('map and starmap implementations passing additional '
'arguments and parallelizing if possible'),
long_des... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name='parmap',
version='1.2.1',
description=('map and starmap implementations passing additional',
'arguments and parallelizing if possible'),... | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name='parmap',
version='1.2.1',
description=('map and starmap implementations passing additional '
'arguments and parallelizing if possible'),
long_des... | #!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name='parmap',
version='1.2.1',
description=('map and starmap implementations passing additional',
'arguments and parallelizing if possible'),
long_des... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name='parmap',
version='1.2.1',
description=('map and starmap implementations passing additional',
'arguments and parallelizing if possible'),... |
439b8eea574a9bfa154cbce069367d26faa94368 | setup.py | setup.py | from setuptools import find_packages, setup
version = '0.1.0'
setup(
name='django-user-deletion',
packages=find_packages(),
include_package_data=True,
version=version,
license='BSD',
description='Management commands to notify and delete inactive django users',
classifiers=(
'Deve... | from setuptools import find_packages, setup
version = '0.1.0'
setup(
name='django-user-deletion',
packages=find_packages(),
include_package_data=True,
version=version,
license='BSD',
description='Management commands to notify and delete inactive django users',
classifiers=[
'Deve... | Use a list for classifiers | Use a list for classifiers
| Python | bsd-2-clause | incuna/django-user-deletion | from setuptools import find_packages, setup
version = '0.1.0'
setup(
name='django-user-deletion',
packages=find_packages(),
include_package_data=True,
version=version,
license='BSD',
description='Management commands to notify and delete inactive django users',
classifiers=(
'Deve... | from setuptools import find_packages, setup
version = '0.1.0'
setup(
name='django-user-deletion',
packages=find_packages(),
include_package_data=True,
version=version,
license='BSD',
description='Management commands to notify and delete inactive django users',
classifiers=[
'Deve... | <commit_before>from setuptools import find_packages, setup
version = '0.1.0'
setup(
name='django-user-deletion',
packages=find_packages(),
include_package_data=True,
version=version,
license='BSD',
description='Management commands to notify and delete inactive django users',
classifiers=... | from setuptools import find_packages, setup
version = '0.1.0'
setup(
name='django-user-deletion',
packages=find_packages(),
include_package_data=True,
version=version,
license='BSD',
description='Management commands to notify and delete inactive django users',
classifiers=[
'Deve... | from setuptools import find_packages, setup
version = '0.1.0'
setup(
name='django-user-deletion',
packages=find_packages(),
include_package_data=True,
version=version,
license='BSD',
description='Management commands to notify and delete inactive django users',
classifiers=(
'Deve... | <commit_before>from setuptools import find_packages, setup
version = '0.1.0'
setup(
name='django-user-deletion',
packages=find_packages(),
include_package_data=True,
version=version,
license='BSD',
description='Management commands to notify and delete inactive django users',
classifiers=... |
26d64b98fab7fa90a6504e556a0a41892e99f8a8 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst... | Fix a small typo in the github url | Fix a small typo in the github url
Signed-off-by: Ben Lopatin <[email protected]>
| Python | bsd-3-clause | bennylope/sysenv,bennylope/sysenv | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = op... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = op... |
588060454795c92f76dc623bb03b9ef17b585f81 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='zeit.content.portraitbox',
version='1.22.10dev',
author='gocept',
author_email='[email protected]',
url='https://svn.gocept.com/repos/gocept-int/zeit.cms',
description="ZEIT portraitbox",
packages=find_packages('src'),
package_dir =... | from setuptools import setup, find_packages
setup(
name='zeit.content.portraitbox',
version='1.22.10dev',
author='gocept',
author_email='[email protected]',
url='https://svn.gocept.com/repos/gocept-int/zeit.cms',
description="ZEIT portraitbox",
packages=find_packages('src'),
package_dir =... | Declare required version of zeit.cms | Declare required version of zeit.cms
| Python | bsd-3-clause | ZeitOnline/zeit.content.portraitbox | from setuptools import setup, find_packages
setup(
name='zeit.content.portraitbox',
version='1.22.10dev',
author='gocept',
author_email='[email protected]',
url='https://svn.gocept.com/repos/gocept-int/zeit.cms',
description="ZEIT portraitbox",
packages=find_packages('src'),
package_dir =... | from setuptools import setup, find_packages
setup(
name='zeit.content.portraitbox',
version='1.22.10dev',
author='gocept',
author_email='[email protected]',
url='https://svn.gocept.com/repos/gocept-int/zeit.cms',
description="ZEIT portraitbox",
packages=find_packages('src'),
package_dir =... | <commit_before>from setuptools import setup, find_packages
setup(
name='zeit.content.portraitbox',
version='1.22.10dev',
author='gocept',
author_email='[email protected]',
url='https://svn.gocept.com/repos/gocept-int/zeit.cms',
description="ZEIT portraitbox",
packages=find_packages('src'),
... | from setuptools import setup, find_packages
setup(
name='zeit.content.portraitbox',
version='1.22.10dev',
author='gocept',
author_email='[email protected]',
url='https://svn.gocept.com/repos/gocept-int/zeit.cms',
description="ZEIT portraitbox",
packages=find_packages('src'),
package_dir =... | from setuptools import setup, find_packages
setup(
name='zeit.content.portraitbox',
version='1.22.10dev',
author='gocept',
author_email='[email protected]',
url='https://svn.gocept.com/repos/gocept-int/zeit.cms',
description="ZEIT portraitbox",
packages=find_packages('src'),
package_dir =... | <commit_before>from setuptools import setup, find_packages
setup(
name='zeit.content.portraitbox',
version='1.22.10dev',
author='gocept',
author_email='[email protected]',
url='https://svn.gocept.com/repos/gocept-int/zeit.cms',
description="ZEIT portraitbox",
packages=find_packages('src'),
... |
d3d084f3030946217dd0c29a452ff002768cf381 | setup.py | setup.py | import setuptools
with open("README.md", "r") as fin:
long_description = fin.read()
setuptools.setup(
name="geneagrapher",
version="1.0",
author="David Alber",
author_email="[email protected]",
description="Mathematical genealogy grapher.",
entry_points={
'console_scripts':
... | import re
import setuptools
with open("README.md", "r") as fin:
long_description = fin.read()
long_description = re.sub(
"^(!\[.*\]\()(.*\))",
lambda m: m.group(1) + "https://github.com/davidalber/geneagrapher/raw/master/" + m.group(2),
long_description,
flags=re.MULTILINE
)
setuptools.setup(
... | Replace relative links with absolute links | Replace relative links with absolute links
| Python | mit | davidalber/Geneagrapher,davidalber/Geneagrapher | import setuptools
with open("README.md", "r") as fin:
long_description = fin.read()
setuptools.setup(
name="geneagrapher",
version="1.0",
author="David Alber",
author_email="[email protected]",
description="Mathematical genealogy grapher.",
entry_points={
'console_scripts':
... | import re
import setuptools
with open("README.md", "r") as fin:
long_description = fin.read()
long_description = re.sub(
"^(!\[.*\]\()(.*\))",
lambda m: m.group(1) + "https://github.com/davidalber/geneagrapher/raw/master/" + m.group(2),
long_description,
flags=re.MULTILINE
)
setuptools.setup(
... | <commit_before>import setuptools
with open("README.md", "r") as fin:
long_description = fin.read()
setuptools.setup(
name="geneagrapher",
version="1.0",
author="David Alber",
author_email="[email protected]",
description="Mathematical genealogy grapher.",
entry_points={
'consol... | import re
import setuptools
with open("README.md", "r") as fin:
long_description = fin.read()
long_description = re.sub(
"^(!\[.*\]\()(.*\))",
lambda m: m.group(1) + "https://github.com/davidalber/geneagrapher/raw/master/" + m.group(2),
long_description,
flags=re.MULTILINE
)
setuptools.setup(
... | import setuptools
with open("README.md", "r") as fin:
long_description = fin.read()
setuptools.setup(
name="geneagrapher",
version="1.0",
author="David Alber",
author_email="[email protected]",
description="Mathematical genealogy grapher.",
entry_points={
'console_scripts':
... | <commit_before>import setuptools
with open("README.md", "r") as fin:
long_description = fin.read()
setuptools.setup(
name="geneagrapher",
version="1.0",
author="David Alber",
author_email="[email protected]",
description="Mathematical genealogy grapher.",
entry_points={
'consol... |
4d246e9e08f03f1ca77bc7d8aa78d74f21d9fbfb | setup.py | setup.py | import os
from setuptools import setup, find_packages
version = __import__('aws_status').__version__
def read(path):
"""Return the content of a file."""
with open(path, 'r') as f:
return f.read()
setup(
name='aws-status',
version=version,
description='Wraps AWS status informations obtain... | import os
from setuptools import setup, find_packages
version = __import__('aws_status').__version__
def read(path):
"""Return the content of a file."""
with open(path, 'r') as f:
return f.read()
setup(
name='aws-status',
version=version,
description='Wraps AWS status informations obtain... | Add aws-status-check to declared binaries | Add aws-status-check to declared binaries
| Python | mit | jbbarth/aws-status,jbbarth/aws-status | import os
from setuptools import setup, find_packages
version = __import__('aws_status').__version__
def read(path):
"""Return the content of a file."""
with open(path, 'r') as f:
return f.read()
setup(
name='aws-status',
version=version,
description='Wraps AWS status informations obtain... | import os
from setuptools import setup, find_packages
version = __import__('aws_status').__version__
def read(path):
"""Return the content of a file."""
with open(path, 'r') as f:
return f.read()
setup(
name='aws-status',
version=version,
description='Wraps AWS status informations obtain... | <commit_before>import os
from setuptools import setup, find_packages
version = __import__('aws_status').__version__
def read(path):
"""Return the content of a file."""
with open(path, 'r') as f:
return f.read()
setup(
name='aws-status',
version=version,
description='Wraps AWS status info... | import os
from setuptools import setup, find_packages
version = __import__('aws_status').__version__
def read(path):
"""Return the content of a file."""
with open(path, 'r') as f:
return f.read()
setup(
name='aws-status',
version=version,
description='Wraps AWS status informations obtain... | import os
from setuptools import setup, find_packages
version = __import__('aws_status').__version__
def read(path):
"""Return the content of a file."""
with open(path, 'r') as f:
return f.read()
setup(
name='aws-status',
version=version,
description='Wraps AWS status informations obtain... | <commit_before>import os
from setuptools import setup, find_packages
version = __import__('aws_status').__version__
def read(path):
"""Return the content of a file."""
with open(path, 'r') as f:
return f.read()
setup(
name='aws-status',
version=version,
description='Wraps AWS status info... |
d06f4466cf9ccb6f88df96798d96df8880a94276 | setup.py | setup.py | import os
from setuptools import setup, find_packages
__version__ = '0.1'
HERE = os.path.dirname(__file__)
try:
long_description = open(os.path.join(HERE, 'README.rst')).read()
except:
long_description = None
setup(
name='rubberjack-cli',
version=__version__,
packages=find_packages(exclude=['tes... | import os
from setuptools import setup, find_packages
__version__ = '0.1'
HERE = os.path.dirname(__file__)
try:
long_description = open(os.path.join(HERE, 'README.rst')).read()
except:
long_description = None
setup(
name='rubberjack-cli',
version=__version__,
packages=find_packages(exclude=['tes... | Drop `author_email` - oops, excessive copy-paste | Drop `author_email` - oops, excessive copy-paste
| Python | mit | laterpay/rubberjack-cli | import os
from setuptools import setup, find_packages
__version__ = '0.1'
HERE = os.path.dirname(__file__)
try:
long_description = open(os.path.join(HERE, 'README.rst')).read()
except:
long_description = None
setup(
name='rubberjack-cli',
version=__version__,
packages=find_packages(exclude=['tes... | import os
from setuptools import setup, find_packages
__version__ = '0.1'
HERE = os.path.dirname(__file__)
try:
long_description = open(os.path.join(HERE, 'README.rst')).read()
except:
long_description = None
setup(
name='rubberjack-cli',
version=__version__,
packages=find_packages(exclude=['tes... | <commit_before>import os
from setuptools import setup, find_packages
__version__ = '0.1'
HERE = os.path.dirname(__file__)
try:
long_description = open(os.path.join(HERE, 'README.rst')).read()
except:
long_description = None
setup(
name='rubberjack-cli',
version=__version__,
packages=find_package... | import os
from setuptools import setup, find_packages
__version__ = '0.1'
HERE = os.path.dirname(__file__)
try:
long_description = open(os.path.join(HERE, 'README.rst')).read()
except:
long_description = None
setup(
name='rubberjack-cli',
version=__version__,
packages=find_packages(exclude=['tes... | import os
from setuptools import setup, find_packages
__version__ = '0.1'
HERE = os.path.dirname(__file__)
try:
long_description = open(os.path.join(HERE, 'README.rst')).read()
except:
long_description = None
setup(
name='rubberjack-cli',
version=__version__,
packages=find_packages(exclude=['tes... | <commit_before>import os
from setuptools import setup, find_packages
__version__ = '0.1'
HERE = os.path.dirname(__file__)
try:
long_description = open(os.path.join(HERE, 'README.rst')).read()
except:
long_description = None
setup(
name='rubberjack-cli',
version=__version__,
packages=find_package... |
dcdaef9fb950a8082dcd46fc6a43c965b09f43b5 | places/views.py | places/views.py | from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import TemplateView, View
from django.views.generic.detail import DetailView
from django.views.generic.edit import UpdateView
from django.views.generic.list im... | from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import TemplateView, View
from django.views.generic.detail import DetailView
from django.views.generic.edit import UpdateView
from django.views.generic.list im... | Order restaurants by name in ListView | Order restaurants by name in ListView
| Python | mit | huangsam/chowist,huangsam/chowist,huangsam/chowist | from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import TemplateView, View
from django.views.generic.detail import DetailView
from django.views.generic.edit import UpdateView
from django.views.generic.list im... | from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import TemplateView, View
from django.views.generic.detail import DetailView
from django.views.generic.edit import UpdateView
from django.views.generic.list im... | <commit_before>from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import TemplateView, View
from django.views.generic.detail import DetailView
from django.views.generic.edit import UpdateView
from django.views.... | from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import TemplateView, View
from django.views.generic.detail import DetailView
from django.views.generic.edit import UpdateView
from django.views.generic.list im... | from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import TemplateView, View
from django.views.generic.detail import DetailView
from django.views.generic.edit import UpdateView
from django.views.generic.list im... | <commit_before>from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import TemplateView, View
from django.views.generic.detail import DetailView
from django.views.generic.edit import UpdateView
from django.views.... |
747dbd3f70838386fda4e8755f44fcbefd5409b3 | server/views.py | server/views.py | from rest_framework_mongoengine.viewsets import ModelViewSet
from server.documents import Vote, User
from server.serializers import VoteSerializer, UserSerializer
class VoteViewSet(ModelViewSet):
queryset = Vote.objects.all()
serializer_class = VoteSerializer
lookup_field = "stuff_id"
class UserViewSet(ModelVi... | from rest_framework_mongoengine.viewsets import ModelViewSet
from server.documents import Vote, User
from server.serializers import VoteSerializer, UserSerializer
class VoteViewSet(ModelViewSet):
queryset = Vote.objects.all()
serializer_class = VoteSerializer
lookup_field = "stuff_id"
class UserViewSet(ModelVi... | Add twitter_id as lookup for user | Add twitter_id as lookup for user
| Python | agpl-3.0 | asm-products/pipfix | from rest_framework_mongoengine.viewsets import ModelViewSet
from server.documents import Vote, User
from server.serializers import VoteSerializer, UserSerializer
class VoteViewSet(ModelViewSet):
queryset = Vote.objects.all()
serializer_class = VoteSerializer
lookup_field = "stuff_id"
class UserViewSet(ModelVi... | from rest_framework_mongoengine.viewsets import ModelViewSet
from server.documents import Vote, User
from server.serializers import VoteSerializer, UserSerializer
class VoteViewSet(ModelViewSet):
queryset = Vote.objects.all()
serializer_class = VoteSerializer
lookup_field = "stuff_id"
class UserViewSet(ModelVi... | <commit_before>from rest_framework_mongoengine.viewsets import ModelViewSet
from server.documents import Vote, User
from server.serializers import VoteSerializer, UserSerializer
class VoteViewSet(ModelViewSet):
queryset = Vote.objects.all()
serializer_class = VoteSerializer
lookup_field = "stuff_id"
class User... | from rest_framework_mongoengine.viewsets import ModelViewSet
from server.documents import Vote, User
from server.serializers import VoteSerializer, UserSerializer
class VoteViewSet(ModelViewSet):
queryset = Vote.objects.all()
serializer_class = VoteSerializer
lookup_field = "stuff_id"
class UserViewSet(ModelVi... | from rest_framework_mongoengine.viewsets import ModelViewSet
from server.documents import Vote, User
from server.serializers import VoteSerializer, UserSerializer
class VoteViewSet(ModelViewSet):
queryset = Vote.objects.all()
serializer_class = VoteSerializer
lookup_field = "stuff_id"
class UserViewSet(ModelVi... | <commit_before>from rest_framework_mongoengine.viewsets import ModelViewSet
from server.documents import Vote, User
from server.serializers import VoteSerializer, UserSerializer
class VoteViewSet(ModelViewSet):
queryset = Vote.objects.all()
serializer_class = VoteSerializer
lookup_field = "stuff_id"
class User... |
9139a8f02b71acc4b07742bf18388236cffa5c75 | settings/dev.py | settings/dev.py | # settings for development
from common import *
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
STATICFILES_FINDERS += (
'compressor.finders.CompressorFinder',
)
INSTALLED_APPS += (
'django.contrib.admin',
'debug_toolbar',
'compressor',... | # settings for development
from common import *
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
STATICFILES_FINDERS += (
'compressor.finders.CompressorFinder',
)
INSTALLED_APPS += (
'django.contrib.admin',
'debug_toolbar',
'compressor',... | Add 'apps.hello' as separation of default installed apps | Add 'apps.hello' as separation of default installed apps
| Python | bsd-3-clause | teracyhq/django-tutorial,datphan/teracy-tutorial | # settings for development
from common import *
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
STATICFILES_FINDERS += (
'compressor.finders.CompressorFinder',
)
INSTALLED_APPS += (
'django.contrib.admin',
'debug_toolbar',
'compressor',... | # settings for development
from common import *
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
STATICFILES_FINDERS += (
'compressor.finders.CompressorFinder',
)
INSTALLED_APPS += (
'django.contrib.admin',
'debug_toolbar',
'compressor',... | <commit_before># settings for development
from common import *
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
STATICFILES_FINDERS += (
'compressor.finders.CompressorFinder',
)
INSTALLED_APPS += (
'django.contrib.admin',
'debug_toolbar',
... | # settings for development
from common import *
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
STATICFILES_FINDERS += (
'compressor.finders.CompressorFinder',
)
INSTALLED_APPS += (
'django.contrib.admin',
'debug_toolbar',
'compressor',... | # settings for development
from common import *
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
STATICFILES_FINDERS += (
'compressor.finders.CompressorFinder',
)
INSTALLED_APPS += (
'django.contrib.admin',
'debug_toolbar',
'compressor',... | <commit_before># settings for development
from common import *
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
STATICFILES_FINDERS += (
'compressor.finders.CompressorFinder',
)
INSTALLED_APPS += (
'django.contrib.admin',
'debug_toolbar',
... |
df6f4af9d61ac66450a54c6134a587db0fd93e34 | python/simple_types.py | python/simple_types.py | assert(type(5) == int)
assert(type(True) == bool)
assert(type(5.7) == float)
assert(type(9 + 5j) == complex)
assert(type((8, 'dog', False)) == tuple)
assert(type('hello') == str)
assert(type(b'hello') == bytes)
assert(type([1, '', False]) == list)
assert(type(range(1,10)) == range)
assert(type(set([1, 2, 3])) == set)
a... | assert(type(5) == int)
assert(type(True) == bool)
assert(type(5.7) == float)
assert(type(9 + 5j) == complex)
assert(type((8, 'dog', False)) == tuple)
assert(type('hello') == str)
assert(type(b'hello') == bytes)
assert(type([1, '', False]) == list)
assert(type(range(1,10)) == range)
assert(type({1, 2, 3}) == set)
assert... | Use braces for Python sets | Use braces for Python sets
| Python | mit | rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,... | assert(type(5) == int)
assert(type(True) == bool)
assert(type(5.7) == float)
assert(type(9 + 5j) == complex)
assert(type((8, 'dog', False)) == tuple)
assert(type('hello') == str)
assert(type(b'hello') == bytes)
assert(type([1, '', False]) == list)
assert(type(range(1,10)) == range)
assert(type(set([1, 2, 3])) == set)
a... | assert(type(5) == int)
assert(type(True) == bool)
assert(type(5.7) == float)
assert(type(9 + 5j) == complex)
assert(type((8, 'dog', False)) == tuple)
assert(type('hello') == str)
assert(type(b'hello') == bytes)
assert(type([1, '', False]) == list)
assert(type(range(1,10)) == range)
assert(type({1, 2, 3}) == set)
assert... | <commit_before>assert(type(5) == int)
assert(type(True) == bool)
assert(type(5.7) == float)
assert(type(9 + 5j) == complex)
assert(type((8, 'dog', False)) == tuple)
assert(type('hello') == str)
assert(type(b'hello') == bytes)
assert(type([1, '', False]) == list)
assert(type(range(1,10)) == range)
assert(type(set([1, 2,... | assert(type(5) == int)
assert(type(True) == bool)
assert(type(5.7) == float)
assert(type(9 + 5j) == complex)
assert(type((8, 'dog', False)) == tuple)
assert(type('hello') == str)
assert(type(b'hello') == bytes)
assert(type([1, '', False]) == list)
assert(type(range(1,10)) == range)
assert(type({1, 2, 3}) == set)
assert... | assert(type(5) == int)
assert(type(True) == bool)
assert(type(5.7) == float)
assert(type(9 + 5j) == complex)
assert(type((8, 'dog', False)) == tuple)
assert(type('hello') == str)
assert(type(b'hello') == bytes)
assert(type([1, '', False]) == list)
assert(type(range(1,10)) == range)
assert(type(set([1, 2, 3])) == set)
a... | <commit_before>assert(type(5) == int)
assert(type(True) == bool)
assert(type(5.7) == float)
assert(type(9 + 5j) == complex)
assert(type((8, 'dog', False)) == tuple)
assert(type('hello') == str)
assert(type(b'hello') == bytes)
assert(type([1, '', False]) == list)
assert(type(range(1,10)) == range)
assert(type(set([1, 2,... |
08e84dcc0bce7a1914bc7fa734ca51c0dde362d1 | lab/monitors/nova_service_list.py | lab/monitors/nova_service_list.py | def start(lab, log, args):
import time
from fabric.context_managers import shell_env
grep_host = args.get('grep_host', 'overcloud-')
duration = args['duration']
period = args['period']
statuses = {'up': 1, 'down': 0}
server = lab.director()
start_time = time.time()
while start_tim... | def start(lab, log, args):
from fabric.context_managers import shell_env
grep_host = args.get('grep_host', 'overcloud-')
statuses = {'up': 1, 'down': 0}
server = lab.director()
with shell_env(OS_AUTH_URL=lab.cloud.end_point, OS_USERNAME=lab.cloud.user, OS_PASSWORD=lab.cloud.password, OS_TENANT_N... | Verify services status if FI is rebooted | Verify services status if FI is rebooted
Change-Id: Ia02ef16d53fbb7b55a8de884ff16a4bef345a1f2
| Python | apache-2.0 | CiscoSystems/os-sqe,CiscoSystems/os-sqe,CiscoSystems/os-sqe | def start(lab, log, args):
import time
from fabric.context_managers import shell_env
grep_host = args.get('grep_host', 'overcloud-')
duration = args['duration']
period = args['period']
statuses = {'up': 1, 'down': 0}
server = lab.director()
start_time = time.time()
while start_tim... | def start(lab, log, args):
from fabric.context_managers import shell_env
grep_host = args.get('grep_host', 'overcloud-')
statuses = {'up': 1, 'down': 0}
server = lab.director()
with shell_env(OS_AUTH_URL=lab.cloud.end_point, OS_USERNAME=lab.cloud.user, OS_PASSWORD=lab.cloud.password, OS_TENANT_N... | <commit_before>def start(lab, log, args):
import time
from fabric.context_managers import shell_env
grep_host = args.get('grep_host', 'overcloud-')
duration = args['duration']
period = args['period']
statuses = {'up': 1, 'down': 0}
server = lab.director()
start_time = time.time()
... | def start(lab, log, args):
from fabric.context_managers import shell_env
grep_host = args.get('grep_host', 'overcloud-')
statuses = {'up': 1, 'down': 0}
server = lab.director()
with shell_env(OS_AUTH_URL=lab.cloud.end_point, OS_USERNAME=lab.cloud.user, OS_PASSWORD=lab.cloud.password, OS_TENANT_N... | def start(lab, log, args):
import time
from fabric.context_managers import shell_env
grep_host = args.get('grep_host', 'overcloud-')
duration = args['duration']
period = args['period']
statuses = {'up': 1, 'down': 0}
server = lab.director()
start_time = time.time()
while start_tim... | <commit_before>def start(lab, log, args):
import time
from fabric.context_managers import shell_env
grep_host = args.get('grep_host', 'overcloud-')
duration = args['duration']
period = args['period']
statuses = {'up': 1, 'down': 0}
server = lab.director()
start_time = time.time()
... |
84953a5595598f08741d49da22b01aaca2459bc2 | server/bottle_drone.py | server/bottle_drone.py | """Set up a bottle server to accept post requests commanding the drone."""
from bottle import post, run, hook, response, get, abort
from venthur_api import libardrone
drone = libardrone.ARDrone()
@hook('after_request')
def enable_cors():
"""Allow control headers."""
response.headers['Access-Control-Allow-O... | """Set up a bottle server to accept post requests commanding the drone."""
from bottle import post, run, hook, response, get, abort
from venthur_api import libardrone
drone = libardrone.ARDrone()
@hook('after_request')
def enable_cors():
"""Allow control headers."""
response.headers['Access-Control-Allow-O... | Set up a imgdata route to fetch latest image. | Set up a imgdata route to fetch latest image.
| Python | mit | DroneQuest/drone-quest,DroneQuest/drone-quest | """Set up a bottle server to accept post requests commanding the drone."""
from bottle import post, run, hook, response, get, abort
from venthur_api import libardrone
drone = libardrone.ARDrone()
@hook('after_request')
def enable_cors():
"""Allow control headers."""
response.headers['Access-Control-Allow-O... | """Set up a bottle server to accept post requests commanding the drone."""
from bottle import post, run, hook, response, get, abort
from venthur_api import libardrone
drone = libardrone.ARDrone()
@hook('after_request')
def enable_cors():
"""Allow control headers."""
response.headers['Access-Control-Allow-O... | <commit_before>"""Set up a bottle server to accept post requests commanding the drone."""
from bottle import post, run, hook, response, get, abort
from venthur_api import libardrone
drone = libardrone.ARDrone()
@hook('after_request')
def enable_cors():
"""Allow control headers."""
response.headers['Access-... | """Set up a bottle server to accept post requests commanding the drone."""
from bottle import post, run, hook, response, get, abort
from venthur_api import libardrone
drone = libardrone.ARDrone()
@hook('after_request')
def enable_cors():
"""Allow control headers."""
response.headers['Access-Control-Allow-O... | """Set up a bottle server to accept post requests commanding the drone."""
from bottle import post, run, hook, response, get, abort
from venthur_api import libardrone
drone = libardrone.ARDrone()
@hook('after_request')
def enable_cors():
"""Allow control headers."""
response.headers['Access-Control-Allow-O... | <commit_before>"""Set up a bottle server to accept post requests commanding the drone."""
from bottle import post, run, hook, response, get, abort
from venthur_api import libardrone
drone = libardrone.ARDrone()
@hook('after_request')
def enable_cors():
"""Allow control headers."""
response.headers['Access-... |
0449b604691b78d41ba588c43fe6f9646ebfc2e4 | OIPA/api/permissions/serializers.py | OIPA/api/permissions/serializers.py | from rest_framework import serializers
from django.contrib.auth.models import Group
from iati.permissions.models import OrganisationUser, OrganisationAdminGroup, OrganisationGroup
from api.publisher.serializers import PublisherSerializer
class OrganisationUserSerializer(serializers.ModelSerializer):
admin_groups ... | from rest_framework import serializers
from django.contrib.auth.models import Group
from iati.permissions.models import OrganisationUser, OrganisationAdminGroup, OrganisationGroup
from api.publisher.serializers import PublisherSerializer
class OrganisationUserSerializer(serializers.ModelSerializer):
admin_groups ... | Add an is_validated key t OrganisationUserSerializer. | Add an is_validated key t OrganisationUserSerializer.
| Python | agpl-3.0 | zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,openaid-IATI/OIPA,openaid-IATI/OIPA,zimmerman-zimmerman/OIPA,openaid-IATI/OIPA,openaid-IATI/OIPA,zimmerman-zimmerman/OIPA,openaid-IATI/OIPA | from rest_framework import serializers
from django.contrib.auth.models import Group
from iati.permissions.models import OrganisationUser, OrganisationAdminGroup, OrganisationGroup
from api.publisher.serializers import PublisherSerializer
class OrganisationUserSerializer(serializers.ModelSerializer):
admin_groups ... | from rest_framework import serializers
from django.contrib.auth.models import Group
from iati.permissions.models import OrganisationUser, OrganisationAdminGroup, OrganisationGroup
from api.publisher.serializers import PublisherSerializer
class OrganisationUserSerializer(serializers.ModelSerializer):
admin_groups ... | <commit_before>from rest_framework import serializers
from django.contrib.auth.models import Group
from iati.permissions.models import OrganisationUser, OrganisationAdminGroup, OrganisationGroup
from api.publisher.serializers import PublisherSerializer
class OrganisationUserSerializer(serializers.ModelSerializer):
... | from rest_framework import serializers
from django.contrib.auth.models import Group
from iati.permissions.models import OrganisationUser, OrganisationAdminGroup, OrganisationGroup
from api.publisher.serializers import PublisherSerializer
class OrganisationUserSerializer(serializers.ModelSerializer):
admin_groups ... | from rest_framework import serializers
from django.contrib.auth.models import Group
from iati.permissions.models import OrganisationUser, OrganisationAdminGroup, OrganisationGroup
from api.publisher.serializers import PublisherSerializer
class OrganisationUserSerializer(serializers.ModelSerializer):
admin_groups ... | <commit_before>from rest_framework import serializers
from django.contrib.auth.models import Group
from iati.permissions.models import OrganisationUser, OrganisationAdminGroup, OrganisationGroup
from api.publisher.serializers import PublisherSerializer
class OrganisationUserSerializer(serializers.ModelSerializer):
... |
914e9dd1e9dd9fb3a0847d7b57095a4d571d17cd | keras_cv/__init__.py | keras_cv/__init__.py | # Copyright 2022 The KerasCV Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | # Copyright 2022 The KerasCV Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | Update back to dev tag | Update back to dev tag
| Python | apache-2.0 | keras-team/keras-cv,keras-team/keras-cv,keras-team/keras-cv | # Copyright 2022 The KerasCV Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | # Copyright 2022 The KerasCV Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | <commit_before># Copyright 2022 The KerasCV Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | # Copyright 2022 The KerasCV Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | # Copyright 2022 The KerasCV Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | <commit_before># Copyright 2022 The KerasCV Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
a6e6c32fc8455303c44cebdfa7507300d298aa24 | mediacrush/mcmanage/files.py | mediacrush/mcmanage/files.py | from ..objects import File, Album, Feedback, RedisObject, FailedFile
from ..files import delete_file
def files_delete(arguments):
hash = arguments['<hash>']
f = File.from_hash(hash)
if not f:
print("%r is not a valid file." % arguments["<hash>"])
return
delete_file(f)
print("Done, ... | from ..objects import File, Album, Feedback, RedisObject, FailedFile
from ..files import delete_file
def files_delete(arguments):
hash = arguments['<hash>']
if hash.startswith("./"):
hash = hash[2:]
f = File.from_hash(hash)
if not f:
print("%r is not a valid file." % hash)
retu... | Add support for ./hash to mcmanage | Add support for ./hash to mcmanage
| Python | mit | roderickm/MediaCrush,roderickm/MediaCrush,nerdzeu/NERDZCrush,roderickm/MediaCrush,MediaCrush/MediaCrush,nerdzeu/NERDZCrush,MediaCrush/MediaCrush,nerdzeu/NERDZCrush | from ..objects import File, Album, Feedback, RedisObject, FailedFile
from ..files import delete_file
def files_delete(arguments):
hash = arguments['<hash>']
f = File.from_hash(hash)
if not f:
print("%r is not a valid file." % arguments["<hash>"])
return
delete_file(f)
print("Done, ... | from ..objects import File, Album, Feedback, RedisObject, FailedFile
from ..files import delete_file
def files_delete(arguments):
hash = arguments['<hash>']
if hash.startswith("./"):
hash = hash[2:]
f = File.from_hash(hash)
if not f:
print("%r is not a valid file." % hash)
retu... | <commit_before>from ..objects import File, Album, Feedback, RedisObject, FailedFile
from ..files import delete_file
def files_delete(arguments):
hash = arguments['<hash>']
f = File.from_hash(hash)
if not f:
print("%r is not a valid file." % arguments["<hash>"])
return
delete_file(f)
... | from ..objects import File, Album, Feedback, RedisObject, FailedFile
from ..files import delete_file
def files_delete(arguments):
hash = arguments['<hash>']
if hash.startswith("./"):
hash = hash[2:]
f = File.from_hash(hash)
if not f:
print("%r is not a valid file." % hash)
retu... | from ..objects import File, Album, Feedback, RedisObject, FailedFile
from ..files import delete_file
def files_delete(arguments):
hash = arguments['<hash>']
f = File.from_hash(hash)
if not f:
print("%r is not a valid file." % arguments["<hash>"])
return
delete_file(f)
print("Done, ... | <commit_before>from ..objects import File, Album, Feedback, RedisObject, FailedFile
from ..files import delete_file
def files_delete(arguments):
hash = arguments['<hash>']
f = File.from_hash(hash)
if not f:
print("%r is not a valid file." % arguments["<hash>"])
return
delete_file(f)
... |
34fbab0a31956af0572c31612f359608a8819360 | models/phase3_eval/assemble_cx.py | models/phase3_eval/assemble_cx.py | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from os.path import join as pjoin
from indra.assemblers import CxAssembler
import indra.tools.assemble_corpus as ac
def assemble_cx(stmts, out_file):
"""Return a CX assembler."""
stmts = ac.filter_belief(stm... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from os.path import join as pjoin
from indra.assemblers import CxAssembler
import indra.tools.assemble_corpus as ac
def assemble_cx(stmts, out_file):
"""Return a CX assembler."""
stmts = ac.filter_belief(stm... | Remove strip context for CX assembly | Remove strip context for CX assembly
| Python | bsd-2-clause | pvtodorov/indra,bgyori/indra,pvtodorov/indra,johnbachman/belpy,pvtodorov/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/indra,sorgerlab/indra,pvtodorov/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/belpy | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from os.path import join as pjoin
from indra.assemblers import CxAssembler
import indra.tools.assemble_corpus as ac
def assemble_cx(stmts, out_file):
"""Return a CX assembler."""
stmts = ac.filter_belief(stm... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from os.path import join as pjoin
from indra.assemblers import CxAssembler
import indra.tools.assemble_corpus as ac
def assemble_cx(stmts, out_file):
"""Return a CX assembler."""
stmts = ac.filter_belief(stm... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from os.path import join as pjoin
from indra.assemblers import CxAssembler
import indra.tools.assemble_corpus as ac
def assemble_cx(stmts, out_file):
"""Return a CX assembler."""
stmts = ac.fi... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from os.path import join as pjoin
from indra.assemblers import CxAssembler
import indra.tools.assemble_corpus as ac
def assemble_cx(stmts, out_file):
"""Return a CX assembler."""
stmts = ac.filter_belief(stm... | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from os.path import join as pjoin
from indra.assemblers import CxAssembler
import indra.tools.assemble_corpus as ac
def assemble_cx(stmts, out_file):
"""Return a CX assembler."""
stmts = ac.filter_belief(stm... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from os.path import join as pjoin
from indra.assemblers import CxAssembler
import indra.tools.assemble_corpus as ac
def assemble_cx(stmts, out_file):
"""Return a CX assembler."""
stmts = ac.fi... |
19f09bb432a9e2232f0c23743d75315bb2ad2295 | cfgov/sheerlike/external_links.py | cfgov/sheerlike/external_links.py | import warnings
from bs4 import BeautifulSoup
from v1 import parse_links
def process_external_links(doc):
warnings.filterwarnings('ignore')
for key, value in doc.iteritems():
doc[key] = _process_data(value)
warnings.resetwarnings()
return doc
def _process_data(field):
if isinstance(field... | import warnings
from bs4 import BeautifulSoup
from v1 import parse_links
def process_external_links(doc):
warnings.filterwarnings('ignore')
for key, value in doc.iteritems():
doc[key] = _process_data(value)
warnings.resetwarnings()
return doc
def _process_data(field):
if isinstance(field... | Remove output formatting to get back what was put in | Remove output formatting to get back what was put in
| Python | cc0-1.0 | kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh | import warnings
from bs4 import BeautifulSoup
from v1 import parse_links
def process_external_links(doc):
warnings.filterwarnings('ignore')
for key, value in doc.iteritems():
doc[key] = _process_data(value)
warnings.resetwarnings()
return doc
def _process_data(field):
if isinstance(field... | import warnings
from bs4 import BeautifulSoup
from v1 import parse_links
def process_external_links(doc):
warnings.filterwarnings('ignore')
for key, value in doc.iteritems():
doc[key] = _process_data(value)
warnings.resetwarnings()
return doc
def _process_data(field):
if isinstance(field... | <commit_before>import warnings
from bs4 import BeautifulSoup
from v1 import parse_links
def process_external_links(doc):
warnings.filterwarnings('ignore')
for key, value in doc.iteritems():
doc[key] = _process_data(value)
warnings.resetwarnings()
return doc
def _process_data(field):
if i... | import warnings
from bs4 import BeautifulSoup
from v1 import parse_links
def process_external_links(doc):
warnings.filterwarnings('ignore')
for key, value in doc.iteritems():
doc[key] = _process_data(value)
warnings.resetwarnings()
return doc
def _process_data(field):
if isinstance(field... | import warnings
from bs4 import BeautifulSoup
from v1 import parse_links
def process_external_links(doc):
warnings.filterwarnings('ignore')
for key, value in doc.iteritems():
doc[key] = _process_data(value)
warnings.resetwarnings()
return doc
def _process_data(field):
if isinstance(field... | <commit_before>import warnings
from bs4 import BeautifulSoup
from v1 import parse_links
def process_external_links(doc):
warnings.filterwarnings('ignore')
for key, value in doc.iteritems():
doc[key] = _process_data(value)
warnings.resetwarnings()
return doc
def _process_data(field):
if i... |
f4286480f0fa157eb1b88b144ee57ffef7d1fc03 | barython/tests/hooks/test_bspwm.py | barython/tests/hooks/test_bspwm.py |
from collections import OrderedDict
import pytest
from barython.hooks.bspwm import BspwmHook
def test_bspwm_hook_parse_event():
bh = BspwmHook()
status = ("WmHDMI-0:Ou:LT:MDVI-D-0:fo:f7:fDesktop2:os:Of:fp:oq:fi:LT:"
"mDVI-I-0:Od:LT")
expected = OrderedDict([
('HDMI-0', {'desktops':... |
from collections import OrderedDict
import pytest
from barython.hooks.bspwm import BspwmHook
def test_bspwm_hook_parse_event():
bh = BspwmHook()
status = ("WmHDMI-0:Ou:LT:MDVI-D-0:fo:f7:fDesktop2:os:Of:fp:oq:fi:LT:"
"mDVI-I-0:Od:LT")
expected = OrderedDict([
('HDMI-0', {'desktops':... | Add test for bspwm widget | Add test for bspwm widget
| Python | bsd-3-clause | Anthony25/barython |
from collections import OrderedDict
import pytest
from barython.hooks.bspwm import BspwmHook
def test_bspwm_hook_parse_event():
bh = BspwmHook()
status = ("WmHDMI-0:Ou:LT:MDVI-D-0:fo:f7:fDesktop2:os:Of:fp:oq:fi:LT:"
"mDVI-I-0:Od:LT")
expected = OrderedDict([
('HDMI-0', {'desktops':... |
from collections import OrderedDict
import pytest
from barython.hooks.bspwm import BspwmHook
def test_bspwm_hook_parse_event():
bh = BspwmHook()
status = ("WmHDMI-0:Ou:LT:MDVI-D-0:fo:f7:fDesktop2:os:Of:fp:oq:fi:LT:"
"mDVI-I-0:Od:LT")
expected = OrderedDict([
('HDMI-0', {'desktops':... | <commit_before>
from collections import OrderedDict
import pytest
from barython.hooks.bspwm import BspwmHook
def test_bspwm_hook_parse_event():
bh = BspwmHook()
status = ("WmHDMI-0:Ou:LT:MDVI-D-0:fo:f7:fDesktop2:os:Of:fp:oq:fi:LT:"
"mDVI-I-0:Od:LT")
expected = OrderedDict([
('HDMI-0... |
from collections import OrderedDict
import pytest
from barython.hooks.bspwm import BspwmHook
def test_bspwm_hook_parse_event():
bh = BspwmHook()
status = ("WmHDMI-0:Ou:LT:MDVI-D-0:fo:f7:fDesktop2:os:Of:fp:oq:fi:LT:"
"mDVI-I-0:Od:LT")
expected = OrderedDict([
('HDMI-0', {'desktops':... |
from collections import OrderedDict
import pytest
from barython.hooks.bspwm import BspwmHook
def test_bspwm_hook_parse_event():
bh = BspwmHook()
status = ("WmHDMI-0:Ou:LT:MDVI-D-0:fo:f7:fDesktop2:os:Of:fp:oq:fi:LT:"
"mDVI-I-0:Od:LT")
expected = OrderedDict([
('HDMI-0', {'desktops':... | <commit_before>
from collections import OrderedDict
import pytest
from barython.hooks.bspwm import BspwmHook
def test_bspwm_hook_parse_event():
bh = BspwmHook()
status = ("WmHDMI-0:Ou:LT:MDVI-D-0:fo:f7:fDesktop2:os:Of:fp:oq:fi:LT:"
"mDVI-I-0:Od:LT")
expected = OrderedDict([
('HDMI-0... |
ae583132ade7370595d6d9d14dba2b720c5415d6 | cinemair/favorites/serializers.py | cinemair/favorites/serializers.py | from rest_framework import serializers as drf_serializers
from cinemair.common.api import serializers
from cinemair.shows.serializers import ShowRelatedSerializer
from . import models
class FavoriteSerializer(serializers.ModelSerializer):
show_info = drf_serializers.SerializerMethodField()
class Meta:
... | from rest_framework import serializers as drf_serializers
from cinemair.common.api import serializers
from cinemair.shows.serializers import ShowRelatedSerializer
from . import models
class FavoriteSerializer(serializers.ModelSerializer):
show_info = drf_serializers.SerializerMethodField()
class Meta:
... | Validate user when favorite a show | Validate user when favorite a show
| Python | mit | Cinemair/cinemair-server,Cinemair/cinemair-server | from rest_framework import serializers as drf_serializers
from cinemair.common.api import serializers
from cinemair.shows.serializers import ShowRelatedSerializer
from . import models
class FavoriteSerializer(serializers.ModelSerializer):
show_info = drf_serializers.SerializerMethodField()
class Meta:
... | from rest_framework import serializers as drf_serializers
from cinemair.common.api import serializers
from cinemair.shows.serializers import ShowRelatedSerializer
from . import models
class FavoriteSerializer(serializers.ModelSerializer):
show_info = drf_serializers.SerializerMethodField()
class Meta:
... | <commit_before>from rest_framework import serializers as drf_serializers
from cinemair.common.api import serializers
from cinemair.shows.serializers import ShowRelatedSerializer
from . import models
class FavoriteSerializer(serializers.ModelSerializer):
show_info = drf_serializers.SerializerMethodField()
... | from rest_framework import serializers as drf_serializers
from cinemair.common.api import serializers
from cinemair.shows.serializers import ShowRelatedSerializer
from . import models
class FavoriteSerializer(serializers.ModelSerializer):
show_info = drf_serializers.SerializerMethodField()
class Meta:
... | from rest_framework import serializers as drf_serializers
from cinemair.common.api import serializers
from cinemair.shows.serializers import ShowRelatedSerializer
from . import models
class FavoriteSerializer(serializers.ModelSerializer):
show_info = drf_serializers.SerializerMethodField()
class Meta:
... | <commit_before>from rest_framework import serializers as drf_serializers
from cinemair.common.api import serializers
from cinemair.shows.serializers import ShowRelatedSerializer
from . import models
class FavoriteSerializer(serializers.ModelSerializer):
show_info = drf_serializers.SerializerMethodField()
... |
82bb28f32c343e419e595aa2ca5ffb6fe6aa30ed | modules/pipeunion.py | modules/pipeunion.py | # pipeunion.py
#
from pipe2py import util
def pipe_union(context, _INPUT, **kwargs):
"""This operator merges up to 5 source together.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- _OTHER1 - another source generator
_OTHER2 etc.
Yields (... | # pipeunion.py
#
from pipe2py import util
def pipe_union(context, _INPUT, **kwargs):
"""This operator merges up to 5 source together.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- _OTHER1 - another source generator
_OTHER2 etc.
Yields (_OUT... | Fix whitespace errors and line lengths | Fix whitespace errors and line lengths
| Python | mit | nerevu/riko,nerevu/riko | # pipeunion.py
#
from pipe2py import util
def pipe_union(context, _INPUT, **kwargs):
"""This operator merges up to 5 source together.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- _OTHER1 - another source generator
_OTHER2 etc.
Yields (... | # pipeunion.py
#
from pipe2py import util
def pipe_union(context, _INPUT, **kwargs):
"""This operator merges up to 5 source together.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- _OTHER1 - another source generator
_OTHER2 etc.
Yields (_OUT... | <commit_before># pipeunion.py
#
from pipe2py import util
def pipe_union(context, _INPUT, **kwargs):
"""This operator merges up to 5 source together.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- _OTHER1 - another source generator
_OTHER2 etc.
... | # pipeunion.py
#
from pipe2py import util
def pipe_union(context, _INPUT, **kwargs):
"""This operator merges up to 5 source together.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- _OTHER1 - another source generator
_OTHER2 etc.
Yields (_OUT... | # pipeunion.py
#
from pipe2py import util
def pipe_union(context, _INPUT, **kwargs):
"""This operator merges up to 5 source together.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- _OTHER1 - another source generator
_OTHER2 etc.
Yields (... | <commit_before># pipeunion.py
#
from pipe2py import util
def pipe_union(context, _INPUT, **kwargs):
"""This operator merges up to 5 source together.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- _OTHER1 - another source generator
_OTHER2 etc.
... |
48750d7fef9a6045251f72f1064b1cc825dfdb5f | mysite/testrunner.py | mysite/testrunner.py | from django.conf import settings
import xmlrunner.extra.djangotestrunner
from django.test.simple import run_tests
import os
def run(*args, **kwargs):
settings.CELERY_ALWAYS_EAGER = True
if os.environ.get('USER', 'unknown') == 'hudson':
# Hudson should run with xmlrunner because he consumes JUnit-style ... | from django.conf import settings
import xmlrunner.extra.djangotestrunner
from django.test.simple import run_tests
import tempfile
import os
import datetime
def override_settings_for_testing():
settings.CELERY_ALWAYS_EAGER = True
settings.SVN_REPO_PATH = tempfile.mkdtemp(
prefix='svn_repo_path_' +
... | Add a function called override_settings_for_testing | Add a function called override_settings_for_testing
In it, set SVN_REPO_PATH to a tempfile.mkdtemp() path.
| Python | agpl-3.0 | willingc/oh-mainline,campbe13/openhatch,eeshangarg/oh-mainline,openhatch/oh-mainline,nirmeshk/oh-mainline,campbe13/openhatch,nirmeshk/oh-mainline,Changaco/oh-mainline,onceuponatimeforever/oh-mainline,ojengwa/oh-mainline,vipul-sharma20/oh-mainline,sudheesh001/oh-mainline,SnappleCap/oh-mainline,campbe13/openhatch,sudhees... | from django.conf import settings
import xmlrunner.extra.djangotestrunner
from django.test.simple import run_tests
import os
def run(*args, **kwargs):
settings.CELERY_ALWAYS_EAGER = True
if os.environ.get('USER', 'unknown') == 'hudson':
# Hudson should run with xmlrunner because he consumes JUnit-style ... | from django.conf import settings
import xmlrunner.extra.djangotestrunner
from django.test.simple import run_tests
import tempfile
import os
import datetime
def override_settings_for_testing():
settings.CELERY_ALWAYS_EAGER = True
settings.SVN_REPO_PATH = tempfile.mkdtemp(
prefix='svn_repo_path_' +
... | <commit_before>from django.conf import settings
import xmlrunner.extra.djangotestrunner
from django.test.simple import run_tests
import os
def run(*args, **kwargs):
settings.CELERY_ALWAYS_EAGER = True
if os.environ.get('USER', 'unknown') == 'hudson':
# Hudson should run with xmlrunner because he consum... | from django.conf import settings
import xmlrunner.extra.djangotestrunner
from django.test.simple import run_tests
import tempfile
import os
import datetime
def override_settings_for_testing():
settings.CELERY_ALWAYS_EAGER = True
settings.SVN_REPO_PATH = tempfile.mkdtemp(
prefix='svn_repo_path_' +
... | from django.conf import settings
import xmlrunner.extra.djangotestrunner
from django.test.simple import run_tests
import os
def run(*args, **kwargs):
settings.CELERY_ALWAYS_EAGER = True
if os.environ.get('USER', 'unknown') == 'hudson':
# Hudson should run with xmlrunner because he consumes JUnit-style ... | <commit_before>from django.conf import settings
import xmlrunner.extra.djangotestrunner
from django.test.simple import run_tests
import os
def run(*args, **kwargs):
settings.CELERY_ALWAYS_EAGER = True
if os.environ.get('USER', 'unknown') == 'hudson':
# Hudson should run with xmlrunner because he consum... |
d4d73fe7d5e83c65d9abbf59ea14ed60eb23a83f | poem_reader.py | poem_reader.py | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Reader for the newspaper XML files
"""
import argparse
from lxml import etree
argparser = argparse.ArgumentParser(description="Newspaper XML parser", fromfile_prefix_chars='@')
argparser.add_argument("dataroot", help="Path to DHH 17 newspapers directory")
args = a... | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Reader for the newspaper XML files
"""
import argparse
import glob
from lxml import etree
argparser = argparse.ArgumentParser(description="Newspaper XML parser", fromfile_prefix_chars='@')
argparser.add_argument("dataroot", help="Path to DHH 17 newspapers directory"... | Read XML files from a directory and find textblock by id | Read XML files from a directory and find textblock by id
| Python | mit | dhh17/categories_norms_genres,dhh17/categories_norms_genres,dhh17/categories_norms_genres | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Reader for the newspaper XML files
"""
import argparse
from lxml import etree
argparser = argparse.ArgumentParser(description="Newspaper XML parser", fromfile_prefix_chars='@')
argparser.add_argument("dataroot", help="Path to DHH 17 newspapers directory")
args = a... | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Reader for the newspaper XML files
"""
import argparse
import glob
from lxml import etree
argparser = argparse.ArgumentParser(description="Newspaper XML parser", fromfile_prefix_chars='@')
argparser.add_argument("dataroot", help="Path to DHH 17 newspapers directory"... | <commit_before>#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Reader for the newspaper XML files
"""
import argparse
from lxml import etree
argparser = argparse.ArgumentParser(description="Newspaper XML parser", fromfile_prefix_chars='@')
argparser.add_argument("dataroot", help="Path to DHH 17 newspapers direct... | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Reader for the newspaper XML files
"""
import argparse
import glob
from lxml import etree
argparser = argparse.ArgumentParser(description="Newspaper XML parser", fromfile_prefix_chars='@')
argparser.add_argument("dataroot", help="Path to DHH 17 newspapers directory"... | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Reader for the newspaper XML files
"""
import argparse
from lxml import etree
argparser = argparse.ArgumentParser(description="Newspaper XML parser", fromfile_prefix_chars='@')
argparser.add_argument("dataroot", help="Path to DHH 17 newspapers directory")
args = a... | <commit_before>#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Reader for the newspaper XML files
"""
import argparse
from lxml import etree
argparser = argparse.ArgumentParser(description="Newspaper XML parser", fromfile_prefix_chars='@')
argparser.add_argument("dataroot", help="Path to DHH 17 newspapers direct... |
51bbc760d0be6f21b1526752f1b4ab5a76c82917 | diff_array/diff_array.py | diff_array/diff_array.py | def array_diff(a, b):
return a if not b else [x for x in a if x != b[0]]
| def array_diff(a, b):
return [x for x in a if x not in set(b)]
| Change code because failed the random test | Change code because failed the random test
| Python | mit | lowks/codewars-katas-python | def array_diff(a, b):
return a if not b else [x for x in a if x != b[0]]
Change code because failed the random test | def array_diff(a, b):
return [x for x in a if x not in set(b)]
| <commit_before>def array_diff(a, b):
return a if not b else [x for x in a if x != b[0]]
<commit_msg>Change code because failed the random test<commit_after> | def array_diff(a, b):
return [x for x in a if x not in set(b)]
| def array_diff(a, b):
return a if not b else [x for x in a if x != b[0]]
Change code because failed the random testdef array_diff(a, b):
return [x for x in a if x not in set(b)]
| <commit_before>def array_diff(a, b):
return a if not b else [x for x in a if x != b[0]]
<commit_msg>Change code because failed the random test<commit_after>def array_diff(a, b):
return [x for x in a if x not in set(b)]
|
65c712464813ba41b564aa3e0116e60805f6681e | storyboard/api/v1/system_info.py | storyboard/api/v1/system_info.py | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Add example commands for the Systeminfo api | Add example commands for the Systeminfo api
Currently the api documentation does not include example commands.
It would be very friendly for our users to have some example commands
to follow and use the api.
This patch adds examples to the Systeminfo section of the api documentation.
Change-Id: Ic3d56d207db696100754... | Python | apache-2.0 | ColdrickSotK/storyboard,ColdrickSotK/storyboard,ColdrickSotK/storyboard | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before># Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | <commit_before># Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
81cc39ca4c9348732a18d2f1ee7edcdbc4c61479 | tests/tags/test_div.py | tests/tags/test_div.py | # -*- coding: utf-8 -*-
from riot.layout import render_layout, patch_layout
def test_render_div():
assert render_layout([
'div', {}, []
]) == [
'div',
{
'div_char': u' ',
'top': 0,
'bottom': 0,
}
]
def test_render_div_with_div_char():
... | # -*- coding: utf-8 -*-
from riot.layout import render_layout, patch_layout
def test_render_div():
assert render_layout([
'div', {}, []
]) == [
'div',
{
'div_char': u' ',
'top': 0,
'bottom': 0,
}
]
def test_render_div_with_opts():
as... | Allow render opts to div. | Allow render opts to div.
| Python | mit | soasme/riotpy | # -*- coding: utf-8 -*-
from riot.layout import render_layout, patch_layout
def test_render_div():
assert render_layout([
'div', {}, []
]) == [
'div',
{
'div_char': u' ',
'top': 0,
'bottom': 0,
}
]
def test_render_div_with_div_char():
... | # -*- coding: utf-8 -*-
from riot.layout import render_layout, patch_layout
def test_render_div():
assert render_layout([
'div', {}, []
]) == [
'div',
{
'div_char': u' ',
'top': 0,
'bottom': 0,
}
]
def test_render_div_with_opts():
as... | <commit_before># -*- coding: utf-8 -*-
from riot.layout import render_layout, patch_layout
def test_render_div():
assert render_layout([
'div', {}, []
]) == [
'div',
{
'div_char': u' ',
'top': 0,
'bottom': 0,
}
]
def test_render_div_with... | # -*- coding: utf-8 -*-
from riot.layout import render_layout, patch_layout
def test_render_div():
assert render_layout([
'div', {}, []
]) == [
'div',
{
'div_char': u' ',
'top': 0,
'bottom': 0,
}
]
def test_render_div_with_opts():
as... | # -*- coding: utf-8 -*-
from riot.layout import render_layout, patch_layout
def test_render_div():
assert render_layout([
'div', {}, []
]) == [
'div',
{
'div_char': u' ',
'top': 0,
'bottom': 0,
}
]
def test_render_div_with_div_char():
... | <commit_before># -*- coding: utf-8 -*-
from riot.layout import render_layout, patch_layout
def test_render_div():
assert render_layout([
'div', {}, []
]) == [
'div',
{
'div_char': u' ',
'top': 0,
'bottom': 0,
}
]
def test_render_div_with... |
c3d094074a6c4224efb39489110fe99b491d1108 | utils/swift_build_support/swift_build_support/compiler_stage.py | utils/swift_build_support/swift_build_support/compiler_stage.py | # ===--- compiler_stage.py -----------------------------------------------===#
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:#swift.org/LICENSE.txt... | # ===--- compiler_stage.py -----------------------------------------------===#
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:#swift.org/LICENSE.txt... | Make sure that StageArgs are never passed a StageArgs as their args. | [build-script] Make sure that StageArgs are never passed a StageArgs as their args.
No good reason to do this and simplifies the state space.
| Python | apache-2.0 | hooman/swift,ahoppen/swift,gregomni/swift,benlangmuir/swift,gregomni/swift,glessard/swift,ahoppen/swift,glessard/swift,hooman/swift,roambotics/swift,apple/swift,rudkx/swift,hooman/swift,ahoppen/swift,xwu/swift,xwu/swift,xwu/swift,JGiola/swift,rudkx/swift,apple/swift,hooman/swift,roambotics/swift,atrick/swift,benlangmui... | # ===--- compiler_stage.py -----------------------------------------------===#
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:#swift.org/LICENSE.txt... | # ===--- compiler_stage.py -----------------------------------------------===#
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:#swift.org/LICENSE.txt... | <commit_before># ===--- compiler_stage.py -----------------------------------------------===#
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:#swift.... | # ===--- compiler_stage.py -----------------------------------------------===#
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:#swift.org/LICENSE.txt... | # ===--- compiler_stage.py -----------------------------------------------===#
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:#swift.org/LICENSE.txt... | <commit_before># ===--- compiler_stage.py -----------------------------------------------===#
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https:#swift.... |
f86ca97dc1ba22b5fab0c7a4605ab2a51367b365 | openassessment/assessment/migrations/0002_staffworkflow.py | openassessment/assessment/migrations/0002_staffworkflow.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('assessment', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='StaffW... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('assessment', '0004_edited_content_migration'),
]
operations = [
migrations.CreateModel(
... | Update migration history to include trackchanges migrations | Update migration history to include trackchanges migrations
| Python | agpl-3.0 | Stanford-Online/edx-ora2,Stanford-Online/edx-ora2,Stanford-Online/edx-ora2,Stanford-Online/edx-ora2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('assessment', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='StaffW... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('assessment', '0004_edited_content_migration'),
]
operations = [
migrations.CreateModel(
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('assessment', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('assessment', '0004_edited_content_migration'),
]
operations = [
migrations.CreateModel(
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('assessment', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='StaffW... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('assessment', '0001_initial'),
]
operations = [
migrations.CreateModel(
... |
77e9d92e040b60cc5e894a59ecfde0a91a8f1f8c | coop_cms/apps/email_auth/forms.py | coop_cms/apps/email_auth/forms.py | # -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=_(u"Email"))
password = forms.CharField(label=_("Password"), widget=forms.PasswordInpu... | # -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _, ugettext_lazy as __
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=__(u"Email"))
password = forms.CharField(label=__("Password"), wi... | Fix translation issue on EmailAuthForm | Fix translation issue on EmailAuthForm
| Python | bsd-3-clause | ljean/coop_cms,ljean/coop_cms,ljean/coop_cms | # -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=_(u"Email"))
password = forms.CharField(label=_("Password"), widget=forms.PasswordInpu... | # -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _, ugettext_lazy as __
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=__(u"Email"))
password = forms.CharField(label=__("Password"), wi... | <commit_before># -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=_(u"Email"))
password = forms.CharField(label=_("Password"), widget=for... | # -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _, ugettext_lazy as __
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=__(u"Email"))
password = forms.CharField(label=__("Password"), wi... | # -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=_(u"Email"))
password = forms.CharField(label=_("Password"), widget=forms.PasswordInpu... | <commit_before># -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=_(u"Email"))
password = forms.CharField(label=_("Password"), widget=for... |
82db68b8474ccd38ddd9edf564a522add0658e0b | corehq/apps/export/esaccessors.py | corehq/apps/export/esaccessors.py | from corehq.apps.es import CaseES, GroupES
from corehq.apps.es import FormES
def get_form_export_base_query(domain, app_id, xmlns, include_errors):
query = (FormES()
.domain(domain)
.app(app_id)
.xmlns(xmlns)
.sort("received_on"))
if include_errors:
quer... | from corehq.apps.es import CaseES, GroupES
from corehq.apps.es import FormES
def get_form_export_base_query(domain, app_id, xmlns, include_errors):
query = (FormES()
.domain(domain)
.app(app_id)
.xmlns(xmlns)
.sort("received_on")
.remove_default_filter('... | Remove default filter that breaks unknown users export filter | Remove default filter that breaks unknown users export filter
| Python | bsd-3-clause | qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq | from corehq.apps.es import CaseES, GroupES
from corehq.apps.es import FormES
def get_form_export_base_query(domain, app_id, xmlns, include_errors):
query = (FormES()
.domain(domain)
.app(app_id)
.xmlns(xmlns)
.sort("received_on"))
if include_errors:
quer... | from corehq.apps.es import CaseES, GroupES
from corehq.apps.es import FormES
def get_form_export_base_query(domain, app_id, xmlns, include_errors):
query = (FormES()
.domain(domain)
.app(app_id)
.xmlns(xmlns)
.sort("received_on")
.remove_default_filter('... | <commit_before>from corehq.apps.es import CaseES, GroupES
from corehq.apps.es import FormES
def get_form_export_base_query(domain, app_id, xmlns, include_errors):
query = (FormES()
.domain(domain)
.app(app_id)
.xmlns(xmlns)
.sort("received_on"))
if include_error... | from corehq.apps.es import CaseES, GroupES
from corehq.apps.es import FormES
def get_form_export_base_query(domain, app_id, xmlns, include_errors):
query = (FormES()
.domain(domain)
.app(app_id)
.xmlns(xmlns)
.sort("received_on")
.remove_default_filter('... | from corehq.apps.es import CaseES, GroupES
from corehq.apps.es import FormES
def get_form_export_base_query(domain, app_id, xmlns, include_errors):
query = (FormES()
.domain(domain)
.app(app_id)
.xmlns(xmlns)
.sort("received_on"))
if include_errors:
quer... | <commit_before>from corehq.apps.es import CaseES, GroupES
from corehq.apps.es import FormES
def get_form_export_base_query(domain, app_id, xmlns, include_errors):
query = (FormES()
.domain(domain)
.app(app_id)
.xmlns(xmlns)
.sort("received_on"))
if include_error... |
027e9dabb3270a3b9e3135f8a399ae4eb114a217 | package_name/module.py | package_name/module.py | """
Module provides a simple cubic_rectification function.
"""
import numpy as np
def cubic_rectification(x):
"""
Rectified cube of an array.
Parameters
----------
x : numpy.ndarray
Input array.
Returns
-------
numpy.ndarray
Elementwise, the cube of `x` where it is p... | """
Module provides a simple cubic_rectification function.
"""
import numpy as np
def cubic_rectification(x, verbose=False):
"""
Rectified cube of an array.
Parameters
----------
x : numpy.ndarray
Input array.
verbose : bool, optional
Whether to print out details. Default is ... | Add verbose argument to cubic_rectification | ENH: Add verbose argument to cubic_rectification
| Python | mit | scottclowe/python-ci,scottclowe/python-ci,scottclowe/python-continuous-integration,scottclowe/python-continuous-integration | """
Module provides a simple cubic_rectification function.
"""
import numpy as np
def cubic_rectification(x):
"""
Rectified cube of an array.
Parameters
----------
x : numpy.ndarray
Input array.
Returns
-------
numpy.ndarray
Elementwise, the cube of `x` where it is p... | """
Module provides a simple cubic_rectification function.
"""
import numpy as np
def cubic_rectification(x, verbose=False):
"""
Rectified cube of an array.
Parameters
----------
x : numpy.ndarray
Input array.
verbose : bool, optional
Whether to print out details. Default is ... | <commit_before>"""
Module provides a simple cubic_rectification function.
"""
import numpy as np
def cubic_rectification(x):
"""
Rectified cube of an array.
Parameters
----------
x : numpy.ndarray
Input array.
Returns
-------
numpy.ndarray
Elementwise, the cube of `x... | """
Module provides a simple cubic_rectification function.
"""
import numpy as np
def cubic_rectification(x, verbose=False):
"""
Rectified cube of an array.
Parameters
----------
x : numpy.ndarray
Input array.
verbose : bool, optional
Whether to print out details. Default is ... | """
Module provides a simple cubic_rectification function.
"""
import numpy as np
def cubic_rectification(x):
"""
Rectified cube of an array.
Parameters
----------
x : numpy.ndarray
Input array.
Returns
-------
numpy.ndarray
Elementwise, the cube of `x` where it is p... | <commit_before>"""
Module provides a simple cubic_rectification function.
"""
import numpy as np
def cubic_rectification(x):
"""
Rectified cube of an array.
Parameters
----------
x : numpy.ndarray
Input array.
Returns
-------
numpy.ndarray
Elementwise, the cube of `x... |
db6755fae84afee6466fb7119e44532392ea6e4a | lms/djangoapps/teams/api_urls.py | lms/djangoapps/teams/api_urls.py | """Defines the URL routes for the Team API."""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
TeamsListView,
TeamsDetailView,
TopicDetailView,
TopicListView,
MembershipListView,
MembershipDetailView
)
TEAM_ID_PATTERN = r'(?P<team_id>[a-z\d_-]+... | """Defines the URL routes for the Team API."""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
TeamsListView,
TeamsDetailView,
TopicDetailView,
TopicListView,
MembershipListView,
MembershipDetailView
)
TEAM_ID_PATTERN = r'(?P<team_id>[a-z\d_-]+... | Fix URL trailing slash bug in teams endpoint | Fix URL trailing slash bug in teams endpoint
| Python | agpl-3.0 | ESOedX/edx-platform,motion2015/edx-platform,fintech-circle/edx-platform,stvstnfrd/edx-platform,louyihua/edx-platform,tiagochiavericosta/edx-platform,analyseuc3m/ANALYSE-v1,gymnasium/edx-platform,vasyarv/edx-platform,ampax/edx-platform,raccoongang/edx-platform,simbs/edx-platform,bitifirefly/edx-platform,wwj718/edx-platf... | """Defines the URL routes for the Team API."""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
TeamsListView,
TeamsDetailView,
TopicDetailView,
TopicListView,
MembershipListView,
MembershipDetailView
)
TEAM_ID_PATTERN = r'(?P<team_id>[a-z\d_-]+... | """Defines the URL routes for the Team API."""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
TeamsListView,
TeamsDetailView,
TopicDetailView,
TopicListView,
MembershipListView,
MembershipDetailView
)
TEAM_ID_PATTERN = r'(?P<team_id>[a-z\d_-]+... | <commit_before>"""Defines the URL routes for the Team API."""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
TeamsListView,
TeamsDetailView,
TopicDetailView,
TopicListView,
MembershipListView,
MembershipDetailView
)
TEAM_ID_PATTERN = r'(?P<tea... | """Defines the URL routes for the Team API."""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
TeamsListView,
TeamsDetailView,
TopicDetailView,
TopicListView,
MembershipListView,
MembershipDetailView
)
TEAM_ID_PATTERN = r'(?P<team_id>[a-z\d_-]+... | """Defines the URL routes for the Team API."""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
TeamsListView,
TeamsDetailView,
TopicDetailView,
TopicListView,
MembershipListView,
MembershipDetailView
)
TEAM_ID_PATTERN = r'(?P<team_id>[a-z\d_-]+... | <commit_before>"""Defines the URL routes for the Team API."""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
TeamsListView,
TeamsDetailView,
TopicDetailView,
TopicListView,
MembershipListView,
MembershipDetailView
)
TEAM_ID_PATTERN = r'(?P<tea... |
402f7d3b89efd98da23633542c17a0ff51edee0a | tcelery/__init__.py | tcelery/__init__.py | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 0)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(celery_app=None... | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 0)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(celery_app=None... | Allow custon io loops for ConnectionPools | Allow custon io loops for ConnectionPools
| Python | bsd-3-clause | mher/tornado-celery,sangwonl/tornado-celery,shnjp/tornado-celery,qudos-com/tornado-celery | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 0)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(celery_app=None... | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 0)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(celery_app=None... | <commit_before>from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 0)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(... | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 0)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(celery_app=None... | from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 0)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(celery_app=None... | <commit_before>from __future__ import absolute_import
import celery
from tornado import ioloop
from .connection import ConnectionPool
from .producer import NonBlockingTaskProducer
from .result import AsyncResult
VERSION = (0, 3, 0)
__version__ = '.'.join(map(str, VERSION)) + '-dev'
def setup_nonblocking_producer(... |
87545718c9178d1d25e51128ca8cdb9c4bb466fb | version.py | version.py | major = 0
minor=0
patch=14
branch="master"
timestamp=1376507766.02 | major = 0
minor=0
patch=15
branch="master"
timestamp=1376507862.77 | Tag commit for v0.0.15-master generated by gitmake.py | Tag commit for v0.0.15-master generated by gitmake.py
| Python | mit | ryansturmer/gitmake | major = 0
minor=0
patch=14
branch="master"
timestamp=1376507766.02Tag commit for v0.0.15-master generated by gitmake.py | major = 0
minor=0
patch=15
branch="master"
timestamp=1376507862.77 | <commit_before>major = 0
minor=0
patch=14
branch="master"
timestamp=1376507766.02<commit_msg>Tag commit for v0.0.15-master generated by gitmake.py<commit_after> | major = 0
minor=0
patch=15
branch="master"
timestamp=1376507862.77 | major = 0
minor=0
patch=14
branch="master"
timestamp=1376507766.02Tag commit for v0.0.15-master generated by gitmake.pymajor = 0
minor=0
patch=15
branch="master"
timestamp=1376507862.77 | <commit_before>major = 0
minor=0
patch=14
branch="master"
timestamp=1376507766.02<commit_msg>Tag commit for v0.0.15-master generated by gitmake.py<commit_after>major = 0
minor=0
patch=15
branch="master"
timestamp=1376507862.77 |
aa8c94bfa63aab1779e280d6695c3a259e290c8b | test/test_flvlib.py | test/test_flvlib.py | import unittest
import test_primitives, test_astypes
def get_suite():
primitives = unittest.TestLoader().loadTestsFromModule(test_primitives)
astypes = unittest.TestLoader().loadTestsFromModule(test_astypes)
return unittest.TestSuite([primitives, astypes])
def main():
unittest.TextTestRunner(verbosity... | import unittest
import test_primitives, test_astypes, test_helpers
def get_suite():
modules = (test_primitives, test_astypes, test_helpers)
suites = [unittest.TestLoader().loadTestsFromModule(module) for
module in modules]
return unittest.TestSuite(suites)
def main():
unittest.TextTestRu... | Include the helpers module tests in the full library testsuite. | Include the helpers module tests in the full library testsuite.
| Python | mit | wulczer/flvlib | import unittest
import test_primitives, test_astypes
def get_suite():
primitives = unittest.TestLoader().loadTestsFromModule(test_primitives)
astypes = unittest.TestLoader().loadTestsFromModule(test_astypes)
return unittest.TestSuite([primitives, astypes])
def main():
unittest.TextTestRunner(verbosity... | import unittest
import test_primitives, test_astypes, test_helpers
def get_suite():
modules = (test_primitives, test_astypes, test_helpers)
suites = [unittest.TestLoader().loadTestsFromModule(module) for
module in modules]
return unittest.TestSuite(suites)
def main():
unittest.TextTestRu... | <commit_before>import unittest
import test_primitives, test_astypes
def get_suite():
primitives = unittest.TestLoader().loadTestsFromModule(test_primitives)
astypes = unittest.TestLoader().loadTestsFromModule(test_astypes)
return unittest.TestSuite([primitives, astypes])
def main():
unittest.TextTestR... | import unittest
import test_primitives, test_astypes, test_helpers
def get_suite():
modules = (test_primitives, test_astypes, test_helpers)
suites = [unittest.TestLoader().loadTestsFromModule(module) for
module in modules]
return unittest.TestSuite(suites)
def main():
unittest.TextTestRu... | import unittest
import test_primitives, test_astypes
def get_suite():
primitives = unittest.TestLoader().loadTestsFromModule(test_primitives)
astypes = unittest.TestLoader().loadTestsFromModule(test_astypes)
return unittest.TestSuite([primitives, astypes])
def main():
unittest.TextTestRunner(verbosity... | <commit_before>import unittest
import test_primitives, test_astypes
def get_suite():
primitives = unittest.TestLoader().loadTestsFromModule(test_primitives)
astypes = unittest.TestLoader().loadTestsFromModule(test_astypes)
return unittest.TestSuite([primitives, astypes])
def main():
unittest.TextTestR... |
aafff9f089b92137c8827addaff278da94edec45 | base/components/people/constants.py | base/components/people/constants.py | from model_utils import Choices
from ohashi.constants import OTHER
BLOOD_TYPE = Choices('A', 'B', 'O', 'AB')
CLASSIFICATIONS = Choices(
(1, 'major', 'Major Unit'),
(2, 'minor', 'Minor Unit'),
(3, 'shuffle', 'Shuffle Unit'),
(4, 'temporary', 'Temporary Unit'),
(5, 'subunit', 'Sub-Unit'),
(6, ... | from model_utils import Choices
from ohashi.constants import OTHER
BLOOD_TYPE = Choices('A', 'B', 'O', 'AB')
CLASSIFICATIONS = Choices(
(1, 'major', 'Major Unit'),
(2, 'minor', 'Minor Unit'),
(3, 'shuffle', 'Shuffle Unit'),
(4, 'temporary', 'Temporary Unit'),
(5, 'subunit', 'Sub-Unit'),
(6, ... | Make the Satoyama Movement a scope. | Make the Satoyama Movement a scope.
| Python | apache-2.0 | hello-base/web,hello-base/web,hello-base/web,hello-base/web | from model_utils import Choices
from ohashi.constants import OTHER
BLOOD_TYPE = Choices('A', 'B', 'O', 'AB')
CLASSIFICATIONS = Choices(
(1, 'major', 'Major Unit'),
(2, 'minor', 'Minor Unit'),
(3, 'shuffle', 'Shuffle Unit'),
(4, 'temporary', 'Temporary Unit'),
(5, 'subunit', 'Sub-Unit'),
(6, ... | from model_utils import Choices
from ohashi.constants import OTHER
BLOOD_TYPE = Choices('A', 'B', 'O', 'AB')
CLASSIFICATIONS = Choices(
(1, 'major', 'Major Unit'),
(2, 'minor', 'Minor Unit'),
(3, 'shuffle', 'Shuffle Unit'),
(4, 'temporary', 'Temporary Unit'),
(5, 'subunit', 'Sub-Unit'),
(6, ... | <commit_before>from model_utils import Choices
from ohashi.constants import OTHER
BLOOD_TYPE = Choices('A', 'B', 'O', 'AB')
CLASSIFICATIONS = Choices(
(1, 'major', 'Major Unit'),
(2, 'minor', 'Minor Unit'),
(3, 'shuffle', 'Shuffle Unit'),
(4, 'temporary', 'Temporary Unit'),
(5, 'subunit', 'Sub-U... | from model_utils import Choices
from ohashi.constants import OTHER
BLOOD_TYPE = Choices('A', 'B', 'O', 'AB')
CLASSIFICATIONS = Choices(
(1, 'major', 'Major Unit'),
(2, 'minor', 'Minor Unit'),
(3, 'shuffle', 'Shuffle Unit'),
(4, 'temporary', 'Temporary Unit'),
(5, 'subunit', 'Sub-Unit'),
(6, ... | from model_utils import Choices
from ohashi.constants import OTHER
BLOOD_TYPE = Choices('A', 'B', 'O', 'AB')
CLASSIFICATIONS = Choices(
(1, 'major', 'Major Unit'),
(2, 'minor', 'Minor Unit'),
(3, 'shuffle', 'Shuffle Unit'),
(4, 'temporary', 'Temporary Unit'),
(5, 'subunit', 'Sub-Unit'),
(6, ... | <commit_before>from model_utils import Choices
from ohashi.constants import OTHER
BLOOD_TYPE = Choices('A', 'B', 'O', 'AB')
CLASSIFICATIONS = Choices(
(1, 'major', 'Major Unit'),
(2, 'minor', 'Minor Unit'),
(3, 'shuffle', 'Shuffle Unit'),
(4, 'temporary', 'Temporary Unit'),
(5, 'subunit', 'Sub-U... |
fb335ed74d9d924816fe6bf712844023abf62e30 | address_book/person.py | address_book/person.py | __all__ = ['Person']
class Person(object):
pass | __all__ = ['Person']
class Person(object):
def __init__(self, first_name, last_name, addresses, phone_numbers):
self.first_name = first_name
self.last_name = last_name
self.addresses = addresses
self.phone_numbers = phone_numbers
| Add constructor with required arguments to the `Person` class | Add constructor with required arguments to the `Person` class
| Python | mit | dizpers/python-address-book-assignment | __all__ = ['Person']
class Person(object):
passAdd constructor with required arguments to the `Person` class | __all__ = ['Person']
class Person(object):
def __init__(self, first_name, last_name, addresses, phone_numbers):
self.first_name = first_name
self.last_name = last_name
self.addresses = addresses
self.phone_numbers = phone_numbers
| <commit_before>__all__ = ['Person']
class Person(object):
pass<commit_msg>Add constructor with required arguments to the `Person` class<commit_after> | __all__ = ['Person']
class Person(object):
def __init__(self, first_name, last_name, addresses, phone_numbers):
self.first_name = first_name
self.last_name = last_name
self.addresses = addresses
self.phone_numbers = phone_numbers
| __all__ = ['Person']
class Person(object):
passAdd constructor with required arguments to the `Person` class__all__ = ['Person']
class Person(object):
def __init__(self, first_name, last_name, addresses, phone_numbers):
self.first_name = first_name
self.last_name = last_name
self.ad... | <commit_before>__all__ = ['Person']
class Person(object):
pass<commit_msg>Add constructor with required arguments to the `Person` class<commit_after>__all__ = ['Person']
class Person(object):
def __init__(self, first_name, last_name, addresses, phone_numbers):
self.first_name = first_name
s... |
e26109802eab5777602bab836c8c88cb8ee0fe89 | openedx/stanford/cms/envs/aws.py | openedx/stanford/cms/envs/aws.py | from cms.envs.aws import *
from lms.envs.common import COURSE_MODE_DEFAULTS
CMS_BASE = ENV_TOKENS.get(
'CMS_BASE',
)
COPYRIGHT_EMAIL = ENV_TOKENS.get(
'COPYRIGHT_EMAIL',
COPYRIGHT_EMAIL
)
DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get(
'DEFAULT_COURSE_ABOUT_IMAGE_URL',
DEFAULT_COURSE_ABOUT_IMAGE_... | from cms.envs.aws import *
from lms.envs.aws import COURSE_MODE_DEFAULTS
CMS_BASE = ENV_TOKENS.get(
'CMS_BASE',
)
COPYRIGHT_EMAIL = ENV_TOKENS.get(
'COPYRIGHT_EMAIL',
COPYRIGHT_EMAIL
)
DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get(
'DEFAULT_COURSE_ABOUT_IMAGE_URL',
DEFAULT_COURSE_ABOUT_IMAGE_URL... | Fix course mode settings import | Fix course mode settings import
Without this, we were pulling edx's default (audit) from common,
instead of pulling "ours" from aws/json (honor).
| Python | agpl-3.0 | Stanford-Online/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform | from cms.envs.aws import *
from lms.envs.common import COURSE_MODE_DEFAULTS
CMS_BASE = ENV_TOKENS.get(
'CMS_BASE',
)
COPYRIGHT_EMAIL = ENV_TOKENS.get(
'COPYRIGHT_EMAIL',
COPYRIGHT_EMAIL
)
DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get(
'DEFAULT_COURSE_ABOUT_IMAGE_URL',
DEFAULT_COURSE_ABOUT_IMAGE_... | from cms.envs.aws import *
from lms.envs.aws import COURSE_MODE_DEFAULTS
CMS_BASE = ENV_TOKENS.get(
'CMS_BASE',
)
COPYRIGHT_EMAIL = ENV_TOKENS.get(
'COPYRIGHT_EMAIL',
COPYRIGHT_EMAIL
)
DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get(
'DEFAULT_COURSE_ABOUT_IMAGE_URL',
DEFAULT_COURSE_ABOUT_IMAGE_URL... | <commit_before>from cms.envs.aws import *
from lms.envs.common import COURSE_MODE_DEFAULTS
CMS_BASE = ENV_TOKENS.get(
'CMS_BASE',
)
COPYRIGHT_EMAIL = ENV_TOKENS.get(
'COPYRIGHT_EMAIL',
COPYRIGHT_EMAIL
)
DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get(
'DEFAULT_COURSE_ABOUT_IMAGE_URL',
DEFAULT_COUR... | from cms.envs.aws import *
from lms.envs.aws import COURSE_MODE_DEFAULTS
CMS_BASE = ENV_TOKENS.get(
'CMS_BASE',
)
COPYRIGHT_EMAIL = ENV_TOKENS.get(
'COPYRIGHT_EMAIL',
COPYRIGHT_EMAIL
)
DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get(
'DEFAULT_COURSE_ABOUT_IMAGE_URL',
DEFAULT_COURSE_ABOUT_IMAGE_URL... | from cms.envs.aws import *
from lms.envs.common import COURSE_MODE_DEFAULTS
CMS_BASE = ENV_TOKENS.get(
'CMS_BASE',
)
COPYRIGHT_EMAIL = ENV_TOKENS.get(
'COPYRIGHT_EMAIL',
COPYRIGHT_EMAIL
)
DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get(
'DEFAULT_COURSE_ABOUT_IMAGE_URL',
DEFAULT_COURSE_ABOUT_IMAGE_... | <commit_before>from cms.envs.aws import *
from lms.envs.common import COURSE_MODE_DEFAULTS
CMS_BASE = ENV_TOKENS.get(
'CMS_BASE',
)
COPYRIGHT_EMAIL = ENV_TOKENS.get(
'COPYRIGHT_EMAIL',
COPYRIGHT_EMAIL
)
DEFAULT_COURSE_ABOUT_IMAGE_URL = ENV_TOKENS.get(
'DEFAULT_COURSE_ABOUT_IMAGE_URL',
DEFAULT_COUR... |
74ec59b48b8a0bd7bac9d0eada4caa463a897d08 | playground/settings.py | playground/settings.py | """
Eve playground settings
"""
DOMAIN = {
"accounts": {
"schema": {
"name": {
"type": "string",
},
"can_manage": {
"type": "list",
"schema": {
"type": "objectid",
"data_relation": {
... | """
Eve playground settings
"""
DOMAIN = {
"accounts": {
"schema": {
"name": {
"type": "string",
},
"can_manage": {
"type": "list",
"schema": {
"type": "objectid",
"data_relation": {
... | Add example of a scoped resource | Add example of a scoped resource
Add the Project resource and set the `url` setting in the domain to allow it to sit as a sub resource under accounts. See: http://python-eve.org/features.html#sub-resources
| Python | mit | proxama/eve-playground | """
Eve playground settings
"""
DOMAIN = {
"accounts": {
"schema": {
"name": {
"type": "string",
},
"can_manage": {
"type": "list",
"schema": {
"type": "objectid",
"data_relation": {
... | """
Eve playground settings
"""
DOMAIN = {
"accounts": {
"schema": {
"name": {
"type": "string",
},
"can_manage": {
"type": "list",
"schema": {
"type": "objectid",
"data_relation": {
... | <commit_before>"""
Eve playground settings
"""
DOMAIN = {
"accounts": {
"schema": {
"name": {
"type": "string",
},
"can_manage": {
"type": "list",
"schema": {
"type": "objectid",
"dat... | """
Eve playground settings
"""
DOMAIN = {
"accounts": {
"schema": {
"name": {
"type": "string",
},
"can_manage": {
"type": "list",
"schema": {
"type": "objectid",
"data_relation": {
... | """
Eve playground settings
"""
DOMAIN = {
"accounts": {
"schema": {
"name": {
"type": "string",
},
"can_manage": {
"type": "list",
"schema": {
"type": "objectid",
"data_relation": {
... | <commit_before>"""
Eve playground settings
"""
DOMAIN = {
"accounts": {
"schema": {
"name": {
"type": "string",
},
"can_manage": {
"type": "list",
"schema": {
"type": "objectid",
"dat... |
1c2fc06fe61f4f512dc2e5bca412e123fa17fb9b | plenum/__metadata__.py | plenum/__metadata__.py | """
plenum package metadata
"""
__version_info__ = (0, 1, 157)
__version__ = '{}.{}.{}'.format(*__version_info__)
__author__ = "Evernym, Inc."
__license__ = "Apache 2.0"
__all__ = ['__version_info__', '__version__', '__author__', '__license__']
__dependencies__ = {
"ledger": ">=0.0.31"
}
| """
plenum package metadata
"""
__version_info__ = (0, 1, 158)
__version__ = '{}.{}.{}'.format(*__version_info__)
__author__ = "Evernym, Inc."
__license__ = "Apache 2.0"
__all__ = ['__version_info__', '__version__', '__author__', '__license__']
__dependencies__ = {
"ledger": ">=0.0.31"
}
| Increase plenum version to 0.1.158 | Increase plenum version to 0.1.158
| Python | apache-2.0 | evernym/plenum,evernym/zeno | """
plenum package metadata
"""
__version_info__ = (0, 1, 157)
__version__ = '{}.{}.{}'.format(*__version_info__)
__author__ = "Evernym, Inc."
__license__ = "Apache 2.0"
__all__ = ['__version_info__', '__version__', '__author__', '__license__']
__dependencies__ = {
"ledger": ">=0.0.31"
}
Increase plenum version t... | """
plenum package metadata
"""
__version_info__ = (0, 1, 158)
__version__ = '{}.{}.{}'.format(*__version_info__)
__author__ = "Evernym, Inc."
__license__ = "Apache 2.0"
__all__ = ['__version_info__', '__version__', '__author__', '__license__']
__dependencies__ = {
"ledger": ">=0.0.31"
}
| <commit_before>"""
plenum package metadata
"""
__version_info__ = (0, 1, 157)
__version__ = '{}.{}.{}'.format(*__version_info__)
__author__ = "Evernym, Inc."
__license__ = "Apache 2.0"
__all__ = ['__version_info__', '__version__', '__author__', '__license__']
__dependencies__ = {
"ledger": ">=0.0.31"
}
<commit_ms... | """
plenum package metadata
"""
__version_info__ = (0, 1, 158)
__version__ = '{}.{}.{}'.format(*__version_info__)
__author__ = "Evernym, Inc."
__license__ = "Apache 2.0"
__all__ = ['__version_info__', '__version__', '__author__', '__license__']
__dependencies__ = {
"ledger": ">=0.0.31"
}
| """
plenum package metadata
"""
__version_info__ = (0, 1, 157)
__version__ = '{}.{}.{}'.format(*__version_info__)
__author__ = "Evernym, Inc."
__license__ = "Apache 2.0"
__all__ = ['__version_info__', '__version__', '__author__', '__license__']
__dependencies__ = {
"ledger": ">=0.0.31"
}
Increase plenum version t... | <commit_before>"""
plenum package metadata
"""
__version_info__ = (0, 1, 157)
__version__ = '{}.{}.{}'.format(*__version_info__)
__author__ = "Evernym, Inc."
__license__ = "Apache 2.0"
__all__ = ['__version_info__', '__version__', '__author__', '__license__']
__dependencies__ = {
"ledger": ">=0.0.31"
}
<commit_ms... |
577a652852f0bb6305f071f34b69c318b01d9c97 | poet/test/test_poet.py | poet/test/test_poet.py | # Integration tests for poet
import subprocess
import sys
def poet(*args):
return subprocess.check_output(
["poet"] + list(args),
stderr=subprocess.STDOUT)
def test_version():
assert b"homebrew-pypi-poet" in poet("-V")
def test_single():
result = poet("-s", "nose", "six")
assert b... | # Integration tests for poet
import subprocess
import sys
def poet(*args):
return subprocess.check_output(
["poet"] + list(args),
stderr=subprocess.STDOUT)
def test_version():
assert b"homebrew-pypi-poet" in poet("-V")
def test_single():
result = poet("-s", "nose", "six")
assert b... | Test that poet uses sha256's from pypi | Test that poet uses sha256's from pypi
Closes #25. Closes #23. Closes #6.
| Python | mit | tdsmith/homebrew-pypi-poet | # Integration tests for poet
import subprocess
import sys
def poet(*args):
return subprocess.check_output(
["poet"] + list(args),
stderr=subprocess.STDOUT)
def test_version():
assert b"homebrew-pypi-poet" in poet("-V")
def test_single():
result = poet("-s", "nose", "six")
assert b... | # Integration tests for poet
import subprocess
import sys
def poet(*args):
return subprocess.check_output(
["poet"] + list(args),
stderr=subprocess.STDOUT)
def test_version():
assert b"homebrew-pypi-poet" in poet("-V")
def test_single():
result = poet("-s", "nose", "six")
assert b... | <commit_before># Integration tests for poet
import subprocess
import sys
def poet(*args):
return subprocess.check_output(
["poet"] + list(args),
stderr=subprocess.STDOUT)
def test_version():
assert b"homebrew-pypi-poet" in poet("-V")
def test_single():
result = poet("-s", "nose", "six... | # Integration tests for poet
import subprocess
import sys
def poet(*args):
return subprocess.check_output(
["poet"] + list(args),
stderr=subprocess.STDOUT)
def test_version():
assert b"homebrew-pypi-poet" in poet("-V")
def test_single():
result = poet("-s", "nose", "six")
assert b... | # Integration tests for poet
import subprocess
import sys
def poet(*args):
return subprocess.check_output(
["poet"] + list(args),
stderr=subprocess.STDOUT)
def test_version():
assert b"homebrew-pypi-poet" in poet("-V")
def test_single():
result = poet("-s", "nose", "six")
assert b... | <commit_before># Integration tests for poet
import subprocess
import sys
def poet(*args):
return subprocess.check_output(
["poet"] + list(args),
stderr=subprocess.STDOUT)
def test_version():
assert b"homebrew-pypi-poet" in poet("-V")
def test_single():
result = poet("-s", "nose", "six... |
4ff709f80999bfc512d23a25d4236108c067cc31 | poppinsbag/__init__.py | poppinsbag/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "0.1.0"
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Mary Poppins always has what you need in her bag.
This is a set of tools and helpers to deals with common things.
Give it a try !
"""
__version__ = "0.1.0"
| Add a docstring to the poppinsbag module | Add a docstring to the poppinsbag module
| Python | mit | avcreation/pyPoppins | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "0.1.0"
Add a docstring to the poppinsbag module | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Mary Poppins always has what you need in her bag.
This is a set of tools and helpers to deals with common things.
Give it a try !
"""
__version__ = "0.1.0"
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "0.1.0"
<commit_msg>Add a docstring to the poppinsbag module<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Mary Poppins always has what you need in her bag.
This is a set of tools and helpers to deals with common things.
Give it a try !
"""
__version__ = "0.1.0"
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "0.1.0"
Add a docstring to the poppinsbag module#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Mary Poppins always has what you need in her bag.
This is a set of tools and helpers to deals with common things.
Give it a try !
"""
__version__ = "0.... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "0.1.0"
<commit_msg>Add a docstring to the poppinsbag module<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Mary Poppins always has what you need in her bag.
This is a set of tools and helpers to deals with common things.
... |
3873fe6b33665267a04f80faec63eaaa19ea00bd | portal/pages/models.py | portal/pages/models.py | from django.db import models
from wagtail.wagtailcore.models import Page as WagtailPage
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class Page(WagtailPage):
parent_page_types = ['home.HomePage', 'Page']
body = RichTextField()
indexed_fie... | from django.db import models
from wagtail.wagtailcore.models import Page as WagtailPage
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class Page(WagtailPage):
body = RichTextField()
indexed_fields = ('body', )
content_panels = [
Fi... | Allow pages to appear anywhere they aren't excluded | Allow pages to appear anywhere they aren't excluded
| Python | isc | Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,MidAtlanticPortal/marco-portal2,MidAtlanticPortal/marco-portal2,MidAtlanticPortal/marco-portal2,MidAtlanticPortal/marco-portal2,Ecotrust/marineplanner-core | from django.db import models
from wagtail.wagtailcore.models import Page as WagtailPage
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class Page(WagtailPage):
parent_page_types = ['home.HomePage', 'Page']
body = RichTextField()
indexed_fie... | from django.db import models
from wagtail.wagtailcore.models import Page as WagtailPage
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class Page(WagtailPage):
body = RichTextField()
indexed_fields = ('body', )
content_panels = [
Fi... | <commit_before>from django.db import models
from wagtail.wagtailcore.models import Page as WagtailPage
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class Page(WagtailPage):
parent_page_types = ['home.HomePage', 'Page']
body = RichTextField()
... | from django.db import models
from wagtail.wagtailcore.models import Page as WagtailPage
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class Page(WagtailPage):
body = RichTextField()
indexed_fields = ('body', )
content_panels = [
Fi... | from django.db import models
from wagtail.wagtailcore.models import Page as WagtailPage
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class Page(WagtailPage):
parent_page_types = ['home.HomePage', 'Page']
body = RichTextField()
indexed_fie... | <commit_before>from django.db import models
from wagtail.wagtailcore.models import Page as WagtailPage
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class Page(WagtailPage):
parent_page_types = ['home.HomePage', 'Page']
body = RichTextField()
... |
c0c902cc356d1a3142a6d260e7b768114449013e | tutorials/models.py | tutorials/models.py | from django.db import models
from markdownx.models import MarkdownxField
# Create your models here.
class Tutorial(models.Model):
# ToDo: Fields that are out-commented are missing according to the mockup -> datamodel ??
# Category = models.TextField()
title = models.TextField()
html = models.TextFie... | from django.db import models
from django.urls import reverse
from markdownx.models import MarkdownxField
# add options if needed
CATEGORY_OPTIONS = [('io', 'I/O'), ('intro', 'Introduction')]
LEVEL_OPTIONS = [(1, '1'), (2, '2'), (3, '3')]
# Create your models here.
class Tutorial(models.Model):
# ToDo: Fields th... | Add options for choices fields, Add new fields to Tutorial model | Add options for choices fields, Add new fields to Tutorial model
| Python | agpl-3.0 | openego/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform | from django.db import models
from markdownx.models import MarkdownxField
# Create your models here.
class Tutorial(models.Model):
# ToDo: Fields that are out-commented are missing according to the mockup -> datamodel ??
# Category = models.TextField()
title = models.TextField()
html = models.TextFie... | from django.db import models
from django.urls import reverse
from markdownx.models import MarkdownxField
# add options if needed
CATEGORY_OPTIONS = [('io', 'I/O'), ('intro', 'Introduction')]
LEVEL_OPTIONS = [(1, '1'), (2, '2'), (3, '3')]
# Create your models here.
class Tutorial(models.Model):
# ToDo: Fields th... | <commit_before>from django.db import models
from markdownx.models import MarkdownxField
# Create your models here.
class Tutorial(models.Model):
# ToDo: Fields that are out-commented are missing according to the mockup -> datamodel ??
# Category = models.TextField()
title = models.TextField()
html =... | from django.db import models
from django.urls import reverse
from markdownx.models import MarkdownxField
# add options if needed
CATEGORY_OPTIONS = [('io', 'I/O'), ('intro', 'Introduction')]
LEVEL_OPTIONS = [(1, '1'), (2, '2'), (3, '3')]
# Create your models here.
class Tutorial(models.Model):
# ToDo: Fields th... | from django.db import models
from markdownx.models import MarkdownxField
# Create your models here.
class Tutorial(models.Model):
# ToDo: Fields that are out-commented are missing according to the mockup -> datamodel ??
# Category = models.TextField()
title = models.TextField()
html = models.TextFie... | <commit_before>from django.db import models
from markdownx.models import MarkdownxField
# Create your models here.
class Tutorial(models.Model):
# ToDo: Fields that are out-commented are missing according to the mockup -> datamodel ??
# Category = models.TextField()
title = models.TextField()
html =... |
6153f18bda4dcf3601df91b60787453af1517b78 | falmer/auth/types.py | falmer/auth/types.py | import graphene
from django.contrib.auth.models import Permission as DjangoPermission
from graphene_django import DjangoObjectType
from . import models
class ClientUser(DjangoObjectType):
name = graphene.String()
has_cms_access = graphene.Boolean()
user_id = graphene.Int()
permissions = graphene.List(... | import graphene
from django.contrib.auth.models import Permission as DjangoPermission
from graphene_django import DjangoObjectType
from . import models
class ClientUser(DjangoObjectType):
name = graphene.String()
has_cms_access = graphene.Boolean()
user_id = graphene.Int()
permissions = graphene.List(... | Add additional fields to permission type | Add additional fields to permission type
| Python | mit | sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer | import graphene
from django.contrib.auth.models import Permission as DjangoPermission
from graphene_django import DjangoObjectType
from . import models
class ClientUser(DjangoObjectType):
name = graphene.String()
has_cms_access = graphene.Boolean()
user_id = graphene.Int()
permissions = graphene.List(... | import graphene
from django.contrib.auth.models import Permission as DjangoPermission
from graphene_django import DjangoObjectType
from . import models
class ClientUser(DjangoObjectType):
name = graphene.String()
has_cms_access = graphene.Boolean()
user_id = graphene.Int()
permissions = graphene.List(... | <commit_before>import graphene
from django.contrib.auth.models import Permission as DjangoPermission
from graphene_django import DjangoObjectType
from . import models
class ClientUser(DjangoObjectType):
name = graphene.String()
has_cms_access = graphene.Boolean()
user_id = graphene.Int()
permissions =... | import graphene
from django.contrib.auth.models import Permission as DjangoPermission
from graphene_django import DjangoObjectType
from . import models
class ClientUser(DjangoObjectType):
name = graphene.String()
has_cms_access = graphene.Boolean()
user_id = graphene.Int()
permissions = graphene.List(... | import graphene
from django.contrib.auth.models import Permission as DjangoPermission
from graphene_django import DjangoObjectType
from . import models
class ClientUser(DjangoObjectType):
name = graphene.String()
has_cms_access = graphene.Boolean()
user_id = graphene.Int()
permissions = graphene.List(... | <commit_before>import graphene
from django.contrib.auth.models import Permission as DjangoPermission
from graphene_django import DjangoObjectType
from . import models
class ClientUser(DjangoObjectType):
name = graphene.String()
has_cms_access = graphene.Boolean()
user_id = graphene.Int()
permissions =... |
c5bcd270e8422ba23bcb29dd4a00ce4fa9e7d437 | anki.py | anki.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import os
import re
import yaml
import lib.genanki.genanki as genanki
class Anki:
def generate_id():
"""Gener... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import os
import re
import yaml
import lib.genanki.genanki as genanki
class Anki:
def generate_id():
"""Gener... | Document new {{import:file.txt}} command for Anki card definitions. | Document new {{import:file.txt}} command for Anki card definitions.
| Python | mpl-2.0 | holocronweaver/wanikani2anki,holocronweaver/wanikani2anki,holocronweaver/wanikani2anki | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import os
import re
import yaml
import lib.genanki.genanki as genanki
class Anki:
def generate_id():
"""Gener... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import os
import re
import yaml
import lib.genanki.genanki as genanki
class Anki:
def generate_id():
"""Gener... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import os
import re
import yaml
import lib.genanki.genanki as genanki
class Anki:
def generate_id():
... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import os
import re
import yaml
import lib.genanki.genanki as genanki
class Anki:
def generate_id():
"""Gener... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import os
import re
import yaml
import lib.genanki.genanki as genanki
class Anki:
def generate_id():
"""Gener... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import os
import re
import yaml
import lib.genanki.genanki as genanki
class Anki:
def generate_id():
... |
63d42df486c7276c4edc7d1b89e2e22215d81f61 | picoCTF-web/api/apps/v1/groups.py | picoCTF-web/api/apps/v1/groups.py | """Group manangement."""
from flask import jsonify
from flask_restplus import Namespace, Resource
import api.team
import api.user
ns = Namespace('groups', description='Group management')
@ns.route('/')
class GroupList(Resource):
"""Get the list of groups, or add a new group."""
# @TODO allow admins to see ... | """Group manangement."""
from flask import jsonify
from flask_restplus import Namespace, Resource
import api.group
import api.team
import api.user
from api.common import PicoException
ns = Namespace('groups', description='Group management')
@ns.route('/')
class GroupList(Resource):
"""Get the list of groups, or... | Add route to get specific group | Add route to get specific group
| Python | mit | royragsdale/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF | """Group manangement."""
from flask import jsonify
from flask_restplus import Namespace, Resource
import api.team
import api.user
ns = Namespace('groups', description='Group management')
@ns.route('/')
class GroupList(Resource):
"""Get the list of groups, or add a new group."""
# @TODO allow admins to see ... | """Group manangement."""
from flask import jsonify
from flask_restplus import Namespace, Resource
import api.group
import api.team
import api.user
from api.common import PicoException
ns = Namespace('groups', description='Group management')
@ns.route('/')
class GroupList(Resource):
"""Get the list of groups, or... | <commit_before>"""Group manangement."""
from flask import jsonify
from flask_restplus import Namespace, Resource
import api.team
import api.user
ns = Namespace('groups', description='Group management')
@ns.route('/')
class GroupList(Resource):
"""Get the list of groups, or add a new group."""
# @TODO allow... | """Group manangement."""
from flask import jsonify
from flask_restplus import Namespace, Resource
import api.group
import api.team
import api.user
from api.common import PicoException
ns = Namespace('groups', description='Group management')
@ns.route('/')
class GroupList(Resource):
"""Get the list of groups, or... | """Group manangement."""
from flask import jsonify
from flask_restplus import Namespace, Resource
import api.team
import api.user
ns = Namespace('groups', description='Group management')
@ns.route('/')
class GroupList(Resource):
"""Get the list of groups, or add a new group."""
# @TODO allow admins to see ... | <commit_before>"""Group manangement."""
from flask import jsonify
from flask_restplus import Namespace, Resource
import api.team
import api.user
ns = Namespace('groups', description='Group management')
@ns.route('/')
class GroupList(Resource):
"""Get the list of groups, or add a new group."""
# @TODO allow... |
18fa5009d78f8f22af0d7e4902918e7c6020699d | tests/models.py | tests/models.py | from django.db import models
class NonAsciiRepr:
def __repr__(self):
return "nôt åscíì"
class Binary(models.Model):
field = models.BinaryField()
try:
from django.db.models import JSONField
except ImportError: # Django<3.1
try:
from django.contrib.postgres.fields import JSONField
... | from django.db import models
class NonAsciiRepr:
def __repr__(self):
return "nôt åscíì"
class Binary(models.Model):
field = models.BinaryField()
try:
from django.db.models import JSONField
except ImportError: # Django<3.1
try:
from django.contrib.postgres.fields import JSONField
... | Fix one coding style problem | Fix one coding style problem
| Python | bsd-3-clause | django-debug-toolbar/django-debug-toolbar,tim-schilling/django-debug-toolbar,tim-schilling/django-debug-toolbar,spookylukey/django-debug-toolbar,spookylukey/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,tim-schilling/django-debug-toolbar,jazzband/django-debug-toolbar,jazzband/django-debug-toolbar,spook... | from django.db import models
class NonAsciiRepr:
def __repr__(self):
return "nôt åscíì"
class Binary(models.Model):
field = models.BinaryField()
try:
from django.db.models import JSONField
except ImportError: # Django<3.1
try:
from django.contrib.postgres.fields import JSONField
... | from django.db import models
class NonAsciiRepr:
def __repr__(self):
return "nôt åscíì"
class Binary(models.Model):
field = models.BinaryField()
try:
from django.db.models import JSONField
except ImportError: # Django<3.1
try:
from django.contrib.postgres.fields import JSONField
... | <commit_before>from django.db import models
class NonAsciiRepr:
def __repr__(self):
return "nôt åscíì"
class Binary(models.Model):
field = models.BinaryField()
try:
from django.db.models import JSONField
except ImportError: # Django<3.1
try:
from django.contrib.postgres.fields imp... | from django.db import models
class NonAsciiRepr:
def __repr__(self):
return "nôt åscíì"
class Binary(models.Model):
field = models.BinaryField()
try:
from django.db.models import JSONField
except ImportError: # Django<3.1
try:
from django.contrib.postgres.fields import JSONField
... | from django.db import models
class NonAsciiRepr:
def __repr__(self):
return "nôt åscíì"
class Binary(models.Model):
field = models.BinaryField()
try:
from django.db.models import JSONField
except ImportError: # Django<3.1
try:
from django.contrib.postgres.fields import JSONField
... | <commit_before>from django.db import models
class NonAsciiRepr:
def __repr__(self):
return "nôt åscíì"
class Binary(models.Model):
field = models.BinaryField()
try:
from django.db.models import JSONField
except ImportError: # Django<3.1
try:
from django.contrib.postgres.fields imp... |
f5885a2644a21def7340e0d34b809a98472b366c | heufybot/modules/commands/nick.py | heufybot/modules/commands/nick.py | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class NickCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Nick"
def triggers(self):
return ["nick"]
... | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class NickCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Nick"
def triggers(self):
return ["nick"]
... | Fix the Nick command help text | Fix the Nick command help text
| Python | mit | Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class NickCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Nick"
def triggers(self):
return ["nick"]
... | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class NickCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Nick"
def triggers(self):
return ["nick"]
... | <commit_before>from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class NickCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Nick"
def triggers(self):
return... | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class NickCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Nick"
def triggers(self):
return ["nick"]
... | from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class NickCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Nick"
def triggers(self):
return ["nick"]
... | <commit_before>from twisted.plugin import IPlugin
from heufybot.moduleinterface import IBotModule
from heufybot.modules.commandinterface import BotCommand
from zope.interface import implements
class NickCommand(BotCommand):
implements(IPlugin, IBotModule)
name = "Nick"
def triggers(self):
return... |
f11c489f6b28edc1ec9b399bbff1f1d0831d23bb | grab.py | grab.py | #!/usr/bin/env python
# Grab runs from S3 and do analysis
#
# Daniel Klein, 2015-08-14
import sys
import subprocess
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('remote_dir', help = 'S3 directory with completed runs')
parser.add_argument('run_ids', help = 'IDs of runs to analyze... | #!/usr/bin/env python
# Grab runs from S3 and do analysis
#
# Daniel Klein, 2015-08-14
import sys
import subprocess
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('remote_dir', help = 'S3 directory with completed runs')
parser.add_argument('output_dir', help = 'Local destination f... | Add specification of output directory from command line | Add specification of output directory from command line
| Python | mit | othercriteria/StochasticBlockmodel,othercriteria/StochasticBlockmodel,othercriteria/StochasticBlockmodel,othercriteria/StochasticBlockmodel,othercriteria/StochasticBlockmodel,othercriteria/StochasticBlockmodel | #!/usr/bin/env python
# Grab runs from S3 and do analysis
#
# Daniel Klein, 2015-08-14
import sys
import subprocess
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('remote_dir', help = 'S3 directory with completed runs')
parser.add_argument('run_ids', help = 'IDs of runs to analyze... | #!/usr/bin/env python
# Grab runs from S3 and do analysis
#
# Daniel Klein, 2015-08-14
import sys
import subprocess
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('remote_dir', help = 'S3 directory with completed runs')
parser.add_argument('output_dir', help = 'Local destination f... | <commit_before>#!/usr/bin/env python
# Grab runs from S3 and do analysis
#
# Daniel Klein, 2015-08-14
import sys
import subprocess
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('remote_dir', help = 'S3 directory with completed runs')
parser.add_argument('run_ids', help = 'IDs of ... | #!/usr/bin/env python
# Grab runs from S3 and do analysis
#
# Daniel Klein, 2015-08-14
import sys
import subprocess
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('remote_dir', help = 'S3 directory with completed runs')
parser.add_argument('output_dir', help = 'Local destination f... | #!/usr/bin/env python
# Grab runs from S3 and do analysis
#
# Daniel Klein, 2015-08-14
import sys
import subprocess
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('remote_dir', help = 'S3 directory with completed runs')
parser.add_argument('run_ids', help = 'IDs of runs to analyze... | <commit_before>#!/usr/bin/env python
# Grab runs from S3 and do analysis
#
# Daniel Klein, 2015-08-14
import sys
import subprocess
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('remote_dir', help = 'S3 directory with completed runs')
parser.add_argument('run_ids', help = 'IDs of ... |
682805bfa7ea77276dd20e02732eaaec48d84e2b | server/main.py | server/main.py | import base64
import json
import struct
from flask import Flask, request
from scarab import EncryptedArray, PublicKey
from .store import Store
from common.utils import binary
app = Flask(__name__)
store = Store()
@app.route('/db_size')
def get_db_size():
data = {'num_records': store.record_count, 'record_size... | import base64
import json
import struct
from flask import Flask, request
from scarab import EncryptedArray, PublicKey
from .store import Store
from common.utils import binary
app = Flask(__name__)
store = Store()
@app.route('/db_size')
def get_db_size():
data = {'num_records': store.record_count, 'record_size... | Convert public key string type in server | Convert public key string type in server
This fixes a segmentation fault caused by an incorrect string encoding
when run in Python 2.7.
| Python | mit | blindstore/blindstore-old-scarab | import base64
import json
import struct
from flask import Flask, request
from scarab import EncryptedArray, PublicKey
from .store import Store
from common.utils import binary
app = Flask(__name__)
store = Store()
@app.route('/db_size')
def get_db_size():
data = {'num_records': store.record_count, 'record_size... | import base64
import json
import struct
from flask import Flask, request
from scarab import EncryptedArray, PublicKey
from .store import Store
from common.utils import binary
app = Flask(__name__)
store = Store()
@app.route('/db_size')
def get_db_size():
data = {'num_records': store.record_count, 'record_size... | <commit_before>import base64
import json
import struct
from flask import Flask, request
from scarab import EncryptedArray, PublicKey
from .store import Store
from common.utils import binary
app = Flask(__name__)
store = Store()
@app.route('/db_size')
def get_db_size():
data = {'num_records': store.record_coun... | import base64
import json
import struct
from flask import Flask, request
from scarab import EncryptedArray, PublicKey
from .store import Store
from common.utils import binary
app = Flask(__name__)
store = Store()
@app.route('/db_size')
def get_db_size():
data = {'num_records': store.record_count, 'record_size... | import base64
import json
import struct
from flask import Flask, request
from scarab import EncryptedArray, PublicKey
from .store import Store
from common.utils import binary
app = Flask(__name__)
store = Store()
@app.route('/db_size')
def get_db_size():
data = {'num_records': store.record_count, 'record_size... | <commit_before>import base64
import json
import struct
from flask import Flask, request
from scarab import EncryptedArray, PublicKey
from .store import Store
from common.utils import binary
app = Flask(__name__)
store = Store()
@app.route('/db_size')
def get_db_size():
data = {'num_records': store.record_coun... |
b5fc62d022cd773a0333560f30d8c8c0d6dbd25e | txircd/utils.py | txircd/utils.py | def unescapeEndpointDescription(desc):
result = []
escape = []
depth = 0
desc = iter(desc)
for char in desc:
if char == "\\":
try:
char = desc.next()
except StopIteration:
raise ValueError ("Endpoint description not valid: escaped end o... | def _enum(**enums):
return type('Enum', (), enums)
ModeType = _enum(List=0, ParamOnUnset=1, Param=2, NoParam=3, Status=4)
def unescapeEndpointDescription(desc):
result = []
escape = []
depth = 0
desc = iter(desc)
for char in desc:
if char == "\\":
try:
char ... | Add a ModeType enum for later benefit | Add a ModeType enum for later benefit
| Python | bsd-3-clause | ElementalAlchemist/txircd,Heufneutje/txircd | def unescapeEndpointDescription(desc):
result = []
escape = []
depth = 0
desc = iter(desc)
for char in desc:
if char == "\\":
try:
char = desc.next()
except StopIteration:
raise ValueError ("Endpoint description not valid: escaped end o... | def _enum(**enums):
return type('Enum', (), enums)
ModeType = _enum(List=0, ParamOnUnset=1, Param=2, NoParam=3, Status=4)
def unescapeEndpointDescription(desc):
result = []
escape = []
depth = 0
desc = iter(desc)
for char in desc:
if char == "\\":
try:
char ... | <commit_before>def unescapeEndpointDescription(desc):
result = []
escape = []
depth = 0
desc = iter(desc)
for char in desc:
if char == "\\":
try:
char = desc.next()
except StopIteration:
raise ValueError ("Endpoint description not valid... | def _enum(**enums):
return type('Enum', (), enums)
ModeType = _enum(List=0, ParamOnUnset=1, Param=2, NoParam=3, Status=4)
def unescapeEndpointDescription(desc):
result = []
escape = []
depth = 0
desc = iter(desc)
for char in desc:
if char == "\\":
try:
char ... | def unescapeEndpointDescription(desc):
result = []
escape = []
depth = 0
desc = iter(desc)
for char in desc:
if char == "\\":
try:
char = desc.next()
except StopIteration:
raise ValueError ("Endpoint description not valid: escaped end o... | <commit_before>def unescapeEndpointDescription(desc):
result = []
escape = []
depth = 0
desc = iter(desc)
for char in desc:
if char == "\\":
try:
char = desc.next()
except StopIteration:
raise ValueError ("Endpoint description not valid... |
8687087daec7b116f51eac3d3653f0a0d3756eeb | apnsclient/__init__.py | apnsclient/__init__.py | # Copyright 2013 Getlogic BV, Sardar Yumatov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | # Copyright 2013 Getlogic BV, Sardar Yumatov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | Adjust the module __version__ to match the version advertised in PyPI. | Adjust the module __version__ to match the version advertised in PyPI.
| Python | apache-2.0 | vine/apns-client,simon-liu/apns-client,baverman/apns-client,GoodRx/apns-client,mobify/apns-client,GMcD/apns-client,MichiganLabs/apns-client,mahall/apns-client,lostdragon/apns-client,sttts/apns-client,ChatSecure/apns-client,quatanium/apns-client | # Copyright 2013 Getlogic BV, Sardar Yumatov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | # Copyright 2013 Getlogic BV, Sardar Yumatov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | <commit_before># Copyright 2013 Getlogic BV, Sardar Yumatov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | # Copyright 2013 Getlogic BV, Sardar Yumatov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | # Copyright 2013 Getlogic BV, Sardar Yumatov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | <commit_before># Copyright 2013 Getlogic BV, Sardar Yumatov
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
ef37001c97f83d39e8e9998a8f7d1d6db75b1e0b | examples/graph/degree_sequence.py | examples/graph/degree_sequence.py | #!/usr/bin/env python
"""
Random graph from given degree sequence.
"""
__author__ = """Aric Hagberg ([email protected])"""
__date__ = "$Date: 2004-11-03 08:11:09 -0700 (Wed, 03 Nov 2004) $"
__credits__ = """"""
__revision__ = "$Revision: 503 $"
# Copyright (C) 2004 by
# Aric Hagberg <[email protected]>
# Dan Sc... | #!/usr/bin/env python
"""
Random graph from given degree sequence.
"""
__author__ = """Aric Hagberg ([email protected])"""
__date__ = "$Date: 2004-11-03 08:11:09 -0700 (Wed, 03 Nov 2004) $"
__credits__ = """"""
__revision__ = "$Revision: 503 $"
# Copyright (C) 2004 by
# Aric Hagberg <[email protected]>
# Dan Sc... | Remove Python 3 incompatible print statement | Remove Python 3 incompatible print statement
| Python | bsd-3-clause | goulu/networkx,harlowja/networkx,sharifulgeo/networkx,bzero/networkx,RMKD/networkx,ionanrozenfeld/networkx,bzero/networkx,blublud/networkx,SanketDG/networkx,jakevdp/networkx,farhaanbukhsh/networkx,nathania/networkx,RMKD/networkx,cmtm/networkx,aureooms/networkx,JamesClough/networkx,chrisnatali/networkx,beni55/networkx,f... | #!/usr/bin/env python
"""
Random graph from given degree sequence.
"""
__author__ = """Aric Hagberg ([email protected])"""
__date__ = "$Date: 2004-11-03 08:11:09 -0700 (Wed, 03 Nov 2004) $"
__credits__ = """"""
__revision__ = "$Revision: 503 $"
# Copyright (C) 2004 by
# Aric Hagberg <[email protected]>
# Dan Sc... | #!/usr/bin/env python
"""
Random graph from given degree sequence.
"""
__author__ = """Aric Hagberg ([email protected])"""
__date__ = "$Date: 2004-11-03 08:11:09 -0700 (Wed, 03 Nov 2004) $"
__credits__ = """"""
__revision__ = "$Revision: 503 $"
# Copyright (C) 2004 by
# Aric Hagberg <[email protected]>
# Dan Sc... | <commit_before>#!/usr/bin/env python
"""
Random graph from given degree sequence.
"""
__author__ = """Aric Hagberg ([email protected])"""
__date__ = "$Date: 2004-11-03 08:11:09 -0700 (Wed, 03 Nov 2004) $"
__credits__ = """"""
__revision__ = "$Revision: 503 $"
# Copyright (C) 2004 by
# Aric Hagberg <[email protected]... | #!/usr/bin/env python
"""
Random graph from given degree sequence.
"""
__author__ = """Aric Hagberg ([email protected])"""
__date__ = "$Date: 2004-11-03 08:11:09 -0700 (Wed, 03 Nov 2004) $"
__credits__ = """"""
__revision__ = "$Revision: 503 $"
# Copyright (C) 2004 by
# Aric Hagberg <[email protected]>
# Dan Sc... | #!/usr/bin/env python
"""
Random graph from given degree sequence.
"""
__author__ = """Aric Hagberg ([email protected])"""
__date__ = "$Date: 2004-11-03 08:11:09 -0700 (Wed, 03 Nov 2004) $"
__credits__ = """"""
__revision__ = "$Revision: 503 $"
# Copyright (C) 2004 by
# Aric Hagberg <[email protected]>
# Dan Sc... | <commit_before>#!/usr/bin/env python
"""
Random graph from given degree sequence.
"""
__author__ = """Aric Hagberg ([email protected])"""
__date__ = "$Date: 2004-11-03 08:11:09 -0700 (Wed, 03 Nov 2004) $"
__credits__ = """"""
__revision__ = "$Revision: 503 $"
# Copyright (C) 2004 by
# Aric Hagberg <[email protected]... |
c79a3d368b1727b02e97600b17ac3da28a2107b4 | project/apps/forum/serializers.py | project/apps/forum/serializers.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from machina.core.db.models import get_model
from rest_framework import serializers
Forum = get_model('forum', 'Forum')
class ForumSerializer(serializers.ModelSerializer):
description = serializers.SerializerMethodField()
previous_sibling = se... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from machina.core.db.models import get_model
from rest_framework import serializers
Forum = get_model('forum', 'Forum')
class ForumSerializer(serializers.ModelSerializer):
description = serializers.SerializerMethodField()
class Meta:
... | Remove forum siblings from forum serializer | Remove forum siblings from forum serializer
| Python | mit | ellmetha/machina-singlepageapp,ellmetha/machina-singlepageapp | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from machina.core.db.models import get_model
from rest_framework import serializers
Forum = get_model('forum', 'Forum')
class ForumSerializer(serializers.ModelSerializer):
description = serializers.SerializerMethodField()
previous_sibling = se... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from machina.core.db.models import get_model
from rest_framework import serializers
Forum = get_model('forum', 'Forum')
class ForumSerializer(serializers.ModelSerializer):
description = serializers.SerializerMethodField()
class Meta:
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from machina.core.db.models import get_model
from rest_framework import serializers
Forum = get_model('forum', 'Forum')
class ForumSerializer(serializers.ModelSerializer):
description = serializers.SerializerMethodField()
previo... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from machina.core.db.models import get_model
from rest_framework import serializers
Forum = get_model('forum', 'Forum')
class ForumSerializer(serializers.ModelSerializer):
description = serializers.SerializerMethodField()
class Meta:
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from machina.core.db.models import get_model
from rest_framework import serializers
Forum = get_model('forum', 'Forum')
class ForumSerializer(serializers.ModelSerializer):
description = serializers.SerializerMethodField()
previous_sibling = se... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from machina.core.db.models import get_model
from rest_framework import serializers
Forum = get_model('forum', 'Forum')
class ForumSerializer(serializers.ModelSerializer):
description = serializers.SerializerMethodField()
previo... |
0242e64799ebd992b5bec715da956b00e1bddccd | examples/load_ui_base_instance.py | examples/load_ui_base_instance.py | import sys
import os
os.environ["QT_PREFERRED_BINDING"] = "PySide"
from Qt import QtWidgets, load_ui
def setup_ui(uifile, base_instance=None):
ui = load_ui(uifile)
if not base_instance:
return ui
else:
for member in dir(ui):
if not member.startswith('__') and \
... | import sys
import os
# Set preferred binding
# os.environ["QT_PREFERRED_BINDING"] = "PySide"
from Qt import QtWidgets, load_ui
def setup_ui(uifile, base_instance=None):
ui = load_ui(uifile)
if not base_instance:
return ui
else:
for member in dir(ui):
if not member.startswith(... | Remove preffered binding, use obj.__class__ instead of type() | Remove preffered binding, use obj.__class__ instead of type()
| Python | mit | mottosso/Qt.py,mottosso/Qt.py,fredrikaverpil/Qt.py,fredrikaverpil/Qt.py | import sys
import os
os.environ["QT_PREFERRED_BINDING"] = "PySide"
from Qt import QtWidgets, load_ui
def setup_ui(uifile, base_instance=None):
ui = load_ui(uifile)
if not base_instance:
return ui
else:
for member in dir(ui):
if not member.startswith('__') and \
... | import sys
import os
# Set preferred binding
# os.environ["QT_PREFERRED_BINDING"] = "PySide"
from Qt import QtWidgets, load_ui
def setup_ui(uifile, base_instance=None):
ui = load_ui(uifile)
if not base_instance:
return ui
else:
for member in dir(ui):
if not member.startswith(... | <commit_before>import sys
import os
os.environ["QT_PREFERRED_BINDING"] = "PySide"
from Qt import QtWidgets, load_ui
def setup_ui(uifile, base_instance=None):
ui = load_ui(uifile)
if not base_instance:
return ui
else:
for member in dir(ui):
if not member.startswith('__') and \
... | import sys
import os
# Set preferred binding
# os.environ["QT_PREFERRED_BINDING"] = "PySide"
from Qt import QtWidgets, load_ui
def setup_ui(uifile, base_instance=None):
ui = load_ui(uifile)
if not base_instance:
return ui
else:
for member in dir(ui):
if not member.startswith(... | import sys
import os
os.environ["QT_PREFERRED_BINDING"] = "PySide"
from Qt import QtWidgets, load_ui
def setup_ui(uifile, base_instance=None):
ui = load_ui(uifile)
if not base_instance:
return ui
else:
for member in dir(ui):
if not member.startswith('__') and \
... | <commit_before>import sys
import os
os.environ["QT_PREFERRED_BINDING"] = "PySide"
from Qt import QtWidgets, load_ui
def setup_ui(uifile, base_instance=None):
ui = load_ui(uifile)
if not base_instance:
return ui
else:
for member in dir(ui):
if not member.startswith('__') and \
... |
8258848f42142a9b539e3674e3cdaae2ffac09a1 | app/main/views/root.py | app/main/views/root.py | import os
import markdown
import yaml
from flask import render_template, render_template_string, session
from .. import main
from application import application
@main.route('/', methods=['GET'])
def root():
return render_template('index.html')
@main.route('/patterns/')
@main.route('/patterns/<pattern>')
def patte... | import os
import markdown
import yaml
from flask import render_template, render_template_string, session
from .. import main
from application import application
@main.route('/', methods=['GET'])
def root():
return render_template('index.html')
@main.route('/patterns/')
@main.route('/patterns/<pattern>')
def pat... | Fix to pass python linter, this slipped through as the master branch wasnt protected | Fix to pass python linter, this slipped through as the master branch wasnt protected
| Python | mit | ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner | import os
import markdown
import yaml
from flask import render_template, render_template_string, session
from .. import main
from application import application
@main.route('/', methods=['GET'])
def root():
return render_template('index.html')
@main.route('/patterns/')
@main.route('/patterns/<pattern>')
def patte... | import os
import markdown
import yaml
from flask import render_template, render_template_string, session
from .. import main
from application import application
@main.route('/', methods=['GET'])
def root():
return render_template('index.html')
@main.route('/patterns/')
@main.route('/patterns/<pattern>')
def pat... | <commit_before>import os
import markdown
import yaml
from flask import render_template, render_template_string, session
from .. import main
from application import application
@main.route('/', methods=['GET'])
def root():
return render_template('index.html')
@main.route('/patterns/')
@main.route('/patterns/<patte... | import os
import markdown
import yaml
from flask import render_template, render_template_string, session
from .. import main
from application import application
@main.route('/', methods=['GET'])
def root():
return render_template('index.html')
@main.route('/patterns/')
@main.route('/patterns/<pattern>')
def pat... | import os
import markdown
import yaml
from flask import render_template, render_template_string, session
from .. import main
from application import application
@main.route('/', methods=['GET'])
def root():
return render_template('index.html')
@main.route('/patterns/')
@main.route('/patterns/<pattern>')
def patte... | <commit_before>import os
import markdown
import yaml
from flask import render_template, render_template_string, session
from .. import main
from application import application
@main.route('/', methods=['GET'])
def root():
return render_template('index.html')
@main.route('/patterns/')
@main.route('/patterns/<patte... |
7447d0df2034d0113582ba1aae09cf7388430432 | sqlitebiter/_enum.py | sqlitebiter/_enum.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
from enum import Enum
class Context(Enum):
DUP_DATABASE = 1
CONVERT_CONFIG = 5
INDEX_LIST = 10
ADD_PRIMARY_KEY_NAME = 15
TYPE_INFERENCE = 19
TYPE_HINT_HEADER = 20... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
from enum import Enum, unique
@unique
class Context(Enum):
DUP_DATABASE = 1
CONVERT_CONFIG = 5
INDEX_LIST = 10
ADD_PRIMARY_KEY_NAME = 15
TYPE_INFERENCE = 19
TYPE_... | Add unique constraints to Enum definitions | Add unique constraints to Enum definitions
| Python | mit | thombashi/sqlitebiter,thombashi/sqlitebiter | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
from enum import Enum
class Context(Enum):
DUP_DATABASE = 1
CONVERT_CONFIG = 5
INDEX_LIST = 10
ADD_PRIMARY_KEY_NAME = 15
TYPE_INFERENCE = 19
TYPE_HINT_HEADER = 20... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
from enum import Enum, unique
@unique
class Context(Enum):
DUP_DATABASE = 1
CONVERT_CONFIG = 5
INDEX_LIST = 10
ADD_PRIMARY_KEY_NAME = 15
TYPE_INFERENCE = 19
TYPE_... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
from enum import Enum
class Context(Enum):
DUP_DATABASE = 1
CONVERT_CONFIG = 5
INDEX_LIST = 10
ADD_PRIMARY_KEY_NAME = 15
TYPE_INFERENCE = 19
TYPE_H... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
from enum import Enum, unique
@unique
class Context(Enum):
DUP_DATABASE = 1
CONVERT_CONFIG = 5
INDEX_LIST = 10
ADD_PRIMARY_KEY_NAME = 15
TYPE_INFERENCE = 19
TYPE_... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
from enum import Enum
class Context(Enum):
DUP_DATABASE = 1
CONVERT_CONFIG = 5
INDEX_LIST = 10
ADD_PRIMARY_KEY_NAME = 15
TYPE_INFERENCE = 19
TYPE_HINT_HEADER = 20... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from __future__ import absolute_import
from enum import Enum
class Context(Enum):
DUP_DATABASE = 1
CONVERT_CONFIG = 5
INDEX_LIST = 10
ADD_PRIMARY_KEY_NAME = 15
TYPE_INFERENCE = 19
TYPE_H... |
cda667a247ece3f389b8aef22bb7e348ad4cfba6 | hp3parclient/__init__.py | hp3parclient/__init__.py | # Copyright 2012-2014 Hewlett Packard Development Company, L.P.
# 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/LICE... | # Copyright 2012-2014 Hewlett Packard Development Company, L.P.
# 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/LICE... | Update the version to 3.0.0 | Update the version to 3.0.0
| Python | apache-2.0 | hpe-storage/python-3parclient,hp-storage/python-3parclient | # Copyright 2012-2014 Hewlett Packard Development Company, L.P.
# 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/LICE... | # Copyright 2012-2014 Hewlett Packard Development Company, L.P.
# 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/LICE... | <commit_before># Copyright 2012-2014 Hewlett Packard Development Company, L.P.
# 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.or... | # Copyright 2012-2014 Hewlett Packard Development Company, L.P.
# 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/LICE... | # Copyright 2012-2014 Hewlett Packard Development Company, L.P.
# 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/LICE... | <commit_before># Copyright 2012-2014 Hewlett Packard Development Company, L.P.
# 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.or... |
054c283d1cdccdf8277acc96435672480587f6b9 | devicehive/api_subscribe_request.py | devicehive/api_subscribe_request.py | class ApiSubscribeRequest(object):
"""Api request class."""
def __init__(self):
self._action = None
self._request = {}
self._params = {'method': 'GET',
'url': None,
'params': {},
'headers': {},
... | class ApiSubscribeRequest(object):
"""Api request class."""
def __init__(self):
self._action = None
self._request = {}
self._params = {'method': 'GET',
'url': None,
'params': {},
'headers': {},
... | Add params_timestamp_key and response_timestamp_key methods | Add params_timestamp_key and response_timestamp_key methods
| Python | apache-2.0 | devicehive/devicehive-python | class ApiSubscribeRequest(object):
"""Api request class."""
def __init__(self):
self._action = None
self._request = {}
self._params = {'method': 'GET',
'url': None,
'params': {},
'headers': {},
... | class ApiSubscribeRequest(object):
"""Api request class."""
def __init__(self):
self._action = None
self._request = {}
self._params = {'method': 'GET',
'url': None,
'params': {},
'headers': {},
... | <commit_before>class ApiSubscribeRequest(object):
"""Api request class."""
def __init__(self):
self._action = None
self._request = {}
self._params = {'method': 'GET',
'url': None,
'params': {},
'headers': {},
... | class ApiSubscribeRequest(object):
"""Api request class."""
def __init__(self):
self._action = None
self._request = {}
self._params = {'method': 'GET',
'url': None,
'params': {},
'headers': {},
... | class ApiSubscribeRequest(object):
"""Api request class."""
def __init__(self):
self._action = None
self._request = {}
self._params = {'method': 'GET',
'url': None,
'params': {},
'headers': {},
... | <commit_before>class ApiSubscribeRequest(object):
"""Api request class."""
def __init__(self):
self._action = None
self._request = {}
self._params = {'method': 'GET',
'url': None,
'params': {},
'headers': {},
... |
c730184a6ec826f9773fa4130e59121c0fd06e4d | api_v3/misc/oauth2.py | api_v3/misc/oauth2.py | from urlparse import urljoin
from django.conf import settings
import jwt
from social_core.backends.oauth import BaseOAuth2
class KeycloakOAuth2(BaseOAuth2):
"""Keycloak OAuth authentication backend"""
name = 'keycloak'
ID_KEY = 'email'
BASE_URL = settings.SOCIAL_AUTH_KEYCLOAK_BASE
USERINFO_URL ... | from urlparse import urljoin
from django.conf import settings
import jwt
from social_core.backends.oauth import BaseOAuth2
class KeycloakOAuth2(BaseOAuth2):
"""Keycloak OAuth authentication backend"""
name = 'keycloak'
ID_KEY = 'email'
BASE_URL = settings.SOCIAL_AUTH_KEYCLOAK_BASE
USERINFO_URL ... | Remove `username` from keycloack payload. | Remove `username` from keycloack payload.
| Python | mit | occrp/id-backend | from urlparse import urljoin
from django.conf import settings
import jwt
from social_core.backends.oauth import BaseOAuth2
class KeycloakOAuth2(BaseOAuth2):
"""Keycloak OAuth authentication backend"""
name = 'keycloak'
ID_KEY = 'email'
BASE_URL = settings.SOCIAL_AUTH_KEYCLOAK_BASE
USERINFO_URL ... | from urlparse import urljoin
from django.conf import settings
import jwt
from social_core.backends.oauth import BaseOAuth2
class KeycloakOAuth2(BaseOAuth2):
"""Keycloak OAuth authentication backend"""
name = 'keycloak'
ID_KEY = 'email'
BASE_URL = settings.SOCIAL_AUTH_KEYCLOAK_BASE
USERINFO_URL ... | <commit_before>from urlparse import urljoin
from django.conf import settings
import jwt
from social_core.backends.oauth import BaseOAuth2
class KeycloakOAuth2(BaseOAuth2):
"""Keycloak OAuth authentication backend"""
name = 'keycloak'
ID_KEY = 'email'
BASE_URL = settings.SOCIAL_AUTH_KEYCLOAK_BASE
... | from urlparse import urljoin
from django.conf import settings
import jwt
from social_core.backends.oauth import BaseOAuth2
class KeycloakOAuth2(BaseOAuth2):
"""Keycloak OAuth authentication backend"""
name = 'keycloak'
ID_KEY = 'email'
BASE_URL = settings.SOCIAL_AUTH_KEYCLOAK_BASE
USERINFO_URL ... | from urlparse import urljoin
from django.conf import settings
import jwt
from social_core.backends.oauth import BaseOAuth2
class KeycloakOAuth2(BaseOAuth2):
"""Keycloak OAuth authentication backend"""
name = 'keycloak'
ID_KEY = 'email'
BASE_URL = settings.SOCIAL_AUTH_KEYCLOAK_BASE
USERINFO_URL ... | <commit_before>from urlparse import urljoin
from django.conf import settings
import jwt
from social_core.backends.oauth import BaseOAuth2
class KeycloakOAuth2(BaseOAuth2):
"""Keycloak OAuth authentication backend"""
name = 'keycloak'
ID_KEY = 'email'
BASE_URL = settings.SOCIAL_AUTH_KEYCLOAK_BASE
... |
5208429f8e684d8604fe9a8a7eda3709ace0755c | bin/cros_repo_sync_all.py | bin/cros_repo_sync_all.py | #!/usr/bin/python
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Stop gap sync function until cbuildbot is integrated into all builders"""
import cbuildbot
import optparse
import sys
"""Numbe... | #!/usr/bin/python
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Stop gap sync function until cbuildbot is integrated into all builders"""
import cbuildbot_comm
import cbuildbot
import optpars... | Fix circ dep issue with cbuildbot | TBR: Fix circ dep issue with cbuildbot
| Python | bsd-3-clause | sigma/coreos-scripts,smilart/scripts,nicescale/scripts,mjg59/scripts,crawford/scripts,coreos/scripts,bcwaldon/coreos-scripts,bcwaldon/coreos-scripts,endocode/scripts,zhang0137/scripts,zhang0137/scripts,mjg59/scripts,gtank/scripts,gtank/scripts,gtank/scripts,glevand/coreos--scripts,sigma/coreos-scripts,smilart/scripts,m... | #!/usr/bin/python
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Stop gap sync function until cbuildbot is integrated into all builders"""
import cbuildbot
import optparse
import sys
"""Numbe... | #!/usr/bin/python
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Stop gap sync function until cbuildbot is integrated into all builders"""
import cbuildbot_comm
import cbuildbot
import optpars... | <commit_before>#!/usr/bin/python
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Stop gap sync function until cbuildbot is integrated into all builders"""
import cbuildbot
import optparse
impor... | #!/usr/bin/python
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Stop gap sync function until cbuildbot is integrated into all builders"""
import cbuildbot_comm
import cbuildbot
import optpars... | #!/usr/bin/python
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Stop gap sync function until cbuildbot is integrated into all builders"""
import cbuildbot
import optparse
import sys
"""Numbe... | <commit_before>#!/usr/bin/python
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Stop gap sync function until cbuildbot is integrated into all builders"""
import cbuildbot
import optparse
impor... |
1e7c53398e6a4a72d4027524622b32ee1819f154 | zpr.py | zpr.py | #!bin/python
import json
import lib_zpr
from flask import Flask, jsonify, make_response
app = Flask(__name__)
api_version = 'v1.0'
api_base = str('/zpr/{v}'.format(v=api_version))
@app.errorhandler(404)
def not_found(error):
return make_response(jsonify({'error': 'Not found'}), 404)
# @app.route('/zpr/job')
#... | #!bin/python
import json
import lib_zpr
from flask import Flask, jsonify, make_response
app = Flask(__name__)
api_version = 'v1.0'
api_base = str('/zpr/{v}'.format(v=api_version))
@app.errorhandler(404)
def not_found(error):
return make_response(jsonify({'error': 'Not found'}), 404)
# @app.route('/zpr/job')
#... | Add host and remove debug | Add host and remove debug
| Python | apache-2.0 | mattkirby/zpr-api | #!bin/python
import json
import lib_zpr
from flask import Flask, jsonify, make_response
app = Flask(__name__)
api_version = 'v1.0'
api_base = str('/zpr/{v}'.format(v=api_version))
@app.errorhandler(404)
def not_found(error):
return make_response(jsonify({'error': 'Not found'}), 404)
# @app.route('/zpr/job')
#... | #!bin/python
import json
import lib_zpr
from flask import Flask, jsonify, make_response
app = Flask(__name__)
api_version = 'v1.0'
api_base = str('/zpr/{v}'.format(v=api_version))
@app.errorhandler(404)
def not_found(error):
return make_response(jsonify({'error': 'Not found'}), 404)
# @app.route('/zpr/job')
#... | <commit_before>#!bin/python
import json
import lib_zpr
from flask import Flask, jsonify, make_response
app = Flask(__name__)
api_version = 'v1.0'
api_base = str('/zpr/{v}'.format(v=api_version))
@app.errorhandler(404)
def not_found(error):
return make_response(jsonify({'error': 'Not found'}), 404)
# @app.rout... | #!bin/python
import json
import lib_zpr
from flask import Flask, jsonify, make_response
app = Flask(__name__)
api_version = 'v1.0'
api_base = str('/zpr/{v}'.format(v=api_version))
@app.errorhandler(404)
def not_found(error):
return make_response(jsonify({'error': 'Not found'}), 404)
# @app.route('/zpr/job')
#... | #!bin/python
import json
import lib_zpr
from flask import Flask, jsonify, make_response
app = Flask(__name__)
api_version = 'v1.0'
api_base = str('/zpr/{v}'.format(v=api_version))
@app.errorhandler(404)
def not_found(error):
return make_response(jsonify({'error': 'Not found'}), 404)
# @app.route('/zpr/job')
#... | <commit_before>#!bin/python
import json
import lib_zpr
from flask import Flask, jsonify, make_response
app = Flask(__name__)
api_version = 'v1.0'
api_base = str('/zpr/{v}'.format(v=api_version))
@app.errorhandler(404)
def not_found(error):
return make_response(jsonify({'error': 'Not found'}), 404)
# @app.rout... |
8605b07f2f5951f8a0b85d3d77baa1758723fb64 | auth0/v2/authentication/users.py | auth0/v2/authentication/users.py | from .base import AuthenticationBase
class Users(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def userinfo(self, access_token):
return self.get(
url='https://%s/userinfo' % self.domain,
headers={'Authorization': 'Bearer %s' % access_token}
... | from .base import AuthenticationBase
class Users(AuthenticationBase):
"""Userinfo related endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def __init__(self, domain):
self.domain = domain
def userinfo(self, access_token):
"""Returns the us... | Add docstrings to Users class | Add docstrings to Users class
| Python | mit | auth0/auth0-python,auth0/auth0-python | from .base import AuthenticationBase
class Users(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def userinfo(self, access_token):
return self.get(
url='https://%s/userinfo' % self.domain,
headers={'Authorization': 'Bearer %s' % access_token}
... | from .base import AuthenticationBase
class Users(AuthenticationBase):
"""Userinfo related endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def __init__(self, domain):
self.domain = domain
def userinfo(self, access_token):
"""Returns the us... | <commit_before>from .base import AuthenticationBase
class Users(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def userinfo(self, access_token):
return self.get(
url='https://%s/userinfo' % self.domain,
headers={'Authorization': 'Bearer %s' % ac... | from .base import AuthenticationBase
class Users(AuthenticationBase):
"""Userinfo related endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def __init__(self, domain):
self.domain = domain
def userinfo(self, access_token):
"""Returns the us... | from .base import AuthenticationBase
class Users(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def userinfo(self, access_token):
return self.get(
url='https://%s/userinfo' % self.domain,
headers={'Authorization': 'Bearer %s' % access_token}
... | <commit_before>from .base import AuthenticationBase
class Users(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def userinfo(self, access_token):
return self.get(
url='https://%s/userinfo' % self.domain,
headers={'Authorization': 'Bearer %s' % ac... |
67d08d61186f7d9bc0026c1d867039f58872fee7 | main.py | main.py | import cmd
import argparse
from Interface import *
class Lexeme(cmd.Cmd):
intro = "Welcome to Lexeme! Input '?' for help and commands."
prompt = "Enter command: "
def do_list(self, arg):
'List word database.'
listwords()
def do_quit(self, arg):
quit()
def do_add(self, ar... | import cmd
import argparse
from Interface import *
class Lexeme(cmd.Cmd):
intro = "Welcome to Lexeme! Input '?' for help and commands."
prompt = "Enter command: "
def do_list(self, arg):
'List word database.'
listwords()
def do_quit(self, arg):
quit()
def do_add(self, ar... | Clear screen at start of program | Clear screen at start of program
| Python | mit | kdelwat/Lexeme | import cmd
import argparse
from Interface import *
class Lexeme(cmd.Cmd):
intro = "Welcome to Lexeme! Input '?' for help and commands."
prompt = "Enter command: "
def do_list(self, arg):
'List word database.'
listwords()
def do_quit(self, arg):
quit()
def do_add(self, ar... | import cmd
import argparse
from Interface import *
class Lexeme(cmd.Cmd):
intro = "Welcome to Lexeme! Input '?' for help and commands."
prompt = "Enter command: "
def do_list(self, arg):
'List word database.'
listwords()
def do_quit(self, arg):
quit()
def do_add(self, ar... | <commit_before>import cmd
import argparse
from Interface import *
class Lexeme(cmd.Cmd):
intro = "Welcome to Lexeme! Input '?' for help and commands."
prompt = "Enter command: "
def do_list(self, arg):
'List word database.'
listwords()
def do_quit(self, arg):
quit()
def ... | import cmd
import argparse
from Interface import *
class Lexeme(cmd.Cmd):
intro = "Welcome to Lexeme! Input '?' for help and commands."
prompt = "Enter command: "
def do_list(self, arg):
'List word database.'
listwords()
def do_quit(self, arg):
quit()
def do_add(self, ar... | import cmd
import argparse
from Interface import *
class Lexeme(cmd.Cmd):
intro = "Welcome to Lexeme! Input '?' for help and commands."
prompt = "Enter command: "
def do_list(self, arg):
'List word database.'
listwords()
def do_quit(self, arg):
quit()
def do_add(self, ar... | <commit_before>import cmd
import argparse
from Interface import *
class Lexeme(cmd.Cmd):
intro = "Welcome to Lexeme! Input '?' for help and commands."
prompt = "Enter command: "
def do_list(self, arg):
'List word database.'
listwords()
def do_quit(self, arg):
quit()
def ... |
9e9b36836ab829c2bf8226e2836ec6f21b7905c3 | main.py | main.py | # -*- coding: utf-8 -*-
# flake8: noqa
import views
from flask import Flask
from flask_themes2 import Themes
import config
from util.auth import is_admin
from util.converter import RegexConverter
from util.csrf import generate_csrf_token
app = Flask(__name__.split('.')[0])
app.secret_key = config.SECRET_KEY
app.url_... | # -*- coding: utf-8 -*-
# flake8: noqa
from flask import Flask
from flask_themes2 import Themes
import config
from util.auth import is_admin
from util.converter import RegexConverter
from util.csrf import generate_csrf_token
app = Flask(__name__.split('.')[0])
app.secret_key = config.SECRET_KEY
app.url_map.converter... | Fix ImportErrors when running tests, make sure pre-commit hooks still pass | Fix ImportErrors when running tests, make sure pre-commit hooks still pass
| Python | mit | Yelp/love,Yelp/love,Yelp/love | # -*- coding: utf-8 -*-
# flake8: noqa
import views
from flask import Flask
from flask_themes2 import Themes
import config
from util.auth import is_admin
from util.converter import RegexConverter
from util.csrf import generate_csrf_token
app = Flask(__name__.split('.')[0])
app.secret_key = config.SECRET_KEY
app.url_... | # -*- coding: utf-8 -*-
# flake8: noqa
from flask import Flask
from flask_themes2 import Themes
import config
from util.auth import is_admin
from util.converter import RegexConverter
from util.csrf import generate_csrf_token
app = Flask(__name__.split('.')[0])
app.secret_key = config.SECRET_KEY
app.url_map.converter... | <commit_before># -*- coding: utf-8 -*-
# flake8: noqa
import views
from flask import Flask
from flask_themes2 import Themes
import config
from util.auth import is_admin
from util.converter import RegexConverter
from util.csrf import generate_csrf_token
app = Flask(__name__.split('.')[0])
app.secret_key = config.SECR... | # -*- coding: utf-8 -*-
# flake8: noqa
from flask import Flask
from flask_themes2 import Themes
import config
from util.auth import is_admin
from util.converter import RegexConverter
from util.csrf import generate_csrf_token
app = Flask(__name__.split('.')[0])
app.secret_key = config.SECRET_KEY
app.url_map.converter... | # -*- coding: utf-8 -*-
# flake8: noqa
import views
from flask import Flask
from flask_themes2 import Themes
import config
from util.auth import is_admin
from util.converter import RegexConverter
from util.csrf import generate_csrf_token
app = Flask(__name__.split('.')[0])
app.secret_key = config.SECRET_KEY
app.url_... | <commit_before># -*- coding: utf-8 -*-
# flake8: noqa
import views
from flask import Flask
from flask_themes2 import Themes
import config
from util.auth import is_admin
from util.converter import RegexConverter
from util.csrf import generate_csrf_token
app = Flask(__name__.split('.')[0])
app.secret_key = config.SECR... |
68e67cee8969dbf360ed685dd8e6e76562d085d3 | examples/regression_marginals.py | examples/regression_marginals.py | """
Linear regression with marginal distributions
=============================================
"""
import seaborn as sns
sns.set(style="darkgrid")
tips = sns.load_dataset("tips")
color = sns.color_palette()[2]
g = sns.jointplot("total_bill", "tip", data=tips, kind="reg",
color=color, size=7)
g.ax_j... | """
Linear regression with marginal distributions
=============================================
"""
import seaborn as sns
sns.set(style="darkgrid")
tips = sns.load_dataset("tips")
color = sns.color_palette()[2]
g = sns.jointplot("total_bill", "tip", data=tips, kind="reg",
xlim=(0, 60), ylim=(0, 12),... | Set jointplot example axis limits in main call | Set jointplot example axis limits in main call
| Python | bsd-3-clause | uhjish/seaborn,anntzer/seaborn,lukauskas/seaborn,mwaskom/seaborn,sauliusl/seaborn,oesteban/seaborn,q1ang/seaborn,mia1rab/seaborn,aashish24/seaborn,parantapa/seaborn,cwu2011/seaborn,huongttlan/seaborn,lypzln/seaborn,dimarkov/seaborn,arokem/seaborn,clarkfitzg/seaborn,phobson/seaborn,mwaskom/seaborn,nileracecrew/seaborn,j... | """
Linear regression with marginal distributions
=============================================
"""
import seaborn as sns
sns.set(style="darkgrid")
tips = sns.load_dataset("tips")
color = sns.color_palette()[2]
g = sns.jointplot("total_bill", "tip", data=tips, kind="reg",
color=color, size=7)
g.ax_j... | """
Linear regression with marginal distributions
=============================================
"""
import seaborn as sns
sns.set(style="darkgrid")
tips = sns.load_dataset("tips")
color = sns.color_palette()[2]
g = sns.jointplot("total_bill", "tip", data=tips, kind="reg",
xlim=(0, 60), ylim=(0, 12),... | <commit_before>"""
Linear regression with marginal distributions
=============================================
"""
import seaborn as sns
sns.set(style="darkgrid")
tips = sns.load_dataset("tips")
color = sns.color_palette()[2]
g = sns.jointplot("total_bill", "tip", data=tips, kind="reg",
color=color,... | """
Linear regression with marginal distributions
=============================================
"""
import seaborn as sns
sns.set(style="darkgrid")
tips = sns.load_dataset("tips")
color = sns.color_palette()[2]
g = sns.jointplot("total_bill", "tip", data=tips, kind="reg",
xlim=(0, 60), ylim=(0, 12),... | """
Linear regression with marginal distributions
=============================================
"""
import seaborn as sns
sns.set(style="darkgrid")
tips = sns.load_dataset("tips")
color = sns.color_palette()[2]
g = sns.jointplot("total_bill", "tip", data=tips, kind="reg",
color=color, size=7)
g.ax_j... | <commit_before>"""
Linear regression with marginal distributions
=============================================
"""
import seaborn as sns
sns.set(style="darkgrid")
tips = sns.load_dataset("tips")
color = sns.color_palette()[2]
g = sns.jointplot("total_bill", "tip", data=tips, kind="reg",
color=color,... |
f4bf065dac9ee40e89f02115042e86c75ea3f22c | tests/basics/generator-args.py | tests/basics/generator-args.py | # Handling of "complicated" arg forms to generators
# https://github.com/micropython/micropython/issues/397
def gen(v=5):
for i in range(v):
yield i
print(list(gen()))
# Still not supported, ditto for *args and **kwargs
#print(list(gen(v=10)))
| # Handling of "complicated" arg forms to generators
# https://github.com/micropython/micropython/issues/397
def gen(v=5):
for i in range(v):
yield i
print(list(gen()))
print(list(gen(v=10)))
def g(*args, **kwargs):
for i in args:
yield i
for k, v in kwargs.items():
yield (k, v)
p... | Add testcases for "complicated" args to generator functions. | tests: Add testcases for "complicated" args to generator functions.
| Python | mit | xhat/micropython,puuu/micropython,emfcamp/micropython,hosaka/micropython,torwag/micropython,selste/micropython,MrSurly/micropython,tuc-osg/micropython,ceramos/micropython,ahotam/micropython,jmarcelino/pycom-micropython,tralamazza/micropython,ganshun666/micropython,stonegithubs/micropython,lbattraw/micropython,ceramos/m... | # Handling of "complicated" arg forms to generators
# https://github.com/micropython/micropython/issues/397
def gen(v=5):
for i in range(v):
yield i
print(list(gen()))
# Still not supported, ditto for *args and **kwargs
#print(list(gen(v=10)))
tests: Add testcases for "complicated" args to generator functi... | # Handling of "complicated" arg forms to generators
# https://github.com/micropython/micropython/issues/397
def gen(v=5):
for i in range(v):
yield i
print(list(gen()))
print(list(gen(v=10)))
def g(*args, **kwargs):
for i in args:
yield i
for k, v in kwargs.items():
yield (k, v)
p... | <commit_before># Handling of "complicated" arg forms to generators
# https://github.com/micropython/micropython/issues/397
def gen(v=5):
for i in range(v):
yield i
print(list(gen()))
# Still not supported, ditto for *args and **kwargs
#print(list(gen(v=10)))
<commit_msg>tests: Add testcases for "complicate... | # Handling of "complicated" arg forms to generators
# https://github.com/micropython/micropython/issues/397
def gen(v=5):
for i in range(v):
yield i
print(list(gen()))
print(list(gen(v=10)))
def g(*args, **kwargs):
for i in args:
yield i
for k, v in kwargs.items():
yield (k, v)
p... | # Handling of "complicated" arg forms to generators
# https://github.com/micropython/micropython/issues/397
def gen(v=5):
for i in range(v):
yield i
print(list(gen()))
# Still not supported, ditto for *args and **kwargs
#print(list(gen(v=10)))
tests: Add testcases for "complicated" args to generator functi... | <commit_before># Handling of "complicated" arg forms to generators
# https://github.com/micropython/micropython/issues/397
def gen(v=5):
for i in range(v):
yield i
print(list(gen()))
# Still not supported, ditto for *args and **kwargs
#print(list(gen(v=10)))
<commit_msg>tests: Add testcases for "complicate... |
c1b8f935801ca8925c0f3b001a2582136cb861ad | nani.py | nani.py | #!/usr/bin/env python3
"""Information overview for command line tools.
Usage:
nani <command>
nani -h | --help
nani --version
Options:
-h, --help Print this message and exit.
--version Print version info and exit.
"""
from docopt import docopt
import subprocess
if __name__ == '__main__':
arguments =... | #!/usr/bin/env python3
"""Information overview for command line tools.
Usage:
nani <command>
nani -h | --help
nani --version
Options:
-h, --help Print this message and exit.
--version Print version info and exit.
"""
from docopt import docopt
import sys
import subprocess
if __name__ == '__main__':
... | Call type instead of which | Call type instead of which
| Python | mit | fenhl/nani | #!/usr/bin/env python3
"""Information overview for command line tools.
Usage:
nani <command>
nani -h | --help
nani --version
Options:
-h, --help Print this message and exit.
--version Print version info and exit.
"""
from docopt import docopt
import subprocess
if __name__ == '__main__':
arguments =... | #!/usr/bin/env python3
"""Information overview for command line tools.
Usage:
nani <command>
nani -h | --help
nani --version
Options:
-h, --help Print this message and exit.
--version Print version info and exit.
"""
from docopt import docopt
import sys
import subprocess
if __name__ == '__main__':
... | <commit_before>#!/usr/bin/env python3
"""Information overview for command line tools.
Usage:
nani <command>
nani -h | --help
nani --version
Options:
-h, --help Print this message and exit.
--version Print version info and exit.
"""
from docopt import docopt
import subprocess
if __name__ == '__main__':
... | #!/usr/bin/env python3
"""Information overview for command line tools.
Usage:
nani <command>
nani -h | --help
nani --version
Options:
-h, --help Print this message and exit.
--version Print version info and exit.
"""
from docopt import docopt
import sys
import subprocess
if __name__ == '__main__':
... | #!/usr/bin/env python3
"""Information overview for command line tools.
Usage:
nani <command>
nani -h | --help
nani --version
Options:
-h, --help Print this message and exit.
--version Print version info and exit.
"""
from docopt import docopt
import subprocess
if __name__ == '__main__':
arguments =... | <commit_before>#!/usr/bin/env python3
"""Information overview for command line tools.
Usage:
nani <command>
nani -h | --help
nani --version
Options:
-h, --help Print this message and exit.
--version Print version info and exit.
"""
from docopt import docopt
import subprocess
if __name__ == '__main__':
... |
001a50b236e60358cf1fbe371d6d20ea72003ceb | noms.py | noms.py | #!/usr/bin/env python3
from config import WOLFRAM_KEY
import wolframalpha
POD_TITLE = 'Average nutrition facts'
QUERY = input()
def get_macros(pod_text):
items = pod_text.split("|")
for t in items:
chunks = t.split()
if 'protein' in chunks:
protein = tuple(chunks[-2::])
el... | #!/usr/bin/env python3
from config import WOLFRAM_KEY
import sys
import wolframalpha
POD_TITLE = 'Average nutrition facts'
QUERY = input()
def get_macros(pod_text):
items = pod_text.split("|")
for t in items:
chunks = t.split()
if 'protein' in chunks:
protein = chunks[-2::]
... | Add some basic error handling and remove tuples. | Add some basic error handling and remove tuples.
No need for tuples when the lists are going to be
so small. The speed difference between the two
will be minimal.
| Python | mit | brotatos/noms | #!/usr/bin/env python3
from config import WOLFRAM_KEY
import wolframalpha
POD_TITLE = 'Average nutrition facts'
QUERY = input()
def get_macros(pod_text):
items = pod_text.split("|")
for t in items:
chunks = t.split()
if 'protein' in chunks:
protein = tuple(chunks[-2::])
el... | #!/usr/bin/env python3
from config import WOLFRAM_KEY
import sys
import wolframalpha
POD_TITLE = 'Average nutrition facts'
QUERY = input()
def get_macros(pod_text):
items = pod_text.split("|")
for t in items:
chunks = t.split()
if 'protein' in chunks:
protein = chunks[-2::]
... | <commit_before>#!/usr/bin/env python3
from config import WOLFRAM_KEY
import wolframalpha
POD_TITLE = 'Average nutrition facts'
QUERY = input()
def get_macros(pod_text):
items = pod_text.split("|")
for t in items:
chunks = t.split()
if 'protein' in chunks:
protein = tuple(chunks[-2... | #!/usr/bin/env python3
from config import WOLFRAM_KEY
import sys
import wolframalpha
POD_TITLE = 'Average nutrition facts'
QUERY = input()
def get_macros(pod_text):
items = pod_text.split("|")
for t in items:
chunks = t.split()
if 'protein' in chunks:
protein = chunks[-2::]
... | #!/usr/bin/env python3
from config import WOLFRAM_KEY
import wolframalpha
POD_TITLE = 'Average nutrition facts'
QUERY = input()
def get_macros(pod_text):
items = pod_text.split("|")
for t in items:
chunks = t.split()
if 'protein' in chunks:
protein = tuple(chunks[-2::])
el... | <commit_before>#!/usr/bin/env python3
from config import WOLFRAM_KEY
import wolframalpha
POD_TITLE = 'Average nutrition facts'
QUERY = input()
def get_macros(pod_text):
items = pod_text.split("|")
for t in items:
chunks = t.split()
if 'protein' in chunks:
protein = tuple(chunks[-2... |
c4765dc1d68e5a0f20fa94841c0d2ae4d1123918 | maildump/web.py | maildump/web.py | from flask import Flask, render_template, jsonify
from logbook import Logger
from functools import wraps
import maildump
import maildump.db as db
app = Flask(__name__)
app._logger = log = Logger(__name__)
def rest(f):
"""Decorator for simple REST endpoints.
Functions must return one of these values:
-... | import json
from datetime import datetime
from flask import Flask, render_template, jsonify
from logbook import Logger
from functools import wraps
import maildump
import maildump.db as db
app = Flask(__name__)
app._logger = log = Logger(__name__)
def _json_default(obj):
if isinstance(obj, datetime):
re... | Support json encoding of datetime objects | Support json encoding of datetime objects
| Python | mit | luzfcb/maildump,luzfcb/maildump,webpartners/maildump,luzfcb/maildump,webpartners/maildump,webpartners/maildump,ThiefMaster/maildump,ThiefMaster/maildump,ThiefMaster/maildump,webpartners/maildump,luzfcb/maildump,ThiefMaster/maildump | from flask import Flask, render_template, jsonify
from logbook import Logger
from functools import wraps
import maildump
import maildump.db as db
app = Flask(__name__)
app._logger = log = Logger(__name__)
def rest(f):
"""Decorator for simple REST endpoints.
Functions must return one of these values:
-... | import json
from datetime import datetime
from flask import Flask, render_template, jsonify
from logbook import Logger
from functools import wraps
import maildump
import maildump.db as db
app = Flask(__name__)
app._logger = log = Logger(__name__)
def _json_default(obj):
if isinstance(obj, datetime):
re... | <commit_before>from flask import Flask, render_template, jsonify
from logbook import Logger
from functools import wraps
import maildump
import maildump.db as db
app = Flask(__name__)
app._logger = log = Logger(__name__)
def rest(f):
"""Decorator for simple REST endpoints.
Functions must return one of thes... | import json
from datetime import datetime
from flask import Flask, render_template, jsonify
from logbook import Logger
from functools import wraps
import maildump
import maildump.db as db
app = Flask(__name__)
app._logger = log = Logger(__name__)
def _json_default(obj):
if isinstance(obj, datetime):
re... | from flask import Flask, render_template, jsonify
from logbook import Logger
from functools import wraps
import maildump
import maildump.db as db
app = Flask(__name__)
app._logger = log = Logger(__name__)
def rest(f):
"""Decorator for simple REST endpoints.
Functions must return one of these values:
-... | <commit_before>from flask import Flask, render_template, jsonify
from logbook import Logger
from functools import wraps
import maildump
import maildump.db as db
app = Flask(__name__)
app._logger = log = Logger(__name__)
def rest(f):
"""Decorator for simple REST endpoints.
Functions must return one of thes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.