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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
958a134bd5e68ac94e3f4f25d4587e357d9a7ba5 | download_data.py | download_data.py | # coding: utf-8
"""
Script to download the raw data from http://www.rsssf.com/
The data was processed mostly by interactive sessions in ipython. Almost every
file had it's own format, so there is no point in trying to automate it in a
fully automatic script, but this downloading script may be useful for future
dowloads... | # coding: utf-8
"""
Script to download the raw data from http://www.rsssf.com/
The data was processed mostly by interactive sessions in ipython. Almost every
file had it's own format, so there is no point in trying to automate it in a
fully automatic script, but this downloading script may be useful for future
dowloads... | Use nltk to extract text from html data | Use nltk to extract text from html data
| Python | mit | fisadev/afa_cup_learning | # coding: utf-8
"""
Script to download the raw data from http://www.rsssf.com/
The data was processed mostly by interactive sessions in ipython. Almost every
file had it's own format, so there is no point in trying to automate it in a
fully automatic script, but this downloading script may be useful for future
dowloads... | # coding: utf-8
"""
Script to download the raw data from http://www.rsssf.com/
The data was processed mostly by interactive sessions in ipython. Almost every
file had it's own format, so there is no point in trying to automate it in a
fully automatic script, but this downloading script may be useful for future
dowloads... | <commit_before># coding: utf-8
"""
Script to download the raw data from http://www.rsssf.com/
The data was processed mostly by interactive sessions in ipython. Almost every
file had it's own format, so there is no point in trying to automate it in a
fully automatic script, but this downloading script may be useful for ... | # coding: utf-8
"""
Script to download the raw data from http://www.rsssf.com/
The data was processed mostly by interactive sessions in ipython. Almost every
file had it's own format, so there is no point in trying to automate it in a
fully automatic script, but this downloading script may be useful for future
dowloads... | # coding: utf-8
"""
Script to download the raw data from http://www.rsssf.com/
The data was processed mostly by interactive sessions in ipython. Almost every
file had it's own format, so there is no point in trying to automate it in a
fully automatic script, but this downloading script may be useful for future
dowloads... | <commit_before># coding: utf-8
"""
Script to download the raw data from http://www.rsssf.com/
The data was processed mostly by interactive sessions in ipython. Almost every
file had it's own format, so there is no point in trying to automate it in a
fully automatic script, but this downloading script may be useful for ... |
4212b19910e627b48df2c50389b5c8e46250c568 | girder_worker/__init__.py | girder_worker/__init__.py | import abc
import os
from pkg_resources import DistributionNotFound, get_distribution
from six.moves.configparser import SafeConfigParser
from . import log_utils
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
__license__ = 'Apache 2.0'... | import abc
import os
from pkg_resources import DistributionNotFound, get_distribution
from six.moves.configparser import SafeConfigParser, add_metaclass
from . import log_utils
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
__license__... | Use six to add meta class | Use six to add meta class
| Python | apache-2.0 | girder/girder_worker,girder/girder_worker,girder/girder_worker | import abc
import os
from pkg_resources import DistributionNotFound, get_distribution
from six.moves.configparser import SafeConfigParser
from . import log_utils
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
__license__ = 'Apache 2.0'... | import abc
import os
from pkg_resources import DistributionNotFound, get_distribution
from six.moves.configparser import SafeConfigParser, add_metaclass
from . import log_utils
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
__license__... | <commit_before>import abc
import os
from pkg_resources import DistributionNotFound, get_distribution
from six.moves.configparser import SafeConfigParser
from . import log_utils
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
__license__... | import abc
import os
from pkg_resources import DistributionNotFound, get_distribution
from six.moves.configparser import SafeConfigParser, add_metaclass
from . import log_utils
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
__license__... | import abc
import os
from pkg_resources import DistributionNotFound, get_distribution
from six.moves.configparser import SafeConfigParser
from . import log_utils
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
__license__ = 'Apache 2.0'... | <commit_before>import abc
import os
from pkg_resources import DistributionNotFound, get_distribution
from six.moves.configparser import SafeConfigParser
from . import log_utils
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
__license__... |
7638f03dfe347866d62ede55d0163e7593f9e6c9 | waterbutler/core/__init__.py | waterbutler/core/__init__.py | from waterbutler.core.utils import async_retry
from waterbutler.core.utils import make_provider
__all__ = [
'async_retry',
'make_provider',
]
| # from waterbutler.core.utils import async_retry
# from waterbutler.core.utils import make_provider
# __all__ = [
# 'async_retry',
# 'make_provider',
# ]
| Remove __all__ as it was not used and causing circular import errors when attempting to configure logging | Remove __all__ as it was not used and causing circular import errors when attempting to configure logging
| Python | apache-2.0 | TomBaxter/waterbutler,Johnetordoff/waterbutler,RCOSDP/waterbutler,kwierman/waterbutler,CenterForOpenScience/waterbutler,rdhyee/waterbutler,Ghalko/waterbutler,felliott/waterbutler,rafaeldelucena/waterbutler,hmoco/waterbutler,cosenal/waterbutler,icereval/waterbutler,chrisseto/waterbutler | from waterbutler.core.utils import async_retry
from waterbutler.core.utils import make_provider
__all__ = [
'async_retry',
'make_provider',
]
Remove __all__ as it was not used and causing circular import errors when attempting to configure logging | # from waterbutler.core.utils import async_retry
# from waterbutler.core.utils import make_provider
# __all__ = [
# 'async_retry',
# 'make_provider',
# ]
| <commit_before>from waterbutler.core.utils import async_retry
from waterbutler.core.utils import make_provider
__all__ = [
'async_retry',
'make_provider',
]
<commit_msg>Remove __all__ as it was not used and causing circular import errors when attempting to configure logging<commit_after> | # from waterbutler.core.utils import async_retry
# from waterbutler.core.utils import make_provider
# __all__ = [
# 'async_retry',
# 'make_provider',
# ]
| from waterbutler.core.utils import async_retry
from waterbutler.core.utils import make_provider
__all__ = [
'async_retry',
'make_provider',
]
Remove __all__ as it was not used and causing circular import errors when attempting to configure logging# from waterbutler.core.utils import async_retry
# from waterbut... | <commit_before>from waterbutler.core.utils import async_retry
from waterbutler.core.utils import make_provider
__all__ = [
'async_retry',
'make_provider',
]
<commit_msg>Remove __all__ as it was not used and causing circular import errors when attempting to configure logging<commit_after># from waterbutler.core... |
727e2283f60355b7c76e4ef0d72ee666eb269bd4 | facturapdf/__about__.py | facturapdf/__about__.py | __title__ = 'facturapdf'
__summary__ = 'Create PDF invoice according to Spanish regulations.'
__version__ = '0.0.1'
__license__ = 'BSD 3-Clause License'
__uri__ = 'https://github.com/initios/factura-pdf'
__author__ = 'Carlos Goce'
__email__ = 'cgonzalez@initios.com'
| __title__ = 'facturapdf'
__summary__ = 'Create PDF invoice according to Spanish regulations.'
__version__ = '0.0.2'
__license__ = 'BSD 3-Clause License'
__uri__ = 'https://github.com/initios/factura-pdf'
__author__ = 'Carlos Goce'
__email__ = 'cgonzalez@initios.com'
| Update about version. It was outdated | Update about version. It was outdated
| Python | bsd-3-clause | initios/factura-pdf | __title__ = 'facturapdf'
__summary__ = 'Create PDF invoice according to Spanish regulations.'
__version__ = '0.0.1'
__license__ = 'BSD 3-Clause License'
__uri__ = 'https://github.com/initios/factura-pdf'
__author__ = 'Carlos Goce'
__email__ = 'cgonzalez@initios.com'
Update about version. It was outdated | __title__ = 'facturapdf'
__summary__ = 'Create PDF invoice according to Spanish regulations.'
__version__ = '0.0.2'
__license__ = 'BSD 3-Clause License'
__uri__ = 'https://github.com/initios/factura-pdf'
__author__ = 'Carlos Goce'
__email__ = 'cgonzalez@initios.com'
| <commit_before>__title__ = 'facturapdf'
__summary__ = 'Create PDF invoice according to Spanish regulations.'
__version__ = '0.0.1'
__license__ = 'BSD 3-Clause License'
__uri__ = 'https://github.com/initios/factura-pdf'
__author__ = 'Carlos Goce'
__email__ = 'cgonzalez@initios.com'
<commit_msg>Update about version. It... | __title__ = 'facturapdf'
__summary__ = 'Create PDF invoice according to Spanish regulations.'
__version__ = '0.0.2'
__license__ = 'BSD 3-Clause License'
__uri__ = 'https://github.com/initios/factura-pdf'
__author__ = 'Carlos Goce'
__email__ = 'cgonzalez@initios.com'
| __title__ = 'facturapdf'
__summary__ = 'Create PDF invoice according to Spanish regulations.'
__version__ = '0.0.1'
__license__ = 'BSD 3-Clause License'
__uri__ = 'https://github.com/initios/factura-pdf'
__author__ = 'Carlos Goce'
__email__ = 'cgonzalez@initios.com'
Update about version. It was outdated__title__ = 'f... | <commit_before>__title__ = 'facturapdf'
__summary__ = 'Create PDF invoice according to Spanish regulations.'
__version__ = '0.0.1'
__license__ = 'BSD 3-Clause License'
__uri__ = 'https://github.com/initios/factura-pdf'
__author__ = 'Carlos Goce'
__email__ = 'cgonzalez@initios.com'
<commit_msg>Update about version. It... |
4fe675af1cc8eb65f843e06962763dab8c920ce5 | contrib/meson/GetLz4LibraryVersion.py | contrib/meson/GetLz4LibraryVersion.py | #!/usr/bin/env python3
# #############################################################################
# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source t... | #!/usr/bin/env python3
# #############################################################################
# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source t... | Use argparse instead of manually parsing | Use argparse instead of manually parsing [skip ci]
| Python | isc | unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso,unknownbrackets/maxcso | #!/usr/bin/env python3
# #############################################################################
# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source t... | #!/usr/bin/env python3
# #############################################################################
# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source t... | <commit_before>#!/usr/bin/env python3
# #############################################################################
# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory o... | #!/usr/bin/env python3
# #############################################################################
# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source t... | #!/usr/bin/env python3
# #############################################################################
# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source t... | <commit_before>#!/usr/bin/env python3
# #############################################################################
# Copyright (c) 2018-present lzutao <taolzu(at)gmail.com>
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory o... |
b03b62e7abe9a8db0cded78b80cb8d565a424a7e | apps/activity/models.py | apps/activity/models.py | from django.db import models
class Activity(models.Model):
entry = models.ForeignKey('feeds.Entry', blank=True, null=True,
unique=True)
published_on = models.DateTimeField(auto_now_add=True)
def __unicode__(self):
return u'%s:%s => %s' % (self.source_class, self.sour... | from django.db import models
class Activity(models.Model):
entry = models.ForeignKey('feeds.Entry', blank=True, null=True,
unique=True)
published_on = models.DateTimeField(auto_now_add=True)
def __unicode__(self):
return u'%d: Entry: %s' % (self.pk, self.entry)
def... | Remove reference to old field and unused method | Remove reference to old field and unused method
| Python | bsd-3-clause | mozilla/betafarm,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/betafarm,mozilla/betafarm,mozilla/betafarm,mozilla/mozilla-ignite | from django.db import models
class Activity(models.Model):
entry = models.ForeignKey('feeds.Entry', blank=True, null=True,
unique=True)
published_on = models.DateTimeField(auto_now_add=True)
def __unicode__(self):
return u'%s:%s => %s' % (self.source_class, self.sour... | from django.db import models
class Activity(models.Model):
entry = models.ForeignKey('feeds.Entry', blank=True, null=True,
unique=True)
published_on = models.DateTimeField(auto_now_add=True)
def __unicode__(self):
return u'%d: Entry: %s' % (self.pk, self.entry)
def... | <commit_before>from django.db import models
class Activity(models.Model):
entry = models.ForeignKey('feeds.Entry', blank=True, null=True,
unique=True)
published_on = models.DateTimeField(auto_now_add=True)
def __unicode__(self):
return u'%s:%s => %s' % (self.source_c... | from django.db import models
class Activity(models.Model):
entry = models.ForeignKey('feeds.Entry', blank=True, null=True,
unique=True)
published_on = models.DateTimeField(auto_now_add=True)
def __unicode__(self):
return u'%d: Entry: %s' % (self.pk, self.entry)
def... | from django.db import models
class Activity(models.Model):
entry = models.ForeignKey('feeds.Entry', blank=True, null=True,
unique=True)
published_on = models.DateTimeField(auto_now_add=True)
def __unicode__(self):
return u'%s:%s => %s' % (self.source_class, self.sour... | <commit_before>from django.db import models
class Activity(models.Model):
entry = models.ForeignKey('feeds.Entry', blank=True, null=True,
unique=True)
published_on = models.DateTimeField(auto_now_add=True)
def __unicode__(self):
return u'%s:%s => %s' % (self.source_c... |
3504bd0c867841c85f5ef54cdb5096ec5117cc1e | backend/scripts/projsize.py | backend/scripts/projsize.py | #!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
def compute_project_size(project_id, conn):
total = 0
for f in r.table('project2datafile').get_all(project_id, index="project_id").eq_join('datafile_id', r.table(
'datafiles')).zip().run(conn):
total = total + f... | #!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
def compute_project_size(project_id, conn):
total = 0
count = 0
for f in r.table('project2datafile').get_all(project_id, index="project_id").eq_join('datafile_id', r.table(
'datafiles')).zip().run(conn):
tot... | Improve report format and information | Improve report format and information
Include total number of files.
| Python | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | #!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
def compute_project_size(project_id, conn):
total = 0
for f in r.table('project2datafile').get_all(project_id, index="project_id").eq_join('datafile_id', r.table(
'datafiles')).zip().run(conn):
total = total + f... | #!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
def compute_project_size(project_id, conn):
total = 0
count = 0
for f in r.table('project2datafile').get_all(project_id, index="project_id").eq_join('datafile_id', r.table(
'datafiles')).zip().run(conn):
tot... | <commit_before>#!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
def compute_project_size(project_id, conn):
total = 0
for f in r.table('project2datafile').get_all(project_id, index="project_id").eq_join('datafile_id', r.table(
'datafiles')).zip().run(conn):
to... | #!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
def compute_project_size(project_id, conn):
total = 0
count = 0
for f in r.table('project2datafile').get_all(project_id, index="project_id").eq_join('datafile_id', r.table(
'datafiles')).zip().run(conn):
tot... | #!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
def compute_project_size(project_id, conn):
total = 0
for f in r.table('project2datafile').get_all(project_id, index="project_id").eq_join('datafile_id', r.table(
'datafiles')).zip().run(conn):
total = total + f... | <commit_before>#!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
def compute_project_size(project_id, conn):
total = 0
for f in r.table('project2datafile').get_all(project_id, index="project_id").eq_join('datafile_id', r.table(
'datafiles')).zip().run(conn):
to... |
06effd31b4f52f1f61114c03ba8b1d6ce51738ab | zou/app/utils/permissions.py | zou/app/utils/permissions.py | from flask_principal import RoleNeed, Permission
from werkzeug.exceptions import Forbidden
admin_permission = Permission(RoleNeed('admin'))
manager_permission = Permission(RoleNeed('manager'))
class PermissionDenied(Forbidden):
pass
def has_manager_permissions():
return admin_permission.can() or manager_pe... | from flask_principal import RoleNeed, Permission
from werkzeug.exceptions import Forbidden
admin_permission = Permission(RoleNeed('admin'))
manager_permission = Permission(RoleNeed('manager'))
class PermissionDenied(Forbidden):
pass
def has_manager_permissions():
"""
Return True if user is admin or man... | Add comments to permission utils | Add comments to permission utils
| Python | agpl-3.0 | cgwire/zou | from flask_principal import RoleNeed, Permission
from werkzeug.exceptions import Forbidden
admin_permission = Permission(RoleNeed('admin'))
manager_permission = Permission(RoleNeed('manager'))
class PermissionDenied(Forbidden):
pass
def has_manager_permissions():
return admin_permission.can() or manager_pe... | from flask_principal import RoleNeed, Permission
from werkzeug.exceptions import Forbidden
admin_permission = Permission(RoleNeed('admin'))
manager_permission = Permission(RoleNeed('manager'))
class PermissionDenied(Forbidden):
pass
def has_manager_permissions():
"""
Return True if user is admin or man... | <commit_before>from flask_principal import RoleNeed, Permission
from werkzeug.exceptions import Forbidden
admin_permission = Permission(RoleNeed('admin'))
manager_permission = Permission(RoleNeed('manager'))
class PermissionDenied(Forbidden):
pass
def has_manager_permissions():
return admin_permission.can(... | from flask_principal import RoleNeed, Permission
from werkzeug.exceptions import Forbidden
admin_permission = Permission(RoleNeed('admin'))
manager_permission = Permission(RoleNeed('manager'))
class PermissionDenied(Forbidden):
pass
def has_manager_permissions():
"""
Return True if user is admin or man... | from flask_principal import RoleNeed, Permission
from werkzeug.exceptions import Forbidden
admin_permission = Permission(RoleNeed('admin'))
manager_permission = Permission(RoleNeed('manager'))
class PermissionDenied(Forbidden):
pass
def has_manager_permissions():
return admin_permission.can() or manager_pe... | <commit_before>from flask_principal import RoleNeed, Permission
from werkzeug.exceptions import Forbidden
admin_permission = Permission(RoleNeed('admin'))
manager_permission = Permission(RoleNeed('manager'))
class PermissionDenied(Forbidden):
pass
def has_manager_permissions():
return admin_permission.can(... |
af27c17d3f2f13d66d188900bbac02975eb446b4 | lanauth/app.py | lanauth/app.py | from flask import Flask, render_template, jsonify
from lanauth.api import load_api
class App(Flask):
"""Web application.
Routes:
/
/login Route to the main page
"""
def configure_views(self):
"""Configures core views"""
@self.route('/')
@self.route('/login'... | from flask import Flask, render_template, jsonify
from lanauth.api import load_api
class App(Flask):
"""Web application.
Routes:
/
/login Route to the main page
"""
def configure_views(self):
"""Configures core views"""
@self.route('/')
@self.route('/login'... | Set default site string value | Set default site string value
| Python | mit | LSUCS/pyLanAuth,LSUCS/pyLanAuth,LSUCS/pyLanAuth,LSUCS/pyLanAuth | from flask import Flask, render_template, jsonify
from lanauth.api import load_api
class App(Flask):
"""Web application.
Routes:
/
/login Route to the main page
"""
def configure_views(self):
"""Configures core views"""
@self.route('/')
@self.route('/login'... | from flask import Flask, render_template, jsonify
from lanauth.api import load_api
class App(Flask):
"""Web application.
Routes:
/
/login Route to the main page
"""
def configure_views(self):
"""Configures core views"""
@self.route('/')
@self.route('/login'... | <commit_before>from flask import Flask, render_template, jsonify
from lanauth.api import load_api
class App(Flask):
"""Web application.
Routes:
/
/login Route to the main page
"""
def configure_views(self):
"""Configures core views"""
@self.route('/')
@self... | from flask import Flask, render_template, jsonify
from lanauth.api import load_api
class App(Flask):
"""Web application.
Routes:
/
/login Route to the main page
"""
def configure_views(self):
"""Configures core views"""
@self.route('/')
@self.route('/login'... | from flask import Flask, render_template, jsonify
from lanauth.api import load_api
class App(Flask):
"""Web application.
Routes:
/
/login Route to the main page
"""
def configure_views(self):
"""Configures core views"""
@self.route('/')
@self.route('/login'... | <commit_before>from flask import Flask, render_template, jsonify
from lanauth.api import load_api
class App(Flask):
"""Web application.
Routes:
/
/login Route to the main page
"""
def configure_views(self):
"""Configures core views"""
@self.route('/')
@self... |
2f0f34efa83736b1f09db1971ca17ab6d0006516 | api/v2/views/image_bookmark.py | api/v2/views/image_bookmark.py | from core.models import ApplicationBookmark as ImageBookmark
from django.utils import timezone
from django.db.models import Q
from api.v2.serializers.details import ImageBookmarkSerializer
from api.v2.views.base import AuthViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageBookmarkViewSet(Multipl... | from core.models import ApplicationBookmark as ImageBookmark
from django.utils import timezone
from django.db.models import Q
from api.v2.serializers.details import ImageBookmarkSerializer
from api.v2.views.base import AuthViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageBookmarkViewSet(Multipl... | Fix disappearing image bookmarks on refresh | Fix disappearing image bookmarks on refresh
The bookmark queryset was incorrect it had a filter that was returning an
empty list.
| Python | apache-2.0 | CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend | from core.models import ApplicationBookmark as ImageBookmark
from django.utils import timezone
from django.db.models import Q
from api.v2.serializers.details import ImageBookmarkSerializer
from api.v2.views.base import AuthViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageBookmarkViewSet(Multipl... | from core.models import ApplicationBookmark as ImageBookmark
from django.utils import timezone
from django.db.models import Q
from api.v2.serializers.details import ImageBookmarkSerializer
from api.v2.views.base import AuthViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageBookmarkViewSet(Multipl... | <commit_before>from core.models import ApplicationBookmark as ImageBookmark
from django.utils import timezone
from django.db.models import Q
from api.v2.serializers.details import ImageBookmarkSerializer
from api.v2.views.base import AuthViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageBookmark... | from core.models import ApplicationBookmark as ImageBookmark
from django.utils import timezone
from django.db.models import Q
from api.v2.serializers.details import ImageBookmarkSerializer
from api.v2.views.base import AuthViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageBookmarkViewSet(Multipl... | from core.models import ApplicationBookmark as ImageBookmark
from django.utils import timezone
from django.db.models import Q
from api.v2.serializers.details import ImageBookmarkSerializer
from api.v2.views.base import AuthViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageBookmarkViewSet(Multipl... | <commit_before>from core.models import ApplicationBookmark as ImageBookmark
from django.utils import timezone
from django.db.models import Q
from api.v2.serializers.details import ImageBookmarkSerializer
from api.v2.views.base import AuthViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageBookmark... |
5f21b5f387e895a9af2ac8481bd495f2dacd6cdf | carbonate/util.py | carbonate/util.py | import fileinput
import os
import socket
import argparse
def local_addresses():
ips = socket.gethostbyname_ex(socket.gethostname())[2]
return set([ip for ip in ips if not ip.startswith("127.")][:1])
def common_parser(description='untitled'):
parser = argparse.ArgumentParser(
description=descript... | import fileinput
import os
import socket
import argparse
def local_addresses():
ips = socket.gethostbyname_ex(socket.gethostname())[2]
return set([ip for ip in ips if not ip.startswith("127.")][:1])
def common_parser(description='untitled'):
parser = argparse.ArgumentParser(
description=descript... | Read config-file and cluster options from environ | Read config-file and cluster options from environ
This would make it DRY in scripts/wrappers with non-default values.
| Python | mit | jssjr/carbonate,criteo-forks/carbonate,ross/carbonate,criteo-forks/carbonate,graphite-project/carbonate,unbrice/carbonate,criteo-forks/carbonate,deniszh/carbonate,graphite-project/carbonate,jssjr/carbonate,deniszh/carbonate,unbrice/carbonate,deniszh/carbonate,jssjr/carbonate,ross/carbonate,graphite-project/carbonate,un... | import fileinput
import os
import socket
import argparse
def local_addresses():
ips = socket.gethostbyname_ex(socket.gethostname())[2]
return set([ip for ip in ips if not ip.startswith("127.")][:1])
def common_parser(description='untitled'):
parser = argparse.ArgumentParser(
description=descript... | import fileinput
import os
import socket
import argparse
def local_addresses():
ips = socket.gethostbyname_ex(socket.gethostname())[2]
return set([ip for ip in ips if not ip.startswith("127.")][:1])
def common_parser(description='untitled'):
parser = argparse.ArgumentParser(
description=descript... | <commit_before>import fileinput
import os
import socket
import argparse
def local_addresses():
ips = socket.gethostbyname_ex(socket.gethostname())[2]
return set([ip for ip in ips if not ip.startswith("127.")][:1])
def common_parser(description='untitled'):
parser = argparse.ArgumentParser(
descr... | import fileinput
import os
import socket
import argparse
def local_addresses():
ips = socket.gethostbyname_ex(socket.gethostname())[2]
return set([ip for ip in ips if not ip.startswith("127.")][:1])
def common_parser(description='untitled'):
parser = argparse.ArgumentParser(
description=descript... | import fileinput
import os
import socket
import argparse
def local_addresses():
ips = socket.gethostbyname_ex(socket.gethostname())[2]
return set([ip for ip in ips if not ip.startswith("127.")][:1])
def common_parser(description='untitled'):
parser = argparse.ArgumentParser(
description=descript... | <commit_before>import fileinput
import os
import socket
import argparse
def local_addresses():
ips = socket.gethostbyname_ex(socket.gethostname())[2]
return set([ip for ip in ips if not ip.startswith("127.")][:1])
def common_parser(description='untitled'):
parser = argparse.ArgumentParser(
descr... |
4fb8fd95ce873deca56c66a3f7380b031864a879 | lingcod/raster_stats/views.py | lingcod/raster_stats/views.py | # Create your views here.
from django.http import HttpResponse
from lingcod.raster_stats.models import zonal_stats, RasterDataset, ZonalStatsCache
from django.core import serializers
from django.contrib.gis.geos import fromstr
def stats_for_geom(request, raster_name):
# Confirm that we have a valid polygon geometr... | # Create your views here.
from django.http import HttpResponse
from lingcod.raster_stats.models import zonal_stats, RasterDataset, ZonalStatsCache
from django.core import serializers
from django.contrib.gis.geos import fromstr
def stats_for_geom(request, raster_name):
# Confirm that we have a valid polygon geometr... | Exclude certain fields from json serialization in raster_stats web service | Exclude certain fields from json serialization in raster_stats web service
| Python | bsd-3-clause | Ecotrust/madrona_addons,Ecotrust/madrona_addons | # Create your views here.
from django.http import HttpResponse
from lingcod.raster_stats.models import zonal_stats, RasterDataset, ZonalStatsCache
from django.core import serializers
from django.contrib.gis.geos import fromstr
def stats_for_geom(request, raster_name):
# Confirm that we have a valid polygon geometr... | # Create your views here.
from django.http import HttpResponse
from lingcod.raster_stats.models import zonal_stats, RasterDataset, ZonalStatsCache
from django.core import serializers
from django.contrib.gis.geos import fromstr
def stats_for_geom(request, raster_name):
# Confirm that we have a valid polygon geometr... | <commit_before># Create your views here.
from django.http import HttpResponse
from lingcod.raster_stats.models import zonal_stats, RasterDataset, ZonalStatsCache
from django.core import serializers
from django.contrib.gis.geos import fromstr
def stats_for_geom(request, raster_name):
# Confirm that we have a valid ... | # Create your views here.
from django.http import HttpResponse
from lingcod.raster_stats.models import zonal_stats, RasterDataset, ZonalStatsCache
from django.core import serializers
from django.contrib.gis.geos import fromstr
def stats_for_geom(request, raster_name):
# Confirm that we have a valid polygon geometr... | # Create your views here.
from django.http import HttpResponse
from lingcod.raster_stats.models import zonal_stats, RasterDataset, ZonalStatsCache
from django.core import serializers
from django.contrib.gis.geos import fromstr
def stats_for_geom(request, raster_name):
# Confirm that we have a valid polygon geometr... | <commit_before># Create your views here.
from django.http import HttpResponse
from lingcod.raster_stats.models import zonal_stats, RasterDataset, ZonalStatsCache
from django.core import serializers
from django.contrib.gis.geos import fromstr
def stats_for_geom(request, raster_name):
# Confirm that we have a valid ... |
355b1a91edf2dfcff66c2a02e034977f65d0690c | influxdb/dataframe_client.py | influxdb/dataframe_client.py | # -*- coding: utf-8 -*-
"""
DataFrame client for InfluxDB
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['DataFrameClient']
try:
import pandas
del pandas
except ImportError as err:
from .cl... | # -*- coding: utf-8 -*-
"""
DataFrame client for InfluxDB
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['DataFrameClient']
try:
import pandas
del pandas
except ImportError as err:
from .cl... | Fix DataFrameClient import error on python3.5 | Fix DataFrameClient import error on python3.5
| Python | mit | BenHewins/influxdb-python,omki2005/influxdb-python,omki2005/influxdb-python,Asimmetric/influxdb-python,tzonghao/influxdb-python,influxdata/influxdb-python,Asimmetric/influxdb-python,tzonghao/influxdb-python,BenHewins/influxdb-python,influxdb/influxdb-python,influxdata/influxdb-python,influxdb/influxdb-python | # -*- coding: utf-8 -*-
"""
DataFrame client for InfluxDB
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['DataFrameClient']
try:
import pandas
del pandas
except ImportError as err:
from .cl... | # -*- coding: utf-8 -*-
"""
DataFrame client for InfluxDB
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['DataFrameClient']
try:
import pandas
del pandas
except ImportError as err:
from .cl... | <commit_before># -*- coding: utf-8 -*-
"""
DataFrame client for InfluxDB
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['DataFrameClient']
try:
import pandas
del pandas
except ImportError as er... | # -*- coding: utf-8 -*-
"""
DataFrame client for InfluxDB
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['DataFrameClient']
try:
import pandas
del pandas
except ImportError as err:
from .cl... | # -*- coding: utf-8 -*-
"""
DataFrame client for InfluxDB
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['DataFrameClient']
try:
import pandas
del pandas
except ImportError as err:
from .cl... | <commit_before># -*- coding: utf-8 -*-
"""
DataFrame client for InfluxDB
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__all__ = ['DataFrameClient']
try:
import pandas
del pandas
except ImportError as er... |
853bf035fcb9ea21e648cb0b1d1b13ee68f8e9cc | importer/tests/test_utils.py | importer/tests/test_utils.py | from unittest import TestCase
from importer.utils import find_first
class FindFirstTestCase(TestCase):
def test_first_in_haystack(self):
self.assertEqual(
find_first(
['one', 'two', 'three'],
['one', 'four']
),
'one',
)
def ... | from unittest import TestCase
from importer.utils import (
maybe,
find_first,
)
class MaybeTestCase(TestCase):
def setUp(self):
self.add_ten = maybe(lambda x: x + 10)
def test_with_none(self):
self.assertIsNone(self.add_ten(None))
def test_with_different_value(self):
sel... | Add tests for maybe decorator | Add tests for maybe decorator
| Python | mit | despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics | from unittest import TestCase
from importer.utils import find_first
class FindFirstTestCase(TestCase):
def test_first_in_haystack(self):
self.assertEqual(
find_first(
['one', 'two', 'three'],
['one', 'four']
),
'one',
)
def ... | from unittest import TestCase
from importer.utils import (
maybe,
find_first,
)
class MaybeTestCase(TestCase):
def setUp(self):
self.add_ten = maybe(lambda x: x + 10)
def test_with_none(self):
self.assertIsNone(self.add_ten(None))
def test_with_different_value(self):
sel... | <commit_before>from unittest import TestCase
from importer.utils import find_first
class FindFirstTestCase(TestCase):
def test_first_in_haystack(self):
self.assertEqual(
find_first(
['one', 'two', 'three'],
['one', 'four']
),
'one',
... | from unittest import TestCase
from importer.utils import (
maybe,
find_first,
)
class MaybeTestCase(TestCase):
def setUp(self):
self.add_ten = maybe(lambda x: x + 10)
def test_with_none(self):
self.assertIsNone(self.add_ten(None))
def test_with_different_value(self):
sel... | from unittest import TestCase
from importer.utils import find_first
class FindFirstTestCase(TestCase):
def test_first_in_haystack(self):
self.assertEqual(
find_first(
['one', 'two', 'three'],
['one', 'four']
),
'one',
)
def ... | <commit_before>from unittest import TestCase
from importer.utils import find_first
class FindFirstTestCase(TestCase):
def test_first_in_haystack(self):
self.assertEqual(
find_first(
['one', 'two', 'three'],
['one', 'four']
),
'one',
... |
7e4227b304da4313a3114a95d361fc5bb6bf5529 | runtests.py | runtests.py | from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
if not settings.configured:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.message... | from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
if not settings.configured:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.message... | Test speedup by swapping password hasher. | Test speedup by swapping password hasher.
| Python | mit | r4ts0n/django-envelope,zsiciarz/django-envelope,r4ts0n/django-envelope,zsiciarz/django-envelope | from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
if not settings.configured:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.message... | from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
if not settings.configured:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.message... | <commit_before>from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
if not settings.configured:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.... | from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
if not settings.configured:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.message... | from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
if not settings.configured:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.message... | <commit_before>from django.conf import settings
try:
import honeypot
except ImportError:
honeypot = None
if not settings.configured:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.... |
2d4b6b1fa84f7530d064bfc5577d61430b4e5a34 | run_multip.py | run_multip.py | # -*- coding:utf-8 -*-
from subprocess import check_output
from multiprocessing import Pool
from os import listdir, mkdir, path
from sys import argv
def run_simu((psfile, dir_runs)):
"""Runs the main script with specified parameter file."""
ndir = psfile[:-3]
mkdir(ndir)
simu_output = check_output(["p... | # -*- coding:utf-8 -*-
"""
Script for running multiple simulation with different parameter set.
"""
from subprocess import check_output
from multiprocessing import Pool
from os import listdir, mkdir, path
from sys import argv
def run_simu((psfile, dir_runs)):
"""Runs the main script with specified parameter file... | Clean main multi simulation script | Clean main multi simulation script
| Python | mit | neuro-lyon/multiglom-model,neuro-lyon/multiglom-model | # -*- coding:utf-8 -*-
from subprocess import check_output
from multiprocessing import Pool
from os import listdir, mkdir, path
from sys import argv
def run_simu((psfile, dir_runs)):
"""Runs the main script with specified parameter file."""
ndir = psfile[:-3]
mkdir(ndir)
simu_output = check_output(["p... | # -*- coding:utf-8 -*-
"""
Script for running multiple simulation with different parameter set.
"""
from subprocess import check_output
from multiprocessing import Pool
from os import listdir, mkdir, path
from sys import argv
def run_simu((psfile, dir_runs)):
"""Runs the main script with specified parameter file... | <commit_before># -*- coding:utf-8 -*-
from subprocess import check_output
from multiprocessing import Pool
from os import listdir, mkdir, path
from sys import argv
def run_simu((psfile, dir_runs)):
"""Runs the main script with specified parameter file."""
ndir = psfile[:-3]
mkdir(ndir)
simu_output = c... | # -*- coding:utf-8 -*-
"""
Script for running multiple simulation with different parameter set.
"""
from subprocess import check_output
from multiprocessing import Pool
from os import listdir, mkdir, path
from sys import argv
def run_simu((psfile, dir_runs)):
"""Runs the main script with specified parameter file... | # -*- coding:utf-8 -*-
from subprocess import check_output
from multiprocessing import Pool
from os import listdir, mkdir, path
from sys import argv
def run_simu((psfile, dir_runs)):
"""Runs the main script with specified parameter file."""
ndir = psfile[:-3]
mkdir(ndir)
simu_output = check_output(["p... | <commit_before># -*- coding:utf-8 -*-
from subprocess import check_output
from multiprocessing import Pool
from os import listdir, mkdir, path
from sys import argv
def run_simu((psfile, dir_runs)):
"""Runs the main script with specified parameter file."""
ndir = psfile[:-3]
mkdir(ndir)
simu_output = c... |
adb6c4c86407d6c66e8679aefdf2f2f0c9c87277 | pltpreview/view.py | pltpreview/view.py | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking.
*kwargs* are passed to matplotlib's ``imshow`` function. This command
a... | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking.
*kwargs* are passed to matplotlib's ``imshow`` function. This command
a... | Return lines from plot command | Return lines from plot command
| Python | mit | tfarago/pltpreview | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking.
*kwargs* are passed to matplotlib's ``imshow`` function. This command
a... | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking.
*kwargs* are passed to matplotlib's ``imshow`` function. This command
a... | <commit_before>"""Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking.
*kwargs* are passed to matplotlib's ``imshow`` function. Thi... | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking.
*kwargs* are passed to matplotlib's ``imshow`` function. This command
a... | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking.
*kwargs* are passed to matplotlib's ``imshow`` function. This command
a... | <commit_before>"""Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking.
*kwargs* are passed to matplotlib's ``imshow`` function. Thi... |
856e769c564673a9cf0fefb7ca4354cf75eb9155 | access/tests/factories.py | access/tests/factories.py | import factory
from access.models import User
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
email = factory.Sequence(lambda n: 'user{}@example.com'.format(n))
| import factory
from ..models import User
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
email = factory.Sequence(lambda n: 'user{}@example.com'.format(n))
| Use relative import for User | Use relative import for User
| Python | agpl-3.0 | node13h/droll,node13h/droll | import factory
from access.models import User
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
email = factory.Sequence(lambda n: 'user{}@example.com'.format(n))
Use relative import for User | import factory
from ..models import User
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
email = factory.Sequence(lambda n: 'user{}@example.com'.format(n))
| <commit_before>import factory
from access.models import User
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
email = factory.Sequence(lambda n: 'user{}@example.com'.format(n))
<commit_msg>Use relative import for User<commit_after> | import factory
from ..models import User
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
email = factory.Sequence(lambda n: 'user{}@example.com'.format(n))
| import factory
from access.models import User
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
email = factory.Sequence(lambda n: 'user{}@example.com'.format(n))
Use relative import for Userimport factory
from ..models import User
class UserFactory(factory.django.Dja... | <commit_before>import factory
from access.models import User
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
email = factory.Sequence(lambda n: 'user{}@example.com'.format(n))
<commit_msg>Use relative import for User<commit_after>import factory
from ..models import Us... |
c61cace4106a8cf9a27099acbfae26ba2a727d65 | install_steps/run_errands.py | install_steps/run_errands.py | import bosh_client
import os
import yaml
def do_step(context):
settings = context.meta['settings']
username = settings["username"]
home_dir = os.path.join("/home", username)
f = open('manifests/index.yml')
manifests = yaml.safe_load(f)
f.close()
client = bosh_client.BoshClient("https://1... | import bosh_client
import os
import yaml
def do_step(context):
settings = context.meta['settings']
username = settings["username"]
home_dir = os.path.join("/home", username)
f = open('manifests/index.yml')
manifests = yaml.safe_load(f)
f.close()
client = bosh_client.BoshClient("https://1... | Convert task output to UTF8 | Convert task output to UTF8
| Python | apache-2.0 | cf-platform-eng/bosh-azure-template,cf-platform-eng/bosh-azure-template | import bosh_client
import os
import yaml
def do_step(context):
settings = context.meta['settings']
username = settings["username"]
home_dir = os.path.join("/home", username)
f = open('manifests/index.yml')
manifests = yaml.safe_load(f)
f.close()
client = bosh_client.BoshClient("https://1... | import bosh_client
import os
import yaml
def do_step(context):
settings = context.meta['settings']
username = settings["username"]
home_dir = os.path.join("/home", username)
f = open('manifests/index.yml')
manifests = yaml.safe_load(f)
f.close()
client = bosh_client.BoshClient("https://1... | <commit_before>import bosh_client
import os
import yaml
def do_step(context):
settings = context.meta['settings']
username = settings["username"]
home_dir = os.path.join("/home", username)
f = open('manifests/index.yml')
manifests = yaml.safe_load(f)
f.close()
client = bosh_client.BoshCl... | import bosh_client
import os
import yaml
def do_step(context):
settings = context.meta['settings']
username = settings["username"]
home_dir = os.path.join("/home", username)
f = open('manifests/index.yml')
manifests = yaml.safe_load(f)
f.close()
client = bosh_client.BoshClient("https://1... | import bosh_client
import os
import yaml
def do_step(context):
settings = context.meta['settings']
username = settings["username"]
home_dir = os.path.join("/home", username)
f = open('manifests/index.yml')
manifests = yaml.safe_load(f)
f.close()
client = bosh_client.BoshClient("https://1... | <commit_before>import bosh_client
import os
import yaml
def do_step(context):
settings = context.meta['settings']
username = settings["username"]
home_dir = os.path.join("/home", username)
f = open('manifests/index.yml')
manifests = yaml.safe_load(f)
f.close()
client = bosh_client.BoshCl... |
9a7de89fd4bc6d134f30bdee4c8a71b34e1e6ab9 | stoq/__init__.py | stoq/__init__.py | #!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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
#
# Un... | #!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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
#
# Un... | Add StoqPluginException to default imports | Add StoqPluginException to default imports
| Python | apache-2.0 | PUNCH-Cyber/stoq | #!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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
#
# Un... | #!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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
#
# Un... | <commit_before>#!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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/LICEN... | #!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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
#
# Un... | #!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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
#
# Un... | <commit_before>#!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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/LICEN... |
ea02f8e714df34da0ff55a8c9750eb0d992875c2 | feincms3/apps.py | feincms3/apps.py | # pragma: no cover
import warnings
import django
if django.VERSION < (3, 2):
from feincms3.applications import * # noqa
warnings.warn(
"Django 3.2 will start autodiscovering app configs inside '.apps' modules."
" We cannot continue using feincms3.apps because the AppsMixin inside this"
... | import warnings
import django
if django.VERSION < (3, 2):
from feincms3.applications import * # noqa
warnings.warn(
"Django 3.2 will start autodiscovering app configs inside '.apps' modules."
" We cannot continue using feincms3.apps because the AppsMixin inside this"
" module can on... | Remove a no cover pragma having no effect (since the pragma only affects the current line) | Remove a no cover pragma having no effect (since the pragma only affects the current line)
| Python | bsd-3-clause | matthiask/feincms3,matthiask/feincms3,matthiask/feincms3 | # pragma: no cover
import warnings
import django
if django.VERSION < (3, 2):
from feincms3.applications import * # noqa
warnings.warn(
"Django 3.2 will start autodiscovering app configs inside '.apps' modules."
" We cannot continue using feincms3.apps because the AppsMixin inside this"
... | import warnings
import django
if django.VERSION < (3, 2):
from feincms3.applications import * # noqa
warnings.warn(
"Django 3.2 will start autodiscovering app configs inside '.apps' modules."
" We cannot continue using feincms3.apps because the AppsMixin inside this"
" module can on... | <commit_before># pragma: no cover
import warnings
import django
if django.VERSION < (3, 2):
from feincms3.applications import * # noqa
warnings.warn(
"Django 3.2 will start autodiscovering app configs inside '.apps' modules."
" We cannot continue using feincms3.apps because the AppsMixin i... | import warnings
import django
if django.VERSION < (3, 2):
from feincms3.applications import * # noqa
warnings.warn(
"Django 3.2 will start autodiscovering app configs inside '.apps' modules."
" We cannot continue using feincms3.apps because the AppsMixin inside this"
" module can on... | # pragma: no cover
import warnings
import django
if django.VERSION < (3, 2):
from feincms3.applications import * # noqa
warnings.warn(
"Django 3.2 will start autodiscovering app configs inside '.apps' modules."
" We cannot continue using feincms3.apps because the AppsMixin inside this"
... | <commit_before># pragma: no cover
import warnings
import django
if django.VERSION < (3, 2):
from feincms3.applications import * # noqa
warnings.warn(
"Django 3.2 will start autodiscovering app configs inside '.apps' modules."
" We cannot continue using feincms3.apps because the AppsMixin i... |
bea83c533f65eeedae983b70fd41350e57df6908 | cms/djangoapps/contentstore/features/video-editor.py | cms/djangoapps/contentstore/features/video-editor.py | # disable missing docstring
#pylint: disable=C0111
from lettuce import world, step
@step('I see the correct settings and default values$')
def i_see_the_correct_settings_and_values(step):
world.verify_all_setting_entries([['.75x', '', False],
['1.25x', '', False],
... | # disable missing docstring
#pylint: disable=C0111
from lettuce import world, step
@step('I see the correct settings and default values$')
def i_see_the_correct_settings_and_values(step):
world.verify_all_setting_entries([['Default Speed', '', False],
['Display Name', 'defau... | Update failing metadata settings acceptance test. | Update failing metadata settings acceptance test.
| Python | agpl-3.0 | bitifirefly/edx-platform,jonathan-beard/edx-platform,arbrandes/edx-platform,xuxiao19910803/edx-platform,zhenzhai/edx-platform,jazztpt/edx-platform,doismellburning/edx-platform,apigee/edx-platform,jbassen/edx-platform,inares/edx-platform,stvstnfrd/edx-platform,Edraak/edx-platform,a-parhom/edx-platform,etzhou/edx-platfor... | # disable missing docstring
#pylint: disable=C0111
from lettuce import world, step
@step('I see the correct settings and default values$')
def i_see_the_correct_settings_and_values(step):
world.verify_all_setting_entries([['.75x', '', False],
['1.25x', '', False],
... | # disable missing docstring
#pylint: disable=C0111
from lettuce import world, step
@step('I see the correct settings and default values$')
def i_see_the_correct_settings_and_values(step):
world.verify_all_setting_entries([['Default Speed', '', False],
['Display Name', 'defau... | <commit_before># disable missing docstring
#pylint: disable=C0111
from lettuce import world, step
@step('I see the correct settings and default values$')
def i_see_the_correct_settings_and_values(step):
world.verify_all_setting_entries([['.75x', '', False],
['1.25x', '', Fal... | # disable missing docstring
#pylint: disable=C0111
from lettuce import world, step
@step('I see the correct settings and default values$')
def i_see_the_correct_settings_and_values(step):
world.verify_all_setting_entries([['Default Speed', '', False],
['Display Name', 'defau... | # disable missing docstring
#pylint: disable=C0111
from lettuce import world, step
@step('I see the correct settings and default values$')
def i_see_the_correct_settings_and_values(step):
world.verify_all_setting_entries([['.75x', '', False],
['1.25x', '', False],
... | <commit_before># disable missing docstring
#pylint: disable=C0111
from lettuce import world, step
@step('I see the correct settings and default values$')
def i_see_the_correct_settings_and_values(step):
world.verify_all_setting_entries([['.75x', '', False],
['1.25x', '', Fal... |
878de0641342b4f43ca6cfe48357e9e198bc696f | index.py | index.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable web debugging
import cgitb
cgitb.enable()
print("Content-Type: text/html;charset=utf-8")
print()
import formar.fweb.WebFormar
| #!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable web debugging
import cgitb
cgitb.enable()
"""
from os import path
import sys
sys.path.append(path.abspath('../WebTagGenerator'))
"""
from os import path
import sys
sys.path.append(path.abspath('../WebTagGenerator/'))
print("Content-Type: text/html;charset=utf-8")
p... | Add external module reference to deal with html | Add external module reference to deal with html
| Python | apache-2.0 | ronengi/Formar,ronengi/Formar | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable web debugging
import cgitb
cgitb.enable()
print("Content-Type: text/html;charset=utf-8")
print()
import formar.fweb.WebFormar
Add external module reference to deal with html | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable web debugging
import cgitb
cgitb.enable()
"""
from os import path
import sys
sys.path.append(path.abspath('../WebTagGenerator'))
"""
from os import path
import sys
sys.path.append(path.abspath('../WebTagGenerator/'))
print("Content-Type: text/html;charset=utf-8")
p... | <commit_before>#!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable web debugging
import cgitb
cgitb.enable()
print("Content-Type: text/html;charset=utf-8")
print()
import formar.fweb.WebFormar
<commit_msg>Add external module reference to deal with html<commit_after> | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable web debugging
import cgitb
cgitb.enable()
"""
from os import path
import sys
sys.path.append(path.abspath('../WebTagGenerator'))
"""
from os import path
import sys
sys.path.append(path.abspath('../WebTagGenerator/'))
print("Content-Type: text/html;charset=utf-8")
p... | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable web debugging
import cgitb
cgitb.enable()
print("Content-Type: text/html;charset=utf-8")
print()
import formar.fweb.WebFormar
Add external module reference to deal with html#!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable web debugging
import cgitb
cgitb.enable(... | <commit_before>#!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable web debugging
import cgitb
cgitb.enable()
print("Content-Type: text/html;charset=utf-8")
print()
import formar.fweb.WebFormar
<commit_msg>Add external module reference to deal with html<commit_after>#!/usr/bin/python
# -*- coding: UTF-8 -*-
# enable... |
6b6fb12545ff3b35420fd2382576a6150044bdc8 | kerze.py | kerze.py | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESS... | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESS... | Prepare for use as module | Prepare for use as module
| Python | mit | luforst/adventskranz | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESS... | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESS... | <commit_before>from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
... | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESS... | from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
back(GROESS... | <commit_before>from turtle import *
GROESSE = 0.5
FARBE = "red"
FAERBEN = True
SHAPE = "turtle"
fillcolor(FARBE)
shape(SHAPE)
def zeichneKerze(brennt):
pd()
begin_fill()
forward(GROESSE*100)
left(90)
forward(GROESSE*400)
left(90)
forward(GROESSE*100)
right(90)
forward(GROESSE*30)
... |
7e9f765b90df14b66a361c6cf9fe25a38189475a | actions/server/extend_expiration_date.py | actions/server/extend_expiration_date.py | import datetime
from utilities.logger import ThreadLogger
from utilities.mail import send_mail
from utilities.mail import InvalidConfigurationException
"""
Server action to extend expiration date on a server by 30 days
"""
def run(job, logger=None):
# Extend Server Expiration Date
server = job.server_set.firs... | """
Server Action to extend the expiration date of a Server by 30 days and notify
Approvers in the Server's Group.
"""
import datetime
from utilities.logger import ThreadLogger
from utilities.mail import send_mail, InvalidConfigurationException
logger = ThreadLogger(__name__)
def run(job, logger=None):
# Exten... | Fix "Extend Expiration Date" Server Action | Fix "Extend Expiration Date" Server Action
Server Action had bugs where server.expiration_date would cause an
exception if it wasn't set, and was using the old method
`group.approvers`. These issues have been fixed, and the plugin is more
stable.
[DEV-13752]
| Python | apache-2.0 | CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge | import datetime
from utilities.logger import ThreadLogger
from utilities.mail import send_mail
from utilities.mail import InvalidConfigurationException
"""
Server action to extend expiration date on a server by 30 days
"""
def run(job, logger=None):
# Extend Server Expiration Date
server = job.server_set.firs... | """
Server Action to extend the expiration date of a Server by 30 days and notify
Approvers in the Server's Group.
"""
import datetime
from utilities.logger import ThreadLogger
from utilities.mail import send_mail, InvalidConfigurationException
logger = ThreadLogger(__name__)
def run(job, logger=None):
# Exten... | <commit_before>import datetime
from utilities.logger import ThreadLogger
from utilities.mail import send_mail
from utilities.mail import InvalidConfigurationException
"""
Server action to extend expiration date on a server by 30 days
"""
def run(job, logger=None):
# Extend Server Expiration Date
server = job.... | """
Server Action to extend the expiration date of a Server by 30 days and notify
Approvers in the Server's Group.
"""
import datetime
from utilities.logger import ThreadLogger
from utilities.mail import send_mail, InvalidConfigurationException
logger = ThreadLogger(__name__)
def run(job, logger=None):
# Exten... | import datetime
from utilities.logger import ThreadLogger
from utilities.mail import send_mail
from utilities.mail import InvalidConfigurationException
"""
Server action to extend expiration date on a server by 30 days
"""
def run(job, logger=None):
# Extend Server Expiration Date
server = job.server_set.firs... | <commit_before>import datetime
from utilities.logger import ThreadLogger
from utilities.mail import send_mail
from utilities.mail import InvalidConfigurationException
"""
Server action to extend expiration date on a server by 30 days
"""
def run(job, logger=None):
# Extend Server Expiration Date
server = job.... |
204c955b7150e3ef26f44e1982359b2d6096eebe | lc053_maximum_subarray.py | lc053_maximum_subarray.py | """Leetcode 53. Maximum Subarray
Easy
Given an integer array nums, find the contiguous subarray
(containing at least one number) which has the largest sum and return its sum.
Example:
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
Follow up:
If you have figured out the O(... | """Leetcode 53. Maximum Subarray
Easy
Given an integer array nums, find the contiguous subarray
(containing at least one number) which has the largest sum and return its sum.
Example:
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
Follow up:
If you have figured out the O(... | Complete max subarray sum by DP | Complete max subarray sum by DP
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | """Leetcode 53. Maximum Subarray
Easy
Given an integer array nums, find the contiguous subarray
(containing at least one number) which has the largest sum and return its sum.
Example:
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
Follow up:
If you have figured out the O(... | """Leetcode 53. Maximum Subarray
Easy
Given an integer array nums, find the contiguous subarray
(containing at least one number) which has the largest sum and return its sum.
Example:
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
Follow up:
If you have figured out the O(... | <commit_before>"""Leetcode 53. Maximum Subarray
Easy
Given an integer array nums, find the contiguous subarray
(containing at least one number) which has the largest sum and return its sum.
Example:
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
Follow up:
If you have fig... | """Leetcode 53. Maximum Subarray
Easy
Given an integer array nums, find the contiguous subarray
(containing at least one number) which has the largest sum and return its sum.
Example:
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
Follow up:
If you have figured out the O(... | """Leetcode 53. Maximum Subarray
Easy
Given an integer array nums, find the contiguous subarray
(containing at least one number) which has the largest sum and return its sum.
Example:
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
Follow up:
If you have figured out the O(... | <commit_before>"""Leetcode 53. Maximum Subarray
Easy
Given an integer array nums, find the contiguous subarray
(containing at least one number) which has the largest sum and return its sum.
Example:
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
Follow up:
If you have fig... |
5c7161858fa7ca2962f08b66f6d20ae49715c206 | ci_scripts/buildLinuxWheels.py | ci_scripts/buildLinuxWheels.py | from subprocess import call, check_output
import sys
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(argv[1])
call('pip in... | from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(argv[1])
ca... | Fix build wheels and upload 3. | Fix build wheels and upload 3.
| Python | bsd-3-clause | jr-garcia/AssimpCy,jr-garcia/AssimpCy | from subprocess import call, check_output
import sys
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(argv[1])
call('pip in... | from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(argv[1])
ca... | <commit_before>from subprocess import call, check_output
import sys
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(argv[1... | from subprocess import call, check_output
import sys
import os
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(argv[1])
ca... | from subprocess import call, check_output
import sys
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(argv[1])
call('pip in... | <commit_before>from subprocess import call, check_output
import sys
isPython3 = sys.version_info.major == 3
# https://stackoverflow.com/a/3357357
command = 'git log --format=%B -n 1'.split()
out = check_output(command)
if b'build wheels' not in out.lower() or not isPython3:
exit(0)
path = os.path.abspath(argv[1... |
7f6cd8f5444d92644642cadb84d7f958e0b6fce1 | examples/image_test.py | examples/image_test.py | import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = Image2d.loa... | import sys
import os
import ctypes
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet import image
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = image.load(sys.argv[1])
imx = imy ... | Use the core, make example more useful. | Use the core, make example more useful.
git-svn-id: d4fdfcd4de20a449196f78acc655f735742cd30d@874 14d46d22-621c-0410-bb3d-6f67920f7d95
| Python | bsd-3-clause | regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations | import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = Image2d.loa... | import sys
import os
import ctypes
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet import image
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = image.load(sys.argv[1])
imx = imy ... | <commit_before>import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
imag... | import sys
import os
import ctypes
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet import image
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = image.load(sys.argv[1])
imx = imy ... | import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = Image2d.loa... | <commit_before>import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
imag... |
3ddbff7204c8458be777cdf194ce38170c1982d9 | learntools/computer_vision/ex4.py | learntools/computer_vision/ex4.py | from learntools.core import *
import tensorflow as tf
class Q1A(ThoughtExperiment):
_solution = ""
class Q1B(ThoughtExperiment):
_solution = ""
Q1 = MultipartProblem(Q1A, Q1B)
class Q2A(ThoughtExperiment):
_hint = "Stacking the second layer expanded the receptive field by one neuron on each side, givi... | from learntools.core import *
import tensorflow as tf
class Q1A(ThoughtExperiment):
_solution = ""
class Q1B(ThoughtExperiment):
_solution = ""
Q1 = MultipartProblem(Q1A, Q1B)
class Q2A(ThoughtExperiment):
_hint = r"Stacking the second layer expanded the receptive field by one neuron on each side, giv... | Change to raw strings in exercise 4 checking | Change to raw strings in exercise 4 checking
| Python | apache-2.0 | Kaggle/learntools,Kaggle/learntools | from learntools.core import *
import tensorflow as tf
class Q1A(ThoughtExperiment):
_solution = ""
class Q1B(ThoughtExperiment):
_solution = ""
Q1 = MultipartProblem(Q1A, Q1B)
class Q2A(ThoughtExperiment):
_hint = "Stacking the second layer expanded the receptive field by one neuron on each side, givi... | from learntools.core import *
import tensorflow as tf
class Q1A(ThoughtExperiment):
_solution = ""
class Q1B(ThoughtExperiment):
_solution = ""
Q1 = MultipartProblem(Q1A, Q1B)
class Q2A(ThoughtExperiment):
_hint = r"Stacking the second layer expanded the receptive field by one neuron on each side, giv... | <commit_before>from learntools.core import *
import tensorflow as tf
class Q1A(ThoughtExperiment):
_solution = ""
class Q1B(ThoughtExperiment):
_solution = ""
Q1 = MultipartProblem(Q1A, Q1B)
class Q2A(ThoughtExperiment):
_hint = "Stacking the second layer expanded the receptive field by one neuron on ... | from learntools.core import *
import tensorflow as tf
class Q1A(ThoughtExperiment):
_solution = ""
class Q1B(ThoughtExperiment):
_solution = ""
Q1 = MultipartProblem(Q1A, Q1B)
class Q2A(ThoughtExperiment):
_hint = r"Stacking the second layer expanded the receptive field by one neuron on each side, giv... | from learntools.core import *
import tensorflow as tf
class Q1A(ThoughtExperiment):
_solution = ""
class Q1B(ThoughtExperiment):
_solution = ""
Q1 = MultipartProblem(Q1A, Q1B)
class Q2A(ThoughtExperiment):
_hint = "Stacking the second layer expanded the receptive field by one neuron on each side, givi... | <commit_before>from learntools.core import *
import tensorflow as tf
class Q1A(ThoughtExperiment):
_solution = ""
class Q1B(ThoughtExperiment):
_solution = ""
Q1 = MultipartProblem(Q1A, Q1B)
class Q2A(ThoughtExperiment):
_hint = "Stacking the second layer expanded the receptive field by one neuron on ... |
fffce05288a80b4d4e8e45b6a1282eaa6c2d80c4 | dec02/dec02part2.py | dec02/dec02part2.py | # Advent of Code
# Dec 2, Part 2
# @geekygirlsarah
| # Advent of Code
# Dec 2, Part 1
# @geekygirlsarah
inputFile = "input.txt"
# Tracking vars
finalCode = ""
lastNumber = 5 # start here
tempNumber = lastNumber
with open(inputFile) as f:
while True:
line = f.readline(-1)
if not line:
# print "End of file"
break
... | Add 12/2 part 2 solution | Add 12/2 part 2 solution
| Python | mit | geekygirlsarah/adventofcode2016 | # Advent of Code
# Dec 2, Part 2
# @geekygirlsarah
Add 12/2 part 2 solution | # Advent of Code
# Dec 2, Part 1
# @geekygirlsarah
inputFile = "input.txt"
# Tracking vars
finalCode = ""
lastNumber = 5 # start here
tempNumber = lastNumber
with open(inputFile) as f:
while True:
line = f.readline(-1)
if not line:
# print "End of file"
break
... | <commit_before># Advent of Code
# Dec 2, Part 2
# @geekygirlsarah
<commit_msg>Add 12/2 part 2 solution<commit_after> | # Advent of Code
# Dec 2, Part 1
# @geekygirlsarah
inputFile = "input.txt"
# Tracking vars
finalCode = ""
lastNumber = 5 # start here
tempNumber = lastNumber
with open(inputFile) as f:
while True:
line = f.readline(-1)
if not line:
# print "End of file"
break
... | # Advent of Code
# Dec 2, Part 2
# @geekygirlsarah
Add 12/2 part 2 solution# Advent of Code
# Dec 2, Part 1
# @geekygirlsarah
inputFile = "input.txt"
# Tracking vars
finalCode = ""
lastNumber = 5 # start here
tempNumber = lastNumber
with open(inputFile) as f:
while True:
line = f.readline(-1)
... | <commit_before># Advent of Code
# Dec 2, Part 2
# @geekygirlsarah
<commit_msg>Add 12/2 part 2 solution<commit_after># Advent of Code
# Dec 2, Part 1
# @geekygirlsarah
inputFile = "input.txt"
# Tracking vars
finalCode = ""
lastNumber = 5 # start here
tempNumber = lastNumber
with open(inputFile) as f:
while ... |
5a806254b63b8cc1732dfc4a797371b9a52c8621 | mediacloud/mediawords/util/test_process.py | mediacloud/mediawords/util/test_process.py | import subprocess
from mediawords.util.process import *
def test_process_with_pid_is_running():
test_process = subprocess.Popen(['sleep', '999'])
test_process_pid = test_process.pid
assert test_process_pid != 0
assert test_process_pid is not None
assert process_with_pid_is_running(test_process_... | import subprocess
from mediawords.util.process import *
def test_process_with_pid_is_running():
test_process = subprocess.Popen(['sleep', '999'])
test_process_pid = test_process.pid
assert test_process_pid != 0
assert test_process_pid is not None
assert process_with_pid_is_running(test_process_... | Comment out erroneous process_with_pid_is_running() test | Comment out erroneous process_with_pid_is_running() test
| Python | agpl-3.0 | berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud | import subprocess
from mediawords.util.process import *
def test_process_with_pid_is_running():
test_process = subprocess.Popen(['sleep', '999'])
test_process_pid = test_process.pid
assert test_process_pid != 0
assert test_process_pid is not None
assert process_with_pid_is_running(test_process_... | import subprocess
from mediawords.util.process import *
def test_process_with_pid_is_running():
test_process = subprocess.Popen(['sleep', '999'])
test_process_pid = test_process.pid
assert test_process_pid != 0
assert test_process_pid is not None
assert process_with_pid_is_running(test_process_... | <commit_before>import subprocess
from mediawords.util.process import *
def test_process_with_pid_is_running():
test_process = subprocess.Popen(['sleep', '999'])
test_process_pid = test_process.pid
assert test_process_pid != 0
assert test_process_pid is not None
assert process_with_pid_is_runnin... | import subprocess
from mediawords.util.process import *
def test_process_with_pid_is_running():
test_process = subprocess.Popen(['sleep', '999'])
test_process_pid = test_process.pid
assert test_process_pid != 0
assert test_process_pid is not None
assert process_with_pid_is_running(test_process_... | import subprocess
from mediawords.util.process import *
def test_process_with_pid_is_running():
test_process = subprocess.Popen(['sleep', '999'])
test_process_pid = test_process.pid
assert test_process_pid != 0
assert test_process_pid is not None
assert process_with_pid_is_running(test_process_... | <commit_before>import subprocess
from mediawords.util.process import *
def test_process_with_pid_is_running():
test_process = subprocess.Popen(['sleep', '999'])
test_process_pid = test_process.pid
assert test_process_pid != 0
assert test_process_pid is not None
assert process_with_pid_is_runnin... |
c88310e970518c3531dbe26c9544ff4455068a7e | opps/core/tests/test_obj_tags.py | opps/core/tests/test_obj_tags.py | from django.test import TestCase
from opps.channels.templatetags.menu_tags import ofKey
class OfKeyTest(TestCase):
def test_tag(self):
result = ofKey({"name": "andrews"}, "name")
self.assertEqual(result, "andrews")
def test_tag_is_none(self):
result = ofKey(None, "name")
self... | from django.test import TestCase
from opps.core.templatetags.obj_tags import ofKey
class OfKeyTest(TestCase):
def test_tag(self):
result = ofKey({"name": "andrews"}, "name")
self.assertEqual(result, "andrews")
def test_tag_is_none(self):
result = ofKey(None, "name")
self.asse... | Fix import template tag obj_tags on test case core | Fix import template tag obj_tags on test case core
| Python | mit | williamroot/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,YACOWS/opps,jeanmask/opps,opps/opps,opps/opps,jeanmask/opps | from django.test import TestCase
from opps.channels.templatetags.menu_tags import ofKey
class OfKeyTest(TestCase):
def test_tag(self):
result = ofKey({"name": "andrews"}, "name")
self.assertEqual(result, "andrews")
def test_tag_is_none(self):
result = ofKey(None, "name")
self... | from django.test import TestCase
from opps.core.templatetags.obj_tags import ofKey
class OfKeyTest(TestCase):
def test_tag(self):
result = ofKey({"name": "andrews"}, "name")
self.assertEqual(result, "andrews")
def test_tag_is_none(self):
result = ofKey(None, "name")
self.asse... | <commit_before>from django.test import TestCase
from opps.channels.templatetags.menu_tags import ofKey
class OfKeyTest(TestCase):
def test_tag(self):
result = ofKey({"name": "andrews"}, "name")
self.assertEqual(result, "andrews")
def test_tag_is_none(self):
result = ofKey(None, "name... | from django.test import TestCase
from opps.core.templatetags.obj_tags import ofKey
class OfKeyTest(TestCase):
def test_tag(self):
result = ofKey({"name": "andrews"}, "name")
self.assertEqual(result, "andrews")
def test_tag_is_none(self):
result = ofKey(None, "name")
self.asse... | from django.test import TestCase
from opps.channels.templatetags.menu_tags import ofKey
class OfKeyTest(TestCase):
def test_tag(self):
result = ofKey({"name": "andrews"}, "name")
self.assertEqual(result, "andrews")
def test_tag_is_none(self):
result = ofKey(None, "name")
self... | <commit_before>from django.test import TestCase
from opps.channels.templatetags.menu_tags import ofKey
class OfKeyTest(TestCase):
def test_tag(self):
result = ofKey({"name": "andrews"}, "name")
self.assertEqual(result, "andrews")
def test_tag_is_none(self):
result = ofKey(None, "name... |
ee6bd389e3e602b67fac399cdb4a50c3a67666b9 | twitter/admin.py | twitter/admin.py | from django.contrib import admin
from twitter.models import User, Tweet, Analytics, AnalyticsReport
class UserAdmin(admin.ModelAdmin):
list_display = ('screen_name', 'current_followers')
class AnalyticsAdmin(admin.ModelAdmin):
list_display = (
'date',
'user',
'followers',
'fo... | from django.contrib import admin
from twitter.models import User, Tweet, Analytics, AnalyticsReport
class UserAdmin(admin.ModelAdmin):
list_display = ('screen_name', 'current_followers')
class AnalyticsAdmin(admin.ModelAdmin):
list_display = (
'date',
'user',
'followers',
'fo... | Add a list filter to make looking a specific users easier. | Add a list filter to make looking a specific users easier.
| Python | mit | CIGIHub/tweet_cache,albertoconnor/tweet_cache | from django.contrib import admin
from twitter.models import User, Tweet, Analytics, AnalyticsReport
class UserAdmin(admin.ModelAdmin):
list_display = ('screen_name', 'current_followers')
class AnalyticsAdmin(admin.ModelAdmin):
list_display = (
'date',
'user',
'followers',
'fo... | from django.contrib import admin
from twitter.models import User, Tweet, Analytics, AnalyticsReport
class UserAdmin(admin.ModelAdmin):
list_display = ('screen_name', 'current_followers')
class AnalyticsAdmin(admin.ModelAdmin):
list_display = (
'date',
'user',
'followers',
'fo... | <commit_before>from django.contrib import admin
from twitter.models import User, Tweet, Analytics, AnalyticsReport
class UserAdmin(admin.ModelAdmin):
list_display = ('screen_name', 'current_followers')
class AnalyticsAdmin(admin.ModelAdmin):
list_display = (
'date',
'user',
'follower... | from django.contrib import admin
from twitter.models import User, Tweet, Analytics, AnalyticsReport
class UserAdmin(admin.ModelAdmin):
list_display = ('screen_name', 'current_followers')
class AnalyticsAdmin(admin.ModelAdmin):
list_display = (
'date',
'user',
'followers',
'fo... | from django.contrib import admin
from twitter.models import User, Tweet, Analytics, AnalyticsReport
class UserAdmin(admin.ModelAdmin):
list_display = ('screen_name', 'current_followers')
class AnalyticsAdmin(admin.ModelAdmin):
list_display = (
'date',
'user',
'followers',
'fo... | <commit_before>from django.contrib import admin
from twitter.models import User, Tweet, Analytics, AnalyticsReport
class UserAdmin(admin.ModelAdmin):
list_display = ('screen_name', 'current_followers')
class AnalyticsAdmin(admin.ModelAdmin):
list_display = (
'date',
'user',
'follower... |
0e866db1377e4c58ef05d66583cea6e35071ba20 | nnpy/errors.py | nnpy/errors.py | from _nnpy import ffi, lib as nanomsg
class NNError(Exception):
def __init__(self, error_no, *args, **kwargs):
super().__init__(*args, **kwargs)
self.error_no = error_no
def convert(rc, value=None):
if rc < 0:
error_no = nanomsg.nn_errno()
chars = nanomsg.nn_strerror(error_no)
... | from _nnpy import ffi, lib as nanomsg
class NNError(Exception):
def __init__(self, error_no, *args, **kwargs):
super(NNError, self).__init__(*args, **kwargs)
self.error_no = error_no
def convert(rc, value=None):
if rc < 0:
error_no = nanomsg.nn_errno()
chars = nanomsg.nn_strerr... | Fix incorrect args to super | Fix incorrect args to super
| Python | mit | nanomsg/nnpy | from _nnpy import ffi, lib as nanomsg
class NNError(Exception):
def __init__(self, error_no, *args, **kwargs):
super().__init__(*args, **kwargs)
self.error_no = error_no
def convert(rc, value=None):
if rc < 0:
error_no = nanomsg.nn_errno()
chars = nanomsg.nn_strerror(error_no)
... | from _nnpy import ffi, lib as nanomsg
class NNError(Exception):
def __init__(self, error_no, *args, **kwargs):
super(NNError, self).__init__(*args, **kwargs)
self.error_no = error_no
def convert(rc, value=None):
if rc < 0:
error_no = nanomsg.nn_errno()
chars = nanomsg.nn_strerr... | <commit_before>from _nnpy import ffi, lib as nanomsg
class NNError(Exception):
def __init__(self, error_no, *args, **kwargs):
super().__init__(*args, **kwargs)
self.error_no = error_no
def convert(rc, value=None):
if rc < 0:
error_no = nanomsg.nn_errno()
chars = nanomsg.nn_stre... | from _nnpy import ffi, lib as nanomsg
class NNError(Exception):
def __init__(self, error_no, *args, **kwargs):
super(NNError, self).__init__(*args, **kwargs)
self.error_no = error_no
def convert(rc, value=None):
if rc < 0:
error_no = nanomsg.nn_errno()
chars = nanomsg.nn_strerr... | from _nnpy import ffi, lib as nanomsg
class NNError(Exception):
def __init__(self, error_no, *args, **kwargs):
super().__init__(*args, **kwargs)
self.error_no = error_no
def convert(rc, value=None):
if rc < 0:
error_no = nanomsg.nn_errno()
chars = nanomsg.nn_strerror(error_no)
... | <commit_before>from _nnpy import ffi, lib as nanomsg
class NNError(Exception):
def __init__(self, error_no, *args, **kwargs):
super().__init__(*args, **kwargs)
self.error_no = error_no
def convert(rc, value=None):
if rc < 0:
error_no = nanomsg.nn_errno()
chars = nanomsg.nn_stre... |
6557cbe8bee7ded848ba7c3928e2b4f82aedeea8 | linked-list/remove-k-from-list.py | linked-list/remove-k-from-list.py | # Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k
class Node(object):
def __init__(self, value):
self.value = value
self.next = None
def remove_k_from_list(l, k):
fake_head = Node(None)
fake_head.next = l
current_node = fake_head
while ... | # Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k
class Node(object): # define constructor
def __init__(self, value):
self.value = value
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(... | Add linked list class and add method | Add linked list class and add method
| Python | mit | derekmpham/interview-prep,derekmpham/interview-prep | # Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k
class Node(object):
def __init__(self, value):
self.value = value
self.next = None
def remove_k_from_list(l, k):
fake_head = Node(None)
fake_head.next = l
current_node = fake_head
while ... | # Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k
class Node(object): # define constructor
def __init__(self, value):
self.value = value
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(... | <commit_before># Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k
class Node(object):
def __init__(self, value):
self.value = value
self.next = None
def remove_k_from_list(l, k):
fake_head = Node(None)
fake_head.next = l
current_node = fak... | # Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k
class Node(object): # define constructor
def __init__(self, value):
self.value = value
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def add(... | # Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k
class Node(object):
def __init__(self, value):
self.value = value
self.next = None
def remove_k_from_list(l, k):
fake_head = Node(None)
fake_head.next = l
current_node = fake_head
while ... | <commit_before># Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k
class Node(object):
def __init__(self, value):
self.value = value
self.next = None
def remove_k_from_list(l, k):
fake_head = Node(None)
fake_head.next = l
current_node = fak... |
06c7e43f96f9394949b0ec1ed709429ab3167cf9 | incuna_auth/backends.py | incuna_auth/backends.py | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class CustomUserModelBackend(ModelBackend):
def authenticate(self, username=None, password=None):
"""Allow users to log in with their email as well as username."""
kw = 'email__iexact' if '@' in usern... | from django.contrib.auth.backends import ModelBackend
try:
from django.contrib.auth import get_user_model
User = get_user_model()
except ImportError:
# Django < 1.5
from django.contrib.auth.models import User
class CustomUserModelBackend(ModelBackend):
def authenticate(self, username=None, passwor... | Make the CustomerUserModelBackend Dj1.5 compatible | Make the CustomerUserModelBackend Dj1.5 compatible
| Python | bsd-2-clause | incuna/incuna-auth,ghickman/incuna-auth,ghickman/incuna-auth,incuna/incuna-auth | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class CustomUserModelBackend(ModelBackend):
def authenticate(self, username=None, password=None):
"""Allow users to log in with their email as well as username."""
kw = 'email__iexact' if '@' in usern... | from django.contrib.auth.backends import ModelBackend
try:
from django.contrib.auth import get_user_model
User = get_user_model()
except ImportError:
# Django < 1.5
from django.contrib.auth.models import User
class CustomUserModelBackend(ModelBackend):
def authenticate(self, username=None, passwor... | <commit_before>from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class CustomUserModelBackend(ModelBackend):
def authenticate(self, username=None, password=None):
"""Allow users to log in with their email as well as username."""
kw = 'email__iexact' ... | from django.contrib.auth.backends import ModelBackend
try:
from django.contrib.auth import get_user_model
User = get_user_model()
except ImportError:
# Django < 1.5
from django.contrib.auth.models import User
class CustomUserModelBackend(ModelBackend):
def authenticate(self, username=None, passwor... | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class CustomUserModelBackend(ModelBackend):
def authenticate(self, username=None, password=None):
"""Allow users to log in with their email as well as username."""
kw = 'email__iexact' if '@' in usern... | <commit_before>from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class CustomUserModelBackend(ModelBackend):
def authenticate(self, username=None, password=None):
"""Allow users to log in with their email as well as username."""
kw = 'email__iexact' ... |
6a717adf087f847ae4a58375170d01adf5ef17de | polyaxon/factories/pipelines.py | polyaxon/factories/pipelines.py | import factory
from factories.factory_projects import ProjectFactory
from factories.factory_users import UserFactory
from pipelines.models import Pipeline, Operation
class PipelineFactory(factory.DjangoModelFactory):
user = factory.SubFactory(UserFactory)
project = factory.SubFactory(ProjectFactory)
cla... | import factory
from factories.factory_projects import ProjectFactory
from factories.factory_users import UserFactory
from pipelines.models import Pipeline, Operation, PipelineRun, OperationRun
class PipelineFactory(factory.DjangoModelFactory):
user = factory.SubFactory(UserFactory)
project = factory.SubFacto... | Add pipeline run and operation run factories | Add pipeline run and operation run factories
| Python | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | import factory
from factories.factory_projects import ProjectFactory
from factories.factory_users import UserFactory
from pipelines.models import Pipeline, Operation
class PipelineFactory(factory.DjangoModelFactory):
user = factory.SubFactory(UserFactory)
project = factory.SubFactory(ProjectFactory)
cla... | import factory
from factories.factory_projects import ProjectFactory
from factories.factory_users import UserFactory
from pipelines.models import Pipeline, Operation, PipelineRun, OperationRun
class PipelineFactory(factory.DjangoModelFactory):
user = factory.SubFactory(UserFactory)
project = factory.SubFacto... | <commit_before>import factory
from factories.factory_projects import ProjectFactory
from factories.factory_users import UserFactory
from pipelines.models import Pipeline, Operation
class PipelineFactory(factory.DjangoModelFactory):
user = factory.SubFactory(UserFactory)
project = factory.SubFactory(ProjectFa... | import factory
from factories.factory_projects import ProjectFactory
from factories.factory_users import UserFactory
from pipelines.models import Pipeline, Operation, PipelineRun, OperationRun
class PipelineFactory(factory.DjangoModelFactory):
user = factory.SubFactory(UserFactory)
project = factory.SubFacto... | import factory
from factories.factory_projects import ProjectFactory
from factories.factory_users import UserFactory
from pipelines.models import Pipeline, Operation
class PipelineFactory(factory.DjangoModelFactory):
user = factory.SubFactory(UserFactory)
project = factory.SubFactory(ProjectFactory)
cla... | <commit_before>import factory
from factories.factory_projects import ProjectFactory
from factories.factory_users import UserFactory
from pipelines.models import Pipeline, Operation
class PipelineFactory(factory.DjangoModelFactory):
user = factory.SubFactory(UserFactory)
project = factory.SubFactory(ProjectFa... |
08ac56dc6d80560ec46ad06fec6843be18bb1d91 | dictionary/test1.py | dictionary/test1.py | #!/usr/local/bin/python
#items=[('a','b'),(1,2)]
#b=dict(items)
#print b
#c=dict(name='c',age=42)
#print c
#print len(c)
#c['sex']='female'
#print c
#del c['age']
#print c
#print 'sex' in c
#c['age']=25
#print c
#print c.clear()
#print c
#x={'name':'a','age':'14'}
#y=x
#print y
#z=y.copy()
#z.clear()
#print x
#print y
... | #!/usr/local/bin/python
#items=[('a','b'),(1,2)]
#b=dict(items)
#print b
#c=dict(name='c',age=42)
#print c
#print len(c)
#c['sex']='female'
#print c
#del c['age']
#print c
#print 'sex' in c
#c['age']=25
#print c
#print c.clear()
#print c
#x={'name':'a','age':'14'}
#y=x
#print y
#z=y.copy()
#z.clear()
#print x
#print y
... | Use update,get,setdefault and so on. | Use update,get,setdefault and so on.
| Python | apache-2.0 | Vayne-Lover/Python | #!/usr/local/bin/python
#items=[('a','b'),(1,2)]
#b=dict(items)
#print b
#c=dict(name='c',age=42)
#print c
#print len(c)
#c['sex']='female'
#print c
#del c['age']
#print c
#print 'sex' in c
#c['age']=25
#print c
#print c.clear()
#print c
#x={'name':'a','age':'14'}
#y=x
#print y
#z=y.copy()
#z.clear()
#print x
#print y
... | #!/usr/local/bin/python
#items=[('a','b'),(1,2)]
#b=dict(items)
#print b
#c=dict(name='c',age=42)
#print c
#print len(c)
#c['sex']='female'
#print c
#del c['age']
#print c
#print 'sex' in c
#c['age']=25
#print c
#print c.clear()
#print c
#x={'name':'a','age':'14'}
#y=x
#print y
#z=y.copy()
#z.clear()
#print x
#print y
... | <commit_before>#!/usr/local/bin/python
#items=[('a','b'),(1,2)]
#b=dict(items)
#print b
#c=dict(name='c',age=42)
#print c
#print len(c)
#c['sex']='female'
#print c
#del c['age']
#print c
#print 'sex' in c
#c['age']=25
#print c
#print c.clear()
#print c
#x={'name':'a','age':'14'}
#y=x
#print y
#z=y.copy()
#z.clear()
#pr... | #!/usr/local/bin/python
#items=[('a','b'),(1,2)]
#b=dict(items)
#print b
#c=dict(name='c',age=42)
#print c
#print len(c)
#c['sex']='female'
#print c
#del c['age']
#print c
#print 'sex' in c
#c['age']=25
#print c
#print c.clear()
#print c
#x={'name':'a','age':'14'}
#y=x
#print y
#z=y.copy()
#z.clear()
#print x
#print y
... | #!/usr/local/bin/python
#items=[('a','b'),(1,2)]
#b=dict(items)
#print b
#c=dict(name='c',age=42)
#print c
#print len(c)
#c['sex']='female'
#print c
#del c['age']
#print c
#print 'sex' in c
#c['age']=25
#print c
#print c.clear()
#print c
#x={'name':'a','age':'14'}
#y=x
#print y
#z=y.copy()
#z.clear()
#print x
#print y
... | <commit_before>#!/usr/local/bin/python
#items=[('a','b'),(1,2)]
#b=dict(items)
#print b
#c=dict(name='c',age=42)
#print c
#print len(c)
#c['sex']='female'
#print c
#del c['age']
#print c
#print 'sex' in c
#c['age']=25
#print c
#print c.clear()
#print c
#x={'name':'a','age':'14'}
#y=x
#print y
#z=y.copy()
#z.clear()
#pr... |
a5d2751be278356e2a03fe07f5a1d0aef11b401f | ch07/enrich_airlines.py | ch07/enrich_airlines.py | # Load the on-time parquet file
on_time_dataframe = sqlContext.read.parquet('../data/on_time_performance.parquet')
wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
| # Load the on-time parquet file
on_time_dataframe = sqlContext.read.parquet('data/on_time_performance.parquet')
# The first step is easily expressed as SQL: get all unique tail numbers for each airline
on_time_dataframe.registerTempTable("on_time_performance")
carrier_codes = sqlContext.sql(
"SELECT DISTINCT Carrier... | Work on chapter 7 enriching airlines with the name of the carrier from the openflights airline data | Work on chapter 7 enriching airlines with the name of the carrier from the openflights airline data
| Python | mit | rjurney/Agile_Data_Code_2,naoyak/Agile_Data_Code_2,rjurney/Agile_Data_Code_2,rjurney/Agile_Data_Code_2,naoyak/Agile_Data_Code_2,rjurney/Agile_Data_Code_2,naoyak/Agile_Data_Code_2,naoyak/Agile_Data_Code_2 | # Load the on-time parquet file
on_time_dataframe = sqlContext.read.parquet('../data/on_time_performance.parquet')
wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
Work on chapter 7 enriching airlines with the name of the carrier from the openflights airline data | # Load the on-time parquet file
on_time_dataframe = sqlContext.read.parquet('data/on_time_performance.parquet')
# The first step is easily expressed as SQL: get all unique tail numbers for each airline
on_time_dataframe.registerTempTable("on_time_performance")
carrier_codes = sqlContext.sql(
"SELECT DISTINCT Carrier... | <commit_before># Load the on-time parquet file
on_time_dataframe = sqlContext.read.parquet('../data/on_time_performance.parquet')
wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
<commit_msg>Work on chapter 7 enriching airlines with the name of the carrier from the openflights airline data<com... | # Load the on-time parquet file
on_time_dataframe = sqlContext.read.parquet('data/on_time_performance.parquet')
# The first step is easily expressed as SQL: get all unique tail numbers for each airline
on_time_dataframe.registerTempTable("on_time_performance")
carrier_codes = sqlContext.sql(
"SELECT DISTINCT Carrier... | # Load the on-time parquet file
on_time_dataframe = sqlContext.read.parquet('../data/on_time_performance.parquet')
wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
Work on chapter 7 enriching airlines with the name of the carrier from the openflights airline data# Load the on-time parquet file... | <commit_before># Load the on-time parquet file
on_time_dataframe = sqlContext.read.parquet('../data/on_time_performance.parquet')
wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
<commit_msg>Work on chapter 7 enriching airlines with the name of the carrier from the openflights airline data<com... |
84ccc5489b4d3dfdf1883bb777cd597bd9cb8e53 | src/test/testclasses.py | src/test/testclasses.py |
from nose.tools import *
from libeeyore.builtins import add_builtins
from libeeyore.classvalues import *
from libeeyore.environment import EeyEnvironment
from libeeyore.cpp.cppvalues import *
from libeeyore.cpp.cpprenderer import EeyCppRenderer
from eeyasserts import assert_multiline_equal
def test_Static_variable_... |
from nose.tools import *
from libeeyore.builtins import add_builtins
from libeeyore.classvalues import *
from libeeyore.environment import EeyEnvironment
from libeeyore.cpp.cppvalues import *
from libeeyore.cpp.cpprenderer import EeyCppRenderer
from eeyasserts import assert_multiline_equal
def test_Static_variable_... | Add a test that demonstrates calling a function within a class definition. | Add a test that demonstrates calling a function within a class definition.
| Python | mit | andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper,andybalaam/pepper |
from nose.tools import *
from libeeyore.builtins import add_builtins
from libeeyore.classvalues import *
from libeeyore.environment import EeyEnvironment
from libeeyore.cpp.cppvalues import *
from libeeyore.cpp.cpprenderer import EeyCppRenderer
from eeyasserts import assert_multiline_equal
def test_Static_variable_... |
from nose.tools import *
from libeeyore.builtins import add_builtins
from libeeyore.classvalues import *
from libeeyore.environment import EeyEnvironment
from libeeyore.cpp.cppvalues import *
from libeeyore.cpp.cpprenderer import EeyCppRenderer
from eeyasserts import assert_multiline_equal
def test_Static_variable_... | <commit_before>
from nose.tools import *
from libeeyore.builtins import add_builtins
from libeeyore.classvalues import *
from libeeyore.environment import EeyEnvironment
from libeeyore.cpp.cppvalues import *
from libeeyore.cpp.cpprenderer import EeyCppRenderer
from eeyasserts import assert_multiline_equal
def test_S... |
from nose.tools import *
from libeeyore.builtins import add_builtins
from libeeyore.classvalues import *
from libeeyore.environment import EeyEnvironment
from libeeyore.cpp.cppvalues import *
from libeeyore.cpp.cpprenderer import EeyCppRenderer
from eeyasserts import assert_multiline_equal
def test_Static_variable_... |
from nose.tools import *
from libeeyore.builtins import add_builtins
from libeeyore.classvalues import *
from libeeyore.environment import EeyEnvironment
from libeeyore.cpp.cppvalues import *
from libeeyore.cpp.cpprenderer import EeyCppRenderer
from eeyasserts import assert_multiline_equal
def test_Static_variable_... | <commit_before>
from nose.tools import *
from libeeyore.builtins import add_builtins
from libeeyore.classvalues import *
from libeeyore.environment import EeyEnvironment
from libeeyore.cpp.cppvalues import *
from libeeyore.cpp.cpprenderer import EeyCppRenderer
from eeyasserts import assert_multiline_equal
def test_S... |
898e087d67ba5f6f8af3f280d46c59edc0bb665e | modules/module_spotify.py | modules/module_spotify.py |
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(4))
f = ur... |
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(4))
f = ur... | Change output format to a more reasonable one | Change output format to a more reasonable one
git-svn-id: 056f9092885898c4775d98c479d2d33d00273e45@143 dda364a1-ef19-0410-af65-756c83048fb2
| Python | bsd-3-clause | EArmour/pyfibot,nigeljonez/newpyfibot,huqa/pyfibot,lepinkainen/pyfibot,rnyberg/pyfibot,lepinkainen/pyfibot,aapa/pyfibot,aapa/pyfibot,EArmour/pyfibot,rnyberg/pyfibot,huqa/pyfibot |
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(4))
f = ur... |
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(4))
f = ur... | <commit_before>
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(... |
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(4))
f = ur... |
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(4))
f = ur... | <commit_before>
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(... |
afe792e50e6e30036f1ed718d7c3f5143a1e2da5 | adhocracy4/follows/signals.py | adhocracy4/follows/signals.py | from django.conf import settings
from django.db.models.signals import post_save
from . import models
def autofollow_hook(instance, **kwargs):
if hasattr(instance.project, 'id'):
models.Follow.objects.get_or_create(
project=instance.project,
creator=instance.creator,
de... | from django.apps import apps
from django.conf import settings
from django.db.models.signals import post_save
from . import models
def autofollow_hook(instance, **kwargs):
if hasattr(instance.project, 'id'):
models.Follow.objects.get_or_create(
project=instance.project,
creator=ins... | Fix setting up AUTO_FOLLOWABLES models | Fix setting up AUTO_FOLLOWABLES models
Note that `Signal.connect` expects the model class as the sender
argument.
Altough while using e.g. `post_save` it also works with a string
`"apname.model"`
| Python | agpl-3.0 | liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4 | from django.conf import settings
from django.db.models.signals import post_save
from . import models
def autofollow_hook(instance, **kwargs):
if hasattr(instance.project, 'id'):
models.Follow.objects.get_or_create(
project=instance.project,
creator=instance.creator,
de... | from django.apps import apps
from django.conf import settings
from django.db.models.signals import post_save
from . import models
def autofollow_hook(instance, **kwargs):
if hasattr(instance.project, 'id'):
models.Follow.objects.get_or_create(
project=instance.project,
creator=ins... | <commit_before>from django.conf import settings
from django.db.models.signals import post_save
from . import models
def autofollow_hook(instance, **kwargs):
if hasattr(instance.project, 'id'):
models.Follow.objects.get_or_create(
project=instance.project,
creator=instance.creator,... | from django.apps import apps
from django.conf import settings
from django.db.models.signals import post_save
from . import models
def autofollow_hook(instance, **kwargs):
if hasattr(instance.project, 'id'):
models.Follow.objects.get_or_create(
project=instance.project,
creator=ins... | from django.conf import settings
from django.db.models.signals import post_save
from . import models
def autofollow_hook(instance, **kwargs):
if hasattr(instance.project, 'id'):
models.Follow.objects.get_or_create(
project=instance.project,
creator=instance.creator,
de... | <commit_before>from django.conf import settings
from django.db.models.signals import post_save
from . import models
def autofollow_hook(instance, **kwargs):
if hasattr(instance.project, 'id'):
models.Follow.objects.get_or_create(
project=instance.project,
creator=instance.creator,... |
404ff05ea8a57fff8e706a26b69356366e67352f | main.py | main.py | from update import *
from plot_and_save import *
from Parameters.parametersA3 import n, n_t, n0
animate = False # animate the wave in the string upon completion
plot = False # plot the waveform and frequency spectrum on the piano bridge
write_file = True # write the waveform on the bridge to a... | from update import *
from plot_and_save import *
from Parameters.parametersA3 import n, n_t, n0
animate = False # animate the wave in the string upon completion
plot = False # plot the waveform and frequency spectrum on the piano bridge
write_file = True # write the waveform on the bridge to a... | Save file in correct folder | Save file in correct folder
| Python | mit | madarivi/PianoSimulation | from update import *
from plot_and_save import *
from Parameters.parametersA3 import n, n_t, n0
animate = False # animate the wave in the string upon completion
plot = False # plot the waveform and frequency spectrum on the piano bridge
write_file = True # write the waveform on the bridge to a... | from update import *
from plot_and_save import *
from Parameters.parametersA3 import n, n_t, n0
animate = False # animate the wave in the string upon completion
plot = False # plot the waveform and frequency spectrum on the piano bridge
write_file = True # write the waveform on the bridge to a... | <commit_before>from update import *
from plot_and_save import *
from Parameters.parametersA3 import n, n_t, n0
animate = False # animate the wave in the string upon completion
plot = False # plot the waveform and frequency spectrum on the piano bridge
write_file = True # write the waveform on ... | from update import *
from plot_and_save import *
from Parameters.parametersA3 import n, n_t, n0
animate = False # animate the wave in the string upon completion
plot = False # plot the waveform and frequency spectrum on the piano bridge
write_file = True # write the waveform on the bridge to a... | from update import *
from plot_and_save import *
from Parameters.parametersA3 import n, n_t, n0
animate = False # animate the wave in the string upon completion
plot = False # plot the waveform and frequency spectrum on the piano bridge
write_file = True # write the waveform on the bridge to a... | <commit_before>from update import *
from plot_and_save import *
from Parameters.parametersA3 import n, n_t, n0
animate = False # animate the wave in the string upon completion
plot = False # plot the waveform and frequency spectrum on the piano bridge
write_file = True # write the waveform on ... |
817c9634e89be79c5ca4e08ce48c1eb1dd173f46 | skimage/viewer/qt/__init__.py | skimage/viewer/qt/__init__.py | import os
import warnings
qt_api = os.environ.get('QT_API')
if qt_api is None:
try:
import PySide
qt_api = 'pyside'
except ImportError:
try:
import PyQt4
qt_api = 'pyqt'
except ImportError:
qt_api = None
# Note that we don't want ... | import os
import warnings
qt_api = os.environ.get('QT_API')
if qt_api is None:
try:
import PySide
qt_api = 'pyside'
except ImportError:
try:
import PyQt4
qt_api = 'pyqt'
except ImportError:
qt_api = None
# Note that we don't want ... | Fix setting of QT_API environment variable | Fix setting of QT_API environment variable
| Python | bsd-3-clause | jwiggins/scikit-image,blink1073/scikit-image,Hiyorimi/scikit-image,pratapvardhan/scikit-image,paalge/scikit-image,rjeli/scikit-image,emon10005/scikit-image,robintw/scikit-image,newville/scikit-image,almarklein/scikit-image,almarklein/scikit-image,oew1v07/scikit-image,vighneshbirodkar/scikit-image,michaelaye/scikit-imag... | import os
import warnings
qt_api = os.environ.get('QT_API')
if qt_api is None:
try:
import PySide
qt_api = 'pyside'
except ImportError:
try:
import PyQt4
qt_api = 'pyqt'
except ImportError:
qt_api = None
# Note that we don't want ... | import os
import warnings
qt_api = os.environ.get('QT_API')
if qt_api is None:
try:
import PySide
qt_api = 'pyside'
except ImportError:
try:
import PyQt4
qt_api = 'pyqt'
except ImportError:
qt_api = None
# Note that we don't want ... | <commit_before>import os
import warnings
qt_api = os.environ.get('QT_API')
if qt_api is None:
try:
import PySide
qt_api = 'pyside'
except ImportError:
try:
import PyQt4
qt_api = 'pyqt'
except ImportError:
qt_api = None
# Note that... | import os
import warnings
qt_api = os.environ.get('QT_API')
if qt_api is None:
try:
import PySide
qt_api = 'pyside'
except ImportError:
try:
import PyQt4
qt_api = 'pyqt'
except ImportError:
qt_api = None
# Note that we don't want ... | import os
import warnings
qt_api = os.environ.get('QT_API')
if qt_api is None:
try:
import PySide
qt_api = 'pyside'
except ImportError:
try:
import PyQt4
qt_api = 'pyqt'
except ImportError:
qt_api = None
# Note that we don't want ... | <commit_before>import os
import warnings
qt_api = os.environ.get('QT_API')
if qt_api is None:
try:
import PySide
qt_api = 'pyside'
except ImportError:
try:
import PyQt4
qt_api = 'pyqt'
except ImportError:
qt_api = None
# Note that... |
1525c25029a2cd93494ebab45377661d606fa7ab | make_mozilla/events/tasks.py | make_mozilla/events/tasks.py | from celery.decorators import task
from make_mozilla.bsd import BSDRegisterConstituent
@task
def register_email_address_as_constituent(email_address, group):
BSDRegisterConstituent.add_email_to_group(email_address, group)
| from celery.task import task
from make_mozilla.bsd import BSDRegisterConstituent
@task
def register_email_address_as_constituent(email_address, group):
BSDRegisterConstituent.add_email_to_group(email_address, group)
| Switch to post Celery 2.2 task decorator syntax. | Switch to post Celery 2.2 task decorator syntax. | Python | bsd-3-clause | mozilla/make.mozilla.org,mozilla/make.mozilla.org,mozilla/make.mozilla.org,mozilla/make.mozilla.org | from celery.decorators import task
from make_mozilla.bsd import BSDRegisterConstituent
@task
def register_email_address_as_constituent(email_address, group):
BSDRegisterConstituent.add_email_to_group(email_address, group)
Switch to post Celery 2.2 task decorator syntax. | from celery.task import task
from make_mozilla.bsd import BSDRegisterConstituent
@task
def register_email_address_as_constituent(email_address, group):
BSDRegisterConstituent.add_email_to_group(email_address, group)
| <commit_before>from celery.decorators import task
from make_mozilla.bsd import BSDRegisterConstituent
@task
def register_email_address_as_constituent(email_address, group):
BSDRegisterConstituent.add_email_to_group(email_address, group)
<commit_msg>Switch to post Celery 2.2 task decorator syntax.<commit_after> | from celery.task import task
from make_mozilla.bsd import BSDRegisterConstituent
@task
def register_email_address_as_constituent(email_address, group):
BSDRegisterConstituent.add_email_to_group(email_address, group)
| from celery.decorators import task
from make_mozilla.bsd import BSDRegisterConstituent
@task
def register_email_address_as_constituent(email_address, group):
BSDRegisterConstituent.add_email_to_group(email_address, group)
Switch to post Celery 2.2 task decorator syntax.from celery.task import task
from make_mozill... | <commit_before>from celery.decorators import task
from make_mozilla.bsd import BSDRegisterConstituent
@task
def register_email_address_as_constituent(email_address, group):
BSDRegisterConstituent.add_email_to_group(email_address, group)
<commit_msg>Switch to post Celery 2.2 task decorator syntax.<commit_after>from... |
151dbe6d319b27882e4df42a73c4fe6c6b77b90a | rm/trials/templatetags/share.py | rm/trials/templatetags/share.py | """
Helpers for sharing
"""
from django.template import Library
register = Library()
def absolute(request):
return request.build_absolute_uri(request.path)
@register.inclusion_tag('share_this.html', takes_context=True)
def share_this(context):
"What, you can't copy a URL? Bah."
return dict(
title... | """
Helpers for sharing
"""
from django.template import Library
register = Library()
def absolute(request):
return request.build_absolute_uri(request.path)
@register.inclusion_tag('share_this.html', takes_context=True)
def share_this(context):
"What, you can't copy a URL? Bah."
title = ''
trial = con... | Move variable out of inline dict construction to debug production errors. | Move variable out of inline dict construction to debug production errors.
| Python | agpl-3.0 | openhealthcare/randomise.me,openhealthcare/randomise.me,openhealthcare/randomise.me,openhealthcare/randomise.me | """
Helpers for sharing
"""
from django.template import Library
register = Library()
def absolute(request):
return request.build_absolute_uri(request.path)
@register.inclusion_tag('share_this.html', takes_context=True)
def share_this(context):
"What, you can't copy a URL? Bah."
return dict(
title... | """
Helpers for sharing
"""
from django.template import Library
register = Library()
def absolute(request):
return request.build_absolute_uri(request.path)
@register.inclusion_tag('share_this.html', takes_context=True)
def share_this(context):
"What, you can't copy a URL? Bah."
title = ''
trial = con... | <commit_before>"""
Helpers for sharing
"""
from django.template import Library
register = Library()
def absolute(request):
return request.build_absolute_uri(request.path)
@register.inclusion_tag('share_this.html', takes_context=True)
def share_this(context):
"What, you can't copy a URL? Bah."
return dict... | """
Helpers for sharing
"""
from django.template import Library
register = Library()
def absolute(request):
return request.build_absolute_uri(request.path)
@register.inclusion_tag('share_this.html', takes_context=True)
def share_this(context):
"What, you can't copy a URL? Bah."
title = ''
trial = con... | """
Helpers for sharing
"""
from django.template import Library
register = Library()
def absolute(request):
return request.build_absolute_uri(request.path)
@register.inclusion_tag('share_this.html', takes_context=True)
def share_this(context):
"What, you can't copy a URL? Bah."
return dict(
title... | <commit_before>"""
Helpers for sharing
"""
from django.template import Library
register = Library()
def absolute(request):
return request.build_absolute_uri(request.path)
@register.inclusion_tag('share_this.html', takes_context=True)
def share_this(context):
"What, you can't copy a URL? Bah."
return dict... |
0b6e9d6e329b8e88fca9635640ef0842f3cb82c2 | api/tests/test_scrapers.py | api/tests/test_scrapers.py | def test_scrape_item_by_id():
from api.scrapers.item import scrape_item_by_id
item = scrape_item_by_id('d19447e548d')
assert item.id == 'd19447e548d'
assert item.name == 'Thyrus Zenith'
assert item.type == 'Two-handed Conjurer\'s Arm'
assert item.ilvl == 90
| def test_scrape_item_by_id():
from api.scrapers.item import scrape_item_by_id
item = scrape_item_by_id('d19447e548d')
assert item.id == 'd19447e548d'
assert item.name == 'Thyrus Zenith'
assert item.type == 'Two-handed Conjurer\'s Arm'
assert item.ilvl == 90
def test_scrape_character_by_id():... | Add scrape character unit test | Add scrape character unit test
| Python | mit | Demotivated/loadstone | def test_scrape_item_by_id():
from api.scrapers.item import scrape_item_by_id
item = scrape_item_by_id('d19447e548d')
assert item.id == 'd19447e548d'
assert item.name == 'Thyrus Zenith'
assert item.type == 'Two-handed Conjurer\'s Arm'
assert item.ilvl == 90
Add scrape character unit test | def test_scrape_item_by_id():
from api.scrapers.item import scrape_item_by_id
item = scrape_item_by_id('d19447e548d')
assert item.id == 'd19447e548d'
assert item.name == 'Thyrus Zenith'
assert item.type == 'Two-handed Conjurer\'s Arm'
assert item.ilvl == 90
def test_scrape_character_by_id():... | <commit_before>def test_scrape_item_by_id():
from api.scrapers.item import scrape_item_by_id
item = scrape_item_by_id('d19447e548d')
assert item.id == 'd19447e548d'
assert item.name == 'Thyrus Zenith'
assert item.type == 'Two-handed Conjurer\'s Arm'
assert item.ilvl == 90
<commit_msg>Add scrap... | def test_scrape_item_by_id():
from api.scrapers.item import scrape_item_by_id
item = scrape_item_by_id('d19447e548d')
assert item.id == 'd19447e548d'
assert item.name == 'Thyrus Zenith'
assert item.type == 'Two-handed Conjurer\'s Arm'
assert item.ilvl == 90
def test_scrape_character_by_id():... | def test_scrape_item_by_id():
from api.scrapers.item import scrape_item_by_id
item = scrape_item_by_id('d19447e548d')
assert item.id == 'd19447e548d'
assert item.name == 'Thyrus Zenith'
assert item.type == 'Two-handed Conjurer\'s Arm'
assert item.ilvl == 90
Add scrape character unit testdef te... | <commit_before>def test_scrape_item_by_id():
from api.scrapers.item import scrape_item_by_id
item = scrape_item_by_id('d19447e548d')
assert item.id == 'd19447e548d'
assert item.name == 'Thyrus Zenith'
assert item.type == 'Two-handed Conjurer\'s Arm'
assert item.ilvl == 90
<commit_msg>Add scrap... |
68ae2de4b51a2fe0f02c40bad8731d34b1092521 | narcissa.py | narcissa.py | #!/usr/bin/env python3
import subprocess
import atexit
import sys
from utils.safe_schedule import SafeScheduler
from time import sleep
from glob import glob
META_IMPORT = '# narcissa import '
scheduler = SafeScheduler()
def make_exit_graceful():
original_hook = sys.excepthook
def new_hook(type, value, tra... | #!/usr/bin/env python3
import subprocess
import atexit
import sys
from utils.safe_schedule import SafeScheduler
from time import sleep
from glob import glob
META_IMPORT = '# narcissa import '
scheduler = SafeScheduler()
def make_exit_graceful():
original_hook = sys.excepthook
def new_hook(type, value, tra... | Change name of start_scrapers() to be more accurate | Change name of start_scrapers() to be more accurate
| Python | mit | mplewis/narcissa | #!/usr/bin/env python3
import subprocess
import atexit
import sys
from utils.safe_schedule import SafeScheduler
from time import sleep
from glob import glob
META_IMPORT = '# narcissa import '
scheduler = SafeScheduler()
def make_exit_graceful():
original_hook = sys.excepthook
def new_hook(type, value, tra... | #!/usr/bin/env python3
import subprocess
import atexit
import sys
from utils.safe_schedule import SafeScheduler
from time import sleep
from glob import glob
META_IMPORT = '# narcissa import '
scheduler = SafeScheduler()
def make_exit_graceful():
original_hook = sys.excepthook
def new_hook(type, value, tra... | <commit_before>#!/usr/bin/env python3
import subprocess
import atexit
import sys
from utils.safe_schedule import SafeScheduler
from time import sleep
from glob import glob
META_IMPORT = '# narcissa import '
scheduler = SafeScheduler()
def make_exit_graceful():
original_hook = sys.excepthook
def new_hook(t... | #!/usr/bin/env python3
import subprocess
import atexit
import sys
from utils.safe_schedule import SafeScheduler
from time import sleep
from glob import glob
META_IMPORT = '# narcissa import '
scheduler = SafeScheduler()
def make_exit_graceful():
original_hook = sys.excepthook
def new_hook(type, value, tra... | #!/usr/bin/env python3
import subprocess
import atexit
import sys
from utils.safe_schedule import SafeScheduler
from time import sleep
from glob import glob
META_IMPORT = '# narcissa import '
scheduler = SafeScheduler()
def make_exit_graceful():
original_hook = sys.excepthook
def new_hook(type, value, tra... | <commit_before>#!/usr/bin/env python3
import subprocess
import atexit
import sys
from utils.safe_schedule import SafeScheduler
from time import sleep
from glob import glob
META_IMPORT = '# narcissa import '
scheduler = SafeScheduler()
def make_exit_graceful():
original_hook = sys.excepthook
def new_hook(t... |
27723696885319aabea974f83189d3a43770b7d5 | spillway/fields.py | spillway/fields.py | """Serializer fields"""
from django.contrib.gis import forms
from rest_framework.fields import WritableField
from spillway.compat import json
class GeometryField(WritableField):
type_name = 'GeometryField'
type_label = 'geometry'
form_field_class = forms.GeometryField
def to_native(self, value):
... | """Serializer fields"""
from django.contrib.gis import forms
from rest_framework.fields import FileField, WritableField
from greenwich.raster import Raster
from spillway.compat import json
class GeometryField(WritableField):
type_name = 'GeometryField'
type_label = 'geometry'
form_field_class = forms.Geo... | Add numpy array serializer field | Add numpy array serializer field
| Python | bsd-3-clause | bkg/django-spillway,barseghyanartur/django-spillway,kuzmich/django-spillway | """Serializer fields"""
from django.contrib.gis import forms
from rest_framework.fields import WritableField
from spillway.compat import json
class GeometryField(WritableField):
type_name = 'GeometryField'
type_label = 'geometry'
form_field_class = forms.GeometryField
def to_native(self, value):
... | """Serializer fields"""
from django.contrib.gis import forms
from rest_framework.fields import FileField, WritableField
from greenwich.raster import Raster
from spillway.compat import json
class GeometryField(WritableField):
type_name = 'GeometryField'
type_label = 'geometry'
form_field_class = forms.Geo... | <commit_before>"""Serializer fields"""
from django.contrib.gis import forms
from rest_framework.fields import WritableField
from spillway.compat import json
class GeometryField(WritableField):
type_name = 'GeometryField'
type_label = 'geometry'
form_field_class = forms.GeometryField
def to_native(se... | """Serializer fields"""
from django.contrib.gis import forms
from rest_framework.fields import FileField, WritableField
from greenwich.raster import Raster
from spillway.compat import json
class GeometryField(WritableField):
type_name = 'GeometryField'
type_label = 'geometry'
form_field_class = forms.Geo... | """Serializer fields"""
from django.contrib.gis import forms
from rest_framework.fields import WritableField
from spillway.compat import json
class GeometryField(WritableField):
type_name = 'GeometryField'
type_label = 'geometry'
form_field_class = forms.GeometryField
def to_native(self, value):
... | <commit_before>"""Serializer fields"""
from django.contrib.gis import forms
from rest_framework.fields import WritableField
from spillway.compat import json
class GeometryField(WritableField):
type_name = 'GeometryField'
type_label = 'geometry'
form_field_class = forms.GeometryField
def to_native(se... |
f3ef685d4bb900733741f53e1afcefd143b26289 | npcs.py | npcs.py | import random
from characters import BaseCharacer
class Mentor(BaseCharacer):
MENTORS_COUNT = 4
def __init__(self, location, *groups):
super(Mentor, self).__init__(location, *groups)
def change_place(self, new_x, new_y):
self.rect.left = new_x
self.rect.top = new_y
def chan... | import random
from characters import BaseCharacer
class Mentor(BaseCharacer):
MENTORS_COUNT = 4
def __init__(self, location, *groups):
super(Mentor, self).__init__(location, *groups)
def change_place(self, new_x, new_y):
self.rect.left = new_x
self.rect.top = new_y
def chan... | Add visit method to Mentor | Add visit method to Mentor
| Python | mit | arturbalabanov/hacksym | import random
from characters import BaseCharacer
class Mentor(BaseCharacer):
MENTORS_COUNT = 4
def __init__(self, location, *groups):
super(Mentor, self).__init__(location, *groups)
def change_place(self, new_x, new_y):
self.rect.left = new_x
self.rect.top = new_y
def chan... | import random
from characters import BaseCharacer
class Mentor(BaseCharacer):
MENTORS_COUNT = 4
def __init__(self, location, *groups):
super(Mentor, self).__init__(location, *groups)
def change_place(self, new_x, new_y):
self.rect.left = new_x
self.rect.top = new_y
def chan... | <commit_before>import random
from characters import BaseCharacer
class Mentor(BaseCharacer):
MENTORS_COUNT = 4
def __init__(self, location, *groups):
super(Mentor, self).__init__(location, *groups)
def change_place(self, new_x, new_y):
self.rect.left = new_x
self.rect.top = new_... | import random
from characters import BaseCharacer
class Mentor(BaseCharacer):
MENTORS_COUNT = 4
def __init__(self, location, *groups):
super(Mentor, self).__init__(location, *groups)
def change_place(self, new_x, new_y):
self.rect.left = new_x
self.rect.top = new_y
def chan... | import random
from characters import BaseCharacer
class Mentor(BaseCharacer):
MENTORS_COUNT = 4
def __init__(self, location, *groups):
super(Mentor, self).__init__(location, *groups)
def change_place(self, new_x, new_y):
self.rect.left = new_x
self.rect.top = new_y
def chan... | <commit_before>import random
from characters import BaseCharacer
class Mentor(BaseCharacer):
MENTORS_COUNT = 4
def __init__(self, location, *groups):
super(Mentor, self).__init__(location, *groups)
def change_place(self, new_x, new_y):
self.rect.left = new_x
self.rect.top = new_... |
5933f9ef0ff7af0fd85a7dbe6578eefe9b8f7cdf | seqcluster/create_report.py | seqcluster/create_report.py | import os
import shutil
import logging
from bcbio import install
install._set_matplotlib_default_backend()
import matplotlib
matplotlib.use('Agg', force=True)
from libs.read import load_data
from libs.report import make_profile
from libs.utils import safe_dirs
from db import make_database
import templates
logger = l... | import os
import shutil
import logging
from bcbio import install
install._set_matplotlib_default_backend()
import matplotlib
matplotlib.use('Agg', force=True)
from libs.read import load_data
from libs.report import make_profile
from libs.utils import safe_dirs
from db import make_database
import templates
logger = l... | Add message with link to seqclusterViz | Add message with link to seqclusterViz
| Python | mit | lpantano/seqcluster,lpantano/seqcluster,lpantano/seqcluster,lpantano/seqcluster,lpantano/seqcluster | import os
import shutil
import logging
from bcbio import install
install._set_matplotlib_default_backend()
import matplotlib
matplotlib.use('Agg', force=True)
from libs.read import load_data
from libs.report import make_profile
from libs.utils import safe_dirs
from db import make_database
import templates
logger = l... | import os
import shutil
import logging
from bcbio import install
install._set_matplotlib_default_backend()
import matplotlib
matplotlib.use('Agg', force=True)
from libs.read import load_data
from libs.report import make_profile
from libs.utils import safe_dirs
from db import make_database
import templates
logger = l... | <commit_before>import os
import shutil
import logging
from bcbio import install
install._set_matplotlib_default_backend()
import matplotlib
matplotlib.use('Agg', force=True)
from libs.read import load_data
from libs.report import make_profile
from libs.utils import safe_dirs
from db import make_database
import templa... | import os
import shutil
import logging
from bcbio import install
install._set_matplotlib_default_backend()
import matplotlib
matplotlib.use('Agg', force=True)
from libs.read import load_data
from libs.report import make_profile
from libs.utils import safe_dirs
from db import make_database
import templates
logger = l... | import os
import shutil
import logging
from bcbio import install
install._set_matplotlib_default_backend()
import matplotlib
matplotlib.use('Agg', force=True)
from libs.read import load_data
from libs.report import make_profile
from libs.utils import safe_dirs
from db import make_database
import templates
logger = l... | <commit_before>import os
import shutil
import logging
from bcbio import install
install._set_matplotlib_default_backend()
import matplotlib
matplotlib.use('Agg', force=True)
from libs.read import load_data
from libs.report import make_profile
from libs.utils import safe_dirs
from db import make_database
import templa... |
c96f939c25663e5b123e2123d2d8ec69cf7c4cbe | fusesoc/provider/git.py | fusesoc/provider/git.py | # Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
import shutil
import subprocess
from fusesoc.provider.provider import Provider
from fusesoc.utils import Launcher
logger = logging.getLogger(__nam... | # Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
import shutil
import subprocess
from fusesoc.provider.provider import Provider
from fusesoc.utils import Launcher
logger = logging.getLogger(__nam... | Make sure shallow clone pulls all tags | Make sure shallow clone pulls all tags
No-single-branch flag ensures shallow-clone depth constraint does not make older tags invisible | Python | bsd-2-clause | olofk/fusesoc,olofk/fusesoc | # Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
import shutil
import subprocess
from fusesoc.provider.provider import Provider
from fusesoc.utils import Launcher
logger = logging.getLogger(__nam... | # Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
import shutil
import subprocess
from fusesoc.provider.provider import Provider
from fusesoc.utils import Launcher
logger = logging.getLogger(__nam... | <commit_before># Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
import shutil
import subprocess
from fusesoc.provider.provider import Provider
from fusesoc.utils import Launcher
logger = logging.... | # Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
import shutil
import subprocess
from fusesoc.provider.provider import Provider
from fusesoc.utils import Launcher
logger = logging.getLogger(__nam... | # Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
import shutil
import subprocess
from fusesoc.provider.provider import Provider
from fusesoc.utils import Launcher
logger = logging.getLogger(__nam... | <commit_before># Copyright FuseSoC contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
import shutil
import subprocess
from fusesoc.provider.provider import Provider
from fusesoc.utils import Launcher
logger = logging.... |
64219411d0bcbb7dafc754bef8538fc237584031 | go/vumitools/tests/test_api_worker.py | go/vumitools/tests/test_api_worker.py | # -*- coding: utf-8 -*-
"""Tests for go.vumitools.api_worker."""
from twisted.internet.defer import inlineCallbacks
from vumi.application.tests.test_base import ApplicationTestCase
from go.vumitools.api_worker import VumiApiWorker
from go.vumitools.api import VumiApiCommand
class TestVumiApiWorker(ApplicationTest... | # -*- coding: utf-8 -*-
"""Tests for go.vumitools.api_worker."""
from twisted.internet.defer import inlineCallbacks
from vumi.application.tests.test_base import ApplicationTestCase
from go.vumitools.api_worker import VumiApiWorker
from go.vumitools.api import VumiApiCommand
class TestVumiApiWorker(ApplicationTest... | Remove send_to config from tests since Vumi's application test class now adds this automatically. | Remove send_to config from tests since Vumi's application test class now adds this automatically.
| Python | bsd-3-clause | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | # -*- coding: utf-8 -*-
"""Tests for go.vumitools.api_worker."""
from twisted.internet.defer import inlineCallbacks
from vumi.application.tests.test_base import ApplicationTestCase
from go.vumitools.api_worker import VumiApiWorker
from go.vumitools.api import VumiApiCommand
class TestVumiApiWorker(ApplicationTest... | # -*- coding: utf-8 -*-
"""Tests for go.vumitools.api_worker."""
from twisted.internet.defer import inlineCallbacks
from vumi.application.tests.test_base import ApplicationTestCase
from go.vumitools.api_worker import VumiApiWorker
from go.vumitools.api import VumiApiCommand
class TestVumiApiWorker(ApplicationTest... | <commit_before># -*- coding: utf-8 -*-
"""Tests for go.vumitools.api_worker."""
from twisted.internet.defer import inlineCallbacks
from vumi.application.tests.test_base import ApplicationTestCase
from go.vumitools.api_worker import VumiApiWorker
from go.vumitools.api import VumiApiCommand
class TestVumiApiWorker(... | # -*- coding: utf-8 -*-
"""Tests for go.vumitools.api_worker."""
from twisted.internet.defer import inlineCallbacks
from vumi.application.tests.test_base import ApplicationTestCase
from go.vumitools.api_worker import VumiApiWorker
from go.vumitools.api import VumiApiCommand
class TestVumiApiWorker(ApplicationTest... | # -*- coding: utf-8 -*-
"""Tests for go.vumitools.api_worker."""
from twisted.internet.defer import inlineCallbacks
from vumi.application.tests.test_base import ApplicationTestCase
from go.vumitools.api_worker import VumiApiWorker
from go.vumitools.api import VumiApiCommand
class TestVumiApiWorker(ApplicationTest... | <commit_before># -*- coding: utf-8 -*-
"""Tests for go.vumitools.api_worker."""
from twisted.internet.defer import inlineCallbacks
from vumi.application.tests.test_base import ApplicationTestCase
from go.vumitools.api_worker import VumiApiWorker
from go.vumitools.api import VumiApiCommand
class TestVumiApiWorker(... |
a38ee91cbb45cba35c930aae780a469c0cbc762c | mrbelvedereci/build/tasks.py | mrbelvedereci/build/tasks.py | from celery import shared_task
from mrbelvedereci.build.models import Build
from mrbelvedereci.salesforce.models import Org
@shared_task
def run_build(build_id):
build = Build.objects.get(id=build_id)
build.run()
return build.status
@shared_task
def check_queued_build(build_id):
build = Build.objects.... | from celery import shared_task
from mrbelvedereci.build.models import Build
from mrbelvedereci.salesforce.models import Org
@shared_task
def run_build(build_id):
build = Build.objects.get(id=build_id)
build.run()
return build.status
@shared_task
def check_queued_build(build_id):
build = Build.objects.... | Fix path to org field | Fix path to org field
| Python | bsd-3-clause | SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci | from celery import shared_task
from mrbelvedereci.build.models import Build
from mrbelvedereci.salesforce.models import Org
@shared_task
def run_build(build_id):
build = Build.objects.get(id=build_id)
build.run()
return build.status
@shared_task
def check_queued_build(build_id):
build = Build.objects.... | from celery import shared_task
from mrbelvedereci.build.models import Build
from mrbelvedereci.salesforce.models import Org
@shared_task
def run_build(build_id):
build = Build.objects.get(id=build_id)
build.run()
return build.status
@shared_task
def check_queued_build(build_id):
build = Build.objects.... | <commit_before>from celery import shared_task
from mrbelvedereci.build.models import Build
from mrbelvedereci.salesforce.models import Org
@shared_task
def run_build(build_id):
build = Build.objects.get(id=build_id)
build.run()
return build.status
@shared_task
def check_queued_build(build_id):
build =... | from celery import shared_task
from mrbelvedereci.build.models import Build
from mrbelvedereci.salesforce.models import Org
@shared_task
def run_build(build_id):
build = Build.objects.get(id=build_id)
build.run()
return build.status
@shared_task
def check_queued_build(build_id):
build = Build.objects.... | from celery import shared_task
from mrbelvedereci.build.models import Build
from mrbelvedereci.salesforce.models import Org
@shared_task
def run_build(build_id):
build = Build.objects.get(id=build_id)
build.run()
return build.status
@shared_task
def check_queued_build(build_id):
build = Build.objects.... | <commit_before>from celery import shared_task
from mrbelvedereci.build.models import Build
from mrbelvedereci.salesforce.models import Org
@shared_task
def run_build(build_id):
build = Build.objects.get(id=build_id)
build.run()
return build.status
@shared_task
def check_queued_build(build_id):
build =... |
8aae2526f4e565982f8c57c25d796c59d17e6c46 | components/lie_graph/lie_graph/graph_model_classes/model_files.py | components/lie_graph/lie_graph/graph_model_classes/model_files.py | # -*- coding: utf-8 -*-
"""
file: model_files.py
Graph model classes for working with files
"""
import os
import logging
from lie_graph.graph_mixin import NodeEdgeToolsBaseClass
class FilePath(NodeEdgeToolsBaseClass):
@property
def exists(self):
path = self.get()
if path:
ret... | # -*- coding: utf-8 -*-
"""
file: model_files.py
Graph model classes for working with files
"""
import os
import logging
from lie_graph.graph_mixin import NodeEdgeToolsBaseClass
class FilePath(NodeEdgeToolsBaseClass):
@property
def exists(self):
path = self.get()
if path:
ret... | Rename create_dirs method to makedirs in line with os.path method | Rename create_dirs method to makedirs in line with os.path method
| Python | apache-2.0 | MD-Studio/MDStudio,MD-Studio/MDStudio,MD-Studio/MDStudio,MD-Studio/MDStudio,MD-Studio/MDStudio | # -*- coding: utf-8 -*-
"""
file: model_files.py
Graph model classes for working with files
"""
import os
import logging
from lie_graph.graph_mixin import NodeEdgeToolsBaseClass
class FilePath(NodeEdgeToolsBaseClass):
@property
def exists(self):
path = self.get()
if path:
ret... | # -*- coding: utf-8 -*-
"""
file: model_files.py
Graph model classes for working with files
"""
import os
import logging
from lie_graph.graph_mixin import NodeEdgeToolsBaseClass
class FilePath(NodeEdgeToolsBaseClass):
@property
def exists(self):
path = self.get()
if path:
ret... | <commit_before># -*- coding: utf-8 -*-
"""
file: model_files.py
Graph model classes for working with files
"""
import os
import logging
from lie_graph.graph_mixin import NodeEdgeToolsBaseClass
class FilePath(NodeEdgeToolsBaseClass):
@property
def exists(self):
path = self.get()
if path:
... | # -*- coding: utf-8 -*-
"""
file: model_files.py
Graph model classes for working with files
"""
import os
import logging
from lie_graph.graph_mixin import NodeEdgeToolsBaseClass
class FilePath(NodeEdgeToolsBaseClass):
@property
def exists(self):
path = self.get()
if path:
ret... | # -*- coding: utf-8 -*-
"""
file: model_files.py
Graph model classes for working with files
"""
import os
import logging
from lie_graph.graph_mixin import NodeEdgeToolsBaseClass
class FilePath(NodeEdgeToolsBaseClass):
@property
def exists(self):
path = self.get()
if path:
ret... | <commit_before># -*- coding: utf-8 -*-
"""
file: model_files.py
Graph model classes for working with files
"""
import os
import logging
from lie_graph.graph_mixin import NodeEdgeToolsBaseClass
class FilePath(NodeEdgeToolsBaseClass):
@property
def exists(self):
path = self.get()
if path:
... |
a2b6aa3bd90e967e2b7811f65a6b7311f13c53b3 | testproject/settings.py | testproject/settings.py | import os
DEBUG = True
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
SECRET_KEY = '_'
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.conten... | import os
DEBUG = True
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
SECRET_KEY = '_'
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.conten... | Fix browsable API in test project - add staticfiles app. | Fix browsable API in test project - add staticfiles app.
| Python | mit | johnwalker/djoser,akalipetis/djoser,fladi/djoser,yiyocx/djoser,barseghyanartur/djoser,sunscrapers/djoser,sunscrapers/djoser,dokenzy/djoser,carlosfunk/djoser,akalipetis/djoser,PingaxAnalytics/koob_auth,liyocee/djoser,sunscrapers/djoser,mjuopperi/djoser,vandoornik/djoser,unacast/djoser,apokinsocha/djoser,avances123/djose... | import os
DEBUG = True
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
SECRET_KEY = '_'
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.conten... | import os
DEBUG = True
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
SECRET_KEY = '_'
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.conten... | <commit_before>import os
DEBUG = True
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
SECRET_KEY = '_'
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = (
'django.contrib.auth',
'django... | import os
DEBUG = True
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
SECRET_KEY = '_'
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.conten... | import os
DEBUG = True
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
SECRET_KEY = '_'
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.conten... | <commit_before>import os
DEBUG = True
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
SECRET_KEY = '_'
MIDDLEWARE_CLASSES = ()
INSTALLED_APPS = (
'django.contrib.auth',
'django... |
3e488750a460afa549795d7189f5c5b1c43f96e0 | avalon/houdini/__init__.py | avalon/houdini/__init__.py | from .pipeline import (
install,
uninstall,
Creator,
ls,
containerise,
)
from .lib import (
lsattr,
lsattrs,
read,
maintained_selection,
unique_name
)
__all__ = [
"install",
"uninstall",
"Creator",
"ls",
"containerise",
# Utility functions
"m... | from .pipeline import (
install,
uninstall,
Creator,
ls,
containerise,
)
from .lib import (
lsattr,
lsattrs,
read,
maintained_selection,
unique_name
)
__all__ = [
"install",
"uninstall",
"Creator",
"ls",
"containerise",
# Utility functions
"l... | Reorder so it's similar to imports, purely cosmetics/readability | Reorder so it's similar to imports, purely cosmetics/readability
| Python | mit | getavalon/core,mindbender-studio/core,mindbender-studio/core,getavalon/core | from .pipeline import (
install,
uninstall,
Creator,
ls,
containerise,
)
from .lib import (
lsattr,
lsattrs,
read,
maintained_selection,
unique_name
)
__all__ = [
"install",
"uninstall",
"Creator",
"ls",
"containerise",
# Utility functions
"m... | from .pipeline import (
install,
uninstall,
Creator,
ls,
containerise,
)
from .lib import (
lsattr,
lsattrs,
read,
maintained_selection,
unique_name
)
__all__ = [
"install",
"uninstall",
"Creator",
"ls",
"containerise",
# Utility functions
"l... | <commit_before>from .pipeline import (
install,
uninstall,
Creator,
ls,
containerise,
)
from .lib import (
lsattr,
lsattrs,
read,
maintained_selection,
unique_name
)
__all__ = [
"install",
"uninstall",
"Creator",
"ls",
"containerise",
# Utility f... | from .pipeline import (
install,
uninstall,
Creator,
ls,
containerise,
)
from .lib import (
lsattr,
lsattrs,
read,
maintained_selection,
unique_name
)
__all__ = [
"install",
"uninstall",
"Creator",
"ls",
"containerise",
# Utility functions
"l... | from .pipeline import (
install,
uninstall,
Creator,
ls,
containerise,
)
from .lib import (
lsattr,
lsattrs,
read,
maintained_selection,
unique_name
)
__all__ = [
"install",
"uninstall",
"Creator",
"ls",
"containerise",
# Utility functions
"m... | <commit_before>from .pipeline import (
install,
uninstall,
Creator,
ls,
containerise,
)
from .lib import (
lsattr,
lsattrs,
read,
maintained_selection,
unique_name
)
__all__ = [
"install",
"uninstall",
"Creator",
"ls",
"containerise",
# Utility f... |
eda7125f28a9da3c5ccefb3ec5c604ddd23d3034 | plantcv/plantcv/plot_image.py | plantcv/plantcv/plot_image.py | # Plot image to screen
import cv2
import numpy
import matplotlib
from plantcv.plantcv import params
from matplotlib import pyplot as plt
from plantcv.plantcv import fatal_error
def plot_image(img, cmap=None):
"""Plot an image to the screen.
:param img: numpy.ndarray
:param cmap: str
:return:
"""
... | # Plot image to screen
import cv2
import numpy
import matplotlib
from plantcv.plantcv import params
from matplotlib import pyplot as plt
from plantcv.plantcv import fatal_error
def plot_image(img, cmap=None):
"""Plot an image to the screen.
:param img: numpy.ndarray
:param cmap: str
:return:
"""
... | Create a new figure for each plot | Create a new figure for each plot
| Python | mit | danforthcenter/plantcv,stiphyMT/plantcv,danforthcenter/plantcv,danforthcenter/plantcv,stiphyMT/plantcv,stiphyMT/plantcv | # Plot image to screen
import cv2
import numpy
import matplotlib
from plantcv.plantcv import params
from matplotlib import pyplot as plt
from plantcv.plantcv import fatal_error
def plot_image(img, cmap=None):
"""Plot an image to the screen.
:param img: numpy.ndarray
:param cmap: str
:return:
"""
... | # Plot image to screen
import cv2
import numpy
import matplotlib
from plantcv.plantcv import params
from matplotlib import pyplot as plt
from plantcv.plantcv import fatal_error
def plot_image(img, cmap=None):
"""Plot an image to the screen.
:param img: numpy.ndarray
:param cmap: str
:return:
"""
... | <commit_before># Plot image to screen
import cv2
import numpy
import matplotlib
from plantcv.plantcv import params
from matplotlib import pyplot as plt
from plantcv.plantcv import fatal_error
def plot_image(img, cmap=None):
"""Plot an image to the screen.
:param img: numpy.ndarray
:param cmap: str
:r... | # Plot image to screen
import cv2
import numpy
import matplotlib
from plantcv.plantcv import params
from matplotlib import pyplot as plt
from plantcv.plantcv import fatal_error
def plot_image(img, cmap=None):
"""Plot an image to the screen.
:param img: numpy.ndarray
:param cmap: str
:return:
"""
... | # Plot image to screen
import cv2
import numpy
import matplotlib
from plantcv.plantcv import params
from matplotlib import pyplot as plt
from plantcv.plantcv import fatal_error
def plot_image(img, cmap=None):
"""Plot an image to the screen.
:param img: numpy.ndarray
:param cmap: str
:return:
"""
... | <commit_before># Plot image to screen
import cv2
import numpy
import matplotlib
from plantcv.plantcv import params
from matplotlib import pyplot as plt
from plantcv.plantcv import fatal_error
def plot_image(img, cmap=None):
"""Plot an image to the screen.
:param img: numpy.ndarray
:param cmap: str
:r... |
607ba7481abc7556c247e140b963dfc9d5bd2161 | examples/strings.py | examples/strings.py | import collections
import collections.abc
def strings_have_format_map_method():
"""
As of Python 3.2 you can use the .format_map() method on a string object
to use mapping objects (not just builtin dictionaries) when formatting
a string.
"""
class Default(dict):
def __missing__(self,... | import collections
import collections.abc
def strings_have_format_map_method():
"""
As of Python 3.2 you can use the .format_map() method on a string object
to use mapping objects (not just builtin dictionaries) when formatting
a string.
"""
class Default(dict):
def __missing__(self,... | Make string example a bit less confusing | Make string example a bit less confusing
| Python | mit | svisser/python-3-examples | import collections
import collections.abc
def strings_have_format_map_method():
"""
As of Python 3.2 you can use the .format_map() method on a string object
to use mapping objects (not just builtin dictionaries) when formatting
a string.
"""
class Default(dict):
def __missing__(self,... | import collections
import collections.abc
def strings_have_format_map_method():
"""
As of Python 3.2 you can use the .format_map() method on a string object
to use mapping objects (not just builtin dictionaries) when formatting
a string.
"""
class Default(dict):
def __missing__(self,... | <commit_before>import collections
import collections.abc
def strings_have_format_map_method():
"""
As of Python 3.2 you can use the .format_map() method on a string object
to use mapping objects (not just builtin dictionaries) when formatting
a string.
"""
class Default(dict):
def __... | import collections
import collections.abc
def strings_have_format_map_method():
"""
As of Python 3.2 you can use the .format_map() method on a string object
to use mapping objects (not just builtin dictionaries) when formatting
a string.
"""
class Default(dict):
def __missing__(self,... | import collections
import collections.abc
def strings_have_format_map_method():
"""
As of Python 3.2 you can use the .format_map() method on a string object
to use mapping objects (not just builtin dictionaries) when formatting
a string.
"""
class Default(dict):
def __missing__(self,... | <commit_before>import collections
import collections.abc
def strings_have_format_map_method():
"""
As of Python 3.2 you can use the .format_map() method on a string object
to use mapping objects (not just builtin dictionaries) when formatting
a string.
"""
class Default(dict):
def __... |
ca9cd229faaa0fc43a2ac0e4c6354331c0b57550 | nengo_spinnaker/simulator.py | nengo_spinnaker/simulator.py | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed)
self.dao.writeTextSp... | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed)
self.dao.writeTextSp... | Allow vertices to define a `prepare_vertex` function which will be called just once at some point in the build process. | Allow vertices to define a `prepare_vertex` function which will be called just once at some point in the build process.
| Python | mit | ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014 | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed)
self.dao.writeTextSp... | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed)
self.dao.writeTextSp... | <commit_before>import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed)
self.... | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed)
self.dao.writeTextSp... | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed)
self.dao.writeTextSp... | <commit_before>import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed)
self.... |
749c727b044244060e1e17ad51505ee11957bfeb | tests/test_formatter.py | tests/test_formatter.py | from datetime import datetime, timedelta
from random import randrange
from todoman import ui
DATE_FORMAT = "%d-%m-%y"
def test_format_date():
"""
Tests the format_date function in todoman.ui.TodoFormatter
"""
formatter = ui.TodoFormatter(DATE_FORMAT)
today = datetime.now()
tomorrow = today +... | from datetime import datetime, timedelta
from random import randrange
from todoman import ui
DATE_FORMAT = "%d-%m-%y"
def test_format_date():
"""
Tests the format_date function in todoman.ui.TodoFormatter
"""
formatter = ui.TodoFormatter(DATE_FORMAT)
today = datetime.now()
tomorrow = today +... | Remove spaces from around arguements | Remove spaces from around arguements
| Python | isc | rimshaakhan/todoman | from datetime import datetime, timedelta
from random import randrange
from todoman import ui
DATE_FORMAT = "%d-%m-%y"
def test_format_date():
"""
Tests the format_date function in todoman.ui.TodoFormatter
"""
formatter = ui.TodoFormatter(DATE_FORMAT)
today = datetime.now()
tomorrow = today +... | from datetime import datetime, timedelta
from random import randrange
from todoman import ui
DATE_FORMAT = "%d-%m-%y"
def test_format_date():
"""
Tests the format_date function in todoman.ui.TodoFormatter
"""
formatter = ui.TodoFormatter(DATE_FORMAT)
today = datetime.now()
tomorrow = today +... | <commit_before>from datetime import datetime, timedelta
from random import randrange
from todoman import ui
DATE_FORMAT = "%d-%m-%y"
def test_format_date():
"""
Tests the format_date function in todoman.ui.TodoFormatter
"""
formatter = ui.TodoFormatter(DATE_FORMAT)
today = datetime.now()
tom... | from datetime import datetime, timedelta
from random import randrange
from todoman import ui
DATE_FORMAT = "%d-%m-%y"
def test_format_date():
"""
Tests the format_date function in todoman.ui.TodoFormatter
"""
formatter = ui.TodoFormatter(DATE_FORMAT)
today = datetime.now()
tomorrow = today +... | from datetime import datetime, timedelta
from random import randrange
from todoman import ui
DATE_FORMAT = "%d-%m-%y"
def test_format_date():
"""
Tests the format_date function in todoman.ui.TodoFormatter
"""
formatter = ui.TodoFormatter(DATE_FORMAT)
today = datetime.now()
tomorrow = today +... | <commit_before>from datetime import datetime, timedelta
from random import randrange
from todoman import ui
DATE_FORMAT = "%d-%m-%y"
def test_format_date():
"""
Tests the format_date function in todoman.ui.TodoFormatter
"""
formatter = ui.TodoFormatter(DATE_FORMAT)
today = datetime.now()
tom... |
7cfdde79d161b463bf720cd7e222812280d09cdc | src/fabfile.py | src/fabfile.py | import os
# pylint: disable=unused-wildcard-import,unused-import,wildcard-import
SRC_DIR = os.path.dirname(os.path.abspath(__file__)) # elife-builder/src/
# once called 'THIS_DIR', now deprecated as confusing.
PROJECT_DIR = os.path.dirname(SRC_DIR) # elife-builder/
from cfn import *
# aws tasks are not working ... | import os
# pylint: disable=unused-wildcard-import,unused-import,wildcard-import
SRC_DIR = os.path.dirname(os.path.abspath(__file__)) # elife-builder/src/
# once called 'THIS_DIR', now deprecated as confusing.
PROJECT_DIR = os.path.dirname(SRC_DIR) # elife-builder/
from cfn import *
# aws tasks are not working ... | Remove commented out packer import | Remove commented out packer import
| Python | mit | elifesciences/builder,elifesciences/builder | import os
# pylint: disable=unused-wildcard-import,unused-import,wildcard-import
SRC_DIR = os.path.dirname(os.path.abspath(__file__)) # elife-builder/src/
# once called 'THIS_DIR', now deprecated as confusing.
PROJECT_DIR = os.path.dirname(SRC_DIR) # elife-builder/
from cfn import *
# aws tasks are not working ... | import os
# pylint: disable=unused-wildcard-import,unused-import,wildcard-import
SRC_DIR = os.path.dirname(os.path.abspath(__file__)) # elife-builder/src/
# once called 'THIS_DIR', now deprecated as confusing.
PROJECT_DIR = os.path.dirname(SRC_DIR) # elife-builder/
from cfn import *
# aws tasks are not working ... | <commit_before>import os
# pylint: disable=unused-wildcard-import,unused-import,wildcard-import
SRC_DIR = os.path.dirname(os.path.abspath(__file__)) # elife-builder/src/
# once called 'THIS_DIR', now deprecated as confusing.
PROJECT_DIR = os.path.dirname(SRC_DIR) # elife-builder/
from cfn import *
# aws tasks a... | import os
# pylint: disable=unused-wildcard-import,unused-import,wildcard-import
SRC_DIR = os.path.dirname(os.path.abspath(__file__)) # elife-builder/src/
# once called 'THIS_DIR', now deprecated as confusing.
PROJECT_DIR = os.path.dirname(SRC_DIR) # elife-builder/
from cfn import *
# aws tasks are not working ... | import os
# pylint: disable=unused-wildcard-import,unused-import,wildcard-import
SRC_DIR = os.path.dirname(os.path.abspath(__file__)) # elife-builder/src/
# once called 'THIS_DIR', now deprecated as confusing.
PROJECT_DIR = os.path.dirname(SRC_DIR) # elife-builder/
from cfn import *
# aws tasks are not working ... | <commit_before>import os
# pylint: disable=unused-wildcard-import,unused-import,wildcard-import
SRC_DIR = os.path.dirname(os.path.abspath(__file__)) # elife-builder/src/
# once called 'THIS_DIR', now deprecated as confusing.
PROJECT_DIR = os.path.dirname(SRC_DIR) # elife-builder/
from cfn import *
# aws tasks a... |
eeba670eb9ee4aabf36843add730eaa983de7ca6 | run.py | run.py | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
g.say("pres... | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def root():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(finishOnKey="*", action="/handle-key", method="POST") as g:
g.say("Play that tri... | Refactor code and add ability for many input. | Refactor code and add ability for many input.
| Python | mit | ColdSauce/tw-1,christophert/tw-1,zachlatta/tw-1 | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
g.say("pres... | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def root():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(finishOnKey="*", action="/handle-key", method="POST") as g:
g.say("Play that tri... | <commit_before>from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
... | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def root():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(finishOnKey="*", action="/handle-key", method="POST") as g:
g.say("Play that tri... | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
g.say("pres... | <commit_before>from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
... |
d731b4172592ef905101868b43817f25f5b04063 | virtstrap/exceptions.py | virtstrap/exceptions.py | class CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
| class CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
class RequirementsConfigError(Exception):
"""Exception for command configuration errors"""
pass
| Add a requirements configuration exception | Add a requirements configuration exception
| Python | mit | ravenac95/virtstrap-core,ravenac95/testvirtstrapdocs,ravenac95/virtstrap-core | class CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
Add a requirements configuration exception | class CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
class RequirementsConfigError(Exception):
"""Exception for command configuration errors"""
pass
| <commit_before>class CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
<commit_msg>Add a requirements configuration exception<commit_after> | class CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
class RequirementsConfigError(Exception):
"""Exception for command configuration errors"""
pass
| class CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
Add a requirements configuration exceptionclass CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
class RequirementsConfigError(Exception):
"""Exception for command configur... | <commit_before>class CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
<commit_msg>Add a requirements configuration exception<commit_after>class CommandConfigError(Exception):
"""Exception for command configuration errors"""
pass
class RequirementsConfigError(Exceptio... |
9bdd1c9a33bd48cde186a5d4c425fc8745017cd9 | lifx.py | lifx.py | # -*- encoding: utf8 -*-
from __future__ import division, print_function, division
import pylifx
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('bulb_addr')
parser.add_argument('state', choices=('on', 'off'))
args = parser.parse_args()
wit... | # -*- encoding: utf8 -*-
from __future__ import division, print_function, division
import pylifx
def power(bulb, state):
if state == 'on':
bulb.on()
elif state == 'off':
bulb.off()
else:
raise ValueError('Invalid State specified %s' % state)
if __name__ == '__main__':
import... | Add subparsers for power, rgb, hsb and temperature | Add subparsers for power, rgb, hsb and temperature
| Python | bsd-3-clause | MichaelAquilina/lifx-cmd | # -*- encoding: utf8 -*-
from __future__ import division, print_function, division
import pylifx
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('bulb_addr')
parser.add_argument('state', choices=('on', 'off'))
args = parser.parse_args()
wit... | # -*- encoding: utf8 -*-
from __future__ import division, print_function, division
import pylifx
def power(bulb, state):
if state == 'on':
bulb.on()
elif state == 'off':
bulb.off()
else:
raise ValueError('Invalid State specified %s' % state)
if __name__ == '__main__':
import... | <commit_before># -*- encoding: utf8 -*-
from __future__ import division, print_function, division
import pylifx
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('bulb_addr')
parser.add_argument('state', choices=('on', 'off'))
args = parser.parse_... | # -*- encoding: utf8 -*-
from __future__ import division, print_function, division
import pylifx
def power(bulb, state):
if state == 'on':
bulb.on()
elif state == 'off':
bulb.off()
else:
raise ValueError('Invalid State specified %s' % state)
if __name__ == '__main__':
import... | # -*- encoding: utf8 -*-
from __future__ import division, print_function, division
import pylifx
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('bulb_addr')
parser.add_argument('state', choices=('on', 'off'))
args = parser.parse_args()
wit... | <commit_before># -*- encoding: utf8 -*-
from __future__ import division, print_function, division
import pylifx
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('bulb_addr')
parser.add_argument('state', choices=('on', 'off'))
args = parser.parse_... |
dfd6e69b0a6202ed562360201e123e40c7aa1cc9 | bin/template.py | bin/template.py | #! /usr/bin/env python
import jinja2
import sys
import re
import os
KEY_REGEX = re.compile('([A-Z]+)=(\w+)')
def main():
args = sys.argv[1:]
if len(args) < 1:
raise Exception('args too short {}'.format(args))
template_file = args[0]
keyword_args = args[1:]
if not os.path.exists(templat... | #! /usr/bin/env python
import jinja2
import sys
import re
import os
KEY_REGEX = re.compile('([A-Z]+)=(.+)')
def main():
args = sys.argv[1:]
if len(args) < 1:
raise Exception('args too short {}'.format(args))
template_file = args[0]
keyword_args = args[1:]
if not os.path.exists(template... | Fix the regex so that it catches all characters to the right of the equals-sign. | Fix the regex so that it catches all characters to the right of the equals-sign.
| Python | mit | BedquiltDB/bedquilt-core | #! /usr/bin/env python
import jinja2
import sys
import re
import os
KEY_REGEX = re.compile('([A-Z]+)=(\w+)')
def main():
args = sys.argv[1:]
if len(args) < 1:
raise Exception('args too short {}'.format(args))
template_file = args[0]
keyword_args = args[1:]
if not os.path.exists(templat... | #! /usr/bin/env python
import jinja2
import sys
import re
import os
KEY_REGEX = re.compile('([A-Z]+)=(.+)')
def main():
args = sys.argv[1:]
if len(args) < 1:
raise Exception('args too short {}'.format(args))
template_file = args[0]
keyword_args = args[1:]
if not os.path.exists(template... | <commit_before>#! /usr/bin/env python
import jinja2
import sys
import re
import os
KEY_REGEX = re.compile('([A-Z]+)=(\w+)')
def main():
args = sys.argv[1:]
if len(args) < 1:
raise Exception('args too short {}'.format(args))
template_file = args[0]
keyword_args = args[1:]
if not os.path... | #! /usr/bin/env python
import jinja2
import sys
import re
import os
KEY_REGEX = re.compile('([A-Z]+)=(.+)')
def main():
args = sys.argv[1:]
if len(args) < 1:
raise Exception('args too short {}'.format(args))
template_file = args[0]
keyword_args = args[1:]
if not os.path.exists(template... | #! /usr/bin/env python
import jinja2
import sys
import re
import os
KEY_REGEX = re.compile('([A-Z]+)=(\w+)')
def main():
args = sys.argv[1:]
if len(args) < 1:
raise Exception('args too short {}'.format(args))
template_file = args[0]
keyword_args = args[1:]
if not os.path.exists(templat... | <commit_before>#! /usr/bin/env python
import jinja2
import sys
import re
import os
KEY_REGEX = re.compile('([A-Z]+)=(\w+)')
def main():
args = sys.argv[1:]
if len(args) < 1:
raise Exception('args too short {}'.format(args))
template_file = args[0]
keyword_args = args[1:]
if not os.path... |
6377284c022f26cfd9528b09af3ec61fc91a2c54 | api/tests/__init__.py | api/tests/__init__.py | import json
from django.test import TestCase, Client
# Create your tests here.
from login.models import myuser
from rest_framework.authtoken.models import Token
class APITestCase(TestCase):
test_schema = 'schema1'
test_table = 'population2'
@classmethod
def setUpClass(cls):
super(APITestC... | import json
from django.test import TestCase, Client
# Create your tests here.
from login.models import myuser
from rest_framework.authtoken.models import Token
class APITestCase(TestCase):
test_schema = 'schema1'
test_table = 'population2'
@classmethod
def setUpClass(cls):
super(APITestC... | Add another user for permission testing | Add another user for permission testing
| Python | agpl-3.0 | tom-heimbrodt/oeplatform,tom-heimbrodt/oeplatform,tom-heimbrodt/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform | import json
from django.test import TestCase, Client
# Create your tests here.
from login.models import myuser
from rest_framework.authtoken.models import Token
class APITestCase(TestCase):
test_schema = 'schema1'
test_table = 'population2'
@classmethod
def setUpClass(cls):
super(APITestC... | import json
from django.test import TestCase, Client
# Create your tests here.
from login.models import myuser
from rest_framework.authtoken.models import Token
class APITestCase(TestCase):
test_schema = 'schema1'
test_table = 'population2'
@classmethod
def setUpClass(cls):
super(APITestC... | <commit_before>import json
from django.test import TestCase, Client
# Create your tests here.
from login.models import myuser
from rest_framework.authtoken.models import Token
class APITestCase(TestCase):
test_schema = 'schema1'
test_table = 'population2'
@classmethod
def setUpClass(cls):
... | import json
from django.test import TestCase, Client
# Create your tests here.
from login.models import myuser
from rest_framework.authtoken.models import Token
class APITestCase(TestCase):
test_schema = 'schema1'
test_table = 'population2'
@classmethod
def setUpClass(cls):
super(APITestC... | import json
from django.test import TestCase, Client
# Create your tests here.
from login.models import myuser
from rest_framework.authtoken.models import Token
class APITestCase(TestCase):
test_schema = 'schema1'
test_table = 'population2'
@classmethod
def setUpClass(cls):
super(APITestC... | <commit_before>import json
from django.test import TestCase, Client
# Create your tests here.
from login.models import myuser
from rest_framework.authtoken.models import Token
class APITestCase(TestCase):
test_schema = 'schema1'
test_table = 'population2'
@classmethod
def setUpClass(cls):
... |
833a83a109bc52b034bbfeabc9a9e2d99d8226f9 | app.tmpl/__init__.py | app.tmpl/__init__.py | # Main application file
#
# Copyright (c) 2017, Alexandre Hamelin <alexandre.hamelin gmail.com>
import os
from flask import Flask
from flask_login import LoginManager
app = Flask(__name__)
app.secret_key = 'default-secret-key'
app.config.from_object('plbackend.config.DefaultConfig')
if 'PLBACKEND_CONFIG' in os.envir... | # Main application file
#
# Copyright (c) 2017, Alexandre Hamelin <alexandre.hamelin gmail.com>
import os
from flask import Flask
from flask_login import LoginManager
app = Flask(__name__)
app.secret_key = 'default-secret-key'
app.config.from_object(app.name + '.config.DefaultConfig')
if 'APP_CONFIG' in os.environ:
... | Fix the app config loading process | Fix the app config loading process
| Python | mit | 0xquad/flask-app-template,0xquad/flask-app-template,0xquad/flask-app-template | # Main application file
#
# Copyright (c) 2017, Alexandre Hamelin <alexandre.hamelin gmail.com>
import os
from flask import Flask
from flask_login import LoginManager
app = Flask(__name__)
app.secret_key = 'default-secret-key'
app.config.from_object('plbackend.config.DefaultConfig')
if 'PLBACKEND_CONFIG' in os.envir... | # Main application file
#
# Copyright (c) 2017, Alexandre Hamelin <alexandre.hamelin gmail.com>
import os
from flask import Flask
from flask_login import LoginManager
app = Flask(__name__)
app.secret_key = 'default-secret-key'
app.config.from_object(app.name + '.config.DefaultConfig')
if 'APP_CONFIG' in os.environ:
... | <commit_before># Main application file
#
# Copyright (c) 2017, Alexandre Hamelin <alexandre.hamelin gmail.com>
import os
from flask import Flask
from flask_login import LoginManager
app = Flask(__name__)
app.secret_key = 'default-secret-key'
app.config.from_object('plbackend.config.DefaultConfig')
if 'PLBACKEND_CONF... | # Main application file
#
# Copyright (c) 2017, Alexandre Hamelin <alexandre.hamelin gmail.com>
import os
from flask import Flask
from flask_login import LoginManager
app = Flask(__name__)
app.secret_key = 'default-secret-key'
app.config.from_object(app.name + '.config.DefaultConfig')
if 'APP_CONFIG' in os.environ:
... | # Main application file
#
# Copyright (c) 2017, Alexandre Hamelin <alexandre.hamelin gmail.com>
import os
from flask import Flask
from flask_login import LoginManager
app = Flask(__name__)
app.secret_key = 'default-secret-key'
app.config.from_object('plbackend.config.DefaultConfig')
if 'PLBACKEND_CONFIG' in os.envir... | <commit_before># Main application file
#
# Copyright (c) 2017, Alexandre Hamelin <alexandre.hamelin gmail.com>
import os
from flask import Flask
from flask_login import LoginManager
app = Flask(__name__)
app.secret_key = 'default-secret-key'
app.config.from_object('plbackend.config.DefaultConfig')
if 'PLBACKEND_CONF... |
90405c60b5d2ce583597382bc72e116cb9a450bd | project/library/models.py | project/library/models.py | from django.db import models
class Author(models.Model):
'''Object for book author'''
first_name = models.CharField(max_length=128)
last_name = models.CharField(max_length=128)
def __unicode__(self):
return self.last_name + ", " + self.first_name
class Book(models.Model):
'''Object for library books'... | from datetime import datetime
from django.db import models
class Author(models.Model):
'''Object for book author'''
first_name = models.CharField(max_length=128)
last_name = models.CharField(max_length=128)
def __unicode__(self):
return self.last_name + ", " + self.first_name
class Book(models.Model):
... | Update reservation object to use current time | Update reservation object to use current time
| Python | mit | DUCSS/ducss-site-old,DUCSS/ducss-site-old,DUCSS/ducss-site-old | from django.db import models
class Author(models.Model):
'''Object for book author'''
first_name = models.CharField(max_length=128)
last_name = models.CharField(max_length=128)
def __unicode__(self):
return self.last_name + ", " + self.first_name
class Book(models.Model):
'''Object for library books'... | from datetime import datetime
from django.db import models
class Author(models.Model):
'''Object for book author'''
first_name = models.CharField(max_length=128)
last_name = models.CharField(max_length=128)
def __unicode__(self):
return self.last_name + ", " + self.first_name
class Book(models.Model):
... | <commit_before>from django.db import models
class Author(models.Model):
'''Object for book author'''
first_name = models.CharField(max_length=128)
last_name = models.CharField(max_length=128)
def __unicode__(self):
return self.last_name + ", " + self.first_name
class Book(models.Model):
'''Object for... | from datetime import datetime
from django.db import models
class Author(models.Model):
'''Object for book author'''
first_name = models.CharField(max_length=128)
last_name = models.CharField(max_length=128)
def __unicode__(self):
return self.last_name + ", " + self.first_name
class Book(models.Model):
... | from django.db import models
class Author(models.Model):
'''Object for book author'''
first_name = models.CharField(max_length=128)
last_name = models.CharField(max_length=128)
def __unicode__(self):
return self.last_name + ", " + self.first_name
class Book(models.Model):
'''Object for library books'... | <commit_before>from django.db import models
class Author(models.Model):
'''Object for book author'''
first_name = models.CharField(max_length=128)
last_name = models.CharField(max_length=128)
def __unicode__(self):
return self.last_name + ", " + self.first_name
class Book(models.Model):
'''Object for... |
58ed8c24288ee8f470acfa85cc6ae267f0ad2fd8 | pbag/tests/test_serialize.py | pbag/tests/test_serialize.py | from pbag.serialize import dump, load
data = [b'Hello\n', 1, b'world!', None]
def test_core():
with open('_foo.pack', 'wb') as f:
dump(data, f)
with open('_foo.pack', 'rb') as f:
data2 = load(f)
assert data == data2
def test_multiple_dumps():
with open('_foo.pack', 'wb') as f:
... | from tempfile import TemporaryFile
from pbag.serialize import dump, load
data = [b'Hello\n', 1, b'world!', None]
def test_core():
with TemporaryFile(mode='wb+') as f:
dump(data, f)
f.seek(0)
data2 = load(f)
assert data == data2
def test_multiple_dumps():
with TemporaryFile(mod... | Use temporary files for testing. | Use temporary files for testing.
| Python | bsd-3-clause | jakirkham/dask,clarkfitzg/dask,marianotepper/dask,ContinuumIO/dask,esc/dask,pombredanne/dask,wiso/dask,jcrist/dask,mraspaud/dask,hainm/dask,pombredanne/dask,jakirkham/dask,ssanderson/dask,mraspaud/dask,cpcloud/dask,wiso/dask,mrocklin/dask,minrk/dask,ContinuumIO/dask,PhE/dask,PhE/dask,esc/dask,jayhetee/dask,blaze/dask,d... | from pbag.serialize import dump, load
data = [b'Hello\n', 1, b'world!', None]
def test_core():
with open('_foo.pack', 'wb') as f:
dump(data, f)
with open('_foo.pack', 'rb') as f:
data2 = load(f)
assert data == data2
def test_multiple_dumps():
with open('_foo.pack', 'wb') as f:
... | from tempfile import TemporaryFile
from pbag.serialize import dump, load
data = [b'Hello\n', 1, b'world!', None]
def test_core():
with TemporaryFile(mode='wb+') as f:
dump(data, f)
f.seek(0)
data2 = load(f)
assert data == data2
def test_multiple_dumps():
with TemporaryFile(mod... | <commit_before>from pbag.serialize import dump, load
data = [b'Hello\n', 1, b'world!', None]
def test_core():
with open('_foo.pack', 'wb') as f:
dump(data, f)
with open('_foo.pack', 'rb') as f:
data2 = load(f)
assert data == data2
def test_multiple_dumps():
with open('_foo.pack',... | from tempfile import TemporaryFile
from pbag.serialize import dump, load
data = [b'Hello\n', 1, b'world!', None]
def test_core():
with TemporaryFile(mode='wb+') as f:
dump(data, f)
f.seek(0)
data2 = load(f)
assert data == data2
def test_multiple_dumps():
with TemporaryFile(mod... | from pbag.serialize import dump, load
data = [b'Hello\n', 1, b'world!', None]
def test_core():
with open('_foo.pack', 'wb') as f:
dump(data, f)
with open('_foo.pack', 'rb') as f:
data2 = load(f)
assert data == data2
def test_multiple_dumps():
with open('_foo.pack', 'wb') as f:
... | <commit_before>from pbag.serialize import dump, load
data = [b'Hello\n', 1, b'world!', None]
def test_core():
with open('_foo.pack', 'wb') as f:
dump(data, f)
with open('_foo.pack', 'rb') as f:
data2 = load(f)
assert data == data2
def test_multiple_dumps():
with open('_foo.pack',... |
2b9f5550c85c3f89de7ee25f29cf40af121c70d3 | setup.py | setup.py | from setuptools import setup, find_packages
import os
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
setup(
name='roku',
version='3.1',
description='Client for the Roku media player',
long_description=readme,
author='Jeremy Carbaugh',
author_email='... | from setuptools import setup, find_packages
import os
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
setup(
name='roku',
version='3.0',
description='Client for the Roku media player',
long_description=readme,
author='Jeremy Carbaugh',
author_email='... | Modify version back to 3.0 | Modify version back to 3.0 | Python | bsd-3-clause | jcarbaugh/python-roku | from setuptools import setup, find_packages
import os
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
setup(
name='roku',
version='3.1',
description='Client for the Roku media player',
long_description=readme,
author='Jeremy Carbaugh',
author_email='... | from setuptools import setup, find_packages
import os
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
setup(
name='roku',
version='3.0',
description='Client for the Roku media player',
long_description=readme,
author='Jeremy Carbaugh',
author_email='... | <commit_before>from setuptools import setup, find_packages
import os
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
setup(
name='roku',
version='3.1',
description='Client for the Roku media player',
long_description=readme,
author='Jeremy Carbaugh',
... | from setuptools import setup, find_packages
import os
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
setup(
name='roku',
version='3.0',
description='Client for the Roku media player',
long_description=readme,
author='Jeremy Carbaugh',
author_email='... | from setuptools import setup, find_packages
import os
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
setup(
name='roku',
version='3.1',
description='Client for the Roku media player',
long_description=readme,
author='Jeremy Carbaugh',
author_email='... | <commit_before>from setuptools import setup, find_packages
import os
f = open(os.path.join(os.path.dirname(__file__), 'README.rst'))
readme = f.read()
f.close()
setup(
name='roku',
version='3.1',
description='Client for the Roku media player',
long_description=readme,
author='Jeremy Carbaugh',
... |
08bab0a9e9ae2c362f1c4238fa70b39be109edfd | setup.py | setup.py | import os
from setuptools import setup
import mando
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj:
readme = fobj.read()
setup(name='mando',
version=mando.__version__,
author='Michele Lacchia',
author_email='michelelacchia@gmail.com',
url='https://mando.readthedo... | import os
from setuptools import setup
import mando
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj:
readme = fobj.read()
setup(name='mando',
version=mando.__version__,
author='Michele Lacchia',
author_email='michelelacchia@gmail.com',
url='https://mando.readthedo... | Add argparse as a dependency | Add argparse as a dependency
| Python | mit | MarioSchwalbe/mando,MarioSchwalbe/mando,rubik/mando | import os
from setuptools import setup
import mando
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj:
readme = fobj.read()
setup(name='mando',
version=mando.__version__,
author='Michele Lacchia',
author_email='michelelacchia@gmail.com',
url='https://mando.readthedo... | import os
from setuptools import setup
import mando
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj:
readme = fobj.read()
setup(name='mando',
version=mando.__version__,
author='Michele Lacchia',
author_email='michelelacchia@gmail.com',
url='https://mando.readthedo... | <commit_before>import os
from setuptools import setup
import mando
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj:
readme = fobj.read()
setup(name='mando',
version=mando.__version__,
author='Michele Lacchia',
author_email='michelelacchia@gmail.com',
url='https://... | import os
from setuptools import setup
import mando
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj:
readme = fobj.read()
setup(name='mando',
version=mando.__version__,
author='Michele Lacchia',
author_email='michelelacchia@gmail.com',
url='https://mando.readthedo... | import os
from setuptools import setup
import mando
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj:
readme = fobj.read()
setup(name='mando',
version=mando.__version__,
author='Michele Lacchia',
author_email='michelelacchia@gmail.com',
url='https://mando.readthedo... | <commit_before>import os
from setuptools import setup
import mando
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj:
readme = fobj.read()
setup(name='mando',
version=mando.__version__,
author='Michele Lacchia',
author_email='michelelacchia@gmail.com',
url='https://... |
e69c2796fae7b91b2b3658bca5f946143277f54f | python_apps/pypo/setup.py | python_apps/pypo/setup.py | import os
from setuptools import setup
# Change directory since setuptools uses relative paths
os.chdir(os.path.dirname(os.path.realpath(__file__)))
setup(
name="airtime-playout",
version="1.0",
description="LibreTime Playout",
author="LibreTime Contributors",
url="https://github.com/libretime/li... | import os
from setuptools import setup
# Change directory since setuptools uses relative paths
os.chdir(os.path.dirname(os.path.realpath(__file__)))
setup(
name="airtime-playout",
version="1.0",
description="LibreTime Playout",
author="LibreTime Contributors",
url="https://github.com/libretime/li... | Remove unused python packages from playout | Remove unused python packages from playout
- anyjson is failing with setuptools >=58, because it
dropped the use_2to3 support.
- other package are simply not used.
| Python | agpl-3.0 | LibreTime/libretime,LibreTime/libretime,LibreTime/libretime,LibreTime/libretime,LibreTime/libretime,LibreTime/libretime | import os
from setuptools import setup
# Change directory since setuptools uses relative paths
os.chdir(os.path.dirname(os.path.realpath(__file__)))
setup(
name="airtime-playout",
version="1.0",
description="LibreTime Playout",
author="LibreTime Contributors",
url="https://github.com/libretime/li... | import os
from setuptools import setup
# Change directory since setuptools uses relative paths
os.chdir(os.path.dirname(os.path.realpath(__file__)))
setup(
name="airtime-playout",
version="1.0",
description="LibreTime Playout",
author="LibreTime Contributors",
url="https://github.com/libretime/li... | <commit_before>import os
from setuptools import setup
# Change directory since setuptools uses relative paths
os.chdir(os.path.dirname(os.path.realpath(__file__)))
setup(
name="airtime-playout",
version="1.0",
description="LibreTime Playout",
author="LibreTime Contributors",
url="https://github.c... | import os
from setuptools import setup
# Change directory since setuptools uses relative paths
os.chdir(os.path.dirname(os.path.realpath(__file__)))
setup(
name="airtime-playout",
version="1.0",
description="LibreTime Playout",
author="LibreTime Contributors",
url="https://github.com/libretime/li... | import os
from setuptools import setup
# Change directory since setuptools uses relative paths
os.chdir(os.path.dirname(os.path.realpath(__file__)))
setup(
name="airtime-playout",
version="1.0",
description="LibreTime Playout",
author="LibreTime Contributors",
url="https://github.com/libretime/li... | <commit_before>import os
from setuptools import setup
# Change directory since setuptools uses relative paths
os.chdir(os.path.dirname(os.path.realpath(__file__)))
setup(
name="airtime-playout",
version="1.0",
description="LibreTime Playout",
author="LibreTime Contributors",
url="https://github.c... |
fa232a1bc9d051ac5d734d7dd888601608f6854b | setup.py | setup.py | from setuptools import setup
setup(
name='nose2_html_report',
packages=['nose2_html_report'],
version='0.1.0',
description='Generate an HTML report for your unit tests',
long_description=open('README.md', 'r').read(),
author='Michael Grijalva',
author_email='michaelgrij@gmail.com',
lice... | from setuptools import setup
setup(
name='nose2_html_report',
packages=['nose2_html_report'],
version='0.1.0',
description='Generate an HTML report for your unit tests',
long_description=open('README.md', 'r').read(),
author='Michael Grijalva',
author_email='michaelgrij@gmail.com',
lice... | Include template file in distribution | Include template file in distribution
| Python | mit | mgrijalva/nose2-html-report,mgrijalva/nose2-html-report | from setuptools import setup
setup(
name='nose2_html_report',
packages=['nose2_html_report'],
version='0.1.0',
description='Generate an HTML report for your unit tests',
long_description=open('README.md', 'r').read(),
author='Michael Grijalva',
author_email='michaelgrij@gmail.com',
lice... | from setuptools import setup
setup(
name='nose2_html_report',
packages=['nose2_html_report'],
version='0.1.0',
description='Generate an HTML report for your unit tests',
long_description=open('README.md', 'r').read(),
author='Michael Grijalva',
author_email='michaelgrij@gmail.com',
lice... | <commit_before>from setuptools import setup
setup(
name='nose2_html_report',
packages=['nose2_html_report'],
version='0.1.0',
description='Generate an HTML report for your unit tests',
long_description=open('README.md', 'r').read(),
author='Michael Grijalva',
author_email='michaelgrij@gmail... | from setuptools import setup
setup(
name='nose2_html_report',
packages=['nose2_html_report'],
version='0.1.0',
description='Generate an HTML report for your unit tests',
long_description=open('README.md', 'r').read(),
author='Michael Grijalva',
author_email='michaelgrij@gmail.com',
lice... | from setuptools import setup
setup(
name='nose2_html_report',
packages=['nose2_html_report'],
version='0.1.0',
description='Generate an HTML report for your unit tests',
long_description=open('README.md', 'r').read(),
author='Michael Grijalva',
author_email='michaelgrij@gmail.com',
lice... | <commit_before>from setuptools import setup
setup(
name='nose2_html_report',
packages=['nose2_html_report'],
version='0.1.0',
description='Generate an HTML report for your unit tests',
long_description=open('README.md', 'r').read(),
author='Michael Grijalva',
author_email='michaelgrij@gmail... |
f585b90825f5bb57cadefc6689765fd1ebff6b1a | setup.py | setup.py | import os
import re
import sys
from sys import version_info
from os.path import dirname, join as pjoin
from setuptools import setup, find_packages
with open(pjoin(dirname(__file__), 'furl', '__init__.py')) as fd:
VERSION = re.compile(
r".*__version__ = '(.*?)'", re.S).match(fd.read()).group(1)
if sys.argv... | import os
import re
import sys
from sys import version_info
from os.path import dirname, join as pjoin
from setuptools import setup, find_packages
with open(pjoin(dirname(__file__), 'furl', '__init__.py')) as fd:
VERSION = re.compile(
r".*__version__ = '(.*?)'", re.S).match(fd.read()).group(1)
if sys.argv... | Update orderedmultidict dependency to 0.7.3 and newer. | Update orderedmultidict dependency to 0.7.3 and newer.
| Python | unlicense | Gerhut/furl,guiquanz/furl,lastfm/furl,penyatree/furl | import os
import re
import sys
from sys import version_info
from os.path import dirname, join as pjoin
from setuptools import setup, find_packages
with open(pjoin(dirname(__file__), 'furl', '__init__.py')) as fd:
VERSION = re.compile(
r".*__version__ = '(.*?)'", re.S).match(fd.read()).group(1)
if sys.argv... | import os
import re
import sys
from sys import version_info
from os.path import dirname, join as pjoin
from setuptools import setup, find_packages
with open(pjoin(dirname(__file__), 'furl', '__init__.py')) as fd:
VERSION = re.compile(
r".*__version__ = '(.*?)'", re.S).match(fd.read()).group(1)
if sys.argv... | <commit_before>import os
import re
import sys
from sys import version_info
from os.path import dirname, join as pjoin
from setuptools import setup, find_packages
with open(pjoin(dirname(__file__), 'furl', '__init__.py')) as fd:
VERSION = re.compile(
r".*__version__ = '(.*?)'", re.S).match(fd.read()).group(... | import os
import re
import sys
from sys import version_info
from os.path import dirname, join as pjoin
from setuptools import setup, find_packages
with open(pjoin(dirname(__file__), 'furl', '__init__.py')) as fd:
VERSION = re.compile(
r".*__version__ = '(.*?)'", re.S).match(fd.read()).group(1)
if sys.argv... | import os
import re
import sys
from sys import version_info
from os.path import dirname, join as pjoin
from setuptools import setup, find_packages
with open(pjoin(dirname(__file__), 'furl', '__init__.py')) as fd:
VERSION = re.compile(
r".*__version__ = '(.*?)'", re.S).match(fd.read()).group(1)
if sys.argv... | <commit_before>import os
import re
import sys
from sys import version_info
from os.path import dirname, join as pjoin
from setuptools import setup, find_packages
with open(pjoin(dirname(__file__), 'furl', '__init__.py')) as fd:
VERSION = re.compile(
r".*__version__ = '(.*?)'", re.S).match(fd.read()).group(... |
b21706f393ed7c619f5b4ce8ce8a481fb3941a92 | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def recursive_path(pack, path):
matches = []
for root, dirnames, filenames in os.walk(os.path.join(pack, path)):
for filename in filenames:
matches.append(os.path.join(root, filename)[len(pack) + 1:])
return ma... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def recursive_path(pack, path):
matches = []
for root, dirnames, filenames in os.walk(os.path.join(pack, path)):
for filename in filenames:
matches.append(os.path.join(root, filename)[len(pack) + 1:])
return ma... | Update package to show readme | Update package to show readme
| Python | mit | JoaoFelipe/ipython-unittest,JoaoFelipe/ipython-unittest | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def recursive_path(pack, path):
matches = []
for root, dirnames, filenames in os.walk(os.path.join(pack, path)):
for filename in filenames:
matches.append(os.path.join(root, filename)[len(pack) + 1:])
return ma... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def recursive_path(pack, path):
matches = []
for root, dirnames, filenames in os.walk(os.path.join(pack, path)):
for filename in filenames:
matches.append(os.path.join(root, filename)[len(pack) + 1:])
return ma... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup, find_packages
def recursive_path(pack, path):
matches = []
for root, dirnames, filenames in os.walk(os.path.join(pack, path)):
for filename in filenames:
matches.append(os.path.join(root, filename)[len(pack) + 1:]... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def recursive_path(pack, path):
matches = []
for root, dirnames, filenames in os.walk(os.path.join(pack, path)):
for filename in filenames:
matches.append(os.path.join(root, filename)[len(pack) + 1:])
return ma... | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def recursive_path(pack, path):
matches = []
for root, dirnames, filenames in os.walk(os.path.join(pack, path)):
for filename in filenames:
matches.append(os.path.join(root, filename)[len(pack) + 1:])
return ma... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup, find_packages
def recursive_path(pack, path):
matches = []
for root, dirnames, filenames in os.walk(os.path.join(pack, path)):
for filename in filenames:
matches.append(os.path.join(root, filename)[len(pack) + 1:]... |
f1a683e98bf72cbbe4b65414184ed371af3b5879 | setup.py | setup.py | from setuptools import setup
from tools.generate_pyi import generate_pyi
def main():
# Generate .pyi files
import pyxtf.xtf_ctypes
generate_pyi(pyxtf.xtf_ctypes)
import pyxtf.vendors.kongsberg
generate_pyi(pyxtf.vendors.kongsberg)
# Run setup script
setup(name='pyxtf',
version='0... | from setuptools import setup
from tools.generate_pyi import generate_pyi
def main():
# Generate .pyi files
import pyxtf.xtf_ctypes
generate_pyi(pyxtf.xtf_ctypes)
import pyxtf.vendors.kongsberg
generate_pyi(pyxtf.vendors.kongsberg)
# Run setup script
setup(name='pyxtf',
version='0... | Remove matplotlib from required dependencies | Remove matplotlib from required dependencies
| Python | mit | oysstu/pyxtf | from setuptools import setup
from tools.generate_pyi import generate_pyi
def main():
# Generate .pyi files
import pyxtf.xtf_ctypes
generate_pyi(pyxtf.xtf_ctypes)
import pyxtf.vendors.kongsberg
generate_pyi(pyxtf.vendors.kongsberg)
# Run setup script
setup(name='pyxtf',
version='0... | from setuptools import setup
from tools.generate_pyi import generate_pyi
def main():
# Generate .pyi files
import pyxtf.xtf_ctypes
generate_pyi(pyxtf.xtf_ctypes)
import pyxtf.vendors.kongsberg
generate_pyi(pyxtf.vendors.kongsberg)
# Run setup script
setup(name='pyxtf',
version='0... | <commit_before>from setuptools import setup
from tools.generate_pyi import generate_pyi
def main():
# Generate .pyi files
import pyxtf.xtf_ctypes
generate_pyi(pyxtf.xtf_ctypes)
import pyxtf.vendors.kongsberg
generate_pyi(pyxtf.vendors.kongsberg)
# Run setup script
setup(name='pyxtf',
... | from setuptools import setup
from tools.generate_pyi import generate_pyi
def main():
# Generate .pyi files
import pyxtf.xtf_ctypes
generate_pyi(pyxtf.xtf_ctypes)
import pyxtf.vendors.kongsberg
generate_pyi(pyxtf.vendors.kongsberg)
# Run setup script
setup(name='pyxtf',
version='0... | from setuptools import setup
from tools.generate_pyi import generate_pyi
def main():
# Generate .pyi files
import pyxtf.xtf_ctypes
generate_pyi(pyxtf.xtf_ctypes)
import pyxtf.vendors.kongsberg
generate_pyi(pyxtf.vendors.kongsberg)
# Run setup script
setup(name='pyxtf',
version='0... | <commit_before>from setuptools import setup
from tools.generate_pyi import generate_pyi
def main():
# Generate .pyi files
import pyxtf.xtf_ctypes
generate_pyi(pyxtf.xtf_ctypes)
import pyxtf.vendors.kongsberg
generate_pyi(pyxtf.vendors.kongsberg)
# Run setup script
setup(name='pyxtf',
... |
d9f3e43a05663706b266d60c1f707133b0c3b6a0 | error_proxy.py | error_proxy.py | #!/usr/bin/env python
import sys
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class ErrorHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(420)
if sys.argv[1:]:
port = sys.argv[1:]
else:
port = 8000
httpd = HTTPServer(("localhost", port), ErrorHTTPR... | #!/usr/bin/env python
import sys
import json
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class ErrorHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(420)
if sys.argv[1:]:
config_file = sys.argv[1:]
else:
config_file = "Proxyfile"
with open(config_... | Configure port via a Proxyfile | Configure port via a Proxyfile
| Python | mit | pozorvlak/error_proxy | #!/usr/bin/env python
import sys
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class ErrorHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(420)
if sys.argv[1:]:
port = sys.argv[1:]
else:
port = 8000
httpd = HTTPServer(("localhost", port), ErrorHTTPR... | #!/usr/bin/env python
import sys
import json
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class ErrorHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(420)
if sys.argv[1:]:
config_file = sys.argv[1:]
else:
config_file = "Proxyfile"
with open(config_... | <commit_before>#!/usr/bin/env python
import sys
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class ErrorHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(420)
if sys.argv[1:]:
port = sys.argv[1:]
else:
port = 8000
httpd = HTTPServer(("localhost", po... | #!/usr/bin/env python
import sys
import json
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class ErrorHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(420)
if sys.argv[1:]:
config_file = sys.argv[1:]
else:
config_file = "Proxyfile"
with open(config_... | #!/usr/bin/env python
import sys
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class ErrorHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(420)
if sys.argv[1:]:
port = sys.argv[1:]
else:
port = 8000
httpd = HTTPServer(("localhost", port), ErrorHTTPR... | <commit_before>#!/usr/bin/env python
import sys
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class ErrorHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(420)
if sys.argv[1:]:
port = sys.argv[1:]
else:
port = 8000
httpd = HTTPServer(("localhost", po... |
a6ce774d11100208d2a65aa71c3cb147a550a906 | dpath/__init__.py | dpath/__init__.py | import sys
# Python version flags for Python 3 support
PY2 = ( sys.version_info.major == 2 )
PY3 = ( sys.version_info.major == 3 )
| import sys
# Python version flags for Python 3 support
python_major_version = 0
if hasattr(sys.version_info, 'major'):
python_major_version = sys.version_info.major
else:
python_major_version = sys.version_info[0]
PY2 = ( python_major_version == 2 )
PY3 = ( python_major_version == 3 )
| Make this work on python2.6 again | Make this work on python2.6 again | Python | mit | akesterson/dpath-python,pombredanne/dpath-python,benthomasson/dpath-python,lexhung/dpath-python,calebcase/dpath-python | import sys
# Python version flags for Python 3 support
PY2 = ( sys.version_info.major == 2 )
PY3 = ( sys.version_info.major == 3 )
Make this work on python2.6 again | import sys
# Python version flags for Python 3 support
python_major_version = 0
if hasattr(sys.version_info, 'major'):
python_major_version = sys.version_info.major
else:
python_major_version = sys.version_info[0]
PY2 = ( python_major_version == 2 )
PY3 = ( python_major_version == 3 )
| <commit_before>import sys
# Python version flags for Python 3 support
PY2 = ( sys.version_info.major == 2 )
PY3 = ( sys.version_info.major == 3 )
<commit_msg>Make this work on python2.6 again<commit_after> | import sys
# Python version flags for Python 3 support
python_major_version = 0
if hasattr(sys.version_info, 'major'):
python_major_version = sys.version_info.major
else:
python_major_version = sys.version_info[0]
PY2 = ( python_major_version == 2 )
PY3 = ( python_major_version == 3 )
| import sys
# Python version flags for Python 3 support
PY2 = ( sys.version_info.major == 2 )
PY3 = ( sys.version_info.major == 3 )
Make this work on python2.6 againimport sys
# Python version flags for Python 3 support
python_major_version = 0
if hasattr(sys.version_info, 'major'):
python_major_version = sys.vers... | <commit_before>import sys
# Python version flags for Python 3 support
PY2 = ( sys.version_info.major == 2 )
PY3 = ( sys.version_info.major == 3 )
<commit_msg>Make this work on python2.6 again<commit_after>import sys
# Python version flags for Python 3 support
python_major_version = 0
if hasattr(sys.version_info, 'm... |
66250b7e448f54bc0cd9eb8b16731a885e4cf3e7 | setup.py | setup.py | from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(
name="elyzer",
entry_points={
'console_s... | from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(
name="elyzer",
entry_points={
'console_s... | Put on Python 3 only | Put on Python 3 only
| Python | apache-2.0 | o19s/elyzer | from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(
name="elyzer",
entry_points={
'console_s... | from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(
name="elyzer",
entry_points={
'console_s... | <commit_before>from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(
name="elyzer",
entry_points={
... | from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(
name="elyzer",
entry_points={
'console_s... | from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(
name="elyzer",
entry_points={
'console_s... | <commit_before>from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(
name="elyzer",
entry_points={
... |
28e9cd3e9d047883668263e595978392cd208ac5 | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
def readfile(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name="imagesort",
version="0.2.0",
packages=find_packages(),
install_requires=[
'ExifRead>=1.4... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
def readfile(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name="imagesort",
version="0.2.0",
packages=find_packages(),
install_requires=[
'ExifRead>=1.4... | Mark package as OS independent | Mark package as OS independent
| Python | mit | leinz/imagesort | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
def readfile(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name="imagesort",
version="0.2.0",
packages=find_packages(),
install_requires=[
'ExifRead>=1.4... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
def readfile(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name="imagesort",
version="0.2.0",
packages=find_packages(),
install_requires=[
'ExifRead>=1.4... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
def readfile(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name="imagesort",
version="0.2.0",
packages=find_packages(),
install_requires=[
... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
def readfile(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name="imagesort",
version="0.2.0",
packages=find_packages(),
install_requires=[
'ExifRead>=1.4... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
def readfile(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name="imagesort",
version="0.2.0",
packages=find_packages(),
install_requires=[
'ExifRead>=1.4... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
def readfile(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name="imagesort",
version="0.2.0",
packages=find_packages(),
install_requires=[
... |
3b741d4707cc81abcb22945b8532a416bbf00791 | setup.py | setup.py | #!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.1'
setup(
name='klab',
... | #!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.1'
setup(
name='klab',
... | Add a script to show per-residue score from a PDB file. | Add a script to show per-residue score from a PDB file.
| Python | mit | Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab | #!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.1'
setup(
name='klab',
... | #!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.1'
setup(
name='klab',
... | <commit_before>#!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.1'
setup(
na... | #!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.1'
setup(
name='klab',
... | #!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.1'
setup(
name='klab',
... | <commit_before>#!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.1'
setup(
na... |
ae84f8224d7ab01e419ff548cd8be28eb4b15804 | examples/image_test.py | examples/image_test.py | import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = Image2d.loa... | import sys
import os
import ctypes
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet import image
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = image.load(sys.argv[1])
imx = imy ... | Use the core, make example more useful. | Use the core, make example more useful.
| Python | bsd-3-clause | gdkar/pyglet,kmonsoor/pyglet,xshotD/pyglet,google-code-export/pyglet,xshotD/pyglet,kmonsoor/pyglet,shaileshgoogler/pyglet,mpasternak/pyglet-fix-issue-518-522,kmonsoor/pyglet,google-code-export/pyglet,Austin503/pyglet,arifgursel/pyglet,Austin503/pyglet,arifgursel/pyglet,cledio66/pyglet,shaileshgoogler/pyglet,odyaka341/p... | import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = Image2d.loa... | import sys
import os
import ctypes
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet import image
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = image.load(sys.argv[1])
imx = imy ... | <commit_before>import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
imag... | import sys
import os
import ctypes
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet import image
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = image.load(sys.argv[1])
imx = imy ... | import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
image = Image2d.loa... | <commit_before>import sys
import os
import pyglet.window
from pyglet.gl import *
from pyglet import clock
from pyglet.ext.scene2d import Image2d
from ctypes import *
if len(sys.argv) != 2:
print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0]
sys.exit()
window = pyglet.window.Window(width=400, height=400)
imag... |
820ea244604a6563e2532d2cb848c9509bab4e77 | ai_player.py | ai_player.py | import ab_bridge
import alpha_beta
from gui import *
from player import *
import threading
class AIPlayer(Player):
""" Yes there is a circular dependancy between AIPlayer and Game """
def __init__(self, max_depth, *args, **vargs):
Player.__init__(self, *args, **vargs)
self.max_depth = max_de... | import ab_bridge
import alpha_beta
from gui import *
from player import *
import threading
class AIPlayer(Player):
""" Yes there is a circular dependancy between AIPlayer and Game """
def __init__(self, *args, **vargs):
Player.__init__(self, *args, **vargs)
self.max_depth = 1
def set_ma... | Use a setter for max_depth | Use a setter for max_depth
| Python | mit | cropleyb/pentai,cropleyb/pentai,cropleyb/pentai | import ab_bridge
import alpha_beta
from gui import *
from player import *
import threading
class AIPlayer(Player):
""" Yes there is a circular dependancy between AIPlayer and Game """
def __init__(self, max_depth, *args, **vargs):
Player.__init__(self, *args, **vargs)
self.max_depth = max_de... | import ab_bridge
import alpha_beta
from gui import *
from player import *
import threading
class AIPlayer(Player):
""" Yes there is a circular dependancy between AIPlayer and Game """
def __init__(self, *args, **vargs):
Player.__init__(self, *args, **vargs)
self.max_depth = 1
def set_ma... | <commit_before>import ab_bridge
import alpha_beta
from gui import *
from player import *
import threading
class AIPlayer(Player):
""" Yes there is a circular dependancy between AIPlayer and Game """
def __init__(self, max_depth, *args, **vargs):
Player.__init__(self, *args, **vargs)
self.max... | import ab_bridge
import alpha_beta
from gui import *
from player import *
import threading
class AIPlayer(Player):
""" Yes there is a circular dependancy between AIPlayer and Game """
def __init__(self, *args, **vargs):
Player.__init__(self, *args, **vargs)
self.max_depth = 1
def set_ma... | import ab_bridge
import alpha_beta
from gui import *
from player import *
import threading
class AIPlayer(Player):
""" Yes there is a circular dependancy between AIPlayer and Game """
def __init__(self, max_depth, *args, **vargs):
Player.__init__(self, *args, **vargs)
self.max_depth = max_de... | <commit_before>import ab_bridge
import alpha_beta
from gui import *
from player import *
import threading
class AIPlayer(Player):
""" Yes there is a circular dependancy between AIPlayer and Game """
def __init__(self, max_depth, *args, **vargs):
Player.__init__(self, *args, **vargs)
self.max... |
e0aba854c685610af085da91e25bb3682f20461b | setup.py | setup.py | import setuptools
import codecs
import os.path
# Used to read the file
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
# Used to extract out the __version__
def get_version(rel_path):
for line in read... | import setuptools
import codecs
import os.path
# Used to read the file
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
# Used to extract out the __version__
def get_version(rel_path):
for line in read... | Fix Installation Issues -> missing Boto3 | Fix Installation Issues -> missing Boto3
| Python | mit | robotichead/NearBeach,robotichead/NearBeach,robotichead/NearBeach | import setuptools
import codecs
import os.path
# Used to read the file
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
# Used to extract out the __version__
def get_version(rel_path):
for line in read... | import setuptools
import codecs
import os.path
# Used to read the file
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
# Used to extract out the __version__
def get_version(rel_path):
for line in read... | <commit_before>import setuptools
import codecs
import os.path
# Used to read the file
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
# Used to extract out the __version__
def get_version(rel_path):
f... | import setuptools
import codecs
import os.path
# Used to read the file
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
# Used to extract out the __version__
def get_version(rel_path):
for line in read... | import setuptools
import codecs
import os.path
# Used to read the file
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
# Used to extract out the __version__
def get_version(rel_path):
for line in read... | <commit_before>import setuptools
import codecs
import os.path
# Used to read the file
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
# Used to extract out the __version__
def get_version(rel_path):
f... |
68f07070c829fa2703167e8f1c8161d364e3b800 | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='devito',
version='2.0.1',
description="""Finite Difference DSL for symbolic stencil computation.""",
author="Imperial College London",
license='MIT',
packages=['devito'])
| try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='devito',
version='2.0.1',
description="Finite Difference DSL for symbolic computation.",
long_descritpion="""Devito is a new tool for performing
optimised Finite Difference (FD) computatio... | Add more install meta-data, including dependency packages | Pip: Add more install meta-data, including dependency packages
| Python | mit | opesci/devito,opesci/devito | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='devito',
version='2.0.1',
description="""Finite Difference DSL for symbolic stencil computation.""",
author="Imperial College London",
license='MIT',
packages=['devito'])
Pip: Add mo... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='devito',
version='2.0.1',
description="Finite Difference DSL for symbolic computation.",
long_descritpion="""Devito is a new tool for performing
optimised Finite Difference (FD) computatio... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='devito',
version='2.0.1',
description="""Finite Difference DSL for symbolic stencil computation.""",
author="Imperial College London",
license='MIT',
packages=['devito... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='devito',
version='2.0.1',
description="Finite Difference DSL for symbolic computation.",
long_descritpion="""Devito is a new tool for performing
optimised Finite Difference (FD) computatio... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='devito',
version='2.0.1',
description="""Finite Difference DSL for symbolic stencil computation.""",
author="Imperial College London",
license='MIT',
packages=['devito'])
Pip: Add mo... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='devito',
version='2.0.1',
description="""Finite Difference DSL for symbolic stencil computation.""",
author="Imperial College London",
license='MIT',
packages=['devito... |
89493c1249a5233cf8efb5be965ce427cdd5280a | setup.py | setup.py | """vcrpy-unittest setup module based on
https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import, unicode_literals
from setuptools import setup, find_packages
from codecs import open
import os
here = os.path.dirname(__file__)
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
... | """vcrpy-unittest setup module based on
https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import, unicode_literals
from setuptools import setup, find_packages
from codecs import open
import os
here = os.path.dirname(__file__)
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
... | Bump version for another PyPI release, this time to remove accidental vendorized vcr.py | Bump version for another PyPI release, this time to remove accidental vendorized vcr.py
| Python | mit | agriffis/vcrpy-unittest | """vcrpy-unittest setup module based on
https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import, unicode_literals
from setuptools import setup, find_packages
from codecs import open
import os
here = os.path.dirname(__file__)
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
... | """vcrpy-unittest setup module based on
https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import, unicode_literals
from setuptools import setup, find_packages
from codecs import open
import os
here = os.path.dirname(__file__)
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
... | <commit_before>"""vcrpy-unittest setup module based on
https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import, unicode_literals
from setuptools import setup, find_packages
from codecs import open
import os
here = os.path.dirname(__file__)
with open(os.path.join(here, 'README.rst'), encoding=... | """vcrpy-unittest setup module based on
https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import, unicode_literals
from setuptools import setup, find_packages
from codecs import open
import os
here = os.path.dirname(__file__)
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
... | """vcrpy-unittest setup module based on
https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import, unicode_literals
from setuptools import setup, find_packages
from codecs import open
import os
here = os.path.dirname(__file__)
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
... | <commit_before>"""vcrpy-unittest setup module based on
https://github.com/pypa/sampleproject
"""
from __future__ import absolute_import, unicode_literals
from setuptools import setup, find_packages
from codecs import open
import os
here = os.path.dirname(__file__)
with open(os.path.join(here, 'README.rst'), encoding=... |
fb4bac2a228a196359317f338c3f1e6643c3837d | nova/tests/unit/compute/fake_resource_tracker.py | nova/tests/unit/compute/fake_resource_tracker.py | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | Remove an unused method in FakeResourceTracker | Remove an unused method in FakeResourceTracker
Nothing calls _create and there is no _create in the super class for
this to be overriding.
Change-Id: Ic41f2d249b9aaffb2caaa18dd492924a4ceb3653
| Python | apache-2.0 | gooddata/openstack-nova,Juniper/nova,mikalstill/nova,cernops/nova,cernops/nova,vmturbo/nova,NeCTAR-RC/nova,klmitch/nova,jianghuaw/nova,mikalstill/nova,klmitch/nova,Juniper/nova,cloudbase/nova,cernops/nova,openstack/nova,rahulunair/nova,gooddata/openstack-nova,jianghuaw/nova,klmitch/nova,NeCTAR-RC/nova,mikalstill/nova,h... | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | <commit_before># Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | <commit_before># Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... |
2e406c8cca9e55c9b8e2dcbf33005aa580ef74ea | tests/state/test_in_memory_key_value_store.py | tests/state/test_in_memory_key_value_store.py | from winton_kafka_streams.state.in_memory_key_value_store import InMemoryKeyValueStore
def test_inMemoryKeyValueStore():
store = InMemoryKeyValueStore('teststore')
store['a'] = 1
assert store['a'] == 1
store['a'] = 2
assert store['a'] == 2
| import pytest
from winton_kafka_streams.state.in_memory_key_value_store import InMemoryKeyValueStore
def test_inMemoryKeyValueStore():
store = InMemoryKeyValueStore('teststore')
store['a'] = 1
assert store['a'] == 1
store['a'] = 2
assert store['a'] == 2
del store['a']
assert store.get('... | Test behaviour of key deletion | Test behaviour of key deletion
| Python | apache-2.0 | wintoncode/winton-kafka-streams | from winton_kafka_streams.state.in_memory_key_value_store import InMemoryKeyValueStore
def test_inMemoryKeyValueStore():
store = InMemoryKeyValueStore('teststore')
store['a'] = 1
assert store['a'] == 1
store['a'] = 2
assert store['a'] == 2
Test behaviour of key deletion | import pytest
from winton_kafka_streams.state.in_memory_key_value_store import InMemoryKeyValueStore
def test_inMemoryKeyValueStore():
store = InMemoryKeyValueStore('teststore')
store['a'] = 1
assert store['a'] == 1
store['a'] = 2
assert store['a'] == 2
del store['a']
assert store.get('... | <commit_before>from winton_kafka_streams.state.in_memory_key_value_store import InMemoryKeyValueStore
def test_inMemoryKeyValueStore():
store = InMemoryKeyValueStore('teststore')
store['a'] = 1
assert store['a'] == 1
store['a'] = 2
assert store['a'] == 2
<commit_msg>Test behaviour of key deletio... | import pytest
from winton_kafka_streams.state.in_memory_key_value_store import InMemoryKeyValueStore
def test_inMemoryKeyValueStore():
store = InMemoryKeyValueStore('teststore')
store['a'] = 1
assert store['a'] == 1
store['a'] = 2
assert store['a'] == 2
del store['a']
assert store.get('... | from winton_kafka_streams.state.in_memory_key_value_store import InMemoryKeyValueStore
def test_inMemoryKeyValueStore():
store = InMemoryKeyValueStore('teststore')
store['a'] = 1
assert store['a'] == 1
store['a'] = 2
assert store['a'] == 2
Test behaviour of key deletionimport pytest
from winton_... | <commit_before>from winton_kafka_streams.state.in_memory_key_value_store import InMemoryKeyValueStore
def test_inMemoryKeyValueStore():
store = InMemoryKeyValueStore('teststore')
store['a'] = 1
assert store['a'] == 1
store['a'] = 2
assert store['a'] == 2
<commit_msg>Test behaviour of key deletio... |
8b59148347f3009bb082f8fff3d11b04c3048433 | setup.py | setup.py | #!/usr/bin/env python
import setuptools
setuptools.setup(
name='requires-provides',
version='0.1',
description='Flexible dependency decorators',
license='MIT',
author='Joshua Downer',
author_email='joshua.downer@gmail.com',
url='http://github.com/jdowner/requir... | #!/usr/bin/env python
import setuptools
setuptools.setup(
name='requires-provides',
version='0.1',
description='Flexible dependency decorators',
license='MIT',
author='Joshua Downer',
author_email='joshua.downer@gmail.com',
url='http://github.com/jdowner/requir... | Remove tox and pep8 from "install" requires. | Remove tox and pep8 from "install" requires.
https://github.com/jdowner/requires-provides/issues/2
| Python | mit | jdowner/requires-provides | #!/usr/bin/env python
import setuptools
setuptools.setup(
name='requires-provides',
version='0.1',
description='Flexible dependency decorators',
license='MIT',
author='Joshua Downer',
author_email='joshua.downer@gmail.com',
url='http://github.com/jdowner/requir... | #!/usr/bin/env python
import setuptools
setuptools.setup(
name='requires-provides',
version='0.1',
description='Flexible dependency decorators',
license='MIT',
author='Joshua Downer',
author_email='joshua.downer@gmail.com',
url='http://github.com/jdowner/requir... | <commit_before>#!/usr/bin/env python
import setuptools
setuptools.setup(
name='requires-provides',
version='0.1',
description='Flexible dependency decorators',
license='MIT',
author='Joshua Downer',
author_email='joshua.downer@gmail.com',
url='http://github.com... | #!/usr/bin/env python
import setuptools
setuptools.setup(
name='requires-provides',
version='0.1',
description='Flexible dependency decorators',
license='MIT',
author='Joshua Downer',
author_email='joshua.downer@gmail.com',
url='http://github.com/jdowner/requir... | #!/usr/bin/env python
import setuptools
setuptools.setup(
name='requires-provides',
version='0.1',
description='Flexible dependency decorators',
license='MIT',
author='Joshua Downer',
author_email='joshua.downer@gmail.com',
url='http://github.com/jdowner/requir... | <commit_before>#!/usr/bin/env python
import setuptools
setuptools.setup(
name='requires-provides',
version='0.1',
description='Flexible dependency decorators',
license='MIT',
author='Joshua Downer',
author_email='joshua.downer@gmail.com',
url='http://github.com... |
493dc021322bd7ecf516535d9fef444376d96e4e | files/views.py | files/views.py | from django.shortcuts import render
from .models import Image
from .forms import ImageForm
from django.views.generic import CreateView, DeleteView, UpdateView, ListView, View
from django.shortcuts import redirect, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.deco... | from django.shortcuts import render
from .models import Image
from .forms import ImageForm
from django.views.generic import CreateView, DeleteView, UpdateView, ListView, View
from django.shortcuts import redirect, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.deco... | Fix image grouping in gallery view | Fix image grouping in gallery view
| Python | mit | hackerspace-ntnu/website,hackerspace-ntnu/website,hackerspace-ntnu/website | from django.shortcuts import render
from .models import Image
from .forms import ImageForm
from django.views.generic import CreateView, DeleteView, UpdateView, ListView, View
from django.shortcuts import redirect, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.deco... | from django.shortcuts import render
from .models import Image
from .forms import ImageForm
from django.views.generic import CreateView, DeleteView, UpdateView, ListView, View
from django.shortcuts import redirect, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.deco... | <commit_before>from django.shortcuts import render
from .models import Image
from .forms import ImageForm
from django.views.generic import CreateView, DeleteView, UpdateView, ListView, View
from django.shortcuts import redirect, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.co... | from django.shortcuts import render
from .models import Image
from .forms import ImageForm
from django.views.generic import CreateView, DeleteView, UpdateView, ListView, View
from django.shortcuts import redirect, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.deco... | from django.shortcuts import render
from .models import Image
from .forms import ImageForm
from django.views.generic import CreateView, DeleteView, UpdateView, ListView, View
from django.shortcuts import redirect, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.deco... | <commit_before>from django.shortcuts import render
from .models import Image
from .forms import ImageForm
from django.views.generic import CreateView, DeleteView, UpdateView, ListView, View
from django.shortcuts import redirect, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.co... |
776a7b25aa5fbb34b3b2597cd98a814147e97415 | web.py | web.py | from flask import Flask, render_template, abort, url_for
from path import path
import settings
import lib
from rq import Connection, Queue
from redis import Redis
flapp = Flask(__name__)
flapp.debug = settings.DEBUG
redis_conn = Redis()
q = Queue(connection=redis_conn)
@flapp.route("/")
def hello():
files = se... | from flask import Flask, render_template, request
import settings
import lib
from rq import Queue
from redis import Redis
import json
flapp = Flask(__name__)
flapp.debug = settings.DEBUG
redis_conn = Redis()
q = Queue(connection=redis_conn)
@flapp.route("/")
def hello():
files = settings.APPS_DIR.listdir('*.ap... | Deploy only for master ? | Deploy only for master ?
| Python | agpl-3.0 | C4ptainCrunch/click-and-deploy,C4ptainCrunch/click-and-deploy | from flask import Flask, render_template, abort, url_for
from path import path
import settings
import lib
from rq import Connection, Queue
from redis import Redis
flapp = Flask(__name__)
flapp.debug = settings.DEBUG
redis_conn = Redis()
q = Queue(connection=redis_conn)
@flapp.route("/")
def hello():
files = se... | from flask import Flask, render_template, request
import settings
import lib
from rq import Queue
from redis import Redis
import json
flapp = Flask(__name__)
flapp.debug = settings.DEBUG
redis_conn = Redis()
q = Queue(connection=redis_conn)
@flapp.route("/")
def hello():
files = settings.APPS_DIR.listdir('*.ap... | <commit_before>from flask import Flask, render_template, abort, url_for
from path import path
import settings
import lib
from rq import Connection, Queue
from redis import Redis
flapp = Flask(__name__)
flapp.debug = settings.DEBUG
redis_conn = Redis()
q = Queue(connection=redis_conn)
@flapp.route("/")
def hello():... | from flask import Flask, render_template, request
import settings
import lib
from rq import Queue
from redis import Redis
import json
flapp = Flask(__name__)
flapp.debug = settings.DEBUG
redis_conn = Redis()
q = Queue(connection=redis_conn)
@flapp.route("/")
def hello():
files = settings.APPS_DIR.listdir('*.ap... | from flask import Flask, render_template, abort, url_for
from path import path
import settings
import lib
from rq import Connection, Queue
from redis import Redis
flapp = Flask(__name__)
flapp.debug = settings.DEBUG
redis_conn = Redis()
q = Queue(connection=redis_conn)
@flapp.route("/")
def hello():
files = se... | <commit_before>from flask import Flask, render_template, abort, url_for
from path import path
import settings
import lib
from rq import Connection, Queue
from redis import Redis
flapp = Flask(__name__)
flapp.debug = settings.DEBUG
redis_conn = Redis()
q = Queue(connection=redis_conn)
@flapp.route("/")
def hello():... |
12525b5e58752df67fc5bc063aaf4a5996c2bf21 | example_storage.py | example_storage.py | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | Fix provider constant in the example. | Fix provider constant in the example.
git-svn-id: 353d90d4d8d13dcb4e0402680a9155a727f61a5a@1090630 13f79535-47bb-0310-9956-ffa450edef68
| Python | apache-2.0 | munkiat/libcloud,sfriesel/libcloud,wrigri/libcloud,JamesGuthrie/libcloud,mbrukman/libcloud,aleGpereira/libcloud,t-tran/libcloud,Itxaka/libcloud,briancurtin/libcloud,pquentin/libcloud,sgammon/libcloud,jimbobhickville/libcloud,Cloud-Elasticity-Services/as-libcloud,apache/libcloud,cryptickp/libcloud,watermelo/libcloud,apa... | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | <commit_before># Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); y... | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | <commit_before># Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); y... |
237faf53129e575faafad6cfeecf96c707d50c4b | examples/common.py | examples/common.py |
def print_devices(b):
for device in sorted(b.devices, key=lambda d: len(d.ancestors)):
print(device) # this is a blivet.devices.StorageDevice instance
print()
|
def print_devices(b):
print(b.devicetree)
| Use DeviceTree.__str__ when printing devices in examples. | Use DeviceTree.__str__ when printing devices in examples.
| Python | lgpl-2.1 | AdamWill/blivet,vojtechtrefny/blivet,rhinstaller/blivet,vpodzime/blivet,vojtechtrefny/blivet,AdamWill/blivet,rvykydal/blivet,rvykydal/blivet,jkonecny12/blivet,rhinstaller/blivet,jkonecny12/blivet,vpodzime/blivet |
def print_devices(b):
for device in sorted(b.devices, key=lambda d: len(d.ancestors)):
print(device) # this is a blivet.devices.StorageDevice instance
print()
Use DeviceTree.__str__ when printing devices in examples. |
def print_devices(b):
print(b.devicetree)
| <commit_before>
def print_devices(b):
for device in sorted(b.devices, key=lambda d: len(d.ancestors)):
print(device) # this is a blivet.devices.StorageDevice instance
print()
<commit_msg>Use DeviceTree.__str__ when printing devices in examples.<commit_after> |
def print_devices(b):
print(b.devicetree)
|
def print_devices(b):
for device in sorted(b.devices, key=lambda d: len(d.ancestors)):
print(device) # this is a blivet.devices.StorageDevice instance
print()
Use DeviceTree.__str__ when printing devices in examples.
def print_devices(b):
print(b.devicetree)
| <commit_before>
def print_devices(b):
for device in sorted(b.devices, key=lambda d: len(d.ancestors)):
print(device) # this is a blivet.devices.StorageDevice instance
print()
<commit_msg>Use DeviceTree.__str__ when printing devices in examples.<commit_after>
def print_devices(b):
print(b.devicet... |
a51bc09ec5c7c03ce0d76cca443520036d45fa63 | apps/projects/urls.py | apps/projects/urls.py | from django.conf.urls.defaults import patterns, url, include
from surlex.dj import surl
from .api import ProjectResource, ProjectDetailResource
from .views import ProjectListView, ProjectDetailView, ProjectMapView
project_resource = ProjectResource()
projectdetail_resource = ProjectDetailResource()
urlpatterns = p... | from django.conf.urls.defaults import patterns, url, include
from surlex.dj import surl
from .api import ProjectResource, ProjectDetailResource, ProjectSearchFormResource
from .views import ProjectListView, ProjectDetailView, ProjectMapView
project_resource = ProjectResource()
projectdetail_resource = ProjectDetailR... | Enable project search form API. | Enable project search form API.
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | from django.conf.urls.defaults import patterns, url, include
from surlex.dj import surl
from .api import ProjectResource, ProjectDetailResource
from .views import ProjectListView, ProjectDetailView, ProjectMapView
project_resource = ProjectResource()
projectdetail_resource = ProjectDetailResource()
urlpatterns = p... | from django.conf.urls.defaults import patterns, url, include
from surlex.dj import surl
from .api import ProjectResource, ProjectDetailResource, ProjectSearchFormResource
from .views import ProjectListView, ProjectDetailView, ProjectMapView
project_resource = ProjectResource()
projectdetail_resource = ProjectDetailR... | <commit_before>from django.conf.urls.defaults import patterns, url, include
from surlex.dj import surl
from .api import ProjectResource, ProjectDetailResource
from .views import ProjectListView, ProjectDetailView, ProjectMapView
project_resource = ProjectResource()
projectdetail_resource = ProjectDetailResource()
... | from django.conf.urls.defaults import patterns, url, include
from surlex.dj import surl
from .api import ProjectResource, ProjectDetailResource, ProjectSearchFormResource
from .views import ProjectListView, ProjectDetailView, ProjectMapView
project_resource = ProjectResource()
projectdetail_resource = ProjectDetailR... | from django.conf.urls.defaults import patterns, url, include
from surlex.dj import surl
from .api import ProjectResource, ProjectDetailResource
from .views import ProjectListView, ProjectDetailView, ProjectMapView
project_resource = ProjectResource()
projectdetail_resource = ProjectDetailResource()
urlpatterns = p... | <commit_before>from django.conf.urls.defaults import patterns, url, include
from surlex.dj import surl
from .api import ProjectResource, ProjectDetailResource
from .views import ProjectListView, ProjectDetailView, ProjectMapView
project_resource = ProjectResource()
projectdetail_resource = ProjectDetailResource()
... |
e2a55bf686679c39304645e3c73cc4ba353f5018 | setup.py | setup.py | from distutils.core import setup
setup(
name='cmsplugin_filery',
version=".".join(map(str, __import__('cmsplugin_filery').__version__)),
author='Alireza Savand',
author_email='alireza.savand@gmail.com',
description = 'Image gallery based on django-filer',
keywords=[
'django',
'd... | from distutils.core import setup
setup(
name='cmsplugin-filery',
version=".".join(map(str, __import__('cmsplugin_filery').__version__)),
author='Alireza Savand',
author_email='alireza.savand@gmail.com',
description = 'Image gallery based on django-filer',
keywords=[
'django',
'd... | Correct the plugin name typo mistake | Correct the plugin name typo mistake
| Python | bsd-2-clause | jasekz/cmsplugin-filery,Alir3z4/cmsplugin-filery | from distutils.core import setup
setup(
name='cmsplugin_filery',
version=".".join(map(str, __import__('cmsplugin_filery').__version__)),
author='Alireza Savand',
author_email='alireza.savand@gmail.com',
description = 'Image gallery based on django-filer',
keywords=[
'django',
'd... | from distutils.core import setup
setup(
name='cmsplugin-filery',
version=".".join(map(str, __import__('cmsplugin_filery').__version__)),
author='Alireza Savand',
author_email='alireza.savand@gmail.com',
description = 'Image gallery based on django-filer',
keywords=[
'django',
'd... | <commit_before>from distutils.core import setup
setup(
name='cmsplugin_filery',
version=".".join(map(str, __import__('cmsplugin_filery').__version__)),
author='Alireza Savand',
author_email='alireza.savand@gmail.com',
description = 'Image gallery based on django-filer',
keywords=[
'djan... | from distutils.core import setup
setup(
name='cmsplugin-filery',
version=".".join(map(str, __import__('cmsplugin_filery').__version__)),
author='Alireza Savand',
author_email='alireza.savand@gmail.com',
description = 'Image gallery based on django-filer',
keywords=[
'django',
'd... | from distutils.core import setup
setup(
name='cmsplugin_filery',
version=".".join(map(str, __import__('cmsplugin_filery').__version__)),
author='Alireza Savand',
author_email='alireza.savand@gmail.com',
description = 'Image gallery based on django-filer',
keywords=[
'django',
'd... | <commit_before>from distutils.core import setup
setup(
name='cmsplugin_filery',
version=".".join(map(str, __import__('cmsplugin_filery').__version__)),
author='Alireza Savand',
author_email='alireza.savand@gmail.com',
description = 'Image gallery based on django-filer',
keywords=[
'djan... |
0607e619da2cf94a4d12c11b2b43ad3e21719dd4 | queued_storage/signals.py | queued_storage/signals.py | """
django-queued-storage ships with a signal fired after a file was transfered
by the Transfer task. It provides the name of the file, the local and the
remote storage backend instances as arguments to connected signal callbacks.
Imagine you'd want to post-process the file that has been transfered from
the local to t... | """
django-queued-storage ships with a signal fired after a file was transferred
by the Transfer task. It provides the name of the file, the local and the
remote storage backend instances as arguments to connected signal callbacks.
Imagine you'd want to post-process the file that has been transferred from
the local to... | Fix simple typo, transfered -> transferred | docs: Fix simple typo, transfered -> transferred
There is a small typo in queued_storage/signals.py.
Should read `transferred` rather than `transfered`.
| Python | bsd-3-clause | jezdez/django-queued-storage,jazzband/django-queued-storage | """
django-queued-storage ships with a signal fired after a file was transfered
by the Transfer task. It provides the name of the file, the local and the
remote storage backend instances as arguments to connected signal callbacks.
Imagine you'd want to post-process the file that has been transfered from
the local to t... | """
django-queued-storage ships with a signal fired after a file was transferred
by the Transfer task. It provides the name of the file, the local and the
remote storage backend instances as arguments to connected signal callbacks.
Imagine you'd want to post-process the file that has been transferred from
the local to... | <commit_before>"""
django-queued-storage ships with a signal fired after a file was transfered
by the Transfer task. It provides the name of the file, the local and the
remote storage backend instances as arguments to connected signal callbacks.
Imagine you'd want to post-process the file that has been transfered from... | """
django-queued-storage ships with a signal fired after a file was transferred
by the Transfer task. It provides the name of the file, the local and the
remote storage backend instances as arguments to connected signal callbacks.
Imagine you'd want to post-process the file that has been transferred from
the local to... | """
django-queued-storage ships with a signal fired after a file was transfered
by the Transfer task. It provides the name of the file, the local and the
remote storage backend instances as arguments to connected signal callbacks.
Imagine you'd want to post-process the file that has been transfered from
the local to t... | <commit_before>"""
django-queued-storage ships with a signal fired after a file was transfered
by the Transfer task. It provides the name of the file, the local and the
remote storage backend instances as arguments to connected signal callbacks.
Imagine you'd want to post-process the file that has been transfered from... |
6ba28684960b14ecb29b26d63ae4a593337e7fa4 | examples/wordy.py | examples/wordy.py | """
Nodes can contain words
=======================
We here at **Daft** headquarters tend to put symbols (variable
names) in our graph nodes. But you don't have to if you don't
want to.
"""
from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)
import daft
pgm = daft.PGM()
pgm.add_n... | """
Nodes can contain words
=======================
We here at **Daft** headquarters tend to put symbols (variable
names) in our graph nodes. But you don't have to if you don't
want to.
"""
from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)
import daft
pgm = daft.PGM()
pgm.add_n... | Add edge label and rotation. | Add edge label and rotation.
| Python | mit | dfm/daft | """
Nodes can contain words
=======================
We here at **Daft** headquarters tend to put symbols (variable
names) in our graph nodes. But you don't have to if you don't
want to.
"""
from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)
import daft
pgm = daft.PGM()
pgm.add_n... | """
Nodes can contain words
=======================
We here at **Daft** headquarters tend to put symbols (variable
names) in our graph nodes. But you don't have to if you don't
want to.
"""
from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)
import daft
pgm = daft.PGM()
pgm.add_n... | <commit_before>"""
Nodes can contain words
=======================
We here at **Daft** headquarters tend to put symbols (variable
names) in our graph nodes. But you don't have to if you don't
want to.
"""
from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)
import daft
pgm = daft.... | """
Nodes can contain words
=======================
We here at **Daft** headquarters tend to put symbols (variable
names) in our graph nodes. But you don't have to if you don't
want to.
"""
from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)
import daft
pgm = daft.PGM()
pgm.add_n... | """
Nodes can contain words
=======================
We here at **Daft** headquarters tend to put symbols (variable
names) in our graph nodes. But you don't have to if you don't
want to.
"""
from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)
import daft
pgm = daft.PGM()
pgm.add_n... | <commit_before>"""
Nodes can contain words
=======================
We here at **Daft** headquarters tend to put symbols (variable
names) in our graph nodes. But you don't have to if you don't
want to.
"""
from matplotlib import rc
rc("font", family="serif", size=12)
rc("text", usetex=True)
import daft
pgm = daft.... |
49c83e0ef5ec7390a78e95dbc035b7d2808ec13e | feedback/tests.py | feedback/tests.py | # -*- coding: utf-8 -*-
from django.test import TestCase, client
from .models import Feedback
client = client.Client()
class FeedbackTest(TestCase):
def test_add_feedback(self):
before_add = Feedback.objects.count()
response = client.post('/feedback/add/', {
'name': 'Пандо Пандев',
... | # -*- coding: utf-8 -*-
from django.test import TestCase, client
from .models import Feedback
client = client.Client()
class FeedbackTest(TestCase):
def test_add_feedback(self):
pass
# before_add = Feedback.objects.count()
# response = client.post('/feedback/add/', {
# 'name... | Remove test for adding feedback | Remove test for adding feedback
| Python | mit | Hackfmi/Diaphanum,Hackfmi/Diaphanum | # -*- coding: utf-8 -*-
from django.test import TestCase, client
from .models import Feedback
client = client.Client()
class FeedbackTest(TestCase):
def test_add_feedback(self):
before_add = Feedback.objects.count()
response = client.post('/feedback/add/', {
'name': 'Пандо Пандев',
... | # -*- coding: utf-8 -*-
from django.test import TestCase, client
from .models import Feedback
client = client.Client()
class FeedbackTest(TestCase):
def test_add_feedback(self):
pass
# before_add = Feedback.objects.count()
# response = client.post('/feedback/add/', {
# 'name... | <commit_before># -*- coding: utf-8 -*-
from django.test import TestCase, client
from .models import Feedback
client = client.Client()
class FeedbackTest(TestCase):
def test_add_feedback(self):
before_add = Feedback.objects.count()
response = client.post('/feedback/add/', {
'name': '... | # -*- coding: utf-8 -*-
from django.test import TestCase, client
from .models import Feedback
client = client.Client()
class FeedbackTest(TestCase):
def test_add_feedback(self):
pass
# before_add = Feedback.objects.count()
# response = client.post('/feedback/add/', {
# 'name... | # -*- coding: utf-8 -*-
from django.test import TestCase, client
from .models import Feedback
client = client.Client()
class FeedbackTest(TestCase):
def test_add_feedback(self):
before_add = Feedback.objects.count()
response = client.post('/feedback/add/', {
'name': 'Пандо Пандев',
... | <commit_before># -*- coding: utf-8 -*-
from django.test import TestCase, client
from .models import Feedback
client = client.Client()
class FeedbackTest(TestCase):
def test_add_feedback(self):
before_add = Feedback.objects.count()
response = client.post('/feedback/add/', {
'name': '... |
1ead832009e87d8570202b71014c1dfadcaaee8f | autocloud/__init__.py | autocloud/__init__.py | # -*- coding: utf-8 -*-
import ConfigParser
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
name = '/etc/autocloud/autocloud.cfg'
if not os.path.exists(name):
raise Exception('Please add a proper cofig file under /etc/autocloud/')
config = ConfigParser.RawConfigParser()
config.read(name)
KO... | # -*- coding: utf-8 -*-
import ConfigParser
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
name = '/etc/autocloud/autocloud.cfg'
if not os.path.exists(name):
raise Exception('Please add a proper config file under /etc/autocloud/')
config = ConfigParser.RawConfigParser()
config.read(name)
K... | Fix typo, cofig => config | config: Fix typo, cofig => config
Signed-off-by: Vivek Anand <6cbec6cb1b0c30c91d3fca6c61ddeb9b64cef11c@gmail.com>
| Python | agpl-3.0 | kushaldas/autocloud,kushaldas/autocloud,kushaldas/autocloud,kushaldas/autocloud | # -*- coding: utf-8 -*-
import ConfigParser
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
name = '/etc/autocloud/autocloud.cfg'
if not os.path.exists(name):
raise Exception('Please add a proper cofig file under /etc/autocloud/')
config = ConfigParser.RawConfigParser()
config.read(name)
KO... | # -*- coding: utf-8 -*-
import ConfigParser
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
name = '/etc/autocloud/autocloud.cfg'
if not os.path.exists(name):
raise Exception('Please add a proper config file under /etc/autocloud/')
config = ConfigParser.RawConfigParser()
config.read(name)
K... | <commit_before># -*- coding: utf-8 -*-
import ConfigParser
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
name = '/etc/autocloud/autocloud.cfg'
if not os.path.exists(name):
raise Exception('Please add a proper cofig file under /etc/autocloud/')
config = ConfigParser.RawConfigParser()
config... | # -*- coding: utf-8 -*-
import ConfigParser
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
name = '/etc/autocloud/autocloud.cfg'
if not os.path.exists(name):
raise Exception('Please add a proper config file under /etc/autocloud/')
config = ConfigParser.RawConfigParser()
config.read(name)
K... | # -*- coding: utf-8 -*-
import ConfigParser
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
name = '/etc/autocloud/autocloud.cfg'
if not os.path.exists(name):
raise Exception('Please add a proper cofig file under /etc/autocloud/')
config = ConfigParser.RawConfigParser()
config.read(name)
KO... | <commit_before># -*- coding: utf-8 -*-
import ConfigParser
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
name = '/etc/autocloud/autocloud.cfg'
if not os.path.exists(name):
raise Exception('Please add a proper cofig file under /etc/autocloud/')
config = ConfigParser.RawConfigParser()
config... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.