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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
65c6c0b5ac47caac71c6c1284d84c1004d348c01 | partner_relations/model/__init__.py | partner_relations/model/__init__.py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | Fix imports at top of file. | Fix imports at top of file.
| Python | agpl-3.0 | Therp/partner-contact,acsone/partner-contact,open-synergy/partner-contact,diagramsoftware/partner-contact | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it unde... | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it unde... |
a056ddc885d7eb333ab323f7552bfffd35635a8a | plugins/ChangeLogPlugin/__init__.py | plugins/ChangeLogPlugin/__init__.py | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import ChangeLog
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"plugin": {
"name": catalog.i18nc("@label", "Changelog"),
"author": "Ul... | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import ChangeLog
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"plugin": {
"name": catalog.i18nc("@label", "Changelog"),
"author": "Ul... | Add period at end of plug-in description | Add period at end of plug-in description
For consistency. All other plug-ins have this (no really, now).
Contributes to issue CURA-1190.
| Python | agpl-3.0 | ynotstartups/Wanhao,senttech/Cura,fieldOfView/Cura,ynotstartups/Wanhao,hmflash/Cura,totalretribution/Cura,fieldOfView/Cura,Curahelper/Cura,senttech/Cura,totalretribution/Cura,Curahelper/Cura,hmflash/Cura | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import ChangeLog
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"plugin": {
"name": catalog.i18nc("@label", "Changelog"),
"author": "Ul... | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import ChangeLog
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"plugin": {
"name": catalog.i18nc("@label", "Changelog"),
"author": "Ul... | <commit_before># Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import ChangeLog
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"plugin": {
"name": catalog.i18nc("@label", "Changelog"),
... | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import ChangeLog
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"plugin": {
"name": catalog.i18nc("@label", "Changelog"),
"author": "Ul... | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import ChangeLog
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"plugin": {
"name": catalog.i18nc("@label", "Changelog"),
"author": "Ul... | <commit_before># Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import ChangeLog
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"plugin": {
"name": catalog.i18nc("@label", "Changelog"),
... |
92febbffb91943f13cfac8c00e55103b20645b70 | plex/objects/library/container.py | plex/objects/library/container.py | from plex.objects.core.base import Property
from plex.objects.container import Container
from plex.objects.library.section import Section
class MediaContainer(Container):
section = Property(resolver=lambda: MediaContainer.construct_section)
title1 = Property
title2 = Property
identifier = Property
... | from plex.objects.core.base import Property
from plex.objects.container import Container
from plex.objects.library.section import Section
class MediaContainer(Container):
section = Property(resolver=lambda: MediaContainer.construct_section)
title1 = Property
title2 = Property
identifier = Property
... | Update [MediaContainer] children with the correct `section` object | Update [MediaContainer] children with the correct `section` object
| Python | mit | fuzeman/plex.py | from plex.objects.core.base import Property
from plex.objects.container import Container
from plex.objects.library.section import Section
class MediaContainer(Container):
section = Property(resolver=lambda: MediaContainer.construct_section)
title1 = Property
title2 = Property
identifier = Property
... | from plex.objects.core.base import Property
from plex.objects.container import Container
from plex.objects.library.section import Section
class MediaContainer(Container):
section = Property(resolver=lambda: MediaContainer.construct_section)
title1 = Property
title2 = Property
identifier = Property
... | <commit_before>from plex.objects.core.base import Property
from plex.objects.container import Container
from plex.objects.library.section import Section
class MediaContainer(Container):
section = Property(resolver=lambda: MediaContainer.construct_section)
title1 = Property
title2 = Property
identifi... | from plex.objects.core.base import Property
from plex.objects.container import Container
from plex.objects.library.section import Section
class MediaContainer(Container):
section = Property(resolver=lambda: MediaContainer.construct_section)
title1 = Property
title2 = Property
identifier = Property
... | from plex.objects.core.base import Property
from plex.objects.container import Container
from plex.objects.library.section import Section
class MediaContainer(Container):
section = Property(resolver=lambda: MediaContainer.construct_section)
title1 = Property
title2 = Property
identifier = Property
... | <commit_before>from plex.objects.core.base import Property
from plex.objects.container import Container
from plex.objects.library.section import Section
class MediaContainer(Container):
section = Property(resolver=lambda: MediaContainer.construct_section)
title1 = Property
title2 = Property
identifi... |
35293cecc99a629b3a185e69cf9ed3a339d9d1cf | automat/_introspection.py | automat/_introspection.py | """
Python introspection helpers.
"""
from types import CodeType as code, FunctionType as function
def copycode(template, changes):
if hasattr(code, "replace"):
return template.replace(**{"co_" + k : v for k, v in changes.items()})
else:
names = [
"argcount", "nlocals", "stacksize... | """
Python introspection helpers.
"""
from types import CodeType as code, FunctionType as function
def copycode(template, changes):
if hasattr(code, "replace"):
return template.replace(**{"co_" + k : v for k, v in changes.items()})
names = [
"argcount", "nlocals", "stacksize", "flags", "code"... | Remove indentation level for easier review | Remove indentation level for easier review
| Python | mit | glyph/automat | """
Python introspection helpers.
"""
from types import CodeType as code, FunctionType as function
def copycode(template, changes):
if hasattr(code, "replace"):
return template.replace(**{"co_" + k : v for k, v in changes.items()})
else:
names = [
"argcount", "nlocals", "stacksize... | """
Python introspection helpers.
"""
from types import CodeType as code, FunctionType as function
def copycode(template, changes):
if hasattr(code, "replace"):
return template.replace(**{"co_" + k : v for k, v in changes.items()})
names = [
"argcount", "nlocals", "stacksize", "flags", "code"... | <commit_before>"""
Python introspection helpers.
"""
from types import CodeType as code, FunctionType as function
def copycode(template, changes):
if hasattr(code, "replace"):
return template.replace(**{"co_" + k : v for k, v in changes.items()})
else:
names = [
"argcount", "nloca... | """
Python introspection helpers.
"""
from types import CodeType as code, FunctionType as function
def copycode(template, changes):
if hasattr(code, "replace"):
return template.replace(**{"co_" + k : v for k, v in changes.items()})
names = [
"argcount", "nlocals", "stacksize", "flags", "code"... | """
Python introspection helpers.
"""
from types import CodeType as code, FunctionType as function
def copycode(template, changes):
if hasattr(code, "replace"):
return template.replace(**{"co_" + k : v for k, v in changes.items()})
else:
names = [
"argcount", "nlocals", "stacksize... | <commit_before>"""
Python introspection helpers.
"""
from types import CodeType as code, FunctionType as function
def copycode(template, changes):
if hasattr(code, "replace"):
return template.replace(**{"co_" + k : v for k, v in changes.items()})
else:
names = [
"argcount", "nloca... |
2c6ccdacc2c4e54cf0a12618d60c963d9c67ef62 | djangocms_page_sitemap/settings.py | djangocms_page_sitemap/settings.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from cms.utils import get_cms_setting
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
PAGE_SITEMAP_CHANGEFREQ_DEFAULT_LIST = {
'always': _('... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from cms.utils.conf import get_cms_setting
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
PAGE_SITEMAP_CHANGEFREQ_DEFAULT_LIST = {
'always'... | Fix for DjangoCMS 3.5: get_cms_setting | Fix for DjangoCMS 3.5: get_cms_setting
ImportError: cannot import name get_cms_setting | Python | bsd-3-clause | nephila/djangocms-page-sitemap | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from cms.utils import get_cms_setting
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
PAGE_SITEMAP_CHANGEFREQ_DEFAULT_LIST = {
'always': _('... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from cms.utils.conf import get_cms_setting
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
PAGE_SITEMAP_CHANGEFREQ_DEFAULT_LIST = {
'always'... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from cms.utils import get_cms_setting
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
PAGE_SITEMAP_CHANGEFREQ_DEFAULT_LIST = {
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from cms.utils.conf import get_cms_setting
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
PAGE_SITEMAP_CHANGEFREQ_DEFAULT_LIST = {
'always'... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from cms.utils import get_cms_setting
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
PAGE_SITEMAP_CHANGEFREQ_DEFAULT_LIST = {
'always': _('... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from cms.utils import get_cms_setting
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
PAGE_SITEMAP_CHANGEFREQ_DEFAULT_LIST = {
... |
06cb55639d2bc504d0ec1b9fb073c40e00751328 | doc/sample_code/demo_plot_state.py | doc/sample_code/demo_plot_state.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyogi.board import Board
from pyogi.plot import plot_board
if __name__ == '__main__':
board = Board()
board.set_initial_state()
board.players = ['先手', '後手']
board.move('+7776FU')
board.move('-3334FU')
board.move('+2868HI')
board.move('... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from pyogi.board import Board
from pyogi.plot import plot_board
if __name__ == '__main__':
board = Board()
board.set_initial_state()
board.players = ['先手', '後手']
board.move('+7776FU')
board.move('-3334FU')
board.move('+2868HI')
bo... | Disable output example_pic.png if exists | Disable output example_pic.png if exists
| Python | mit | tosh1ki/pyogi,tosh1ki/pyogi | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyogi.board import Board
from pyogi.plot import plot_board
if __name__ == '__main__':
board = Board()
board.set_initial_state()
board.players = ['先手', '後手']
board.move('+7776FU')
board.move('-3334FU')
board.move('+2868HI')
board.move('... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from pyogi.board import Board
from pyogi.plot import plot_board
if __name__ == '__main__':
board = Board()
board.set_initial_state()
board.players = ['先手', '後手']
board.move('+7776FU')
board.move('-3334FU')
board.move('+2868HI')
bo... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyogi.board import Board
from pyogi.plot import plot_board
if __name__ == '__main__':
board = Board()
board.set_initial_state()
board.players = ['先手', '後手']
board.move('+7776FU')
board.move('-3334FU')
board.move('+2868HI')
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from pyogi.board import Board
from pyogi.plot import plot_board
if __name__ == '__main__':
board = Board()
board.set_initial_state()
board.players = ['先手', '後手']
board.move('+7776FU')
board.move('-3334FU')
board.move('+2868HI')
bo... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyogi.board import Board
from pyogi.plot import plot_board
if __name__ == '__main__':
board = Board()
board.set_initial_state()
board.players = ['先手', '後手']
board.move('+7776FU')
board.move('-3334FU')
board.move('+2868HI')
board.move('... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyogi.board import Board
from pyogi.plot import plot_board
if __name__ == '__main__':
board = Board()
board.set_initial_state()
board.players = ['先手', '後手']
board.move('+7776FU')
board.move('-3334FU')
board.move('+2868HI')
... |
7f113399e4277ecbbfdde41d683c22082f7e19bd | scrapi/harvesters/smithsonian.py | scrapi/harvesters/smithsonian.py | '''
Harvester for the Smithsonian Digital Repository for the SHARE project
Example API call: http://repository.si.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class SiHarvester(OAIHarvester):
short_name = 'smithsonian'
... | '''
Harvester for the Smithsonian Digital Repository for the SHARE project
Example API call: http://repository.si.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
import re
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class SiHarvester(OAIHa... | Add DOI parsing to identifiers | Add DOI parsing to identifiers
| Python | apache-2.0 | CenterForOpenScience/scrapi,alexgarciac/scrapi,jeffreyliu3230/scrapi,felliott/scrapi,fabianvf/scrapi,mehanig/scrapi,mehanig/scrapi,fabianvf/scrapi,erinspace/scrapi,erinspace/scrapi,felliott/scrapi,CenterForOpenScience/scrapi | '''
Harvester for the Smithsonian Digital Repository for the SHARE project
Example API call: http://repository.si.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class SiHarvester(OAIHarvester):
short_name = 'smithsonian'
... | '''
Harvester for the Smithsonian Digital Repository for the SHARE project
Example API call: http://repository.si.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
import re
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class SiHarvester(OAIHa... | <commit_before>'''
Harvester for the Smithsonian Digital Repository for the SHARE project
Example API call: http://repository.si.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class SiHarvester(OAIHarvester):
short_name = '... | '''
Harvester for the Smithsonian Digital Repository for the SHARE project
Example API call: http://repository.si.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
import re
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class SiHarvester(OAIHa... | '''
Harvester for the Smithsonian Digital Repository for the SHARE project
Example API call: http://repository.si.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class SiHarvester(OAIHarvester):
short_name = 'smithsonian'
... | <commit_before>'''
Harvester for the Smithsonian Digital Repository for the SHARE project
Example API call: http://repository.si.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import OAIHarvester
class SiHarvester(OAIHarvester):
short_name = '... |
3f90d0ec25491eb64f164180139d4baf9ff238a9 | libravatar/context_processors.py | libravatar/context_processors.py | # Copyright (C) 2010 Jonathan Harker <[email protected]>
#
# This file is part of Libravatar
#
# Libravatar is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your... | # Copyright (C) 2010 Jonathan Harker <[email protected]>
#
# This file is part of Libravatar
#
# Libravatar is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your... | Sort the context list in alphabetical order | Sort the context list in alphabetical order
| Python | agpl-3.0 | libravatar/libravatar,libravatar/libravatar,libravatar/libravatar,libravatar/libravatar,libravatar/libravatar,libravatar/libravatar,libravatar/libravatar | # Copyright (C) 2010 Jonathan Harker <[email protected]>
#
# This file is part of Libravatar
#
# Libravatar is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your... | # Copyright (C) 2010 Jonathan Harker <[email protected]>
#
# This file is part of Libravatar
#
# Libravatar is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your... | <commit_before># Copyright (C) 2010 Jonathan Harker <[email protected]>
#
# This file is part of Libravatar
#
# Libravatar is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License... | # Copyright (C) 2010 Jonathan Harker <[email protected]>
#
# This file is part of Libravatar
#
# Libravatar is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your... | # Copyright (C) 2010 Jonathan Harker <[email protected]>
#
# This file is part of Libravatar
#
# Libravatar is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your... | <commit_before># Copyright (C) 2010 Jonathan Harker <[email protected]>
#
# This file is part of Libravatar
#
# Libravatar is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License... |
5a682fccfb6d8e6db3eb100262cf628bfc10e829 | categories/serializers.py | categories/serializers.py | from .models import Category, Keyword
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta(object):
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSerializer):
clas... | from .models import Category, Keyword
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta(object):
model = Category
fields = ('pk', 'name', 'comment_required')
class KeywordSerializer(serializers.ModelSerializer):
class Meta(obj... | Remove weight from category serializer | Remove weight from category serializer
| Python | apache-2.0 | belatrix/BackendAllStars | from .models import Category, Keyword
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta(object):
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSerializer):
clas... | from .models import Category, Keyword
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta(object):
model = Category
fields = ('pk', 'name', 'comment_required')
class KeywordSerializer(serializers.ModelSerializer):
class Meta(obj... | <commit_before>from .models import Category, Keyword
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta(object):
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSeriali... | from .models import Category, Keyword
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta(object):
model = Category
fields = ('pk', 'name', 'comment_required')
class KeywordSerializer(serializers.ModelSerializer):
class Meta(obj... | from .models import Category, Keyword
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta(object):
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSerializer):
clas... | <commit_before>from .models import Category, Keyword
from rest_framework import serializers
class CategorySerializer(serializers.ModelSerializer):
class Meta(object):
model = Category
fields = ('pk', 'name', 'weight', 'comment_required')
class KeywordSerializer(serializers.ModelSeriali... |
2b7bdf39497809749c504d10399dffabe52e97ca | testutils/base_server.py | testutils/base_server.py | from testrunner import testhelp
class BaseServer(object):
"Base server class. Responsible with setting up the ports etc."
# We only want standalone repositories to have SSL support added via
# useSSL
sslEnabled = False
def start(self, resetDir = True):
raise NotImplementedError
def cl... | from testrunner import testhelp
class BaseServer(object):
"Base server class. Responsible with setting up the ports etc."
# We only want standalone repositories to have SSL support added via
# useSSL
sslEnabled = False
def start(self, resetDir = True):
raise NotImplementedError
def cl... | Implement a noisy __del__ in BaseServer. | Implement a noisy __del__ in BaseServer.
It will complain if the server is still running, and attempt to stop it.
| Python | apache-2.0 | sassoftware/testutils,sassoftware/testutils,sassoftware/testutils | from testrunner import testhelp
class BaseServer(object):
"Base server class. Responsible with setting up the ports etc."
# We only want standalone repositories to have SSL support added via
# useSSL
sslEnabled = False
def start(self, resetDir = True):
raise NotImplementedError
def cl... | from testrunner import testhelp
class BaseServer(object):
"Base server class. Responsible with setting up the ports etc."
# We only want standalone repositories to have SSL support added via
# useSSL
sslEnabled = False
def start(self, resetDir = True):
raise NotImplementedError
def cl... | <commit_before>from testrunner import testhelp
class BaseServer(object):
"Base server class. Responsible with setting up the ports etc."
# We only want standalone repositories to have SSL support added via
# useSSL
sslEnabled = False
def start(self, resetDir = True):
raise NotImplementedEr... | from testrunner import testhelp
class BaseServer(object):
"Base server class. Responsible with setting up the ports etc."
# We only want standalone repositories to have SSL support added via
# useSSL
sslEnabled = False
def start(self, resetDir = True):
raise NotImplementedError
def cl... | from testrunner import testhelp
class BaseServer(object):
"Base server class. Responsible with setting up the ports etc."
# We only want standalone repositories to have SSL support added via
# useSSL
sslEnabled = False
def start(self, resetDir = True):
raise NotImplementedError
def cl... | <commit_before>from testrunner import testhelp
class BaseServer(object):
"Base server class. Responsible with setting up the ports etc."
# We only want standalone repositories to have SSL support added via
# useSSL
sslEnabled = False
def start(self, resetDir = True):
raise NotImplementedEr... |
018583a7b8ce3b74b3942402b37b642d37b54c6d | scripts/prepared_json_to_fasta.py | scripts/prepared_json_to_fasta.py | """
Convert a prepared JSON file from augur into a FASTA file.
"""
import argparse
import Bio
import json
import logging
import sys
sys.path.append('..')
from base.sequences_process import sequence_set
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("json", help="prepared J... | """
Convert a prepared JSON file from augur into a FASTA file.
"""
import argparse
import Bio
import json
import logging
import sys
sys.path.append('..')
from base.sequences_process import sequence_set
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Convert a prepared JSON file from aug... | Write FASTA output to standard out. | Write FASTA output to standard out.
| Python | agpl-3.0 | blab/nextstrain-augur,nextstrain/augur,nextstrain/augur,nextstrain/augur | """
Convert a prepared JSON file from augur into a FASTA file.
"""
import argparse
import Bio
import json
import logging
import sys
sys.path.append('..')
from base.sequences_process import sequence_set
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("json", help="prepared J... | """
Convert a prepared JSON file from augur into a FASTA file.
"""
import argparse
import Bio
import json
import logging
import sys
sys.path.append('..')
from base.sequences_process import sequence_set
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Convert a prepared JSON file from aug... | <commit_before>"""
Convert a prepared JSON file from augur into a FASTA file.
"""
import argparse
import Bio
import json
import logging
import sys
sys.path.append('..')
from base.sequences_process import sequence_set
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("json", h... | """
Convert a prepared JSON file from augur into a FASTA file.
"""
import argparse
import Bio
import json
import logging
import sys
sys.path.append('..')
from base.sequences_process import sequence_set
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Convert a prepared JSON file from aug... | """
Convert a prepared JSON file from augur into a FASTA file.
"""
import argparse
import Bio
import json
import logging
import sys
sys.path.append('..')
from base.sequences_process import sequence_set
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("json", help="prepared J... | <commit_before>"""
Convert a prepared JSON file from augur into a FASTA file.
"""
import argparse
import Bio
import json
import logging
import sys
sys.path.append('..')
from base.sequences_process import sequence_set
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("json", h... |
1bacf677311b211ec75780298a4e366c9c65e307 | apps/polls/tests.py | apps/polls/tests.py | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | import datetime
from django.utils import timezone
from django.test import TestCase
from apps.polls.models import Poll
class PollMethodTests(TestCase):
def test_was_published_recently_with_future_poll(self):
"""
was_published_recently() should return False for polls whose
pub_date is in t... | Create a test to expose the bug | Create a test to expose the bug
| Python | bsd-3-clause | cuzen1/teracy-tutorial,cuzen1/teracy-tutorial,cuzen1/teracy-tutorial | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | import datetime
from django.utils import timezone
from django.test import TestCase
from apps.polls.models import Poll
class PollMethodTests(TestCase):
def test_was_published_recently_with_future_poll(self):
"""
was_published_recently() should return False for polls whose
pub_date is in t... | <commit_before>"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tes... | import datetime
from django.utils import timezone
from django.test import TestCase
from apps.polls.models import Poll
class PollMethodTests(TestCase):
def test_was_published_recently_with_future_poll(self):
"""
was_published_recently() should return False for polls whose
pub_date is in t... | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | <commit_before>"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tes... |
9fcf408dad5b97094445677eb42429beaa830c22 | apps/homepage/templatetags/homepage_tags.py | apps/homepage/templatetags/homepage_tags.py | from django import template
from homepage.models import Tab
register = template.Library()
@register.tag(name="get_tabs")
def get_tabs(parser, token):
return GetElementNode()
class GetElementNode(template.Node):
def __init__(self):
pass
def render(self, cont... | from django import template
from homepage.models import Tab
register = template.Library()
@register.tag(name="get_tabs")
def get_tabs(parser, token):
return GetElementNode()
class GetElementNode(template.Node):
def __init__(self):
pass
def render(self, cont... | Reduce queries on all pages by using select_related in the get_tabs template tag. | Reduce queries on all pages by using select_related in the get_tabs template tag.
| Python | mit | benracine/opencomparison,audreyr/opencomparison,QLGu/djangopackages,cartwheelweb/packaginator,QLGu/djangopackages,miketheman/opencomparison,nanuxbe/djangopackages,QLGu/djangopackages,miketheman/opencomparison,nanuxbe/djangopackages,audreyr/opencomparison,cartwheelweb/packaginator,nanuxbe/djangopackages,cartwheelweb/pac... | from django import template
from homepage.models import Tab
register = template.Library()
@register.tag(name="get_tabs")
def get_tabs(parser, token):
return GetElementNode()
class GetElementNode(template.Node):
def __init__(self):
pass
def render(self, cont... | from django import template
from homepage.models import Tab
register = template.Library()
@register.tag(name="get_tabs")
def get_tabs(parser, token):
return GetElementNode()
class GetElementNode(template.Node):
def __init__(self):
pass
def render(self, cont... | <commit_before>from django import template
from homepage.models import Tab
register = template.Library()
@register.tag(name="get_tabs")
def get_tabs(parser, token):
return GetElementNode()
class GetElementNode(template.Node):
def __init__(self):
pass
def re... | from django import template
from homepage.models import Tab
register = template.Library()
@register.tag(name="get_tabs")
def get_tabs(parser, token):
return GetElementNode()
class GetElementNode(template.Node):
def __init__(self):
pass
def render(self, cont... | from django import template
from homepage.models import Tab
register = template.Library()
@register.tag(name="get_tabs")
def get_tabs(parser, token):
return GetElementNode()
class GetElementNode(template.Node):
def __init__(self):
pass
def render(self, cont... | <commit_before>from django import template
from homepage.models import Tab
register = template.Library()
@register.tag(name="get_tabs")
def get_tabs(parser, token):
return GetElementNode()
class GetElementNode(template.Node):
def __init__(self):
pass
def re... |
53a2d8781e3e5d8e5879d4ef7c62752483323cf9 | bfg9000/shell/__init__.py | bfg9000/shell/__init__.py | import os
import subprocess
from ..platform_name import platform_name
if platform_name() == 'windows':
from .windows import *
else:
from .posix import *
class shell_list(list):
"""A special subclass of list used to mark that this command line uses
special shell characters."""
pass
def execute(... | import os
import subprocess
from ..platform_name import platform_name
if platform_name() == 'windows':
from .windows import *
else:
from .posix import *
class shell_list(list):
"""A special subclass of list used to mark that this command line uses
special shell characters."""
pass
def execute(... | Fix "quiet" mode for shell.execute() | Fix "quiet" mode for shell.execute()
| Python | bsd-3-clause | jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000 | import os
import subprocess
from ..platform_name import platform_name
if platform_name() == 'windows':
from .windows import *
else:
from .posix import *
class shell_list(list):
"""A special subclass of list used to mark that this command line uses
special shell characters."""
pass
def execute(... | import os
import subprocess
from ..platform_name import platform_name
if platform_name() == 'windows':
from .windows import *
else:
from .posix import *
class shell_list(list):
"""A special subclass of list used to mark that this command line uses
special shell characters."""
pass
def execute(... | <commit_before>import os
import subprocess
from ..platform_name import platform_name
if platform_name() == 'windows':
from .windows import *
else:
from .posix import *
class shell_list(list):
"""A special subclass of list used to mark that this command line uses
special shell characters."""
pass... | import os
import subprocess
from ..platform_name import platform_name
if platform_name() == 'windows':
from .windows import *
else:
from .posix import *
class shell_list(list):
"""A special subclass of list used to mark that this command line uses
special shell characters."""
pass
def execute(... | import os
import subprocess
from ..platform_name import platform_name
if platform_name() == 'windows':
from .windows import *
else:
from .posix import *
class shell_list(list):
"""A special subclass of list used to mark that this command line uses
special shell characters."""
pass
def execute(... | <commit_before>import os
import subprocess
from ..platform_name import platform_name
if platform_name() == 'windows':
from .windows import *
else:
from .posix import *
class shell_list(list):
"""A special subclass of list used to mark that this command line uses
special shell characters."""
pass... |
fa3c02a164dd81d91d105a4c1a1ddea8ca50d702 | main.py | main.py | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys.exit('{} has a... | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys.exit('{} has a... | Mark beginning of each section with a letter | Mark beginning of each section with a letter
| Python | mit | JoshuaBrockschmidt/dictbuilder | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys.exit('{} has a... | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys.exit('{} has a... | <commit_before>#!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys... | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys.exit('{} has a... | #!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys.exit('{} has a... | <commit_before>#!/usr/bin/env python3
"""TODO:
* more flexible sorting options
* use -o to specify output file
* check more explicitly for errors in JSON files
"""
import json, sys
if len(sys.argv) > 1:
inFn = sys.argv[1]
with open(inFn, 'r') as f:
try:
defs = json.load(f)
except:
sys... |
4244f9c4d9e64783d391139457d7761dbc19e546 | softwareindex/handlers/coreapi.py | softwareindex/handlers/coreapi.py | # This is a software index handler that gives a score based on the
# number of mentions in open access articles. It uses the CORE
# aggregator (http://core.ac.uk/) to search the full text of indexed
# articles.
#
# Inputs:
# - identifier (String)
#
# Outputs:
# - score (Number)
# - description (String)
import reque... | # This is a software index handler that gives a score based on the
# number of mentions in open access articles. It uses the CORE
# aggregator (http://core.ac.uk/) to search the full text of indexed
# articles.
#
# Inputs:
# - identifier (String)
#
# Outputs:
# - score (Number)
# - description (String)
import reque... | Remove unneeded import of json module. | Remove unneeded import of json module.
| Python | bsd-3-clause | softwaresaved/softwareindex,softwaresaved/softwareindex | # This is a software index handler that gives a score based on the
# number of mentions in open access articles. It uses the CORE
# aggregator (http://core.ac.uk/) to search the full text of indexed
# articles.
#
# Inputs:
# - identifier (String)
#
# Outputs:
# - score (Number)
# - description (String)
import reque... | # This is a software index handler that gives a score based on the
# number of mentions in open access articles. It uses the CORE
# aggregator (http://core.ac.uk/) to search the full text of indexed
# articles.
#
# Inputs:
# - identifier (String)
#
# Outputs:
# - score (Number)
# - description (String)
import reque... | <commit_before># This is a software index handler that gives a score based on the
# number of mentions in open access articles. It uses the CORE
# aggregator (http://core.ac.uk/) to search the full text of indexed
# articles.
#
# Inputs:
# - identifier (String)
#
# Outputs:
# - score (Number)
# - description (String... | # This is a software index handler that gives a score based on the
# number of mentions in open access articles. It uses the CORE
# aggregator (http://core.ac.uk/) to search the full text of indexed
# articles.
#
# Inputs:
# - identifier (String)
#
# Outputs:
# - score (Number)
# - description (String)
import reque... | # This is a software index handler that gives a score based on the
# number of mentions in open access articles. It uses the CORE
# aggregator (http://core.ac.uk/) to search the full text of indexed
# articles.
#
# Inputs:
# - identifier (String)
#
# Outputs:
# - score (Number)
# - description (String)
import reque... | <commit_before># This is a software index handler that gives a score based on the
# number of mentions in open access articles. It uses the CORE
# aggregator (http://core.ac.uk/) to search the full text of indexed
# articles.
#
# Inputs:
# - identifier (String)
#
# Outputs:
# - score (Number)
# - description (String... |
7897b985a1ec8fe240c9edead2b53567221cd095 | projectkey/k_runner.py | projectkey/k_runner.py | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import os, imp, inspect
from interpreter import cli_interface
def k_runner():
"""CLI interpreter for the k command."""
# Check every directory from the current all the way to / for a file named key.py
checkdirectory = os.getcwd()
directories_checked = []
... | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import os, imp, inspect, sys
from interpreter import cli_interface
def k_runner():
"""CLI interpreter for the k command."""
# Check every directory from the current all the way to / for a file named key.py
checkdirectory = os.getcwd()
directories_checked = ... | Convert print statement to sys.stderr.write() | Convert print statement to sys.stderr.write()
| Python | mit | crdoconnor/projectkey | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import os, imp, inspect
from interpreter import cli_interface
def k_runner():
"""CLI interpreter for the k command."""
# Check every directory from the current all the way to / for a file named key.py
checkdirectory = os.getcwd()
directories_checked = []
... | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import os, imp, inspect, sys
from interpreter import cli_interface
def k_runner():
"""CLI interpreter for the k command."""
# Check every directory from the current all the way to / for a file named key.py
checkdirectory = os.getcwd()
directories_checked = ... | <commit_before>#!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import os, imp, inspect
from interpreter import cli_interface
def k_runner():
"""CLI interpreter for the k command."""
# Check every directory from the current all the way to / for a file named key.py
checkdirectory = os.getcwd()
directories_... | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import os, imp, inspect, sys
from interpreter import cli_interface
def k_runner():
"""CLI interpreter for the k command."""
# Check every directory from the current all the way to / for a file named key.py
checkdirectory = os.getcwd()
directories_checked = ... | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import os, imp, inspect
from interpreter import cli_interface
def k_runner():
"""CLI interpreter for the k command."""
# Check every directory from the current all the way to / for a file named key.py
checkdirectory = os.getcwd()
directories_checked = []
... | <commit_before>#!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import os, imp, inspect
from interpreter import cli_interface
def k_runner():
"""CLI interpreter for the k command."""
# Check every directory from the current all the way to / for a file named key.py
checkdirectory = os.getcwd()
directories_... |
85be48f42b03273ea458b7c4db3303ae8b991558 | telethon/events/messageedited.py | telethon/events/messageedited.py | from .common import name_inner_event
from .newmessage import NewMessage
from ..tl import types
@name_inner_event
class MessageEdited(NewMessage):
"""
Event fired when a message has been edited.
"""
@classmethod
def build(cls, update):
if isinstance(update, (types.UpdateEditMessage,
... | from .common import name_inner_event
from .newmessage import NewMessage
from ..tl import types
@name_inner_event
class MessageEdited(NewMessage):
"""
Event fired when a message has been edited.
.. warning::
On channels, `Message.out <telethon.tl.custom.message.Message>`
will be ``True`` ... | Document misleading message.out value for events.MessageEdited | Document misleading message.out value for events.MessageEdited
| Python | mit | LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,expectocode/Telethon | from .common import name_inner_event
from .newmessage import NewMessage
from ..tl import types
@name_inner_event
class MessageEdited(NewMessage):
"""
Event fired when a message has been edited.
"""
@classmethod
def build(cls, update):
if isinstance(update, (types.UpdateEditMessage,
... | from .common import name_inner_event
from .newmessage import NewMessage
from ..tl import types
@name_inner_event
class MessageEdited(NewMessage):
"""
Event fired when a message has been edited.
.. warning::
On channels, `Message.out <telethon.tl.custom.message.Message>`
will be ``True`` ... | <commit_before>from .common import name_inner_event
from .newmessage import NewMessage
from ..tl import types
@name_inner_event
class MessageEdited(NewMessage):
"""
Event fired when a message has been edited.
"""
@classmethod
def build(cls, update):
if isinstance(update, (types.UpdateEditM... | from .common import name_inner_event
from .newmessage import NewMessage
from ..tl import types
@name_inner_event
class MessageEdited(NewMessage):
"""
Event fired when a message has been edited.
.. warning::
On channels, `Message.out <telethon.tl.custom.message.Message>`
will be ``True`` ... | from .common import name_inner_event
from .newmessage import NewMessage
from ..tl import types
@name_inner_event
class MessageEdited(NewMessage):
"""
Event fired when a message has been edited.
"""
@classmethod
def build(cls, update):
if isinstance(update, (types.UpdateEditMessage,
... | <commit_before>from .common import name_inner_event
from .newmessage import NewMessage
from ..tl import types
@name_inner_event
class MessageEdited(NewMessage):
"""
Event fired when a message has been edited.
"""
@classmethod
def build(cls, update):
if isinstance(update, (types.UpdateEditM... |
ad6a0b466c47d945265423c66c71777d61a82de0 | utils/http.py | utils/http.py | import httplib2
def url_exists(url):
"""
Check that a url- when following redirection - exists.
This is needed because django's validators rely on python's urllib2
which in verions < 2.6 won't follow redirects.
"""
h = httplib2.Http()
resp, content = h.request(url)
h.follow_all_redirec... | import httplib2
def url_exists(url):
"""
Check that a url- when following redirection - exists.
This is needed because django's validators rely on python's urllib2
which in verions < 2.6 won't follow redirects.
"""
h = httplib2.Http()
resp, content = h.request(url, method="HEAD")
h.fol... | Make url field check work over head requests | Make url field check work over head requests
| Python | agpl-3.0 | pculture/unisubs,pculture/unisubs,pculture/unisubs,ReachingOut/unisubs,norayr/unisubs,eloquence/unisubs,norayr/unisubs,ujdhesa/unisubs,norayr/unisubs,ofer43211/unisubs,ujdhesa/unisubs,eloquence/unisubs,ReachingOut/unisubs,pculture/unisubs,wevoice/wesub,ofer43211/unisubs,eloquence/unisubs,wevoice/wesub,ujdhesa/unisubs,w... | import httplib2
def url_exists(url):
"""
Check that a url- when following redirection - exists.
This is needed because django's validators rely on python's urllib2
which in verions < 2.6 won't follow redirects.
"""
h = httplib2.Http()
resp, content = h.request(url)
h.follow_all_redirec... | import httplib2
def url_exists(url):
"""
Check that a url- when following redirection - exists.
This is needed because django's validators rely on python's urllib2
which in verions < 2.6 won't follow redirects.
"""
h = httplib2.Http()
resp, content = h.request(url, method="HEAD")
h.fol... | <commit_before>import httplib2
def url_exists(url):
"""
Check that a url- when following redirection - exists.
This is needed because django's validators rely on python's urllib2
which in verions < 2.6 won't follow redirects.
"""
h = httplib2.Http()
resp, content = h.request(url)
h.fol... | import httplib2
def url_exists(url):
"""
Check that a url- when following redirection - exists.
This is needed because django's validators rely on python's urllib2
which in verions < 2.6 won't follow redirects.
"""
h = httplib2.Http()
resp, content = h.request(url, method="HEAD")
h.fol... | import httplib2
def url_exists(url):
"""
Check that a url- when following redirection - exists.
This is needed because django's validators rely on python's urllib2
which in verions < 2.6 won't follow redirects.
"""
h = httplib2.Http()
resp, content = h.request(url)
h.follow_all_redirec... | <commit_before>import httplib2
def url_exists(url):
"""
Check that a url- when following redirection - exists.
This is needed because django's validators rely on python's urllib2
which in verions < 2.6 won't follow redirects.
"""
h = httplib2.Http()
resp, content = h.request(url)
h.fol... |
c4c2845d2be318a3aaa23e1f279df9b2180add41 | test/systems/test_skill_check.py | test/systems/test_skill_check.py | from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em... | from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em... | Fix tests to use new key structure | Fix tests to use new key structure
| Python | mit | Kromey/roglick | from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em... | from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em... | <commit_before>from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityM... | from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em... | from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityManager()
em... | <commit_before>from roglick.engine.ecs import Entity,EntityManager
from roglick.components import SkillComponent,SkillSubComponent
from roglick.systems import SkillSystem
from roglick.engine import event
from roglick.events import SkillCheckEvent
def test_skill_check():
wins = 0
iters = 1000
em = EntityM... |
096a8972d610379356d668d57d92010707fcf9e1 | blockbuster/__init__.py | blockbuster/__init__.py | __author__ = 'matt'
from flask import Flask
app = Flask(__name__)
def startup():
import blockbuster.bb_dbconnector_factory
import blockbuster.bb_logging as log
import blockbuster.bb_auditlogger as audit
try:
if blockbuster.bb_dbconnector_factory.DBConnectorInterfaceFactory().create().db_vers... | __author__ = 'matt'
__version__ = '1.24.02'
target_schema_version = '1.24.00'
from flask import Flask
app = Flask(__name__)
def startup():
import blockbuster.bb_dbconnector_factory
import blockbuster.bb_logging as log
import blockbuster.bb_auditlogger as audit
try:
if blockbuster.bb_dbconnec... | Move version numbers back to the package init file | Move version numbers back to the package init file
| Python | mit | mattstibbs/blockbuster-server,mattstibbs/blockbuster-server | __author__ = 'matt'
from flask import Flask
app = Flask(__name__)
def startup():
import blockbuster.bb_dbconnector_factory
import blockbuster.bb_logging as log
import blockbuster.bb_auditlogger as audit
try:
if blockbuster.bb_dbconnector_factory.DBConnectorInterfaceFactory().create().db_vers... | __author__ = 'matt'
__version__ = '1.24.02'
target_schema_version = '1.24.00'
from flask import Flask
app = Flask(__name__)
def startup():
import blockbuster.bb_dbconnector_factory
import blockbuster.bb_logging as log
import blockbuster.bb_auditlogger as audit
try:
if blockbuster.bb_dbconnec... | <commit_before>__author__ = 'matt'
from flask import Flask
app = Flask(__name__)
def startup():
import blockbuster.bb_dbconnector_factory
import blockbuster.bb_logging as log
import blockbuster.bb_auditlogger as audit
try:
if blockbuster.bb_dbconnector_factory.DBConnectorInterfaceFactory().c... | __author__ = 'matt'
__version__ = '1.24.02'
target_schema_version = '1.24.00'
from flask import Flask
app = Flask(__name__)
def startup():
import blockbuster.bb_dbconnector_factory
import blockbuster.bb_logging as log
import blockbuster.bb_auditlogger as audit
try:
if blockbuster.bb_dbconnec... | __author__ = 'matt'
from flask import Flask
app = Flask(__name__)
def startup():
import blockbuster.bb_dbconnector_factory
import blockbuster.bb_logging as log
import blockbuster.bb_auditlogger as audit
try:
if blockbuster.bb_dbconnector_factory.DBConnectorInterfaceFactory().create().db_vers... | <commit_before>__author__ = 'matt'
from flask import Flask
app = Flask(__name__)
def startup():
import blockbuster.bb_dbconnector_factory
import blockbuster.bb_logging as log
import blockbuster.bb_auditlogger as audit
try:
if blockbuster.bb_dbconnector_factory.DBConnectorInterfaceFactory().c... |
d4f7178decbb55a9d6f559e7f94ad2cc6d806b18 | dashboard/ratings/models.py | dashboard/ratings/models.py | import uuid
from django.db import models
class Submission(models.Model):
uuid = models.UUIDField(default=uuid.uuid4,editable=False)
application_date = models.DateTimeField()
submission_date = models.DateTimeField()
def __str__(self):
uid = self.uuid.urn
return uid[9:]
class Media(mod... | import uuid
from django.db import models
class Submission(models.Model):
uuid = models.UUIDField(default=uuid.uuid4,editable=False)
application_date = models.DateTimeField()
submission_date = models.DateTimeField()
def __str__(self):
uid = self.uuid.urn
return uid[9:]
class Media(mod... | Fix Rating model str method | Fix Rating model str method
| Python | mit | daltonamitchell/rating-dashboard,daltonamitchell/rating-dashboard,daltonamitchell/rating-dashboard | import uuid
from django.db import models
class Submission(models.Model):
uuid = models.UUIDField(default=uuid.uuid4,editable=False)
application_date = models.DateTimeField()
submission_date = models.DateTimeField()
def __str__(self):
uid = self.uuid.urn
return uid[9:]
class Media(mod... | import uuid
from django.db import models
class Submission(models.Model):
uuid = models.UUIDField(default=uuid.uuid4,editable=False)
application_date = models.DateTimeField()
submission_date = models.DateTimeField()
def __str__(self):
uid = self.uuid.urn
return uid[9:]
class Media(mod... | <commit_before>import uuid
from django.db import models
class Submission(models.Model):
uuid = models.UUIDField(default=uuid.uuid4,editable=False)
application_date = models.DateTimeField()
submission_date = models.DateTimeField()
def __str__(self):
uid = self.uuid.urn
return uid[9:]
... | import uuid
from django.db import models
class Submission(models.Model):
uuid = models.UUIDField(default=uuid.uuid4,editable=False)
application_date = models.DateTimeField()
submission_date = models.DateTimeField()
def __str__(self):
uid = self.uuid.urn
return uid[9:]
class Media(mod... | import uuid
from django.db import models
class Submission(models.Model):
uuid = models.UUIDField(default=uuid.uuid4,editable=False)
application_date = models.DateTimeField()
submission_date = models.DateTimeField()
def __str__(self):
uid = self.uuid.urn
return uid[9:]
class Media(mod... | <commit_before>import uuid
from django.db import models
class Submission(models.Model):
uuid = models.UUIDField(default=uuid.uuid4,editable=False)
application_date = models.DateTimeField()
submission_date = models.DateTimeField()
def __str__(self):
uid = self.uuid.urn
return uid[9:]
... |
1e3b23597e5bff437dca0f94fdbd644b1454e395 | scrapi/harvesters/scholarsarchiveosu.py | scrapi/harvesters/scholarsarchiveosu.py | '''
Harvester for the ScholarsArchive@OSU for the SHARE project
Example API call: http://ir.library.oregonstate.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class ScholarsarchiveosuHarvester(OA... | '''
Harvester for the ScholarsArchive@OSU for the SHARE project
Example API call: http://ir.library.oregonstate.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class ScholarsarchiveosuHarvester(OA... | Update url for OSU harvester | Update url for OSU harvester
| Python | apache-2.0 | erinspace/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,alexgarciac/scrapi,jeffreyliu3230/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,erinspace/scrapi,mehanig/scrapi,mehanig/scrapi,fabianvf/scrapi | '''
Harvester for the ScholarsArchive@OSU for the SHARE project
Example API call: http://ir.library.oregonstate.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class ScholarsarchiveosuHarvester(OA... | '''
Harvester for the ScholarsArchive@OSU for the SHARE project
Example API call: http://ir.library.oregonstate.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class ScholarsarchiveosuHarvester(OA... | <commit_before>'''
Harvester for the ScholarsArchive@OSU for the SHARE project
Example API call: http://ir.library.oregonstate.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class Scholarsarchive... | '''
Harvester for the ScholarsArchive@OSU for the SHARE project
Example API call: http://ir.library.oregonstate.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class ScholarsarchiveosuHarvester(OA... | '''
Harvester for the ScholarsArchive@OSU for the SHARE project
Example API call: http://ir.library.oregonstate.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class ScholarsarchiveosuHarvester(OA... | <commit_before>'''
Harvester for the ScholarsArchive@OSU for the SHARE project
Example API call: http://ir.library.oregonstate.edu/oai/request?verb=ListRecords&metadataPrefix=oai_dc
'''
from __future__ import unicode_literals
from scrapi.base import helpers
from scrapi.base import OAIHarvester
class Scholarsarchive... |
e665154e1b522feac8cd46c39ba523bc7197afab | annoying/tests/urls.py | annoying/tests/urls.py | """URLs for django-annoying's tests"""
from __future__ import absolute_import
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^ajax-request/$', views.ajax_request_view),
url(r'^ajax-request-httpresponse/$', views.ajax_request_httpresponse_view),
url(r'^render-to-content-type-kwa... | """URLs for django-annoying's tests"""
from __future__ import absolute_import
from django.conf.urls import url
from . import views
import django
from distutils.version import StrictVersion
django_version = django.get_version()
# Use old URL Conf settings for Django <= 1.8.
if StrictVersion(django_version) < StrictVe... | Use old URL Conf settings for Django <= 1.8. | Use old URL Conf settings for Django <= 1.8.
| Python | bsd-3-clause | kabakchey/django-annoying,skorokithakis/django-annoying,YPCrumble/django-annoying,kabakchey/django-annoying,skorokithakis/django-annoying | """URLs for django-annoying's tests"""
from __future__ import absolute_import
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^ajax-request/$', views.ajax_request_view),
url(r'^ajax-request-httpresponse/$', views.ajax_request_httpresponse_view),
url(r'^render-to-content-type-kwa... | """URLs for django-annoying's tests"""
from __future__ import absolute_import
from django.conf.urls import url
from . import views
import django
from distutils.version import StrictVersion
django_version = django.get_version()
# Use old URL Conf settings for Django <= 1.8.
if StrictVersion(django_version) < StrictVe... | <commit_before>"""URLs for django-annoying's tests"""
from __future__ import absolute_import
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^ajax-request/$', views.ajax_request_view),
url(r'^ajax-request-httpresponse/$', views.ajax_request_httpresponse_view),
url(r'^render-to-c... | """URLs for django-annoying's tests"""
from __future__ import absolute_import
from django.conf.urls import url
from . import views
import django
from distutils.version import StrictVersion
django_version = django.get_version()
# Use old URL Conf settings for Django <= 1.8.
if StrictVersion(django_version) < StrictVe... | """URLs for django-annoying's tests"""
from __future__ import absolute_import
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^ajax-request/$', views.ajax_request_view),
url(r'^ajax-request-httpresponse/$', views.ajax_request_httpresponse_view),
url(r'^render-to-content-type-kwa... | <commit_before>"""URLs for django-annoying's tests"""
from __future__ import absolute_import
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^ajax-request/$', views.ajax_request_view),
url(r'^ajax-request-httpresponse/$', views.ajax_request_httpresponse_view),
url(r'^render-to-c... |
bb4a0ca8626f0287a5366e97313018fcc59bcf8f | demo/__init__.py | demo/__init__.py | __project__ = 'TemplateDemo'
__version__ = '0.0.0'
VERSION = "{0} v{1}".format(__project__, __version__)
| from pkg_resources import DistributionNotFound, get_distribution
try:
__version__ = get_distribution('TemplateDemo').version
except DistributionNotFound:
__version__ = '(local)'
| Deploy Travis CI build 1156 to GitHub | Deploy Travis CI build 1156 to GitHub
| Python | mit | jacebrowning/template-python-demo | __project__ = 'TemplateDemo'
__version__ = '0.0.0'
VERSION = "{0} v{1}".format(__project__, __version__)
Deploy Travis CI build 1156 to GitHub | from pkg_resources import DistributionNotFound, get_distribution
try:
__version__ = get_distribution('TemplateDemo').version
except DistributionNotFound:
__version__ = '(local)'
| <commit_before>__project__ = 'TemplateDemo'
__version__ = '0.0.0'
VERSION = "{0} v{1}".format(__project__, __version__)
<commit_msg>Deploy Travis CI build 1156 to GitHub<commit_after> | from pkg_resources import DistributionNotFound, get_distribution
try:
__version__ = get_distribution('TemplateDemo').version
except DistributionNotFound:
__version__ = '(local)'
| __project__ = 'TemplateDemo'
__version__ = '0.0.0'
VERSION = "{0} v{1}".format(__project__, __version__)
Deploy Travis CI build 1156 to GitHubfrom pkg_resources import DistributionNotFound, get_distribution
try:
__version__ = get_distribution('TemplateDemo').version
except DistributionNotFound:
__version__ =... | <commit_before>__project__ = 'TemplateDemo'
__version__ = '0.0.0'
VERSION = "{0} v{1}".format(__project__, __version__)
<commit_msg>Deploy Travis CI build 1156 to GitHub<commit_after>from pkg_resources import DistributionNotFound, get_distribution
try:
__version__ = get_distribution('TemplateDemo').version
excep... |
0baa14975ae1b0729021ecf4d0d88acadb866414 | pfamserver/api.py | pfamserver/api.py | from application import app
from flask.ext.restful import Api, Resource
import os
from subprocess import Popen as run, PIPE
from distutils.sysconfig import get_python_lib
from autoupdate import lib_path, db_path
api = Api(app)
fetch = '{:s}/hmmer/easel/miniapps/esl-afetch'.format(lib_path)
def db(query):
cmd = ... | from application import app
from flask.ext.restful import Api, Resource
import os
from subprocess import Popen as run, PIPE
from distutils.sysconfig import get_python_lib
from autoupdate import lib_path, db_path
api = Api(app)
fetch = '{:s}/hmmer/easel/miniapps/esl-afetch'.format(lib_path)
def db(query):
cmd = ... | Improve the query execution order. | Improve the query execution order.
| Python | agpl-3.0 | ecolell/pfamserver,ecolell/pfamserver,ecolell/pfamserver | from application import app
from flask.ext.restful import Api, Resource
import os
from subprocess import Popen as run, PIPE
from distutils.sysconfig import get_python_lib
from autoupdate import lib_path, db_path
api = Api(app)
fetch = '{:s}/hmmer/easel/miniapps/esl-afetch'.format(lib_path)
def db(query):
cmd = ... | from application import app
from flask.ext.restful import Api, Resource
import os
from subprocess import Popen as run, PIPE
from distutils.sysconfig import get_python_lib
from autoupdate import lib_path, db_path
api = Api(app)
fetch = '{:s}/hmmer/easel/miniapps/esl-afetch'.format(lib_path)
def db(query):
cmd = ... | <commit_before>from application import app
from flask.ext.restful import Api, Resource
import os
from subprocess import Popen as run, PIPE
from distutils.sysconfig import get_python_lib
from autoupdate import lib_path, db_path
api = Api(app)
fetch = '{:s}/hmmer/easel/miniapps/esl-afetch'.format(lib_path)
def db(que... | from application import app
from flask.ext.restful import Api, Resource
import os
from subprocess import Popen as run, PIPE
from distutils.sysconfig import get_python_lib
from autoupdate import lib_path, db_path
api = Api(app)
fetch = '{:s}/hmmer/easel/miniapps/esl-afetch'.format(lib_path)
def db(query):
cmd = ... | from application import app
from flask.ext.restful import Api, Resource
import os
from subprocess import Popen as run, PIPE
from distutils.sysconfig import get_python_lib
from autoupdate import lib_path, db_path
api = Api(app)
fetch = '{:s}/hmmer/easel/miniapps/esl-afetch'.format(lib_path)
def db(query):
cmd = ... | <commit_before>from application import app
from flask.ext.restful import Api, Resource
import os
from subprocess import Popen as run, PIPE
from distutils.sysconfig import get_python_lib
from autoupdate import lib_path, db_path
api = Api(app)
fetch = '{:s}/hmmer/easel/miniapps/esl-afetch'.format(lib_path)
def db(que... |
92bcca68aad8ba7c8be378ef005c6e94018c2bda | instance/tests/integration/base.py | instance/tests/integration/base.py | # -*- coding: utf-8 -*-
#
# OpenCraft -- tools to aid developing and hosting free software projects
# Copyright (C) 2015 OpenCraft <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Soft... | # -*- coding: utf-8 -*-
#
# OpenCraft -- tools to aid developing and hosting free software projects
# Copyright (C) 2015 OpenCraft <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Soft... | Make sure integration tests call super. | Make sure integration tests call super.
| Python | agpl-3.0 | omarkhan/opencraft,omarkhan/opencraft,open-craft/opencraft,omarkhan/opencraft,open-craft/opencraft,open-craft/opencraft,open-craft/opencraft,omarkhan/opencraft,open-craft/opencraft | # -*- coding: utf-8 -*-
#
# OpenCraft -- tools to aid developing and hosting free software projects
# Copyright (C) 2015 OpenCraft <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Soft... | # -*- coding: utf-8 -*-
#
# OpenCraft -- tools to aid developing and hosting free software projects
# Copyright (C) 2015 OpenCraft <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Soft... | <commit_before># -*- coding: utf-8 -*-
#
# OpenCraft -- tools to aid developing and hosting free software projects
# Copyright (C) 2015 OpenCraft <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published b... | # -*- coding: utf-8 -*-
#
# OpenCraft -- tools to aid developing and hosting free software projects
# Copyright (C) 2015 OpenCraft <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Soft... | # -*- coding: utf-8 -*-
#
# OpenCraft -- tools to aid developing and hosting free software projects
# Copyright (C) 2015 OpenCraft <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Soft... | <commit_before># -*- coding: utf-8 -*-
#
# OpenCraft -- tools to aid developing and hosting free software projects
# Copyright (C) 2015 OpenCraft <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published b... |
0aece66f694a1d8d64a76f35ebfd559b8fd2284a | bridge_common/config.py | bridge_common/config.py | """
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONF | """
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONF
| Fix pep8 issues for HEAD | Fix pep8 issues for HEAD
| Python | lgpl-2.1 | Tendrl/commons,rishubhjain/commons,r0h4n/commons | """
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONFFix pep8 issues for HEAD | """
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONF
| <commit_before>"""
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONF<commit_msg>Fix pep8 issues for HEAD<commit_after> | """
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONF
| """
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONFFix pep8 issues for HEAD"""
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONF
| <commit_before>"""
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONF<commit_msg>Fix pep8 issues for HEAD<commit_after>"""
Configuration options registration and useful routines.
"""
from oslo_config import cfg
CONF = cfg.CONF
|
0a7c6011607bccc61570c8f027c547425e8d53cf | iterm2_tools/tests/test_ipython.py | iterm2_tools/tests/test_ipython.py | from __future__ import print_function, division, absolute_import
import subprocess
import sys
import os
def test_IPython():
ipython = os.path.join(sys.prefix, 'bin', 'ipython')
if not os.path.exists(ipython):
raise Exception("IPython must be installed in %s to run the IPython tests" % os.path.join(sys... | from __future__ import print_function, division, absolute_import
import subprocess
import sys
import os
from IPython.testing.tools import get_ipython_cmd
def test_IPython():
ipython = get_ipython_cmd()
commands = b"""\
1
raise Exception
undefined
def f():
pass
f()
"""
p = subprocess.Popen([ipytho... | Use get_ipython_cmd in IPython test | Use get_ipython_cmd in IPython test
| Python | mit | asmeurer/iterm2-tools | from __future__ import print_function, division, absolute_import
import subprocess
import sys
import os
def test_IPython():
ipython = os.path.join(sys.prefix, 'bin', 'ipython')
if not os.path.exists(ipython):
raise Exception("IPython must be installed in %s to run the IPython tests" % os.path.join(sys... | from __future__ import print_function, division, absolute_import
import subprocess
import sys
import os
from IPython.testing.tools import get_ipython_cmd
def test_IPython():
ipython = get_ipython_cmd()
commands = b"""\
1
raise Exception
undefined
def f():
pass
f()
"""
p = subprocess.Popen([ipytho... | <commit_before>from __future__ import print_function, division, absolute_import
import subprocess
import sys
import os
def test_IPython():
ipython = os.path.join(sys.prefix, 'bin', 'ipython')
if not os.path.exists(ipython):
raise Exception("IPython must be installed in %s to run the IPython tests" % o... | from __future__ import print_function, division, absolute_import
import subprocess
import sys
import os
from IPython.testing.tools import get_ipython_cmd
def test_IPython():
ipython = get_ipython_cmd()
commands = b"""\
1
raise Exception
undefined
def f():
pass
f()
"""
p = subprocess.Popen([ipytho... | from __future__ import print_function, division, absolute_import
import subprocess
import sys
import os
def test_IPython():
ipython = os.path.join(sys.prefix, 'bin', 'ipython')
if not os.path.exists(ipython):
raise Exception("IPython must be installed in %s to run the IPython tests" % os.path.join(sys... | <commit_before>from __future__ import print_function, division, absolute_import
import subprocess
import sys
import os
def test_IPython():
ipython = os.path.join(sys.prefix, 'bin', 'ipython')
if not os.path.exists(ipython):
raise Exception("IPython must be installed in %s to run the IPython tests" % o... |
a61a09a08322c3e74800c0635c4848280ad9341e | src/syntax/infix_coordination.py | src/syntax/infix_coordination.py | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
# Break the tree
def break_tree(self, tree):
self.has_infix_coordinati... | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
self.slice_point = -1
self.subtree_list = []
# Break the tree
... | Split the sentence in case of infix coordinatiin | Split the sentence in case of infix coordinatiin
| Python | mit | Somsubhra/Simplify,Somsubhra/Simplify,Somsubhra/Simplify | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
# Break the tree
def break_tree(self, tree):
self.has_infix_coordinati... | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
self.slice_point = -1
self.subtree_list = []
# Break the tree
... | <commit_before>__author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
# Break the tree
def break_tree(self, tree):
self.has_i... | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
self.slice_point = -1
self.subtree_list = []
# Break the tree
... | __author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
# Break the tree
def break_tree(self, tree):
self.has_infix_coordinati... | <commit_before>__author__ = 's7a'
# All imports
from nltk.tree import Tree
# The infix coordination class
class InfixCoordination:
# Constructor for the infix coordination
def __init__(self):
self.has_infix_coordination = False
# Break the tree
def break_tree(self, tree):
self.has_i... |
56f7c35722b4d90e04bf2da3d7d72ef0bfd52602 | tests/test_decorators.py | tests/test_decorators.py | import pytest
from funcy.decorators import *
def test_decorator_no_args():
@decorator
def inc(call):
return call() + 1
@inc
def ten():
return 10
assert ten() == 11
def test_decorator_with_args():
@decorator
def add(call, n):
return call() + n
@add(2)
de... | import pytest
from funcy.decorators import *
def test_decorator_no_args():
@decorator
def inc(call):
return call() + 1
@inc
def ten():
return 10
assert ten() == 11
def test_decorator_with_args():
@decorator
def add(call, n):
return call() + n
@add(2)
de... | Add a test on failed arg introspection in chained decorators | Add a test on failed arg introspection in chained decorators
This is a consequence of not preserving function signature. So this
could be fixed by preserving signature or by some workaround.
| Python | bsd-3-clause | musicpax/funcy,ma-ric/funcy,Suor/funcy | import pytest
from funcy.decorators import *
def test_decorator_no_args():
@decorator
def inc(call):
return call() + 1
@inc
def ten():
return 10
assert ten() == 11
def test_decorator_with_args():
@decorator
def add(call, n):
return call() + n
@add(2)
de... | import pytest
from funcy.decorators import *
def test_decorator_no_args():
@decorator
def inc(call):
return call() + 1
@inc
def ten():
return 10
assert ten() == 11
def test_decorator_with_args():
@decorator
def add(call, n):
return call() + n
@add(2)
de... | <commit_before>import pytest
from funcy.decorators import *
def test_decorator_no_args():
@decorator
def inc(call):
return call() + 1
@inc
def ten():
return 10
assert ten() == 11
def test_decorator_with_args():
@decorator
def add(call, n):
return call() + n
... | import pytest
from funcy.decorators import *
def test_decorator_no_args():
@decorator
def inc(call):
return call() + 1
@inc
def ten():
return 10
assert ten() == 11
def test_decorator_with_args():
@decorator
def add(call, n):
return call() + n
@add(2)
de... | import pytest
from funcy.decorators import *
def test_decorator_no_args():
@decorator
def inc(call):
return call() + 1
@inc
def ten():
return 10
assert ten() == 11
def test_decorator_with_args():
@decorator
def add(call, n):
return call() + n
@add(2)
de... | <commit_before>import pytest
from funcy.decorators import *
def test_decorator_no_args():
@decorator
def inc(call):
return call() + 1
@inc
def ten():
return 10
assert ten() == 11
def test_decorator_with_args():
@decorator
def add(call, n):
return call() + n
... |
df8efcc0f86fa9a311ec444da7e6488de2e86d8a | tests/test_repr.py | tests/test_repr.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t', T_VALUES)
def test_repr_reload(t, get_model):
m1 = get_mode... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import tbmodels # pylint: disable=unused-import
import numpy as np
from tbmodels._ptools.sparse_matrix import csr # pylint: disable=unused-import
fr... | Add back imports to repr test. | Add back imports to repr test.
| Python | apache-2.0 | Z2PackDev/TBmodels,Z2PackDev/TBmodels | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t', T_VALUES)
def test_repr_reload(t, get_model):
m1 = get_mode... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import tbmodels # pylint: disable=unused-import
import numpy as np
from tbmodels._ptools.sparse_matrix import csr # pylint: disable=unused-import
fr... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t', T_VALUES)
def test_repr_reload(t, get_model):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import tbmodels # pylint: disable=unused-import
import numpy as np
from tbmodels._ptools.sparse_matrix import csr # pylint: disable=unused-import
fr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t', T_VALUES)
def test_repr_reload(t, get_model):
m1 = get_mode... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <[email protected]>
import pytest
import numpy as np
from parameters import T_VALUES, KPT
@pytest.mark.parametrize('t', T_VALUES)
def test_repr_reload(t, get_model):
... |
fc123442727ae25f03c5aa8d2fa7bc6fae388ae2 | thecure/levels/level1.py | thecure/levels/level1.py | from thecure.levels.base import Level
from thecure.sprites import Direction, InfectedHuman
class Level1(Level):
name = 'level1'
start_pos = (900, 6200)
def setup(self):
boy = InfectedHuman('boy1')
self.main_layer.add(boy)
boy.move_to(300, 160)
boy.set_direction(Direction.D... | from thecure.levels.base import Level
from thecure.sprites import Direction, InfectedHuman
class Level1(Level):
name = 'level1'
start_pos = (900, 6200)
def setup(self):
boy = InfectedHuman('boy1')
self.main_layer.add(boy)
boy.move_to(1536, 5696)
boy.set_direction(Direction... | Move the kids onto the field. | Move the kids onto the field.
| Python | mit | chipx86/the-cure | from thecure.levels.base import Level
from thecure.sprites import Direction, InfectedHuman
class Level1(Level):
name = 'level1'
start_pos = (900, 6200)
def setup(self):
boy = InfectedHuman('boy1')
self.main_layer.add(boy)
boy.move_to(300, 160)
boy.set_direction(Direction.D... | from thecure.levels.base import Level
from thecure.sprites import Direction, InfectedHuman
class Level1(Level):
name = 'level1'
start_pos = (900, 6200)
def setup(self):
boy = InfectedHuman('boy1')
self.main_layer.add(boy)
boy.move_to(1536, 5696)
boy.set_direction(Direction... | <commit_before>from thecure.levels.base import Level
from thecure.sprites import Direction, InfectedHuman
class Level1(Level):
name = 'level1'
start_pos = (900, 6200)
def setup(self):
boy = InfectedHuman('boy1')
self.main_layer.add(boy)
boy.move_to(300, 160)
boy.set_direct... | from thecure.levels.base import Level
from thecure.sprites import Direction, InfectedHuman
class Level1(Level):
name = 'level1'
start_pos = (900, 6200)
def setup(self):
boy = InfectedHuman('boy1')
self.main_layer.add(boy)
boy.move_to(1536, 5696)
boy.set_direction(Direction... | from thecure.levels.base import Level
from thecure.sprites import Direction, InfectedHuman
class Level1(Level):
name = 'level1'
start_pos = (900, 6200)
def setup(self):
boy = InfectedHuman('boy1')
self.main_layer.add(boy)
boy.move_to(300, 160)
boy.set_direction(Direction.D... | <commit_before>from thecure.levels.base import Level
from thecure.sprites import Direction, InfectedHuman
class Level1(Level):
name = 'level1'
start_pos = (900, 6200)
def setup(self):
boy = InfectedHuman('boy1')
self.main_layer.add(boy)
boy.move_to(300, 160)
boy.set_direct... |
35bbc1d720ba36631fc0a821f7aa953dd8736f2a | laalaa/apps/advisers/middleware.py | laalaa/apps/advisers/middleware.py | from django.http import HttpResponse
from django.utils.deprecation import MiddlewareMixin
class PingMiddleware(MiddlewareMixin):
def process_request(self, request):
if request.method == "GET":
if request.path == "/ping.json":
return self.ping(request)
pass
def ping... | from django.http import HttpResponse
class PingMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
return self.ping(request) or self.get_response(request)
def ping(self, request):
"""
Returns that the server is alive... | Remove use of django.utils.deprecation.MiddlewareMixin for PingMiddleware and upgrade Middleware to latest spec | Remove use of django.utils.deprecation.MiddlewareMixin for PingMiddleware and upgrade Middleware to latest spec
| Python | mit | ministryofjustice/laa-legal-adviser-api,ministryofjustice/laa-legal-adviser-api,ministryofjustice/laa-legal-adviser-api | from django.http import HttpResponse
from django.utils.deprecation import MiddlewareMixin
class PingMiddleware(MiddlewareMixin):
def process_request(self, request):
if request.method == "GET":
if request.path == "/ping.json":
return self.ping(request)
pass
def ping... | from django.http import HttpResponse
class PingMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
return self.ping(request) or self.get_response(request)
def ping(self, request):
"""
Returns that the server is alive... | <commit_before>from django.http import HttpResponse
from django.utils.deprecation import MiddlewareMixin
class PingMiddleware(MiddlewareMixin):
def process_request(self, request):
if request.method == "GET":
if request.path == "/ping.json":
return self.ping(request)
pas... | from django.http import HttpResponse
class PingMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
return self.ping(request) or self.get_response(request)
def ping(self, request):
"""
Returns that the server is alive... | from django.http import HttpResponse
from django.utils.deprecation import MiddlewareMixin
class PingMiddleware(MiddlewareMixin):
def process_request(self, request):
if request.method == "GET":
if request.path == "/ping.json":
return self.ping(request)
pass
def ping... | <commit_before>from django.http import HttpResponse
from django.utils.deprecation import MiddlewareMixin
class PingMiddleware(MiddlewareMixin):
def process_request(self, request):
if request.method == "GET":
if request.path == "/ping.json":
return self.ping(request)
pas... |
bcc2e41717e5287908867958c60ceb09ca824d7a | tests/apps/flask_app/__init__.py | tests/apps/flask_app/__init__.py | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
import os
from .app import flask_server as server
from ..utils import launch_background_thread
app_thread = None
if not os.environ('CASSANDRA_TEST') and app_thread is None:
app_thread = launch_background_thread(server.serve_forever, "Flask")
| # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
import os
from .app import flask_server as server
from ..utils import launch_background_thread
app_thread = None
if not os.environ.get('CASSANDRA_TEST') and app_thread is None:
app_thread = launch_background_thread(server.serve_forever, "Flask")
| Use falsy values for test environment variable in flask_app | test: Use falsy values for test environment variable in flask_app
Signed-off-by: Ferenc Géczi <[email protected]>
| Python | mit | instana/python-sensor,instana/python-sensor | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
import os
from .app import flask_server as server
from ..utils import launch_background_thread
app_thread = None
if not os.environ('CASSANDRA_TEST') and app_thread is None:
app_thread = launch_background_thread(server.serve_forever, "Flask")
test: ... | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
import os
from .app import flask_server as server
from ..utils import launch_background_thread
app_thread = None
if not os.environ.get('CASSANDRA_TEST') and app_thread is None:
app_thread = launch_background_thread(server.serve_forever, "Flask")
| <commit_before># (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
import os
from .app import flask_server as server
from ..utils import launch_background_thread
app_thread = None
if not os.environ('CASSANDRA_TEST') and app_thread is None:
app_thread = launch_background_thread(server.serve_forever, ... | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
import os
from .app import flask_server as server
from ..utils import launch_background_thread
app_thread = None
if not os.environ.get('CASSANDRA_TEST') and app_thread is None:
app_thread = launch_background_thread(server.serve_forever, "Flask")
| # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
import os
from .app import flask_server as server
from ..utils import launch_background_thread
app_thread = None
if not os.environ('CASSANDRA_TEST') and app_thread is None:
app_thread = launch_background_thread(server.serve_forever, "Flask")
test: ... | <commit_before># (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
import os
from .app import flask_server as server
from ..utils import launch_background_thread
app_thread = None
if not os.environ('CASSANDRA_TEST') and app_thread is None:
app_thread = launch_background_thread(server.serve_forever, ... |
4c3a21a73dbdf47d5cac04bfda20df7f85596b22 | tests/suite/kube_config_utils.py | tests/suite/kube_config_utils.py | """Describe methods to work with kubeconfig file."""
import pytest
import yaml
def get_current_context_name(kube_config) -> str:
"""
Get current-context from kubeconfig.
:param kube_config: absolute path to kubeconfig
:return: str
"""
with open(kube_config) as conf:
dep = yaml.load(co... | """Describe methods to work with kubeconfig file."""
import pytest
import yaml
def get_current_context_name(kube_config) -> str:
"""
Get current-context from kubeconfig.
:param kube_config: absolute path to kubeconfig
:return: str
"""
with open(kube_config) as conf:
dep = yaml.load(co... | Fix parsing of the kubeconfig file | Fix parsing of the kubeconfig file
| Python | apache-2.0 | nginxinc/kubernetes-ingress,nginxinc/kubernetes-ingress,nginxinc/kubernetes-ingress,nginxinc/kubernetes-ingress | """Describe methods to work with kubeconfig file."""
import pytest
import yaml
def get_current_context_name(kube_config) -> str:
"""
Get current-context from kubeconfig.
:param kube_config: absolute path to kubeconfig
:return: str
"""
with open(kube_config) as conf:
dep = yaml.load(co... | """Describe methods to work with kubeconfig file."""
import pytest
import yaml
def get_current_context_name(kube_config) -> str:
"""
Get current-context from kubeconfig.
:param kube_config: absolute path to kubeconfig
:return: str
"""
with open(kube_config) as conf:
dep = yaml.load(co... | <commit_before>"""Describe methods to work with kubeconfig file."""
import pytest
import yaml
def get_current_context_name(kube_config) -> str:
"""
Get current-context from kubeconfig.
:param kube_config: absolute path to kubeconfig
:return: str
"""
with open(kube_config) as conf:
dep... | """Describe methods to work with kubeconfig file."""
import pytest
import yaml
def get_current_context_name(kube_config) -> str:
"""
Get current-context from kubeconfig.
:param kube_config: absolute path to kubeconfig
:return: str
"""
with open(kube_config) as conf:
dep = yaml.load(co... | """Describe methods to work with kubeconfig file."""
import pytest
import yaml
def get_current_context_name(kube_config) -> str:
"""
Get current-context from kubeconfig.
:param kube_config: absolute path to kubeconfig
:return: str
"""
with open(kube_config) as conf:
dep = yaml.load(co... | <commit_before>"""Describe methods to work with kubeconfig file."""
import pytest
import yaml
def get_current_context_name(kube_config) -> str:
"""
Get current-context from kubeconfig.
:param kube_config: absolute path to kubeconfig
:return: str
"""
with open(kube_config) as conf:
dep... |
4f577eabc45acb6e9a8880d062daa225cc76d64c | logparser/logs/micro/micro.py | logparser/logs/micro/micro.py | # Log Parser for RTI Connext.
#
# Copyright 2016 Real-Time Innovations, Inc.
#
# 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
#
# ... | # Log Parser for RTI Connext.
#
# Copyright 2016 Real-Time Innovations, Inc.
#
# 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
#
# ... | Check if module and error code exist | Check if module and error code exist
| Python | apache-2.0 | rticommunity/rticonnextdds-logparser,rticommunity/rticonnextdds-logparser | # Log Parser for RTI Connext.
#
# Copyright 2016 Real-Time Innovations, Inc.
#
# 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
#
# ... | # Log Parser for RTI Connext.
#
# Copyright 2016 Real-Time Innovations, Inc.
#
# 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
#
# ... | <commit_before># Log Parser for RTI Connext.
#
# Copyright 2016 Real-Time Innovations, Inc.
#
# 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/LI... | # Log Parser for RTI Connext.
#
# Copyright 2016 Real-Time Innovations, Inc.
#
# 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
#
# ... | # Log Parser for RTI Connext.
#
# Copyright 2016 Real-Time Innovations, Inc.
#
# 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
#
# ... | <commit_before># Log Parser for RTI Connext.
#
# Copyright 2016 Real-Time Innovations, Inc.
#
# 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/LI... |
f5369b9b0175e221743101abb936b5a2947a3808 | polyaxon/libs/paths.py | polyaxon/libs/paths.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
import os
import shutil
logger = logging.getLogger('polyaxon.libs.paths')
def delete_path(path):
if not os.path.exists(path):
return
try:
shutil.rmtree(path)
except OSError:
lo... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
import os
import shutil
logger = logging.getLogger('polyaxon.libs.paths')
def delete_path(path):
if not os.path.exists(path):
return
try:
if os.path.isfile(path):
os.remove(pat... | Check if file or dir before deleting | Check if file or dir before deleting
| Python | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
import os
import shutil
logger = logging.getLogger('polyaxon.libs.paths')
def delete_path(path):
if not os.path.exists(path):
return
try:
shutil.rmtree(path)
except OSError:
lo... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
import os
import shutil
logger = logging.getLogger('polyaxon.libs.paths')
def delete_path(path):
if not os.path.exists(path):
return
try:
if os.path.isfile(path):
os.remove(pat... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
import os
import shutil
logger = logging.getLogger('polyaxon.libs.paths')
def delete_path(path):
if not os.path.exists(path):
return
try:
shutil.rmtree(path)
except OSEr... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
import os
import shutil
logger = logging.getLogger('polyaxon.libs.paths')
def delete_path(path):
if not os.path.exists(path):
return
try:
if os.path.isfile(path):
os.remove(pat... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
import os
import shutil
logger = logging.getLogger('polyaxon.libs.paths')
def delete_path(path):
if not os.path.exists(path):
return
try:
shutil.rmtree(path)
except OSError:
lo... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import logging
import os
import shutil
logger = logging.getLogger('polyaxon.libs.paths')
def delete_path(path):
if not os.path.exists(path):
return
try:
shutil.rmtree(path)
except OSEr... |
9e40fbd1992854db138157d9a7c2fd995722f5ea | massa/__init__.py | massa/__init__.py | # -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
sl = build(app.config)
app.register_bl... | # -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
app.config.from_envvar('MASSA_CONFIG', silen... | Add the ability to specify an alternative configuration object. | Add the ability to specify an alternative configuration object. | Python | mit | jaapverloop/massa | # -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
sl = build(app.config)
app.register_bl... | # -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
app.config.from_envvar('MASSA_CONFIG', silen... | <commit_before># -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
sl = build(app.config)
... | # -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
app.config.from_envvar('MASSA_CONFIG', silen... | # -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
sl = build(app.config)
app.register_bl... | <commit_before># -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
sl = build(app.config)
... |
bb48c975cfb4f43b8ffc5c7edfd42a8253fa7d66 | skan/test/test_pipe.py | skan/test/test_pipe.py | import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_im... | import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_im... | Fix test for output skeleton plot | Fix test for output skeleton plot
| Python | bsd-3-clause | jni/skan | import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_im... | import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_im... | <commit_before>import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = ... | import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_im... | import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = pipe.process_im... | <commit_before>import os
import pytest
import tempfile
import pandas
from skan import pipe
@pytest.fixture
def image_filename():
rundir = os.path.abspath(os.path.dirname(__file__))
datadir = os.path.join(rundir, 'data')
return os.path.join(datadir, 'retic.tif')
def test_pipe(image_filename):
data = ... |
157d5c2f680134fa5b9f4f69320259416c46f44b | tp/netlib/objects/Order_Probe.py | tp/netlib/objects/Order_Probe.py |
import copy
from Order import Order
class Order_Probe(Order):
no = 34
def __init__(self, sequence, \
id, slot, type, \
*args, **kw):
self.no = 34
apply(Order.__init__, (self, sequence, id, slot, type, -1, [])+args, kw)
|
import copy
from Order import Order
class Order_Probe(Order):
no = 34
def __init__(self, *args, **kw):
self.no = 34
Order.__init__(self, *args, **kw)
| Fix the Order Probe message for the new order stuff. | Fix the Order Probe message for the new order stuff.
| Python | lgpl-2.1 | thousandparsec/libtpproto-py,thousandparsec/libtpproto-py |
import copy
from Order import Order
class Order_Probe(Order):
no = 34
def __init__(self, sequence, \
id, slot, type, \
*args, **kw):
self.no = 34
apply(Order.__init__, (self, sequence, id, slot, type, -1, [])+args, kw)
Fix the Order Probe message for the new order stuff. |
import copy
from Order import Order
class Order_Probe(Order):
no = 34
def __init__(self, *args, **kw):
self.no = 34
Order.__init__(self, *args, **kw)
| <commit_before>
import copy
from Order import Order
class Order_Probe(Order):
no = 34
def __init__(self, sequence, \
id, slot, type, \
*args, **kw):
self.no = 34
apply(Order.__init__, (self, sequence, id, slot, type, -1, [])+args, kw)
<commit_msg>Fix the Order Probe message for the new order stuff.<commit_... |
import copy
from Order import Order
class Order_Probe(Order):
no = 34
def __init__(self, *args, **kw):
self.no = 34
Order.__init__(self, *args, **kw)
|
import copy
from Order import Order
class Order_Probe(Order):
no = 34
def __init__(self, sequence, \
id, slot, type, \
*args, **kw):
self.no = 34
apply(Order.__init__, (self, sequence, id, slot, type, -1, [])+args, kw)
Fix the Order Probe message for the new order stuff.
import copy
from Order import Orde... | <commit_before>
import copy
from Order import Order
class Order_Probe(Order):
no = 34
def __init__(self, sequence, \
id, slot, type, \
*args, **kw):
self.no = 34
apply(Order.__init__, (self, sequence, id, slot, type, -1, [])+args, kw)
<commit_msg>Fix the Order Probe message for the new order stuff.<commit_... |
5619b04f55418c943e7a7af606b5247ce4441160 | examples/IPLoM_example.py | examples/IPLoM_example.py | # for local run, before pygraphc packaging
import sys
sys.path.insert(0, '../pygraphc/misc')
from IPLoM import *
sys.path.insert(0, '../pygraphc/clustering')
from ClusterUtility import *
from ClusterEvaluation import *
# set path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/' ... | # for local run, before pygraphc packaging
import sys
sys.path.insert(0, '../pygraphc/misc')
from IPLoM import *
sys.path.insert(0, '../pygraphc/evaluation')
from ExternalEvaluation import *
# set path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address
standard_file =... | Change module path for cluster evaluation | Change module path for cluster evaluation
| Python | mit | studiawan/pygraphc | # for local run, before pygraphc packaging
import sys
sys.path.insert(0, '../pygraphc/misc')
from IPLoM import *
sys.path.insert(0, '../pygraphc/clustering')
from ClusterUtility import *
from ClusterEvaluation import *
# set path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/' ... | # for local run, before pygraphc packaging
import sys
sys.path.insert(0, '../pygraphc/misc')
from IPLoM import *
sys.path.insert(0, '../pygraphc/evaluation')
from ExternalEvaluation import *
# set path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address
standard_file =... | <commit_before># for local run, before pygraphc packaging
import sys
sys.path.insert(0, '../pygraphc/misc')
from IPLoM import *
sys.path.insert(0, '../pygraphc/clustering')
from ClusterUtility import *
from ClusterEvaluation import *
# set path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-aut... | # for local run, before pygraphc packaging
import sys
sys.path.insert(0, '../pygraphc/misc')
from IPLoM import *
sys.path.insert(0, '../pygraphc/evaluation')
from ExternalEvaluation import *
# set path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address
standard_file =... | # for local run, before pygraphc packaging
import sys
sys.path.insert(0, '../pygraphc/misc')
from IPLoM import *
sys.path.insert(0, '../pygraphc/clustering')
from ClusterUtility import *
from ClusterEvaluation import *
# set path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/' ... | <commit_before># for local run, before pygraphc packaging
import sys
sys.path.insert(0, '../pygraphc/misc')
from IPLoM import *
sys.path.insert(0, '../pygraphc/clustering')
from ClusterUtility import *
from ClusterEvaluation import *
# set path
ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-aut... |
8a1bb5a252fa50138316fcaae949de4554fe40e0 | fmn/lib/pkgdb.py | fmn/lib/pkgdb.py | """ fedmsg-notifications pkgdb client """
import json
import logging
import requests
log = logging.getLogger(__name__)
PKGDB_API_URL = 'http://209.132.184.188/api/'
def get_package_of_user(username, acl='commit', branch=None):
""" Retrieve the list of packages where the specified user has the
specified acl o... | """ fedmsg-notifications pkgdb client """
import json
import logging
import requests
log = logging.getLogger(__name__)
## TODO: Move this variable into a configuration file
PKGDB_API_URL = 'http://209.132.184.188/api/'
## TODO: cache the results of this method
# This might mean removing the acl and branch argument
#... | Add a couple of TODOs | Add a couple of TODOs | Python | lgpl-2.1 | jeremycline/fmn,jeremycline/fmn,jeremycline/fmn | """ fedmsg-notifications pkgdb client """
import json
import logging
import requests
log = logging.getLogger(__name__)
PKGDB_API_URL = 'http://209.132.184.188/api/'
def get_package_of_user(username, acl='commit', branch=None):
""" Retrieve the list of packages where the specified user has the
specified acl o... | """ fedmsg-notifications pkgdb client """
import json
import logging
import requests
log = logging.getLogger(__name__)
## TODO: Move this variable into a configuration file
PKGDB_API_URL = 'http://209.132.184.188/api/'
## TODO: cache the results of this method
# This might mean removing the acl and branch argument
#... | <commit_before>""" fedmsg-notifications pkgdb client """
import json
import logging
import requests
log = logging.getLogger(__name__)
PKGDB_API_URL = 'http://209.132.184.188/api/'
def get_package_of_user(username, acl='commit', branch=None):
""" Retrieve the list of packages where the specified user has the
... | """ fedmsg-notifications pkgdb client """
import json
import logging
import requests
log = logging.getLogger(__name__)
## TODO: Move this variable into a configuration file
PKGDB_API_URL = 'http://209.132.184.188/api/'
## TODO: cache the results of this method
# This might mean removing the acl and branch argument
#... | """ fedmsg-notifications pkgdb client """
import json
import logging
import requests
log = logging.getLogger(__name__)
PKGDB_API_URL = 'http://209.132.184.188/api/'
def get_package_of_user(username, acl='commit', branch=None):
""" Retrieve the list of packages where the specified user has the
specified acl o... | <commit_before>""" fedmsg-notifications pkgdb client """
import json
import logging
import requests
log = logging.getLogger(__name__)
PKGDB_API_URL = 'http://209.132.184.188/api/'
def get_package_of_user(username, acl='commit', branch=None):
""" Retrieve the list of packages where the specified user has the
... |
6fc9032bc372aad7b9c1217b44ff081ac9108af2 | manoseimas/common/tests/utils/test_words.py | manoseimas/common/tests/utils/test_words.py | # coding: utf-8
from __future__ import unicode_literals
import unittest
from manoseimas.scrapy import textutils
class WordCountTest(unittest.TestCase):
def test_get_word_count(self):
word_count = textutils.get_word_count('Žodžiai, lietuviškai.')
self.assertEqual(word_count, 2)
def test_get... | # coding: utf-8
from __future__ import unicode_literals
import unittest
from manoseimas.common.utils import words
class WordCountTest(unittest.TestCase):
def test_get_word_count(self):
word_count = words.get_word_count('Žodžiai, lietuviškai.')
self.assertEqual(word_count, 2)
def test_get_w... | Fix word_count test import paths. | Fix word_count test import paths.
| Python | agpl-3.0 | ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt | # coding: utf-8
from __future__ import unicode_literals
import unittest
from manoseimas.scrapy import textutils
class WordCountTest(unittest.TestCase):
def test_get_word_count(self):
word_count = textutils.get_word_count('Žodžiai, lietuviškai.')
self.assertEqual(word_count, 2)
def test_get... | # coding: utf-8
from __future__ import unicode_literals
import unittest
from manoseimas.common.utils import words
class WordCountTest(unittest.TestCase):
def test_get_word_count(self):
word_count = words.get_word_count('Žodžiai, lietuviškai.')
self.assertEqual(word_count, 2)
def test_get_w... | <commit_before># coding: utf-8
from __future__ import unicode_literals
import unittest
from manoseimas.scrapy import textutils
class WordCountTest(unittest.TestCase):
def test_get_word_count(self):
word_count = textutils.get_word_count('Žodžiai, lietuviškai.')
self.assertEqual(word_count, 2)
... | # coding: utf-8
from __future__ import unicode_literals
import unittest
from manoseimas.common.utils import words
class WordCountTest(unittest.TestCase):
def test_get_word_count(self):
word_count = words.get_word_count('Žodžiai, lietuviškai.')
self.assertEqual(word_count, 2)
def test_get_w... | # coding: utf-8
from __future__ import unicode_literals
import unittest
from manoseimas.scrapy import textutils
class WordCountTest(unittest.TestCase):
def test_get_word_count(self):
word_count = textutils.get_word_count('Žodžiai, lietuviškai.')
self.assertEqual(word_count, 2)
def test_get... | <commit_before># coding: utf-8
from __future__ import unicode_literals
import unittest
from manoseimas.scrapy import textutils
class WordCountTest(unittest.TestCase):
def test_get_word_count(self):
word_count = textutils.get_word_count('Žodžiai, lietuviškai.')
self.assertEqual(word_count, 2)
... |
2df1c9f6b9833c1ae44a62d3dfbe208e2e42805a | Python/Product/PythonTools/ptvsd/setup.py | Python/Product/PythonTools/ptvsd/setup.py | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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 ... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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 ... | Update ptvsd version number for 2.0 beta 2. | Update ptvsd version number for 2.0 beta 2.
| Python | apache-2.0 | fivejjs/PTVS,fivejjs/PTVS,xNUTs/PTVS,DEVSENSE/PTVS,Microsoft/PTVS,fivejjs/PTVS,DinoV/PTVS,gilbertw/PTVS,MetSystem/PTVS,crwilcox/PTVS,christer155/PTVS,bolabola/PTVS,DinoV/PTVS,int19h/PTVS,gomiero/PTVS,zooba/PTVS,Habatchii/PTVS,mlorbetske/PTVS,MetSystem/PTVS,xNUTs/PTVS,christer155/PTVS,fjxhkj/PTVS,Microsoft/PTVS,gomiero/... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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 ... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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 ... | <commit_before>#!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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 ... | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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 ... | <commit_before>#!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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... |
2e0c4940b208d0b029e7b43f8c3595fa3b6d2f18 | examples/list-pods-watch.py | examples/list-pods-watch.py | import asyncio
import powershift.endpoints as endpoints
import powershift.resources as resources
client = endpoints.AsyncClient()
async def run_query():
projects = await client.oapi.v1.projects.get()
#print(projects)
#print(resources.dumps(projects, indent=4, sort_keys=True))
#print()
project =... | import sys
import asyncio
import powershift.endpoints as endpoints
async def run_query():
namespace = sys.argv[1]
print('namespace=%r' % namespace)
client = endpoints.AsyncClient()
pods = await client.api.v1.namespaces(namespace=namespace).pods.get()
for pod in pods.items:
print(' O... | Make watch example for pods more durable. | Make watch example for pods more durable.
| Python | bsd-2-clause | getwarped/powershift | import asyncio
import powershift.endpoints as endpoints
import powershift.resources as resources
client = endpoints.AsyncClient()
async def run_query():
projects = await client.oapi.v1.projects.get()
#print(projects)
#print(resources.dumps(projects, indent=4, sort_keys=True))
#print()
project =... | import sys
import asyncio
import powershift.endpoints as endpoints
async def run_query():
namespace = sys.argv[1]
print('namespace=%r' % namespace)
client = endpoints.AsyncClient()
pods = await client.api.v1.namespaces(namespace=namespace).pods.get()
for pod in pods.items:
print(' O... | <commit_before>import asyncio
import powershift.endpoints as endpoints
import powershift.resources as resources
client = endpoints.AsyncClient()
async def run_query():
projects = await client.oapi.v1.projects.get()
#print(projects)
#print(resources.dumps(projects, indent=4, sort_keys=True))
#print()... | import sys
import asyncio
import powershift.endpoints as endpoints
async def run_query():
namespace = sys.argv[1]
print('namespace=%r' % namespace)
client = endpoints.AsyncClient()
pods = await client.api.v1.namespaces(namespace=namespace).pods.get()
for pod in pods.items:
print(' O... | import asyncio
import powershift.endpoints as endpoints
import powershift.resources as resources
client = endpoints.AsyncClient()
async def run_query():
projects = await client.oapi.v1.projects.get()
#print(projects)
#print(resources.dumps(projects, indent=4, sort_keys=True))
#print()
project =... | <commit_before>import asyncio
import powershift.endpoints as endpoints
import powershift.resources as resources
client = endpoints.AsyncClient()
async def run_query():
projects = await client.oapi.v1.projects.get()
#print(projects)
#print(resources.dumps(projects, indent=4, sort_keys=True))
#print()... |
7a81312d1e7b4b0de0343a907e91dd120625f807 | lily/users/authentication/social_auth/providers/google.py | lily/users/authentication/social_auth/providers/google.py | from django.conf import settings
from ..exceptions import InvalidProfileError
from .base import BaseAuthProvider
class GoogleAuthProvider(BaseAuthProvider):
client_id = settings.SOCIAL_AUTH_GOOGLE_CLIENT_ID
client_secret = settings.SOCIAL_AUTH_GOOGLE_SECRET
scope = ['openid', 'email', 'profile']
auth... | from django.conf import settings
from ..exceptions import InvalidProfileError
from .base import BaseAuthProvider
class GoogleAuthProvider(BaseAuthProvider):
client_id = settings.SOCIAL_AUTH_GOOGLE_CLIENT_ID
client_secret = settings.SOCIAL_AUTH_GOOGLE_SECRET
scope = [
'https://www.googleapis.com/a... | Update scopes for Google Auth2 | Update scopes for Google Auth2
| Python | agpl-3.0 | HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily | from django.conf import settings
from ..exceptions import InvalidProfileError
from .base import BaseAuthProvider
class GoogleAuthProvider(BaseAuthProvider):
client_id = settings.SOCIAL_AUTH_GOOGLE_CLIENT_ID
client_secret = settings.SOCIAL_AUTH_GOOGLE_SECRET
scope = ['openid', 'email', 'profile']
auth... | from django.conf import settings
from ..exceptions import InvalidProfileError
from .base import BaseAuthProvider
class GoogleAuthProvider(BaseAuthProvider):
client_id = settings.SOCIAL_AUTH_GOOGLE_CLIENT_ID
client_secret = settings.SOCIAL_AUTH_GOOGLE_SECRET
scope = [
'https://www.googleapis.com/a... | <commit_before>from django.conf import settings
from ..exceptions import InvalidProfileError
from .base import BaseAuthProvider
class GoogleAuthProvider(BaseAuthProvider):
client_id = settings.SOCIAL_AUTH_GOOGLE_CLIENT_ID
client_secret = settings.SOCIAL_AUTH_GOOGLE_SECRET
scope = ['openid', 'email', 'pro... | from django.conf import settings
from ..exceptions import InvalidProfileError
from .base import BaseAuthProvider
class GoogleAuthProvider(BaseAuthProvider):
client_id = settings.SOCIAL_AUTH_GOOGLE_CLIENT_ID
client_secret = settings.SOCIAL_AUTH_GOOGLE_SECRET
scope = [
'https://www.googleapis.com/a... | from django.conf import settings
from ..exceptions import InvalidProfileError
from .base import BaseAuthProvider
class GoogleAuthProvider(BaseAuthProvider):
client_id = settings.SOCIAL_AUTH_GOOGLE_CLIENT_ID
client_secret = settings.SOCIAL_AUTH_GOOGLE_SECRET
scope = ['openid', 'email', 'profile']
auth... | <commit_before>from django.conf import settings
from ..exceptions import InvalidProfileError
from .base import BaseAuthProvider
class GoogleAuthProvider(BaseAuthProvider):
client_id = settings.SOCIAL_AUTH_GOOGLE_CLIENT_ID
client_secret = settings.SOCIAL_AUTH_GOOGLE_SECRET
scope = ['openid', 'email', 'pro... |
2ef20e1658eaf5631395940bbb8583be628e6483 | utils/package_version.py | utils/package_version.py | #!/usr/bin/env python
import sys
import subprocess
mep_version = "MEP_VERSION"
os_family = "OS_FAMILY"
output = subprocess.check_output( [
"curl", "-s",
"http://package.mapr.com/releases/MEP/MEP-%s/%s/" % (mep_version, os_family)
] )
for line in output.splitlines():
index1 = line.find('"ma... | #!/usr/bin/env python
import sys
import subprocess
mep_version = "MEP_VERSION"
os_family = "OS_FAMILY"
output = subprocess.check_output( [
"curl", "-s",
"http://package.mapr.com/releases/MEP/MEP-%s/%s/" % (mep_version, os_family)
] )
for line in output.splitlines():
index1 = line.find('"ma... | Support MEP-6.1.0 which has version containing 4 numbers like mapr-spark-2.3.2.0 while the version directory contains still 3 numbers | Support MEP-6.1.0 which has version containing 4 numbers like mapr-spark-2.3.2.0 while the version directory contains still 3 numbers
| Python | apache-2.0 | qinjunjerry/MapRSetup,qinjunjerry/MapRSetup,qinjunjerry/MapRSetup | #!/usr/bin/env python
import sys
import subprocess
mep_version = "MEP_VERSION"
os_family = "OS_FAMILY"
output = subprocess.check_output( [
"curl", "-s",
"http://package.mapr.com/releases/MEP/MEP-%s/%s/" % (mep_version, os_family)
] )
for line in output.splitlines():
index1 = line.find('"ma... | #!/usr/bin/env python
import sys
import subprocess
mep_version = "MEP_VERSION"
os_family = "OS_FAMILY"
output = subprocess.check_output( [
"curl", "-s",
"http://package.mapr.com/releases/MEP/MEP-%s/%s/" % (mep_version, os_family)
] )
for line in output.splitlines():
index1 = line.find('"ma... | <commit_before>#!/usr/bin/env python
import sys
import subprocess
mep_version = "MEP_VERSION"
os_family = "OS_FAMILY"
output = subprocess.check_output( [
"curl", "-s",
"http://package.mapr.com/releases/MEP/MEP-%s/%s/" % (mep_version, os_family)
] )
for line in output.splitlines():
index1 =... | #!/usr/bin/env python
import sys
import subprocess
mep_version = "MEP_VERSION"
os_family = "OS_FAMILY"
output = subprocess.check_output( [
"curl", "-s",
"http://package.mapr.com/releases/MEP/MEP-%s/%s/" % (mep_version, os_family)
] )
for line in output.splitlines():
index1 = line.find('"ma... | #!/usr/bin/env python
import sys
import subprocess
mep_version = "MEP_VERSION"
os_family = "OS_FAMILY"
output = subprocess.check_output( [
"curl", "-s",
"http://package.mapr.com/releases/MEP/MEP-%s/%s/" % (mep_version, os_family)
] )
for line in output.splitlines():
index1 = line.find('"ma... | <commit_before>#!/usr/bin/env python
import sys
import subprocess
mep_version = "MEP_VERSION"
os_family = "OS_FAMILY"
output = subprocess.check_output( [
"curl", "-s",
"http://package.mapr.com/releases/MEP/MEP-%s/%s/" % (mep_version, os_family)
] )
for line in output.splitlines():
index1 =... |
1303890759afb3ae0466066dcdc9309b50dd73ef | CodeFights/weakNumbers.py | CodeFights/weakNumbers.py | #!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(count)
r... | #!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(count)
r... | Solve Code Fights weak numbers problem | Solve Code Fights weak numbers problem
| Python | mit | HKuz/Test_Code | #!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(count)
r... | #!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(count)
r... | <commit_before>#!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(c... | #!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(count)
r... | #!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(count)
r... | <commit_before>#!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(c... |
818a1b6537c6daedaa4f8320aeb8ff4b25f365d9 | inboxen/tests/settings.py | inboxen/tests/settings.py | from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from inboxen.settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB')
postgres_user = os.environ.get('P... | from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from inboxen.settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB', "sqlite")
postgres_user = os.envi... | Make tests run with sqlite by default | Make tests run with sqlite by default
| Python | agpl-3.0 | Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen | from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from inboxen.settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB')
postgres_user = os.environ.get('P... | from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from inboxen.settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB', "sqlite")
postgres_user = os.envi... | <commit_before>from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from inboxen.settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB')
postgres_user = os... | from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from inboxen.settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB', "sqlite")
postgres_user = os.envi... | from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from inboxen.settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB')
postgres_user = os.environ.get('P... | <commit_before>from __future__ import absolute_import
import os
os.environ['INBOX_TESTING'] = '1'
os.environ["INBOXEN_ADMIN_ACCESS"] = '1'
from inboxen.settings import *
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache"
}
}
db = os.environ.get('DB')
postgres_user = os... |
c045dc59bc313055eb74513e2961ce2cbae87450 | corehq/apps/api/util.py | corehq/apps/api/util.py | from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from couchdbkit.exceptions import ResourceNotFound
def get_object_or_not_exist(cls, doc_id, domain, additional_doc_types=None):
"""
Given a Document class, id, and domain, get that object or raise
an Ob... | from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from couchdbkit.exceptions import ResourceNotFound
def get_object_or_not_exist(cls, doc_id, domain, additional_doc_types=None):
"""
Given a Document class, id, and domain, get that object or raise
an Ob... | Check doc type before wrapping | Check doc type before wrapping
| Python | bsd-3-clause | dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq | from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from couchdbkit.exceptions import ResourceNotFound
def get_object_or_not_exist(cls, doc_id, domain, additional_doc_types=None):
"""
Given a Document class, id, and domain, get that object or raise
an Ob... | from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from couchdbkit.exceptions import ResourceNotFound
def get_object_or_not_exist(cls, doc_id, domain, additional_doc_types=None):
"""
Given a Document class, id, and domain, get that object or raise
an Ob... | <commit_before>from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from couchdbkit.exceptions import ResourceNotFound
def get_object_or_not_exist(cls, doc_id, domain, additional_doc_types=None):
"""
Given a Document class, id, and domain, get that object or ... | from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from couchdbkit.exceptions import ResourceNotFound
def get_object_or_not_exist(cls, doc_id, domain, additional_doc_types=None):
"""
Given a Document class, id, and domain, get that object or raise
an Ob... | from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from couchdbkit.exceptions import ResourceNotFound
def get_object_or_not_exist(cls, doc_id, domain, additional_doc_types=None):
"""
Given a Document class, id, and domain, get that object or raise
an Ob... | <commit_before>from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from couchdbkit.exceptions import ResourceNotFound
def get_object_or_not_exist(cls, doc_id, domain, additional_doc_types=None):
"""
Given a Document class, id, and domain, get that object or ... |
da65e041a7d05eee1cdda7c6f5a23ae2fea70103 | rules/arm-toolchain.py | rules/arm-toolchain.py | import xyz
class ArmToolchain(xyz.BuildProtocol):
group_only = True
pkg_name = 'arm-toolchain'
deps = [('gcc', {'target': 'arm-none-eabi'}),
('binutils', {'target': 'arm-none-eabi'}),
('gdb', {'target': 'arm-none-eabi'})
]
rules = ArmToolchain
| import xyz
class ArmToolchain(xyz.BuildProtocol):
group_only = True
pkg_name = 'arm-toolchain'
deps = [('gcc', {'target': 'arm-none-eabi'}),
('binutils', {'target': 'arm-none-eabi'}),
('gdb', {'target': 'arm-none-eabi'}),
('stlink', {})
]
rules = ArmToolchai... | Add stlink package to arm toolchain | Add stlink package to arm toolchain
| Python | mit | BreakawayConsulting/xyz | import xyz
class ArmToolchain(xyz.BuildProtocol):
group_only = True
pkg_name = 'arm-toolchain'
deps = [('gcc', {'target': 'arm-none-eabi'}),
('binutils', {'target': 'arm-none-eabi'}),
('gdb', {'target': 'arm-none-eabi'})
]
rules = ArmToolchain
Add stlink package to arm ... | import xyz
class ArmToolchain(xyz.BuildProtocol):
group_only = True
pkg_name = 'arm-toolchain'
deps = [('gcc', {'target': 'arm-none-eabi'}),
('binutils', {'target': 'arm-none-eabi'}),
('gdb', {'target': 'arm-none-eabi'}),
('stlink', {})
]
rules = ArmToolchai... | <commit_before>import xyz
class ArmToolchain(xyz.BuildProtocol):
group_only = True
pkg_name = 'arm-toolchain'
deps = [('gcc', {'target': 'arm-none-eabi'}),
('binutils', {'target': 'arm-none-eabi'}),
('gdb', {'target': 'arm-none-eabi'})
]
rules = ArmToolchain
<commit_msg... | import xyz
class ArmToolchain(xyz.BuildProtocol):
group_only = True
pkg_name = 'arm-toolchain'
deps = [('gcc', {'target': 'arm-none-eabi'}),
('binutils', {'target': 'arm-none-eabi'}),
('gdb', {'target': 'arm-none-eabi'}),
('stlink', {})
]
rules = ArmToolchai... | import xyz
class ArmToolchain(xyz.BuildProtocol):
group_only = True
pkg_name = 'arm-toolchain'
deps = [('gcc', {'target': 'arm-none-eabi'}),
('binutils', {'target': 'arm-none-eabi'}),
('gdb', {'target': 'arm-none-eabi'})
]
rules = ArmToolchain
Add stlink package to arm ... | <commit_before>import xyz
class ArmToolchain(xyz.BuildProtocol):
group_only = True
pkg_name = 'arm-toolchain'
deps = [('gcc', {'target': 'arm-none-eabi'}),
('binutils', {'target': 'arm-none-eabi'}),
('gdb', {'target': 'arm-none-eabi'})
]
rules = ArmToolchain
<commit_msg... |
a225eb1925c54c2c0fef857b1bf78fbc93375f1f | airflow_pipeline/pipelines.py | airflow_pipeline/pipelines.py |
from functools import partial
def pipeline_trigger(parent_task):
"""
Use this function with TriggerDagOperator to always trigger a DAG and
pass pipeline information to the next DAG
"""
def trigger(parent_task, context, dag_run_obj):
"""
Use this function with TriggerDagOpera... |
from functools import partial
def pipeline_trigger(parent_task):
"""
Use this function with TriggerDagRunOperator to always trigger a DAG and
pass pipeline information to the next DAG
"""
def trigger(parent_task, context, dag_run_obj):
"""
Use this function with TriggerDagRu... | Fix name of operator in docs | Fix name of operator in docs
| Python | apache-2.0 | LREN-CHUV/airflow-imaging-plugins,LREN-CHUV/airflow-imaging-plugins |
from functools import partial
def pipeline_trigger(parent_task):
"""
Use this function with TriggerDagOperator to always trigger a DAG and
pass pipeline information to the next DAG
"""
def trigger(parent_task, context, dag_run_obj):
"""
Use this function with TriggerDagOpera... |
from functools import partial
def pipeline_trigger(parent_task):
"""
Use this function with TriggerDagRunOperator to always trigger a DAG and
pass pipeline information to the next DAG
"""
def trigger(parent_task, context, dag_run_obj):
"""
Use this function with TriggerDagRu... | <commit_before>
from functools import partial
def pipeline_trigger(parent_task):
"""
Use this function with TriggerDagOperator to always trigger a DAG and
pass pipeline information to the next DAG
"""
def trigger(parent_task, context, dag_run_obj):
"""
Use this function with ... |
from functools import partial
def pipeline_trigger(parent_task):
"""
Use this function with TriggerDagRunOperator to always trigger a DAG and
pass pipeline information to the next DAG
"""
def trigger(parent_task, context, dag_run_obj):
"""
Use this function with TriggerDagRu... |
from functools import partial
def pipeline_trigger(parent_task):
"""
Use this function with TriggerDagOperator to always trigger a DAG and
pass pipeline information to the next DAG
"""
def trigger(parent_task, context, dag_run_obj):
"""
Use this function with TriggerDagOpera... | <commit_before>
from functools import partial
def pipeline_trigger(parent_task):
"""
Use this function with TriggerDagOperator to always trigger a DAG and
pass pipeline information to the next DAG
"""
def trigger(parent_task, context, dag_run_obj):
"""
Use this function with ... |
bb1ab6d72850fdb9ecc9119afa53045a3564a7e2 | test/unit/test_flask_multi_redis.py | test/unit/test_flask_multi_redis.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.modules['redis'] = None
def test_redis_import_error():
"""Test that we can load FlaskMultiRedis even if redis module
is not available."""
from flask_multi_redis import FlaskMultiRedis
f = FlaskMultiRedis()
assert f.provider_class is ... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from sys import modules, version_info
if version_info >= (3,):
from imp import reload
def test_redis_import_error():
"""Test that we can load FlaskMultiRedis even if redis module
is not available."""
import flask_multi_redis
modules['redis'] = None... | Update unit tests to improve redis_import_error | Update unit tests to improve redis_import_error
| Python | agpl-3.0 | max-k/flask-multi-redis | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.modules['redis'] = None
def test_redis_import_error():
"""Test that we can load FlaskMultiRedis even if redis module
is not available."""
from flask_multi_redis import FlaskMultiRedis
f = FlaskMultiRedis()
assert f.provider_class is ... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from sys import modules, version_info
if version_info >= (3,):
from imp import reload
def test_redis_import_error():
"""Test that we can load FlaskMultiRedis even if redis module
is not available."""
import flask_multi_redis
modules['redis'] = None... | <commit_before>#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.modules['redis'] = None
def test_redis_import_error():
"""Test that we can load FlaskMultiRedis even if redis module
is not available."""
from flask_multi_redis import FlaskMultiRedis
f = FlaskMultiRedis()
assert f.pro... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from sys import modules, version_info
if version_info >= (3,):
from imp import reload
def test_redis_import_error():
"""Test that we can load FlaskMultiRedis even if redis module
is not available."""
import flask_multi_redis
modules['redis'] = None... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.modules['redis'] = None
def test_redis_import_error():
"""Test that we can load FlaskMultiRedis even if redis module
is not available."""
from flask_multi_redis import FlaskMultiRedis
f = FlaskMultiRedis()
assert f.provider_class is ... | <commit_before>#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.modules['redis'] = None
def test_redis_import_error():
"""Test that we can load FlaskMultiRedis even if redis module
is not available."""
from flask_multi_redis import FlaskMultiRedis
f = FlaskMultiRedis()
assert f.pro... |
804696126480f36fddd74a8a0d24b0c4274f0f54 | ants/utils/convert_nibabel.py | ants/utils/convert_nibabel.py | __all__ = ["to_nibabel", "from_nibabel"]
import os
from tempfile import mktemp
import numpy as np
from ..core import ants_image_io as iio2
def to_nibabel(image):
"""
Convert an ANTsImage to a Nibabel image
"""
import nibabel as nib
tmpfile = mktemp(suffix=".nii.gz")
image.to_filename(tmpfile)... | __all__ = ["to_nibabel", "from_nibabel"]
import os
from tempfile import mkstemp
import numpy as np
from ..core import ants_image_io as iio2
def to_nibabel(image):
"""
Convert an ANTsImage to a Nibabel image
"""
import nibabel as nib
fd, tmpfile = mkstemp(suffix=".nii.gz")
image.to_filename(tm... | Use safe mkstemp instead of unsafe mktemp in format conversion | Use safe mkstemp instead of unsafe mktemp in format conversion
| Python | apache-2.0 | ANTsX/ANTsPy,ANTsX/ANTsPy,ANTsX/ANTsPy,ANTsX/ANTsPy | __all__ = ["to_nibabel", "from_nibabel"]
import os
from tempfile import mktemp
import numpy as np
from ..core import ants_image_io as iio2
def to_nibabel(image):
"""
Convert an ANTsImage to a Nibabel image
"""
import nibabel as nib
tmpfile = mktemp(suffix=".nii.gz")
image.to_filename(tmpfile)... | __all__ = ["to_nibabel", "from_nibabel"]
import os
from tempfile import mkstemp
import numpy as np
from ..core import ants_image_io as iio2
def to_nibabel(image):
"""
Convert an ANTsImage to a Nibabel image
"""
import nibabel as nib
fd, tmpfile = mkstemp(suffix=".nii.gz")
image.to_filename(tm... | <commit_before>__all__ = ["to_nibabel", "from_nibabel"]
import os
from tempfile import mktemp
import numpy as np
from ..core import ants_image_io as iio2
def to_nibabel(image):
"""
Convert an ANTsImage to a Nibabel image
"""
import nibabel as nib
tmpfile = mktemp(suffix=".nii.gz")
image.to_fi... | __all__ = ["to_nibabel", "from_nibabel"]
import os
from tempfile import mkstemp
import numpy as np
from ..core import ants_image_io as iio2
def to_nibabel(image):
"""
Convert an ANTsImage to a Nibabel image
"""
import nibabel as nib
fd, tmpfile = mkstemp(suffix=".nii.gz")
image.to_filename(tm... | __all__ = ["to_nibabel", "from_nibabel"]
import os
from tempfile import mktemp
import numpy as np
from ..core import ants_image_io as iio2
def to_nibabel(image):
"""
Convert an ANTsImage to a Nibabel image
"""
import nibabel as nib
tmpfile = mktemp(suffix=".nii.gz")
image.to_filename(tmpfile)... | <commit_before>__all__ = ["to_nibabel", "from_nibabel"]
import os
from tempfile import mktemp
import numpy as np
from ..core import ants_image_io as iio2
def to_nibabel(image):
"""
Convert an ANTsImage to a Nibabel image
"""
import nibabel as nib
tmpfile = mktemp(suffix=".nii.gz")
image.to_fi... |
c25d55643953d5bce511b1d3d32e6fce162b4ccd | hoptoad/tests.py | hoptoad/tests.py | from django.test import TestCase
from django.conf import settings
class BasicTests(TestCase):
"""Basic tests like setup and connectivity."""
def test_api_key_present(self):
self.assertTrue('HOPTOAD_API_KEY' in settings.get_all_members(),
msg='The HOPTOAD_API_KEY setting is not present.... | import urllib2
from django.test import TestCase
from django.conf import settings
class BasicTests(TestCase):
"""Basic tests like setup and connectivity."""
def test_api_key_present(self):
self.assertTrue('HOPTOAD_API_KEY' in settings.get_all_members(),
msg='The HOPTOAD_API_KEY setting ... | Add a unit test for hoptoadapp.com connectivity. | Add a unit test for hoptoadapp.com connectivity.
| Python | mit | sjl/django-hoptoad,sjl/django-hoptoad | from django.test import TestCase
from django.conf import settings
class BasicTests(TestCase):
"""Basic tests like setup and connectivity."""
def test_api_key_present(self):
self.assertTrue('HOPTOAD_API_KEY' in settings.get_all_members(),
msg='The HOPTOAD_API_KEY setting is not present.... | import urllib2
from django.test import TestCase
from django.conf import settings
class BasicTests(TestCase):
"""Basic tests like setup and connectivity."""
def test_api_key_present(self):
self.assertTrue('HOPTOAD_API_KEY' in settings.get_all_members(),
msg='The HOPTOAD_API_KEY setting ... | <commit_before>from django.test import TestCase
from django.conf import settings
class BasicTests(TestCase):
"""Basic tests like setup and connectivity."""
def test_api_key_present(self):
self.assertTrue('HOPTOAD_API_KEY' in settings.get_all_members(),
msg='The HOPTOAD_API_KEY setting ... | import urllib2
from django.test import TestCase
from django.conf import settings
class BasicTests(TestCase):
"""Basic tests like setup and connectivity."""
def test_api_key_present(self):
self.assertTrue('HOPTOAD_API_KEY' in settings.get_all_members(),
msg='The HOPTOAD_API_KEY setting ... | from django.test import TestCase
from django.conf import settings
class BasicTests(TestCase):
"""Basic tests like setup and connectivity."""
def test_api_key_present(self):
self.assertTrue('HOPTOAD_API_KEY' in settings.get_all_members(),
msg='The HOPTOAD_API_KEY setting is not present.... | <commit_before>from django.test import TestCase
from django.conf import settings
class BasicTests(TestCase):
"""Basic tests like setup and connectivity."""
def test_api_key_present(self):
self.assertTrue('HOPTOAD_API_KEY' in settings.get_all_members(),
msg='The HOPTOAD_API_KEY setting ... |
0f5aeeedd580cce2970127d4b7e69c4a6427d343 | wsme/tests/test_spore.py | wsme/tests/test_spore.py | import unittest
try:
import simplejson as json
except ImportError:
import json
from wsme.tests.protocol import WSTestRoot
import wsme.spore
class TestSpore(unittest.TestCase):
def test_spore(self):
spore = wsme.spore.getdesc(WSTestRoot())
print spore
spore = json.loads(spore)
... | import unittest
try:
import simplejson as json
except ImportError:
import json
from wsme.tests.protocol import WSTestRoot
import wsme.tests.test_restjson
import wsme.spore
class TestSpore(unittest.TestCase):
def test_spore(self):
spore = wsme.spore.getdesc(WSTestRoot())
print spore
... | Fix the spore test, as some functions were added by restjson | Fix the spore test, as some functions were added by restjson
| Python | mit | stackforge/wsme | import unittest
try:
import simplejson as json
except ImportError:
import json
from wsme.tests.protocol import WSTestRoot
import wsme.spore
class TestSpore(unittest.TestCase):
def test_spore(self):
spore = wsme.spore.getdesc(WSTestRoot())
print spore
spore = json.loads(spore)
... | import unittest
try:
import simplejson as json
except ImportError:
import json
from wsme.tests.protocol import WSTestRoot
import wsme.tests.test_restjson
import wsme.spore
class TestSpore(unittest.TestCase):
def test_spore(self):
spore = wsme.spore.getdesc(WSTestRoot())
print spore
... | <commit_before>import unittest
try:
import simplejson as json
except ImportError:
import json
from wsme.tests.protocol import WSTestRoot
import wsme.spore
class TestSpore(unittest.TestCase):
def test_spore(self):
spore = wsme.spore.getdesc(WSTestRoot())
print spore
spore = json... | import unittest
try:
import simplejson as json
except ImportError:
import json
from wsme.tests.protocol import WSTestRoot
import wsme.tests.test_restjson
import wsme.spore
class TestSpore(unittest.TestCase):
def test_spore(self):
spore = wsme.spore.getdesc(WSTestRoot())
print spore
... | import unittest
try:
import simplejson as json
except ImportError:
import json
from wsme.tests.protocol import WSTestRoot
import wsme.spore
class TestSpore(unittest.TestCase):
def test_spore(self):
spore = wsme.spore.getdesc(WSTestRoot())
print spore
spore = json.loads(spore)
... | <commit_before>import unittest
try:
import simplejson as json
except ImportError:
import json
from wsme.tests.protocol import WSTestRoot
import wsme.spore
class TestSpore(unittest.TestCase):
def test_spore(self):
spore = wsme.spore.getdesc(WSTestRoot())
print spore
spore = json... |
d54f7a769ccb60bd5feaab46a68d636dab38b02b | main.py | main.py | import asyncio
import json
from discord.ext.commands import when_mentioned_or
from bot import BeattieBot
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
with open('config.json') as file:
config = json.load(file)
token = conf... | import asyncio
import json
import logging
import discord
from discord.ext.commands import when_mentioned_or
from bot import BeattieBot
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
with open('config.json') as file:
config =... | Set up logging as per documentation example. | Set up logging as per documentation example.
| Python | mit | BeatButton/beattie-bot,BeatButton/beattie | import asyncio
import json
from discord.ext.commands import when_mentioned_or
from bot import BeattieBot
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
with open('config.json') as file:
config = json.load(file)
token = conf... | import asyncio
import json
import logging
import discord
from discord.ext.commands import when_mentioned_or
from bot import BeattieBot
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
with open('config.json') as file:
config =... | <commit_before>import asyncio
import json
from discord.ext.commands import when_mentioned_or
from bot import BeattieBot
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
with open('config.json') as file:
config = json.load(file)
... | import asyncio
import json
import logging
import discord
from discord.ext.commands import when_mentioned_or
from bot import BeattieBot
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
with open('config.json') as file:
config =... | import asyncio
import json
from discord.ext.commands import when_mentioned_or
from bot import BeattieBot
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
with open('config.json') as file:
config = json.load(file)
token = conf... | <commit_before>import asyncio
import json
from discord.ext.commands import when_mentioned_or
from bot import BeattieBot
try:
import uvloop
except ImportError:
pass
else:
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
with open('config.json') as file:
config = json.load(file)
... |
25cf03a2ecfb80e0866680a7781adfe11c54ebe9 | ircstat/plugins/totals.py | ircstat/plugins/totals.py | # Copyright 2013 John Reese
# Licensed under the MIT license
from ..lib import is_bot
from ..ent import Message
from ..graphs import NetworkKeyComparison, NetworkUserComparison
from .base import Plugin
class Totals(Plugin):
"""Gathers total message type statistics, broken down by channel, day
and user."""
... | # Copyright 2013 John Reese
# Licensed under the MIT license
from ..lib import is_bot
from ..ent import Message
from ..graphs import NetworkKeyComparison, NetworkUserComparison
from .base import Plugin
class Totals(Plugin):
"""Gathers total message type statistics, broken down by channel, day
and user."""
... | Add third graph for Totals plugin | Add third graph for Totals plugin
| Python | mit | jreese/ircstat,jreese/ircstat | # Copyright 2013 John Reese
# Licensed under the MIT license
from ..lib import is_bot
from ..ent import Message
from ..graphs import NetworkKeyComparison, NetworkUserComparison
from .base import Plugin
class Totals(Plugin):
"""Gathers total message type statistics, broken down by channel, day
and user."""
... | # Copyright 2013 John Reese
# Licensed under the MIT license
from ..lib import is_bot
from ..ent import Message
from ..graphs import NetworkKeyComparison, NetworkUserComparison
from .base import Plugin
class Totals(Plugin):
"""Gathers total message type statistics, broken down by channel, day
and user."""
... | <commit_before># Copyright 2013 John Reese
# Licensed under the MIT license
from ..lib import is_bot
from ..ent import Message
from ..graphs import NetworkKeyComparison, NetworkUserComparison
from .base import Plugin
class Totals(Plugin):
"""Gathers total message type statistics, broken down by channel, day
... | # Copyright 2013 John Reese
# Licensed under the MIT license
from ..lib import is_bot
from ..ent import Message
from ..graphs import NetworkKeyComparison, NetworkUserComparison
from .base import Plugin
class Totals(Plugin):
"""Gathers total message type statistics, broken down by channel, day
and user."""
... | # Copyright 2013 John Reese
# Licensed under the MIT license
from ..lib import is_bot
from ..ent import Message
from ..graphs import NetworkKeyComparison, NetworkUserComparison
from .base import Plugin
class Totals(Plugin):
"""Gathers total message type statistics, broken down by channel, day
and user."""
... | <commit_before># Copyright 2013 John Reese
# Licensed under the MIT license
from ..lib import is_bot
from ..ent import Message
from ..graphs import NetworkKeyComparison, NetworkUserComparison
from .base import Plugin
class Totals(Plugin):
"""Gathers total message type statistics, broken down by channel, day
... |
3dbdc8581bcb366e5b6749d523f25589d3ede9ed | test/test_cart.py | test/test_cart.py | import cart
def test_valid_cart_from_csv():
_cart = cart.cart_from_csv('test/cart_files/default_cart.csv')
assert _cart._product_prices == {'apple': 0.15,
'ice cream': 3.49,
'strawberries': 2.00,
'sni... | # -*- coding: utf-8 -*-
import cart
from cart._compatibility import utf8
def test_valid_cart_from_csv():
_cart = cart.cart_from_csv('test/cart_files/default_cart.csv')
assert _cart._product_prices == {'apple': 0.15,
'ice cream': 3.49,
... | Add tests for unicode csv files. | Add tests for unicode csv files.
| Python | mit | davidhalter-archive/shopping_cart_example | import cart
def test_valid_cart_from_csv():
_cart = cart.cart_from_csv('test/cart_files/default_cart.csv')
assert _cart._product_prices == {'apple': 0.15,
'ice cream': 3.49,
'strawberries': 2.00,
'sni... | # -*- coding: utf-8 -*-
import cart
from cart._compatibility import utf8
def test_valid_cart_from_csv():
_cart = cart.cart_from_csv('test/cart_files/default_cart.csv')
assert _cart._product_prices == {'apple': 0.15,
'ice cream': 3.49,
... | <commit_before>import cart
def test_valid_cart_from_csv():
_cart = cart.cart_from_csv('test/cart_files/default_cart.csv')
assert _cart._product_prices == {'apple': 0.15,
'ice cream': 3.49,
'strawberries': 2.00,
... | # -*- coding: utf-8 -*-
import cart
from cart._compatibility import utf8
def test_valid_cart_from_csv():
_cart = cart.cart_from_csv('test/cart_files/default_cart.csv')
assert _cart._product_prices == {'apple': 0.15,
'ice cream': 3.49,
... | import cart
def test_valid_cart_from_csv():
_cart = cart.cart_from_csv('test/cart_files/default_cart.csv')
assert _cart._product_prices == {'apple': 0.15,
'ice cream': 3.49,
'strawberries': 2.00,
'sni... | <commit_before>import cart
def test_valid_cart_from_csv():
_cart = cart.cart_from_csv('test/cart_files/default_cart.csv')
assert _cart._product_prices == {'apple': 0.15,
'ice cream': 3.49,
'strawberries': 2.00,
... |
423c29e859440b4a774a924badb7da4417dbd5c6 | tests/test_provider_lawrenceks.py | tests/test_provider_lawrenceks.py | import busbus
from busbus.provider.lawrenceks import LawrenceTransitProvider
import arrow
import pytest
@pytest.fixture(scope='module')
def lawrenceks_provider(engine):
return LawrenceTransitProvider(engine)
def test_agency_phone_e164(lawrenceks_provider):
agency = next(lawrenceks_provider.agencies)
as... | import busbus
from busbus.provider.lawrenceks import LawrenceTransitProvider
import arrow
import pytest
@pytest.fixture(scope='module')
def lawrenceks_provider(engine):
return LawrenceTransitProvider(engine)
def test_agency_phone_e164(lawrenceks_provider):
agency = next(lawrenceks_provider.agencies)
as... | Add another stop to test_43_to_eaton_hall | Add another stop to test_43_to_eaton_hall
| Python | mit | spaceboats/busbus | import busbus
from busbus.provider.lawrenceks import LawrenceTransitProvider
import arrow
import pytest
@pytest.fixture(scope='module')
def lawrenceks_provider(engine):
return LawrenceTransitProvider(engine)
def test_agency_phone_e164(lawrenceks_provider):
agency = next(lawrenceks_provider.agencies)
as... | import busbus
from busbus.provider.lawrenceks import LawrenceTransitProvider
import arrow
import pytest
@pytest.fixture(scope='module')
def lawrenceks_provider(engine):
return LawrenceTransitProvider(engine)
def test_agency_phone_e164(lawrenceks_provider):
agency = next(lawrenceks_provider.agencies)
as... | <commit_before>import busbus
from busbus.provider.lawrenceks import LawrenceTransitProvider
import arrow
import pytest
@pytest.fixture(scope='module')
def lawrenceks_provider(engine):
return LawrenceTransitProvider(engine)
def test_agency_phone_e164(lawrenceks_provider):
agency = next(lawrenceks_provider.a... | import busbus
from busbus.provider.lawrenceks import LawrenceTransitProvider
import arrow
import pytest
@pytest.fixture(scope='module')
def lawrenceks_provider(engine):
return LawrenceTransitProvider(engine)
def test_agency_phone_e164(lawrenceks_provider):
agency = next(lawrenceks_provider.agencies)
as... | import busbus
from busbus.provider.lawrenceks import LawrenceTransitProvider
import arrow
import pytest
@pytest.fixture(scope='module')
def lawrenceks_provider(engine):
return LawrenceTransitProvider(engine)
def test_agency_phone_e164(lawrenceks_provider):
agency = next(lawrenceks_provider.agencies)
as... | <commit_before>import busbus
from busbus.provider.lawrenceks import LawrenceTransitProvider
import arrow
import pytest
@pytest.fixture(scope='module')
def lawrenceks_provider(engine):
return LawrenceTransitProvider(engine)
def test_agency_phone_e164(lawrenceks_provider):
agency = next(lawrenceks_provider.a... |
abb61ff0b73eb06b65223e30fcff643df4114c53 | tools/geometry/icqCompositeShape.py | tools/geometry/icqCompositeShape.py | #!/usr/bin/env python
import re
from icqShape import Shape
class CompositeShapeBuilder( Shape ):
def __init__( self, shape_tuples=None ):
"""
Constructor
@param shape_tuples list of tuples (expr_var, shape)
"""
self.shape_tuples = shape_tuples
def compose( self, expr... | #!/usr/bin/env python
import re
from icqShape import Shape
class ShapeComposer( Shape ):
def __init__( self, shape_tuples=None ):
self.shape_tuples = shape_tuples
self.csg = None
def __add__( self, other ):
"""
Union
@param other Shape instance
@return Compos... | Enhance the ShapeComposer - still not working. | Enhance the ShapeComposer - still not working. | Python | unknown | gregvonkuster/icqsol,pletzer/icqsol,pletzer/icqsol,gregvonkuster/icqsol,gregvonkuster/icqsol,pletzer/icqsol,pletzer/icqsol,gregvonkuster/icqsol | #!/usr/bin/env python
import re
from icqShape import Shape
class CompositeShapeBuilder( Shape ):
def __init__( self, shape_tuples=None ):
"""
Constructor
@param shape_tuples list of tuples (expr_var, shape)
"""
self.shape_tuples = shape_tuples
def compose( self, expr... | #!/usr/bin/env python
import re
from icqShape import Shape
class ShapeComposer( Shape ):
def __init__( self, shape_tuples=None ):
self.shape_tuples = shape_tuples
self.csg = None
def __add__( self, other ):
"""
Union
@param other Shape instance
@return Compos... | <commit_before>#!/usr/bin/env python
import re
from icqShape import Shape
class CompositeShapeBuilder( Shape ):
def __init__( self, shape_tuples=None ):
"""
Constructor
@param shape_tuples list of tuples (expr_var, shape)
"""
self.shape_tuples = shape_tuples
def comp... | #!/usr/bin/env python
import re
from icqShape import Shape
class ShapeComposer( Shape ):
def __init__( self, shape_tuples=None ):
self.shape_tuples = shape_tuples
self.csg = None
def __add__( self, other ):
"""
Union
@param other Shape instance
@return Compos... | #!/usr/bin/env python
import re
from icqShape import Shape
class CompositeShapeBuilder( Shape ):
def __init__( self, shape_tuples=None ):
"""
Constructor
@param shape_tuples list of tuples (expr_var, shape)
"""
self.shape_tuples = shape_tuples
def compose( self, expr... | <commit_before>#!/usr/bin/env python
import re
from icqShape import Shape
class CompositeShapeBuilder( Shape ):
def __init__( self, shape_tuples=None ):
"""
Constructor
@param shape_tuples list of tuples (expr_var, shape)
"""
self.shape_tuples = shape_tuples
def comp... |
7cfb3d6be9e1fc24b5e86e3179e874bcbe01c47c | profiles/tasks.py | profiles/tasks.py | """
Celery tasks for the User Profiles portion of RAPID.
"""
import datetime
import logging
from celery.schedules import crontab
from celery.task import PeriodicTask
from profiles.models import Profile
LOGGER = logging.getLogger(None)
"""The logger for this module"""
# Note: Logging doesn't appear to work properly ... | """
Celery tasks for the User Profiles portion of RAPID.
"""
import datetime
import logging
from celery.schedules import crontab
from celery.task import PeriodicTask
from profiles.models import Profile
LOGGER = logging.getLogger(None)
"""The logger for this module"""
# Note: Logging doesn't appear to work properly ... | Update the crontab schedule to run every day at midnight | Update the crontab schedule to run every day at midnight
| Python | mit | gdit-cnd/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID | """
Celery tasks for the User Profiles portion of RAPID.
"""
import datetime
import logging
from celery.schedules import crontab
from celery.task import PeriodicTask
from profiles.models import Profile
LOGGER = logging.getLogger(None)
"""The logger for this module"""
# Note: Logging doesn't appear to work properly ... | """
Celery tasks for the User Profiles portion of RAPID.
"""
import datetime
import logging
from celery.schedules import crontab
from celery.task import PeriodicTask
from profiles.models import Profile
LOGGER = logging.getLogger(None)
"""The logger for this module"""
# Note: Logging doesn't appear to work properly ... | <commit_before>"""
Celery tasks for the User Profiles portion of RAPID.
"""
import datetime
import logging
from celery.schedules import crontab
from celery.task import PeriodicTask
from profiles.models import Profile
LOGGER = logging.getLogger(None)
"""The logger for this module"""
# Note: Logging doesn't appear to... | """
Celery tasks for the User Profiles portion of RAPID.
"""
import datetime
import logging
from celery.schedules import crontab
from celery.task import PeriodicTask
from profiles.models import Profile
LOGGER = logging.getLogger(None)
"""The logger for this module"""
# Note: Logging doesn't appear to work properly ... | """
Celery tasks for the User Profiles portion of RAPID.
"""
import datetime
import logging
from celery.schedules import crontab
from celery.task import PeriodicTask
from profiles.models import Profile
LOGGER = logging.getLogger(None)
"""The logger for this module"""
# Note: Logging doesn't appear to work properly ... | <commit_before>"""
Celery tasks for the User Profiles portion of RAPID.
"""
import datetime
import logging
from celery.schedules import crontab
from celery.task import PeriodicTask
from profiles.models import Profile
LOGGER = logging.getLogger(None)
"""The logger for this module"""
# Note: Logging doesn't appear to... |
0684d3132271f6c08a511aa544c85b838e942910 | discode_server/config/base_config.py | discode_server/config/base_config.py | import os
from urllib import parse
DEBUG = False
DATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL')
bits = parse.urlparse(DATABASE_SA)
DATABASE = {
'user': bits.username,
'database': bits.path[1:],
'password': bits.password,
'host': bits.hostname,
'port': bits.port,
'maxsize': 4,... | import os
from urllib import parse
DEBUG = False
DATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL_PGBOUNCER')
bits = parse.urlparse(DATABASE_SA)
DATABASE = {
'user': bits.username,
'database': bits.path[1:],
'password': bits.password,
'host': bits.hostname,
'port': bits.port,
'm... | Switch to using the bouncer | Switch to using the bouncer
| Python | bsd-2-clause | d0ugal/discode-server,d0ugal/discode-server,d0ugal/discode-server | import os
from urllib import parse
DEBUG = False
DATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL')
bits = parse.urlparse(DATABASE_SA)
DATABASE = {
'user': bits.username,
'database': bits.path[1:],
'password': bits.password,
'host': bits.hostname,
'port': bits.port,
'maxsize': 4,... | import os
from urllib import parse
DEBUG = False
DATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL_PGBOUNCER')
bits = parse.urlparse(DATABASE_SA)
DATABASE = {
'user': bits.username,
'database': bits.path[1:],
'password': bits.password,
'host': bits.hostname,
'port': bits.port,
'm... | <commit_before>import os
from urllib import parse
DEBUG = False
DATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL')
bits = parse.urlparse(DATABASE_SA)
DATABASE = {
'user': bits.username,
'database': bits.path[1:],
'password': bits.password,
'host': bits.hostname,
'port': bits.port,
... | import os
from urllib import parse
DEBUG = False
DATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL_PGBOUNCER')
bits = parse.urlparse(DATABASE_SA)
DATABASE = {
'user': bits.username,
'database': bits.path[1:],
'password': bits.password,
'host': bits.hostname,
'port': bits.port,
'm... | import os
from urllib import parse
DEBUG = False
DATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL')
bits = parse.urlparse(DATABASE_SA)
DATABASE = {
'user': bits.username,
'database': bits.path[1:],
'password': bits.password,
'host': bits.hostname,
'port': bits.port,
'maxsize': 4,... | <commit_before>import os
from urllib import parse
DEBUG = False
DATABASE_SA = os.environ.get('HEROKU_POSTGRESQL_CHARCOAL_URL')
bits = parse.urlparse(DATABASE_SA)
DATABASE = {
'user': bits.username,
'database': bits.path[1:],
'password': bits.password,
'host': bits.hostname,
'port': bits.port,
... |
df43b7fc089abb2fff87841173c28b3f5849a3b1 | profile_xf11id/startup/50-scans.py | profile_xf11id/startup/50-scans.py | from ophyd.userapi.scan_api import Scan, AScan, DScan, Count, estimate
scan = Scan()
ascan = AScan()
ascan.default_triggers = [bpm_cam_acq]
ascan.default_detectors = [bpm_tot5]
dscan = DScan()
# Use ct as a count which is a single scan.
ct = Count()
| from ophyd.userapi.scan_api import Scan, AScan, DScan, Count, estimate
scan = Scan()
ascan = AScan()
ascan.default_triggers = [bpm_cam_acq]
ascan.default_detectors = [bpm_tot5]
dscan = DScan()
# Use ct as a count which is a single scan.
ct = Count()
class CHXAScan(AScan):
def __call__(self, *args, **kwargs):
... | Define a CHX Ascan class. | ENH: Define a CHX Ascan class.
| Python | bsd-2-clause | NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd | from ophyd.userapi.scan_api import Scan, AScan, DScan, Count, estimate
scan = Scan()
ascan = AScan()
ascan.default_triggers = [bpm_cam_acq]
ascan.default_detectors = [bpm_tot5]
dscan = DScan()
# Use ct as a count which is a single scan.
ct = Count()
ENH: Define a CHX Ascan class. | from ophyd.userapi.scan_api import Scan, AScan, DScan, Count, estimate
scan = Scan()
ascan = AScan()
ascan.default_triggers = [bpm_cam_acq]
ascan.default_detectors = [bpm_tot5]
dscan = DScan()
# Use ct as a count which is a single scan.
ct = Count()
class CHXAScan(AScan):
def __call__(self, *args, **kwargs):
... | <commit_before>from ophyd.userapi.scan_api import Scan, AScan, DScan, Count, estimate
scan = Scan()
ascan = AScan()
ascan.default_triggers = [bpm_cam_acq]
ascan.default_detectors = [bpm_tot5]
dscan = DScan()
# Use ct as a count which is a single scan.
ct = Count()
<commit_msg>ENH: Define a CHX Ascan class.<commit_aft... | from ophyd.userapi.scan_api import Scan, AScan, DScan, Count, estimate
scan = Scan()
ascan = AScan()
ascan.default_triggers = [bpm_cam_acq]
ascan.default_detectors = [bpm_tot5]
dscan = DScan()
# Use ct as a count which is a single scan.
ct = Count()
class CHXAScan(AScan):
def __call__(self, *args, **kwargs):
... | from ophyd.userapi.scan_api import Scan, AScan, DScan, Count, estimate
scan = Scan()
ascan = AScan()
ascan.default_triggers = [bpm_cam_acq]
ascan.default_detectors = [bpm_tot5]
dscan = DScan()
# Use ct as a count which is a single scan.
ct = Count()
ENH: Define a CHX Ascan class.from ophyd.userapi.scan_api import Sca... | <commit_before>from ophyd.userapi.scan_api import Scan, AScan, DScan, Count, estimate
scan = Scan()
ascan = AScan()
ascan.default_triggers = [bpm_cam_acq]
ascan.default_detectors = [bpm_tot5]
dscan = DScan()
# Use ct as a count which is a single scan.
ct = Count()
<commit_msg>ENH: Define a CHX Ascan class.<commit_aft... |
d8d01d89710cd1d752809b8cd91d934092e99adf | pythonforandroid/recipes/ruamel.yaml/__init__.py | pythonforandroid/recipes/ruamel.yaml/__init__.py | from pythonforandroid.toolchain import PythonRecipe
class RuamelYamlRecipe(PythonRecipe):
version = '0.14.5'
url = 'https://pypi.python.org/packages/5c/13/c120a06b3add0f9763ca9190e5f6edb9faf9d34b158dd3cff7cc9097be03/ruamel.yaml-{version}.tar.gz'
depends = [ ('python2', 'python3crystax') ]
site_packag... | from pythonforandroid.recipe import PythonRecipe
class RuamelYamlRecipe(PythonRecipe):
version = '0.15.77'
url = 'https://pypi.python.org/packages/source/r/ruamel.yaml/ruamel.yaml-{version}.tar.gz'
depends = [('python2', 'python3crystax'), 'setuptools']
site_packages_name = 'ruamel'
call_hostpytho... | Update to last version, fixes import and deps | Update to last version, fixes import and deps | Python | mit | kronenpj/python-for-android,kronenpj/python-for-android,germn/python-for-android,kivy/python-for-android,kronenpj/python-for-android,kivy/python-for-android,rnixx/python-for-android,rnixx/python-for-android,germn/python-for-android,kivy/python-for-android,PKRoma/python-for-android,germn/python-for-android,germn/python-... | from pythonforandroid.toolchain import PythonRecipe
class RuamelYamlRecipe(PythonRecipe):
version = '0.14.5'
url = 'https://pypi.python.org/packages/5c/13/c120a06b3add0f9763ca9190e5f6edb9faf9d34b158dd3cff7cc9097be03/ruamel.yaml-{version}.tar.gz'
depends = [ ('python2', 'python3crystax') ]
site_packag... | from pythonforandroid.recipe import PythonRecipe
class RuamelYamlRecipe(PythonRecipe):
version = '0.15.77'
url = 'https://pypi.python.org/packages/source/r/ruamel.yaml/ruamel.yaml-{version}.tar.gz'
depends = [('python2', 'python3crystax'), 'setuptools']
site_packages_name = 'ruamel'
call_hostpytho... | <commit_before>from pythonforandroid.toolchain import PythonRecipe
class RuamelYamlRecipe(PythonRecipe):
version = '0.14.5'
url = 'https://pypi.python.org/packages/5c/13/c120a06b3add0f9763ca9190e5f6edb9faf9d34b158dd3cff7cc9097be03/ruamel.yaml-{version}.tar.gz'
depends = [ ('python2', 'python3crystax') ]
... | from pythonforandroid.recipe import PythonRecipe
class RuamelYamlRecipe(PythonRecipe):
version = '0.15.77'
url = 'https://pypi.python.org/packages/source/r/ruamel.yaml/ruamel.yaml-{version}.tar.gz'
depends = [('python2', 'python3crystax'), 'setuptools']
site_packages_name = 'ruamel'
call_hostpytho... | from pythonforandroid.toolchain import PythonRecipe
class RuamelYamlRecipe(PythonRecipe):
version = '0.14.5'
url = 'https://pypi.python.org/packages/5c/13/c120a06b3add0f9763ca9190e5f6edb9faf9d34b158dd3cff7cc9097be03/ruamel.yaml-{version}.tar.gz'
depends = [ ('python2', 'python3crystax') ]
site_packag... | <commit_before>from pythonforandroid.toolchain import PythonRecipe
class RuamelYamlRecipe(PythonRecipe):
version = '0.14.5'
url = 'https://pypi.python.org/packages/5c/13/c120a06b3add0f9763ca9190e5f6edb9faf9d34b158dd3cff7cc9097be03/ruamel.yaml-{version}.tar.gz'
depends = [ ('python2', 'python3crystax') ]
... |
c3d40abf3b7c201836bf674da05423d86c345498 | ckanext/romania_theme/plugin.py | ckanext/romania_theme/plugin.py | import ckan.model as model
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import os
def get_number_of_files():
return model.Session.execute("select count(*) from resource where state = 'active'").first()[0]
def get_number_of_external_links():
return model.Session.execute("select count... | import ckan.model as model
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import os
def get_number_of_files():
return model.Session.execute("select count(*) from resource where state = 'active'").first()[0]
def get_number_of_external_links():
return model.Session.execute("select count... | Add all type of unwanted files | Add all type of unwanted files
| Python | agpl-3.0 | govro/ckanext-romania_theme,govro/ckanext-romania_theme,govro/ckanext-romania_theme,govro/ckanext-romania_theme | import ckan.model as model
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import os
def get_number_of_files():
return model.Session.execute("select count(*) from resource where state = 'active'").first()[0]
def get_number_of_external_links():
return model.Session.execute("select count... | import ckan.model as model
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import os
def get_number_of_files():
return model.Session.execute("select count(*) from resource where state = 'active'").first()[0]
def get_number_of_external_links():
return model.Session.execute("select count... | <commit_before>import ckan.model as model
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import os
def get_number_of_files():
return model.Session.execute("select count(*) from resource where state = 'active'").first()[0]
def get_number_of_external_links():
return model.Session.execut... | import ckan.model as model
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import os
def get_number_of_files():
return model.Session.execute("select count(*) from resource where state = 'active'").first()[0]
def get_number_of_external_links():
return model.Session.execute("select count... | import ckan.model as model
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import os
def get_number_of_files():
return model.Session.execute("select count(*) from resource where state = 'active'").first()[0]
def get_number_of_external_links():
return model.Session.execute("select count... | <commit_before>import ckan.model as model
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import os
def get_number_of_files():
return model.Session.execute("select count(*) from resource where state = 'active'").first()[0]
def get_number_of_external_links():
return model.Session.execut... |
88fbd428ceb79d6e176ff235256c8e5951815085 | inspector/inspector/urls.py | inspector/inspector/urls.py | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib impor... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib impor... | Make the url structure a bit more sensible. | Make the url structure a bit more sensible.
| Python | bsd-2-clause | refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,abhijo89/django-cbv-inspector | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib impor... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib impor... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from djang... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib impor... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib impor... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from djang... |
a5072cecb9be257399360f68d68389274431c8ca | fraseador.py | fraseador.py | # -*- coding: utf-8 -*-
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from syntax import clause
def phrases(n=20, lf='... | # -*- coding: utf-8 -*-
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from syntax import clause
def phrases(n=20, lf='... | Refactor list append to list comprehension. | Refactor list append to list comprehension.
| Python | bsd-3-clause | andlima/fraseador | # -*- coding: utf-8 -*-
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from syntax import clause
def phrases(n=20, lf='... | # -*- coding: utf-8 -*-
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from syntax import clause
def phrases(n=20, lf='... | <commit_before># -*- coding: utf-8 -*-
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from syntax import clause
def phr... | # -*- coding: utf-8 -*-
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from syntax import clause
def phrases(n=20, lf='... | # -*- coding: utf-8 -*-
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from syntax import clause
def phrases(n=20, lf='... | <commit_before># -*- coding: utf-8 -*-
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from syntax import clause
def phr... |
85d4496a5ce7cb801c09bacbc0dd4a67c084c504 | main.py | main.py | __author__ = 'tri'
from controller.event_controller import EventController
from controller.env_controller import EnvController
from controller.main_controller import MainController
import pygame
env_controller = EnvController()
event_controller = EventController()
main_controller = MainController(event_controller, en... | __author__ = 'tri'
from controller.event_controller import EventController
from controller.env_controller import EnvController
from controller.main_controller import MainController
import pygame
env_controller = EnvController()
event_controller = EventController()
main_controller = MainController(event_controller, en... | Resolve issuse about cpu, it depends on fps | Resolve issuse about cpu, it depends on fps
| Python | apache-2.0 | ductri/game_programming-ass1 | __author__ = 'tri'
from controller.event_controller import EventController
from controller.env_controller import EnvController
from controller.main_controller import MainController
import pygame
env_controller = EnvController()
event_controller = EventController()
main_controller = MainController(event_controller, en... | __author__ = 'tri'
from controller.event_controller import EventController
from controller.env_controller import EnvController
from controller.main_controller import MainController
import pygame
env_controller = EnvController()
event_controller = EventController()
main_controller = MainController(event_controller, en... | <commit_before>__author__ = 'tri'
from controller.event_controller import EventController
from controller.env_controller import EnvController
from controller.main_controller import MainController
import pygame
env_controller = EnvController()
event_controller = EventController()
main_controller = MainController(event... | __author__ = 'tri'
from controller.event_controller import EventController
from controller.env_controller import EnvController
from controller.main_controller import MainController
import pygame
env_controller = EnvController()
event_controller = EventController()
main_controller = MainController(event_controller, en... | __author__ = 'tri'
from controller.event_controller import EventController
from controller.env_controller import EnvController
from controller.main_controller import MainController
import pygame
env_controller = EnvController()
event_controller = EventController()
main_controller = MainController(event_controller, en... | <commit_before>__author__ = 'tri'
from controller.event_controller import EventController
from controller.env_controller import EnvController
from controller.main_controller import MainController
import pygame
env_controller = EnvController()
event_controller = EventController()
main_controller = MainController(event... |
967a0426a32f6bdb2e82ae055fca8080681ff891 | main.py | main.py | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | Set up for showing schedule | Set up for showing schedule
| Python | mit | shickey/BearStatus,shickey/BearStatus,shickey/BearStatus | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | <commit_before>#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | <commit_before>#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... |
796bea01d77abe421ac7db2e82a481b6d77002de | pylease/extension/__init__.py | pylease/extension/__init__.py | from abc import ABCMeta, abstractmethod
from pylease.logger import LOGME as logme # noqa
class Extension(object):
__metaclass__ = ABCMeta
_IGNORE_ME_VAR_NAME = 'ignore_me'
ignore_me = False
def __init__(self, lizy):
super(Extension, self).__init__()
logme.debug("Initializing {}".f... | from abc import ABCMeta, abstractmethod
from pylease.logger import LOGME as logme # noqa
class Extension(object):
# pylint: disable=abstract-class-not-used
__metaclass__ = ABCMeta
_IGNORE_ME_VAR_NAME = 'ignore_me'
ignore_me = False
def __init__(self, lizy):
super(Extension, self).__init... | Disable Extension class prospector error | Disable Extension class prospector error
| Python | mit | n9code/pylease | from abc import ABCMeta, abstractmethod
from pylease.logger import LOGME as logme # noqa
class Extension(object):
__metaclass__ = ABCMeta
_IGNORE_ME_VAR_NAME = 'ignore_me'
ignore_me = False
def __init__(self, lizy):
super(Extension, self).__init__()
logme.debug("Initializing {}".f... | from abc import ABCMeta, abstractmethod
from pylease.logger import LOGME as logme # noqa
class Extension(object):
# pylint: disable=abstract-class-not-used
__metaclass__ = ABCMeta
_IGNORE_ME_VAR_NAME = 'ignore_me'
ignore_me = False
def __init__(self, lizy):
super(Extension, self).__init... | <commit_before>from abc import ABCMeta, abstractmethod
from pylease.logger import LOGME as logme # noqa
class Extension(object):
__metaclass__ = ABCMeta
_IGNORE_ME_VAR_NAME = 'ignore_me'
ignore_me = False
def __init__(self, lizy):
super(Extension, self).__init__()
logme.debug("Ini... | from abc import ABCMeta, abstractmethod
from pylease.logger import LOGME as logme # noqa
class Extension(object):
# pylint: disable=abstract-class-not-used
__metaclass__ = ABCMeta
_IGNORE_ME_VAR_NAME = 'ignore_me'
ignore_me = False
def __init__(self, lizy):
super(Extension, self).__init... | from abc import ABCMeta, abstractmethod
from pylease.logger import LOGME as logme # noqa
class Extension(object):
__metaclass__ = ABCMeta
_IGNORE_ME_VAR_NAME = 'ignore_me'
ignore_me = False
def __init__(self, lizy):
super(Extension, self).__init__()
logme.debug("Initializing {}".f... | <commit_before>from abc import ABCMeta, abstractmethod
from pylease.logger import LOGME as logme # noqa
class Extension(object):
__metaclass__ = ABCMeta
_IGNORE_ME_VAR_NAME = 'ignore_me'
ignore_me = False
def __init__(self, lizy):
super(Extension, self).__init__()
logme.debug("Ini... |
b6a039369bc18456667c82b8e57f8b8621aed6d1 | deprecated/__init__.py | deprecated/__init__.py | # -*- coding: utf-8 -*-
"""
Deprecated Library
==================
Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.
"""
#: Module Version Number, see `PEP 396 <https://www.python.org/dev/peps/pep-0396/>`_.
__version__ = "1.2.11"
from deprecated.classic import deprecated
| # -*- coding: utf-8 -*-
"""
Deprecated Library
==================
Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.
"""
__version__ = "1.2.11"
__author__ = u"Laurent LAPORTE <[email protected]>"
__date__ = "unreleased"
__credits__ = "(c) Laurent LAPORTE"
from deprecat... | Update :mod:`deprecated` metadata: add ``__author__``, ``__date__`` and ``__credits__``. | Update :mod:`deprecated` metadata: add ``__author__``, ``__date__`` and ``__credits__``.
| Python | mit | tantale/deprecated | # -*- coding: utf-8 -*-
"""
Deprecated Library
==================
Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.
"""
#: Module Version Number, see `PEP 396 <https://www.python.org/dev/peps/pep-0396/>`_.
__version__ = "1.2.11"
from deprecated.classic import deprecated
Update ... | # -*- coding: utf-8 -*-
"""
Deprecated Library
==================
Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.
"""
__version__ = "1.2.11"
__author__ = u"Laurent LAPORTE <[email protected]>"
__date__ = "unreleased"
__credits__ = "(c) Laurent LAPORTE"
from deprecat... | <commit_before># -*- coding: utf-8 -*-
"""
Deprecated Library
==================
Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.
"""
#: Module Version Number, see `PEP 396 <https://www.python.org/dev/peps/pep-0396/>`_.
__version__ = "1.2.11"
from deprecated.classic import dep... | # -*- coding: utf-8 -*-
"""
Deprecated Library
==================
Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.
"""
__version__ = "1.2.11"
__author__ = u"Laurent LAPORTE <[email protected]>"
__date__ = "unreleased"
__credits__ = "(c) Laurent LAPORTE"
from deprecat... | # -*- coding: utf-8 -*-
"""
Deprecated Library
==================
Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.
"""
#: Module Version Number, see `PEP 396 <https://www.python.org/dev/peps/pep-0396/>`_.
__version__ = "1.2.11"
from deprecated.classic import deprecated
Update ... | <commit_before># -*- coding: utf-8 -*-
"""
Deprecated Library
==================
Python ``@deprecated`` decorator to deprecate old python classes, functions or methods.
"""
#: Module Version Number, see `PEP 396 <https://www.python.org/dev/peps/pep-0396/>`_.
__version__ = "1.2.11"
from deprecated.classic import dep... |
9307908f5a5816c709faf034958a8d737dc21078 | tests/test_api.py | tests/test_api.py | import os
import sys
import json
import responses
import unittest
CWD = os.path.dirname(os.path.abspath(__file__))
MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Allow import of api.py
if os.path.join(MS_WD, 'utils') not in sys.path:
sys.path.insert(0, os.path.join(MS_WD, 'utils'))
# Use mu... | import os
import sys
import json
import responses
import unittest
CWD = os.path.dirname(os.path.abspath(__file__))
MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Allow import of api.py
if os.path.join(MS_WD, 'utils') not in sys.path:
sys.path.insert(0, os.path.join(MS_WD, 'utils'))
if os.pa... | Add unit test for newly initialized db | Add unit test for newly initialized db
| Python | mpl-2.0 | mitre/multiscanner,mitre/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,MITRECND/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,MITRECND/multiscanner,awest1339/multiscanner | import os
import sys
import json
import responses
import unittest
CWD = os.path.dirname(os.path.abspath(__file__))
MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Allow import of api.py
if os.path.join(MS_WD, 'utils') not in sys.path:
sys.path.insert(0, os.path.join(MS_WD, 'utils'))
# Use mu... | import os
import sys
import json
import responses
import unittest
CWD = os.path.dirname(os.path.abspath(__file__))
MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Allow import of api.py
if os.path.join(MS_WD, 'utils') not in sys.path:
sys.path.insert(0, os.path.join(MS_WD, 'utils'))
if os.pa... | <commit_before>import os
import sys
import json
import responses
import unittest
CWD = os.path.dirname(os.path.abspath(__file__))
MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Allow import of api.py
if os.path.join(MS_WD, 'utils') not in sys.path:
sys.path.insert(0, os.path.join(MS_WD, 'ut... | import os
import sys
import json
import responses
import unittest
CWD = os.path.dirname(os.path.abspath(__file__))
MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Allow import of api.py
if os.path.join(MS_WD, 'utils') not in sys.path:
sys.path.insert(0, os.path.join(MS_WD, 'utils'))
if os.pa... | import os
import sys
import json
import responses
import unittest
CWD = os.path.dirname(os.path.abspath(__file__))
MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Allow import of api.py
if os.path.join(MS_WD, 'utils') not in sys.path:
sys.path.insert(0, os.path.join(MS_WD, 'utils'))
# Use mu... | <commit_before>import os
import sys
import json
import responses
import unittest
CWD = os.path.dirname(os.path.abspath(__file__))
MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Allow import of api.py
if os.path.join(MS_WD, 'utils') not in sys.path:
sys.path.insert(0, os.path.join(MS_WD, 'ut... |
0f74660466392f3183b01ae0598e5081f112654a | binder/jupyter_notebook_config.py | binder/jupyter_notebook_config.py | lab_command = ' '.join([
'jupyter',
'lab',
'--dev-mode',
'--debug',
'--no-browser',
'--port={port}',
'--ServerApp.ip=127.0.0.1',
'--ServerApp.token=""',
'--ServerApp.base_url={base_url}lab-dev',
# Disable dns rebinding protection here, since our 'Host' header
# is not going t... | lab_command = ' '.join([
'jupyter',
'lab',
'--dev-mode',
'--debug',
'--extensions-in-dev-mode',
'--no-browser',
'--port={port}',
'--ServerApp.ip=127.0.0.1',
'--ServerApp.token=""',
'--ServerApp.base_url={base_url}lab-dev',
# Disable dns rebinding protection here, since our 'H... | Add --extensions-in-dev-mode to the Binder dev mode | Add --extensions-in-dev-mode to the Binder dev mode
| Python | bsd-3-clause | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | lab_command = ' '.join([
'jupyter',
'lab',
'--dev-mode',
'--debug',
'--no-browser',
'--port={port}',
'--ServerApp.ip=127.0.0.1',
'--ServerApp.token=""',
'--ServerApp.base_url={base_url}lab-dev',
# Disable dns rebinding protection here, since our 'Host' header
# is not going t... | lab_command = ' '.join([
'jupyter',
'lab',
'--dev-mode',
'--debug',
'--extensions-in-dev-mode',
'--no-browser',
'--port={port}',
'--ServerApp.ip=127.0.0.1',
'--ServerApp.token=""',
'--ServerApp.base_url={base_url}lab-dev',
# Disable dns rebinding protection here, since our 'H... | <commit_before>lab_command = ' '.join([
'jupyter',
'lab',
'--dev-mode',
'--debug',
'--no-browser',
'--port={port}',
'--ServerApp.ip=127.0.0.1',
'--ServerApp.token=""',
'--ServerApp.base_url={base_url}lab-dev',
# Disable dns rebinding protection here, since our 'Host' header
#... | lab_command = ' '.join([
'jupyter',
'lab',
'--dev-mode',
'--debug',
'--extensions-in-dev-mode',
'--no-browser',
'--port={port}',
'--ServerApp.ip=127.0.0.1',
'--ServerApp.token=""',
'--ServerApp.base_url={base_url}lab-dev',
# Disable dns rebinding protection here, since our 'H... | lab_command = ' '.join([
'jupyter',
'lab',
'--dev-mode',
'--debug',
'--no-browser',
'--port={port}',
'--ServerApp.ip=127.0.0.1',
'--ServerApp.token=""',
'--ServerApp.base_url={base_url}lab-dev',
# Disable dns rebinding protection here, since our 'Host' header
# is not going t... | <commit_before>lab_command = ' '.join([
'jupyter',
'lab',
'--dev-mode',
'--debug',
'--no-browser',
'--port={port}',
'--ServerApp.ip=127.0.0.1',
'--ServerApp.token=""',
'--ServerApp.base_url={base_url}lab-dev',
# Disable dns rebinding protection here, since our 'Host' header
#... |
599b0524d4228b41990c0b4e00106660589160c2 | processrunner/runcommand.py | processrunner/runcommand.py | # -*- coding: utf-8 -*-
import sys
from .processrunner import ProcessRunner
from .writeout import writeOut
def runCommand(command, outputPrefix="ProcessRunner> "):
"""Easy invocation of a command with default IO streams
Args:
command (list): List of strings to pass to subprocess.Popen
Kwargs:
... | # -*- coding: utf-8 -*-
import sys
from .processrunner import ProcessRunner
from .writeout import writeOut
def runCommand(command, outputPrefix="ProcessRunner> ", returnAllContent=False):
"""Easy invocation of a command with default IO streams
returnAllContent as False (default):
Args:
command ... | Expand use for returning both exit code + content | runCommand: Expand use for returning both exit code + content
| Python | mit | arobb/python-processrunner,arobb/python-processrunner | # -*- coding: utf-8 -*-
import sys
from .processrunner import ProcessRunner
from .writeout import writeOut
def runCommand(command, outputPrefix="ProcessRunner> "):
"""Easy invocation of a command with default IO streams
Args:
command (list): List of strings to pass to subprocess.Popen
Kwargs:
... | # -*- coding: utf-8 -*-
import sys
from .processrunner import ProcessRunner
from .writeout import writeOut
def runCommand(command, outputPrefix="ProcessRunner> ", returnAllContent=False):
"""Easy invocation of a command with default IO streams
returnAllContent as False (default):
Args:
command ... | <commit_before># -*- coding: utf-8 -*-
import sys
from .processrunner import ProcessRunner
from .writeout import writeOut
def runCommand(command, outputPrefix="ProcessRunner> "):
"""Easy invocation of a command with default IO streams
Args:
command (list): List of strings to pass to subprocess.Popen... | # -*- coding: utf-8 -*-
import sys
from .processrunner import ProcessRunner
from .writeout import writeOut
def runCommand(command, outputPrefix="ProcessRunner> ", returnAllContent=False):
"""Easy invocation of a command with default IO streams
returnAllContent as False (default):
Args:
command ... | # -*- coding: utf-8 -*-
import sys
from .processrunner import ProcessRunner
from .writeout import writeOut
def runCommand(command, outputPrefix="ProcessRunner> "):
"""Easy invocation of a command with default IO streams
Args:
command (list): List of strings to pass to subprocess.Popen
Kwargs:
... | <commit_before># -*- coding: utf-8 -*-
import sys
from .processrunner import ProcessRunner
from .writeout import writeOut
def runCommand(command, outputPrefix="ProcessRunner> "):
"""Easy invocation of a command with default IO streams
Args:
command (list): List of strings to pass to subprocess.Popen... |
10f931ab6831f9fb403912a0d0d357d35561d099 | subliminal/__init__.py | subliminal/__init__.py | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <[email protected]>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <[email protected]>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | Add some core components to subliminal | Add some core components to subliminal
| Python | mit | ofir123/subliminal,fernandog/subliminal,neo1691/subliminal,nvbn/subliminal,bogdal/subliminal,ravselj/subliminal,SickRage/subliminal,oxan/subliminal,t4lwh/subliminal,Elettronik/subliminal,kbkailashbagaria/subliminal,juanmhidalgo/subliminal,hpsbranco/subliminal,h3llrais3r/subliminal,ratoaq2/subliminal,getzze/subliminal,D... | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <[email protected]>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <[email protected]>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <[email protected]>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; eith... | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <[email protected]>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <[email protected]>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | <commit_before># -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <[email protected]>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; eith... |
f0dde60a20bbbf750f6833c624c0c5bf20c7ac9c | tests/hazmat/bindings/test_utils.py | tests/hazmat/bindings/test_utils.py | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | Update test for new API | Update test for new API
| Python | bsd-3-clause | bwhmather/cryptography,Ayrx/cryptography,kimvais/cryptography,skeuomorf/cryptography,Ayrx/cryptography,skeuomorf/cryptography,Hasimir/cryptography,kimvais/cryptography,kimvais/cryptography,sholsapp/cryptography,skeuomorf/cryptography,Hasimir/cryptography,Ayrx/cryptography,sholsapp/cryptography,Hasimir/cryptography,Ayrx... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distri... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distri... |
fe97ed6d7e7155e974f229235c509b32523d4117 | unit/anon_spec.py | unit/anon_spec.py | from tryp import __
from tryp.test import Spec # type: ignore
class Inner:
def __init__(self, z) -> None:
self.z = z
@property
def wrap(self):
return Inner(self.z * 2)
def add(self, a, b):
return self.z + a + b
class Outer:
def inner(self, z):
return Inner(z)... | from tryp import __
from tryp.test import Spec # type: ignore
class _Inner:
def __init__(self, z) -> None:
self.z = z
@property
def wrap(self):
return _Inner(self.z * 2)
def add(self, a, b):
return self.z + a + b
class _Outer:
def inner(self, z):
return _Inne... | Hide test classes for AnonFunc from spec | Hide test classes for AnonFunc from spec
| Python | mit | tek/amino | from tryp import __
from tryp.test import Spec # type: ignore
class Inner:
def __init__(self, z) -> None:
self.z = z
@property
def wrap(self):
return Inner(self.z * 2)
def add(self, a, b):
return self.z + a + b
class Outer:
def inner(self, z):
return Inner(z)... | from tryp import __
from tryp.test import Spec # type: ignore
class _Inner:
def __init__(self, z) -> None:
self.z = z
@property
def wrap(self):
return _Inner(self.z * 2)
def add(self, a, b):
return self.z + a + b
class _Outer:
def inner(self, z):
return _Inne... | <commit_before>from tryp import __
from tryp.test import Spec # type: ignore
class Inner:
def __init__(self, z) -> None:
self.z = z
@property
def wrap(self):
return Inner(self.z * 2)
def add(self, a, b):
return self.z + a + b
class Outer:
def inner(self, z):
... | from tryp import __
from tryp.test import Spec # type: ignore
class _Inner:
def __init__(self, z) -> None:
self.z = z
@property
def wrap(self):
return _Inner(self.z * 2)
def add(self, a, b):
return self.z + a + b
class _Outer:
def inner(self, z):
return _Inne... | from tryp import __
from tryp.test import Spec # type: ignore
class Inner:
def __init__(self, z) -> None:
self.z = z
@property
def wrap(self):
return Inner(self.z * 2)
def add(self, a, b):
return self.z + a + b
class Outer:
def inner(self, z):
return Inner(z)... | <commit_before>from tryp import __
from tryp.test import Spec # type: ignore
class Inner:
def __init__(self, z) -> None:
self.z = z
@property
def wrap(self):
return Inner(self.z * 2)
def add(self, a, b):
return self.z + a + b
class Outer:
def inner(self, z):
... |
801c370ce88b3b2689da5890ebf09bae533089f4 | tob-api/tob_api/hyperledger_indy.py | tob-api/tob_api/hyperledger_indy.py | import os
import platform
def config():
genesis_txn_path = "/opt/app-root/genesis"
platform_name = platform.system()
if platform_name == "Windows":
genesis_txn_path = os.path.realpath("./app-root/genesis")
return {
"genesis_txn_path": genesis_txn_path,
}
| import os
import platform
import requests
from pathlib import Path
def getGenesisData():
"""
Get a copy of the genesis transaction file from the web.
"""
genesisUrl = os.getenv('GENESIS_URL', 'http://138.197.170.136/genesis').lower()
response = requests.get(genesisUrl)
return response.text
def... | Add support for downloading the genesis transaction file. | Add support for downloading the genesis transaction file.
| Python | apache-2.0 | swcurran/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,WadeBarnes/TheOrgBook | import os
import platform
def config():
genesis_txn_path = "/opt/app-root/genesis"
platform_name = platform.system()
if platform_name == "Windows":
genesis_txn_path = os.path.realpath("./app-root/genesis")
return {
"genesis_txn_path": genesis_txn_path,
}
Add support for downloa... | import os
import platform
import requests
from pathlib import Path
def getGenesisData():
"""
Get a copy of the genesis transaction file from the web.
"""
genesisUrl = os.getenv('GENESIS_URL', 'http://138.197.170.136/genesis').lower()
response = requests.get(genesisUrl)
return response.text
def... | <commit_before>import os
import platform
def config():
genesis_txn_path = "/opt/app-root/genesis"
platform_name = platform.system()
if platform_name == "Windows":
genesis_txn_path = os.path.realpath("./app-root/genesis")
return {
"genesis_txn_path": genesis_txn_path,
}
<commit_... | import os
import platform
import requests
from pathlib import Path
def getGenesisData():
"""
Get a copy of the genesis transaction file from the web.
"""
genesisUrl = os.getenv('GENESIS_URL', 'http://138.197.170.136/genesis').lower()
response = requests.get(genesisUrl)
return response.text
def... | import os
import platform
def config():
genesis_txn_path = "/opt/app-root/genesis"
platform_name = platform.system()
if platform_name == "Windows":
genesis_txn_path = os.path.realpath("./app-root/genesis")
return {
"genesis_txn_path": genesis_txn_path,
}
Add support for downloa... | <commit_before>import os
import platform
def config():
genesis_txn_path = "/opt/app-root/genesis"
platform_name = platform.system()
if platform_name == "Windows":
genesis_txn_path = os.path.realpath("./app-root/genesis")
return {
"genesis_txn_path": genesis_txn_path,
}
<commit_... |
d4a1a75407610caaad769c26131f7d34ef977a70 | flocker/ca/test/test_validation.py | flocker/ca/test/test_validation.py | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Test validation of keys generated by flocker-ca.
"""
from twisted.trial.unittest import SynchronousTestCase
from .. import amp_server_context_factory, rest_api_context_factory
from ..testtools import get_credential_sets
class ClientValidationContextFact... | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Test validation of keys generated by flocker-ca.
"""
from twisted.trial.unittest import SynchronousTestCase
from .. import amp_server_context_factory, rest_api_context_factory
from ..testtools import get_credential_sets
class ClientValidationContextFact... | Address review comment: More standard assertions. | Address review comment: More standard assertions.
| Python | apache-2.0 | hackday-profilers/flocker,achanda/flocker,mbrukman/flocker,LaynePeng/flocker,achanda/flocker,1d4Nf6/flocker,hackday-profilers/flocker,wallnerryan/flocker-profiles,LaynePeng/flocker,hackday-profilers/flocker,mbrukman/flocker,moypray/flocker,moypray/flocker,mbrukman/flocker,agonzalezro/flocker,Azulinho/flocker,wallnerrya... | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Test validation of keys generated by flocker-ca.
"""
from twisted.trial.unittest import SynchronousTestCase
from .. import amp_server_context_factory, rest_api_context_factory
from ..testtools import get_credential_sets
class ClientValidationContextFact... | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Test validation of keys generated by flocker-ca.
"""
from twisted.trial.unittest import SynchronousTestCase
from .. import amp_server_context_factory, rest_api_context_factory
from ..testtools import get_credential_sets
class ClientValidationContextFact... | <commit_before># Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Test validation of keys generated by flocker-ca.
"""
from twisted.trial.unittest import SynchronousTestCase
from .. import amp_server_context_factory, rest_api_context_factory
from ..testtools import get_credential_sets
class ClientValida... | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Test validation of keys generated by flocker-ca.
"""
from twisted.trial.unittest import SynchronousTestCase
from .. import amp_server_context_factory, rest_api_context_factory
from ..testtools import get_credential_sets
class ClientValidationContextFact... | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Test validation of keys generated by flocker-ca.
"""
from twisted.trial.unittest import SynchronousTestCase
from .. import amp_server_context_factory, rest_api_context_factory
from ..testtools import get_credential_sets
class ClientValidationContextFact... | <commit_before># Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Test validation of keys generated by flocker-ca.
"""
from twisted.trial.unittest import SynchronousTestCase
from .. import amp_server_context_factory, rest_api_context_factory
from ..testtools import get_credential_sets
class ClientValida... |
2fead2caae3ff0e021ebfd9f14a04c8ca142c86f | blimp/users/authentication.py | blimp/users/authentication.py | from rest_framework import exceptions
from rest_framework_jwt.settings import api_settings
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
try:
from django.contrib.auth import get_user_model
except ImportError: # Django < 1.5
from django.contrib.auth.models import User
else:
User ... | from rest_framework import exceptions
from rest_framework_jwt.settings import api_settings
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
from .models import User
jwt_decode_handler = api_settings.JWT_DECODE_HANDLER
class JWTAuthentication(JSONWebTokenAuthentication):
def authenticate... | Remove unused user model import handling | Remove unused user model import handling | Python | agpl-3.0 | jessamynsmith/boards-backend,GetBlimp/boards-backend,jessamynsmith/boards-backend | from rest_framework import exceptions
from rest_framework_jwt.settings import api_settings
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
try:
from django.contrib.auth import get_user_model
except ImportError: # Django < 1.5
from django.contrib.auth.models import User
else:
User ... | from rest_framework import exceptions
from rest_framework_jwt.settings import api_settings
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
from .models import User
jwt_decode_handler = api_settings.JWT_DECODE_HANDLER
class JWTAuthentication(JSONWebTokenAuthentication):
def authenticate... | <commit_before>from rest_framework import exceptions
from rest_framework_jwt.settings import api_settings
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
try:
from django.contrib.auth import get_user_model
except ImportError: # Django < 1.5
from django.contrib.auth.models import User
... | from rest_framework import exceptions
from rest_framework_jwt.settings import api_settings
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
from .models import User
jwt_decode_handler = api_settings.JWT_DECODE_HANDLER
class JWTAuthentication(JSONWebTokenAuthentication):
def authenticate... | from rest_framework import exceptions
from rest_framework_jwt.settings import api_settings
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
try:
from django.contrib.auth import get_user_model
except ImportError: # Django < 1.5
from django.contrib.auth.models import User
else:
User ... | <commit_before>from rest_framework import exceptions
from rest_framework_jwt.settings import api_settings
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
try:
from django.contrib.auth import get_user_model
except ImportError: # Django < 1.5
from django.contrib.auth.models import User
... |
8a5d52d388183000af4472afa47db1ddcec96331 | byceps/application_factory.py | byceps/application_factory.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
application factory
~~~~~~~~~~~~~~~~~~~
Create and initialize the application using a configuration specified by
an environment variable.
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from .application import create_... | # -*- coding: utf-8 -*-
"""
application factory
~~~~~~~~~~~~~~~~~~~
Create and initialize the application using a configuration specified by
an environment variable.
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from .application import create_app, init_app
from .ut... | Remove unnecessary shebang line from module | Remove unnecessary shebang line from module
| Python | bsd-3-clause | homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
application factory
~~~~~~~~~~~~~~~~~~~
Create and initialize the application using a configuration specified by
an environment variable.
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from .application import create_... | # -*- coding: utf-8 -*-
"""
application factory
~~~~~~~~~~~~~~~~~~~
Create and initialize the application using a configuration specified by
an environment variable.
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from .application import create_app, init_app
from .ut... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
application factory
~~~~~~~~~~~~~~~~~~~
Create and initialize the application using a configuration specified by
an environment variable.
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from .application... | # -*- coding: utf-8 -*-
"""
application factory
~~~~~~~~~~~~~~~~~~~
Create and initialize the application using a configuration specified by
an environment variable.
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from .application import create_app, init_app
from .ut... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
application factory
~~~~~~~~~~~~~~~~~~~
Create and initialize the application using a configuration specified by
an environment variable.
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from .application import create_... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
application factory
~~~~~~~~~~~~~~~~~~~
Create and initialize the application using a configuration specified by
an environment variable.
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from .application... |
4e28e43fea2eaa08006eeb4d70159c8ebd3c83b4 | flask_uploads/__init__.py | flask_uploads/__init__.py | import loaders
loader = loaders.Lazy(
'%s.models' % __name__,
('Upload',)
)
import extensions
from .functions import (
delete,
save,
save_file,
save_images,
)
from .models import Upload
def init(db, Storage, resizer=None):
extensions.db = db
extensions.resizer = resizer
extensions... | import loaders
loader = loaders.Lazy(
'%s.models' % __name__,
('Upload',)
)
import extensions
from .functions import (
delete,
save,
save_file,
save_images,
)
from .models import Upload
def init(db, Storage, resizer=None):
if 'upload' in db.metadata.tables:
return # Already regis... | Make sure model isn't added several times. | Make sure model isn't added several times.
| Python | mit | FelixLoether/flask-uploads,FelixLoether/flask-image-upload-thing | import loaders
loader = loaders.Lazy(
'%s.models' % __name__,
('Upload',)
)
import extensions
from .functions import (
delete,
save,
save_file,
save_images,
)
from .models import Upload
def init(db, Storage, resizer=None):
extensions.db = db
extensions.resizer = resizer
extensions... | import loaders
loader = loaders.Lazy(
'%s.models' % __name__,
('Upload',)
)
import extensions
from .functions import (
delete,
save,
save_file,
save_images,
)
from .models import Upload
def init(db, Storage, resizer=None):
if 'upload' in db.metadata.tables:
return # Already regis... | <commit_before>import loaders
loader = loaders.Lazy(
'%s.models' % __name__,
('Upload',)
)
import extensions
from .functions import (
delete,
save,
save_file,
save_images,
)
from .models import Upload
def init(db, Storage, resizer=None):
extensions.db = db
extensions.resizer = resizer... | import loaders
loader = loaders.Lazy(
'%s.models' % __name__,
('Upload',)
)
import extensions
from .functions import (
delete,
save,
save_file,
save_images,
)
from .models import Upload
def init(db, Storage, resizer=None):
if 'upload' in db.metadata.tables:
return # Already regis... | import loaders
loader = loaders.Lazy(
'%s.models' % __name__,
('Upload',)
)
import extensions
from .functions import (
delete,
save,
save_file,
save_images,
)
from .models import Upload
def init(db, Storage, resizer=None):
extensions.db = db
extensions.resizer = resizer
extensions... | <commit_before>import loaders
loader = loaders.Lazy(
'%s.models' % __name__,
('Upload',)
)
import extensions
from .functions import (
delete,
save,
save_file,
save_images,
)
from .models import Upload
def init(db, Storage, resizer=None):
extensions.db = db
extensions.resizer = resizer... |
f25f08625d369d7737516971256140af26015235 | astropy/timeseries/io/__init__.py | astropy/timeseries/io/__init__.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from . import kepler
| # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .kepler import *
| Make sure I/O functions appear in API docs | Make sure I/O functions appear in API docs
| Python | bsd-3-clause | bsipocz/astropy,dhomeier/astropy,StuartLittlefair/astropy,MSeifert04/astropy,bsipocz/astropy,mhvk/astropy,dhomeier/astropy,stargaser/astropy,lpsinger/astropy,pllim/astropy,lpsinger/astropy,StuartLittlefair/astropy,mhvk/astropy,stargaser/astropy,MSeifert04/astropy,MSeifert04/astropy,larrybradley/astropy,dhomeier/astropy... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from . import kepler
Make sure I/O functions appear in API docs | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .kepler import *
| <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
from . import kepler
<commit_msg>Make sure I/O functions appear in API docs<commit_after> | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .kepler import *
| # Licensed under a 3-clause BSD style license - see LICENSE.rst
from . import kepler
Make sure I/O functions appear in API docs# Licensed under a 3-clause BSD style license - see LICENSE.rst
from .kepler import *
| <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
from . import kepler
<commit_msg>Make sure I/O functions appear in API docs<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst
from .kepler import *
|
8e8a4360124a033ad3c5bd26bfe2b3896155f25a | tests/TestDBControl.py | tests/TestDBControl.py | import unittest
from blo.DBControl import DBControl
class TestDBControl(unittest.TestCase):
pass | import unittest
from pathlib import Path
from blo.DBControl import DBControl
class TestDBControlOnMemory(unittest.TestCase):
def setUp(self):
self.db_control = DBControl()
def test_initializer_for_file(self):
file_path = "./test.sqlite"
self.db_control.close_connect()
self.db_... | Add test pattern of initializer for file. | Add test pattern of initializer for file.
| Python | mit | 10nin/blo,10nin/blo | import unittest
from blo.DBControl import DBControl
class TestDBControl(unittest.TestCase):
passAdd test pattern of initializer for file. | import unittest
from pathlib import Path
from blo.DBControl import DBControl
class TestDBControlOnMemory(unittest.TestCase):
def setUp(self):
self.db_control = DBControl()
def test_initializer_for_file(self):
file_path = "./test.sqlite"
self.db_control.close_connect()
self.db_... | <commit_before>import unittest
from blo.DBControl import DBControl
class TestDBControl(unittest.TestCase):
pass<commit_msg>Add test pattern of initializer for file.<commit_after> | import unittest
from pathlib import Path
from blo.DBControl import DBControl
class TestDBControlOnMemory(unittest.TestCase):
def setUp(self):
self.db_control = DBControl()
def test_initializer_for_file(self):
file_path = "./test.sqlite"
self.db_control.close_connect()
self.db_... | import unittest
from blo.DBControl import DBControl
class TestDBControl(unittest.TestCase):
passAdd test pattern of initializer for file.import unittest
from pathlib import Path
from blo.DBControl import DBControl
class TestDBControlOnMemory(unittest.TestCase):
def setUp(self):
self.db_control = DBC... | <commit_before>import unittest
from blo.DBControl import DBControl
class TestDBControl(unittest.TestCase):
pass<commit_msg>Add test pattern of initializer for file.<commit_after>import unittest
from pathlib import Path
from blo.DBControl import DBControl
class TestDBControlOnMemory(unittest.TestCase):
def s... |
0b7edca1b0f75cb0b89ae28e22287950e7591cea | dash_core_components/__init__.py | dash_core_components/__init__.py | import os
import dash as _dash
import sys as _sys
current_path = os.path.dirname(os.path.abspath(__file__))
_dash.development.component_loader.load_components(
os.path.join(current_path, '../lib/metadata.json'),
['content', 'id', 'key', 'className', 'style', 'dependencies'],
globals(),
_sys._getframe(... | import os
import dash as _dash
import sys as _sys
current_path = os.path.dirname(os.path.abspath(__file__))
_dash.development.component_loader.load_components(
os.path.join(current_path, 'metadata.json'),
['content', 'id', 'key', 'className', 'style', 'dependencies'],
globals(),
_sys._getframe(1).f_gl... | Load metadata.json from current directory | Load metadata.json from current directory
| Python | mit | plotly/dash-core-components | import os
import dash as _dash
import sys as _sys
current_path = os.path.dirname(os.path.abspath(__file__))
_dash.development.component_loader.load_components(
os.path.join(current_path, '../lib/metadata.json'),
['content', 'id', 'key', 'className', 'style', 'dependencies'],
globals(),
_sys._getframe(... | import os
import dash as _dash
import sys as _sys
current_path = os.path.dirname(os.path.abspath(__file__))
_dash.development.component_loader.load_components(
os.path.join(current_path, 'metadata.json'),
['content', 'id', 'key', 'className', 'style', 'dependencies'],
globals(),
_sys._getframe(1).f_gl... | <commit_before>import os
import dash as _dash
import sys as _sys
current_path = os.path.dirname(os.path.abspath(__file__))
_dash.development.component_loader.load_components(
os.path.join(current_path, '../lib/metadata.json'),
['content', 'id', 'key', 'className', 'style', 'dependencies'],
globals(),
... | import os
import dash as _dash
import sys as _sys
current_path = os.path.dirname(os.path.abspath(__file__))
_dash.development.component_loader.load_components(
os.path.join(current_path, 'metadata.json'),
['content', 'id', 'key', 'className', 'style', 'dependencies'],
globals(),
_sys._getframe(1).f_gl... | import os
import dash as _dash
import sys as _sys
current_path = os.path.dirname(os.path.abspath(__file__))
_dash.development.component_loader.load_components(
os.path.join(current_path, '../lib/metadata.json'),
['content', 'id', 'key', 'className', 'style', 'dependencies'],
globals(),
_sys._getframe(... | <commit_before>import os
import dash as _dash
import sys as _sys
current_path = os.path.dirname(os.path.abspath(__file__))
_dash.development.component_loader.load_components(
os.path.join(current_path, '../lib/metadata.json'),
['content', 'id', 'key', 'className', 'style', 'dependencies'],
globals(),
... |
d17b3f2da3daaea5b0a0468d231fa72ce043a6cc | game/itemsets/__init__.py | game/itemsets/__init__.py | # -*- coding: utf-8 -*-
"""
Item Sets
- ItemSet.dbc
"""
from .. import *
from ..globalstrings import *
class ItemSet(Model):
pass
class ItemSetTooltip(Tooltip):
def tooltip(self):
items = self.obj.getItems()
maxItems = len(items)
self.append("name", ITEM_SET_NAME % (self.obj.getName(), 0, maxItems), ... | # -*- coding: utf-8 -*-
"""
Item Sets
- ItemSet.dbc
"""
from .. import *
from ..globalstrings import *
class ItemSet(Model):
pass
class ItemSetTooltip(Tooltip):
def tooltip(self):
items = self.obj.getItems()
maxItems = len(items)
self.append("name", ITEM_SET_NAME % (self.obj.getName(), 0, maxItems), ... | Use spaces before the item name string in itemsets | Use spaces before the item name string in itemsets
| Python | cc0-1.0 | jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow | # -*- coding: utf-8 -*-
"""
Item Sets
- ItemSet.dbc
"""
from .. import *
from ..globalstrings import *
class ItemSet(Model):
pass
class ItemSetTooltip(Tooltip):
def tooltip(self):
items = self.obj.getItems()
maxItems = len(items)
self.append("name", ITEM_SET_NAME % (self.obj.getName(), 0, maxItems), ... | # -*- coding: utf-8 -*-
"""
Item Sets
- ItemSet.dbc
"""
from .. import *
from ..globalstrings import *
class ItemSet(Model):
pass
class ItemSetTooltip(Tooltip):
def tooltip(self):
items = self.obj.getItems()
maxItems = len(items)
self.append("name", ITEM_SET_NAME % (self.obj.getName(), 0, maxItems), ... | <commit_before># -*- coding: utf-8 -*-
"""
Item Sets
- ItemSet.dbc
"""
from .. import *
from ..globalstrings import *
class ItemSet(Model):
pass
class ItemSetTooltip(Tooltip):
def tooltip(self):
items = self.obj.getItems()
maxItems = len(items)
self.append("name", ITEM_SET_NAME % (self.obj.getName(),... | # -*- coding: utf-8 -*-
"""
Item Sets
- ItemSet.dbc
"""
from .. import *
from ..globalstrings import *
class ItemSet(Model):
pass
class ItemSetTooltip(Tooltip):
def tooltip(self):
items = self.obj.getItems()
maxItems = len(items)
self.append("name", ITEM_SET_NAME % (self.obj.getName(), 0, maxItems), ... | # -*- coding: utf-8 -*-
"""
Item Sets
- ItemSet.dbc
"""
from .. import *
from ..globalstrings import *
class ItemSet(Model):
pass
class ItemSetTooltip(Tooltip):
def tooltip(self):
items = self.obj.getItems()
maxItems = len(items)
self.append("name", ITEM_SET_NAME % (self.obj.getName(), 0, maxItems), ... | <commit_before># -*- coding: utf-8 -*-
"""
Item Sets
- ItemSet.dbc
"""
from .. import *
from ..globalstrings import *
class ItemSet(Model):
pass
class ItemSetTooltip(Tooltip):
def tooltip(self):
items = self.obj.getItems()
maxItems = len(items)
self.append("name", ITEM_SET_NAME % (self.obj.getName(),... |
9cc09cc388d4bb9d503375083501ce566b57b65f | backend/io/connectors/Tellstick.py | backend/io/connectors/Tellstick.py | import os
import socket
import tftpy
import time
from RAXA.settings import PROJECT_ROOT
from backend.io.connector import Connector
class Tellstick(Connector):
TYPE = 'Tellstick'
def is_usable(self):
return self.connector.version.startswith('RAXA')
def update(self):
s = socket.socket(sock... | import os
import socket
import time
from RAXA.settings import PROJECT_ROOT
from backend.io.connector import Connector
class Tellstick(Connector):
TYPE = 'Tellstick'
def is_usable(self):
return self.connector.version.startswith('RAXA')
def update(self):
s = socket.socket(socket.AF_INET, s... | Fix unused import which could creates crashes | Fix unused import which could creates crashes
| Python | agpl-3.0 | Pajn/RAXA-Django,Pajn/RAXA-Django | import os
import socket
import tftpy
import time
from RAXA.settings import PROJECT_ROOT
from backend.io.connector import Connector
class Tellstick(Connector):
TYPE = 'Tellstick'
def is_usable(self):
return self.connector.version.startswith('RAXA')
def update(self):
s = socket.socket(sock... | import os
import socket
import time
from RAXA.settings import PROJECT_ROOT
from backend.io.connector import Connector
class Tellstick(Connector):
TYPE = 'Tellstick'
def is_usable(self):
return self.connector.version.startswith('RAXA')
def update(self):
s = socket.socket(socket.AF_INET, s... | <commit_before>import os
import socket
import tftpy
import time
from RAXA.settings import PROJECT_ROOT
from backend.io.connector import Connector
class Tellstick(Connector):
TYPE = 'Tellstick'
def is_usable(self):
return self.connector.version.startswith('RAXA')
def update(self):
s = soc... | import os
import socket
import time
from RAXA.settings import PROJECT_ROOT
from backend.io.connector import Connector
class Tellstick(Connector):
TYPE = 'Tellstick'
def is_usable(self):
return self.connector.version.startswith('RAXA')
def update(self):
s = socket.socket(socket.AF_INET, s... | import os
import socket
import tftpy
import time
from RAXA.settings import PROJECT_ROOT
from backend.io.connector import Connector
class Tellstick(Connector):
TYPE = 'Tellstick'
def is_usable(self):
return self.connector.version.startswith('RAXA')
def update(self):
s = socket.socket(sock... | <commit_before>import os
import socket
import tftpy
import time
from RAXA.settings import PROJECT_ROOT
from backend.io.connector import Connector
class Tellstick(Connector):
TYPE = 'Tellstick'
def is_usable(self):
return self.connector.version.startswith('RAXA')
def update(self):
s = soc... |
bf006aa3dc8ee331eccb4abd8244a134949c8cc0 | bawebauth/apps/bawebauth/fields.py | bawebauth/apps/bawebauth/fields.py | # -*- coding: utf-8 -*-
from django.db import models
class PositiveBigIntegerField(models.PositiveIntegerField):
"""Represents MySQL's unsigned BIGINT data type (works with MySQL only!)"""
empty_strings_allowed = False
def get_internal_type(self):
return "PositiveBigIntegerField"
def db_type(... | # -*- coding: utf-8 -*-
from django.db import models
class PositiveBigIntegerField(models.PositiveIntegerField):
"""Represents MySQL's unsigned BIGINT data type (works with MySQL only!)"""
empty_strings_allowed = False
def db_type(self, connection):
if connection.settings_dict['ENGINE'] == 'django... | Fix tests by removing obsolete internal field type declaration | Fix tests by removing obsolete internal field type declaration
| Python | mit | mback2k/django-bawebauth,mback2k/django-bawebauth,mback2k/django-bawebauth,mback2k/django-bawebauth | # -*- coding: utf-8 -*-
from django.db import models
class PositiveBigIntegerField(models.PositiveIntegerField):
"""Represents MySQL's unsigned BIGINT data type (works with MySQL only!)"""
empty_strings_allowed = False
def get_internal_type(self):
return "PositiveBigIntegerField"
def db_type(... | # -*- coding: utf-8 -*-
from django.db import models
class PositiveBigIntegerField(models.PositiveIntegerField):
"""Represents MySQL's unsigned BIGINT data type (works with MySQL only!)"""
empty_strings_allowed = False
def db_type(self, connection):
if connection.settings_dict['ENGINE'] == 'django... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
class PositiveBigIntegerField(models.PositiveIntegerField):
"""Represents MySQL's unsigned BIGINT data type (works with MySQL only!)"""
empty_strings_allowed = False
def get_internal_type(self):
return "PositiveBigIntegerField"
... | # -*- coding: utf-8 -*-
from django.db import models
class PositiveBigIntegerField(models.PositiveIntegerField):
"""Represents MySQL's unsigned BIGINT data type (works with MySQL only!)"""
empty_strings_allowed = False
def db_type(self, connection):
if connection.settings_dict['ENGINE'] == 'django... | # -*- coding: utf-8 -*-
from django.db import models
class PositiveBigIntegerField(models.PositiveIntegerField):
"""Represents MySQL's unsigned BIGINT data type (works with MySQL only!)"""
empty_strings_allowed = False
def get_internal_type(self):
return "PositiveBigIntegerField"
def db_type(... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
class PositiveBigIntegerField(models.PositiveIntegerField):
"""Represents MySQL's unsigned BIGINT data type (works with MySQL only!)"""
empty_strings_allowed = False
def get_internal_type(self):
return "PositiveBigIntegerField"
... |
0ca48ecf091e2194aef962e8880447b59066e462 | src/competition/api/serializers.py | src/competition/api/serializers.py | from django.contrib.auth.models import User
from rest_framework import serializers
from competition.models import Team
class TeamSerializer(serializers.ModelSerializer):
class Meta:
model = Team
fields = ('name', 'slug', 'url')
url = serializers.SerializerMethodField(read_only=True)
d... | from django.contrib.auth.models import User
from rest_framework import serializers
from competition.models import Team
class TeamSerializer(serializers.ModelSerializer):
class Meta:
model = Team
fields = ('id', 'name', 'slug', 'url')
url = serializers.SerializerMethodField(read_only=True)
... | Add team id field to API output | Add team id field to API output
| Python | bsd-3-clause | michaelwisely/django-competition,michaelwisely/django-competition,michaelwisely/django-competition | from django.contrib.auth.models import User
from rest_framework import serializers
from competition.models import Team
class TeamSerializer(serializers.ModelSerializer):
class Meta:
model = Team
fields = ('name', 'slug', 'url')
url = serializers.SerializerMethodField(read_only=True)
d... | from django.contrib.auth.models import User
from rest_framework import serializers
from competition.models import Team
class TeamSerializer(serializers.ModelSerializer):
class Meta:
model = Team
fields = ('id', 'name', 'slug', 'url')
url = serializers.SerializerMethodField(read_only=True)
... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers
from competition.models import Team
class TeamSerializer(serializers.ModelSerializer):
class Meta:
model = Team
fields = ('name', 'slug', 'url')
url = serializers.SerializerMethodField(read_on... | from django.contrib.auth.models import User
from rest_framework import serializers
from competition.models import Team
class TeamSerializer(serializers.ModelSerializer):
class Meta:
model = Team
fields = ('id', 'name', 'slug', 'url')
url = serializers.SerializerMethodField(read_only=True)
... | from django.contrib.auth.models import User
from rest_framework import serializers
from competition.models import Team
class TeamSerializer(serializers.ModelSerializer):
class Meta:
model = Team
fields = ('name', 'slug', 'url')
url = serializers.SerializerMethodField(read_only=True)
d... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers
from competition.models import Team
class TeamSerializer(serializers.ModelSerializer):
class Meta:
model = Team
fields = ('name', 'slug', 'url')
url = serializers.SerializerMethodField(read_on... |
f82fe96cf520ec2f635f34f911bc8d4ccd78d776 | mfnd/todotask.py | mfnd/todotask.py | #!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description):
"""
Initialize a to-do list task item
"""
self.description = description
self.completionStatus = 0
... | #!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description):
"""
Initialize a to-do list task item
"""
self.description = description
self.completionStatus = 0
... | Implement str method for TodoTask class | feature: Implement str method for TodoTask class
| Python | mit | mes32/mfnd | #!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description):
"""
Initialize a to-do list task item
"""
self.description = description
self.completionStatus = 0
... | #!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description):
"""
Initialize a to-do list task item
"""
self.description = description
self.completionStatus = 0
... | <commit_before>#!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description):
"""
Initialize a to-do list task item
"""
self.description = description
self.comple... | #!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description):
"""
Initialize a to-do list task item
"""
self.description = description
self.completionStatus = 0
... | #!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description):
"""
Initialize a to-do list task item
"""
self.description = description
self.completionStatus = 0
... | <commit_before>#!/usr/bin/env python3
"""
Module for tasks in the to-do list
"""
class TodoTask:
"""
Represents a task in the to-do list
"""
def __init__(self, description):
"""
Initialize a to-do list task item
"""
self.description = description
self.comple... |
688292246b9db3eb0aa5be752612ae2df2fcff67 | tools/tests/factory_configuration/factory_configuration_test.py | tools/tests/factory_configuration/factory_configuration_test.py | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Verifies that the configuration for each BuildFactory matches its
expectation. """
import os
import sys
sys.path.append('master')
sys.path.append(... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Verifies that the configuration for each BuildFactory matches its
expectation. """
import os
import sys
buildbot_path = os.path.join(os.path.abspa... | Update factory configuration test to work independently of working directory | Update factory configuration test to work independently of working directory
(SkipBuildbotRuns)
[email protected]
Review URL: https://codereview.chromium.org/15317003
git-svn-id: 32fc27f4dcfb6c0385cd9719852b95fe6680452d@9186 2bbb7eff-a529-9590-31e7-b0007b416f81
| Python | bsd-3-clause | Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Ti... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Verifies that the configuration for each BuildFactory matches its
expectation. """
import os
import sys
sys.path.append('master')
sys.path.append(... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Verifies that the configuration for each BuildFactory matches its
expectation. """
import os
import sys
buildbot_path = os.path.join(os.path.abspa... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Verifies that the configuration for each BuildFactory matches its
expectation. """
import os
import sys
sys.path.append('master')
s... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Verifies that the configuration for each BuildFactory matches its
expectation. """
import os
import sys
buildbot_path = os.path.join(os.path.abspa... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Verifies that the configuration for each BuildFactory matches its
expectation. """
import os
import sys
sys.path.append('master')
sys.path.append(... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Verifies that the configuration for each BuildFactory matches its
expectation. """
import os
import sys
sys.path.append('master')
s... |
fc3f2e2f9fdf8a19756bbf8b5bd1442b71ac3a87 | scrapi/settings/__init__.py | scrapi/settings/__init__.py | import logging
from raven import Client
from fluent import sender
from raven.contrib.celery import register_signal
from scrapi.settings.defaults import *
from scrapi.settings.local import *
logging.basicConfig(level=logging.INFO)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(logging.WARNING... | import logging
from raven import Client
from fluent import sender
from raven.contrib.celery import register_signal
from scrapi.settings.defaults import *
from scrapi.settings.local import *
logging.basicConfig(level=logging.INFO)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(logging.WARNING... | Add new place to look for celery tasks | Add new place to look for celery tasks
| Python | apache-2.0 | CenterForOpenScience/scrapi,erinspace/scrapi,felliott/scrapi,mehanig/scrapi,fabianvf/scrapi,mehanig/scrapi,felliott/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,alexgarciac/scrapi,fabianvf/scrapi,ostwald/scrapi,icereval/scrapi | import logging
from raven import Client
from fluent import sender
from raven.contrib.celery import register_signal
from scrapi.settings.defaults import *
from scrapi.settings.local import *
logging.basicConfig(level=logging.INFO)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(logging.WARNING... | import logging
from raven import Client
from fluent import sender
from raven.contrib.celery import register_signal
from scrapi.settings.defaults import *
from scrapi.settings.local import *
logging.basicConfig(level=logging.INFO)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(logging.WARNING... | <commit_before>import logging
from raven import Client
from fluent import sender
from raven.contrib.celery import register_signal
from scrapi.settings.defaults import *
from scrapi.settings.local import *
logging.basicConfig(level=logging.INFO)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(... | import logging
from raven import Client
from fluent import sender
from raven.contrib.celery import register_signal
from scrapi.settings.defaults import *
from scrapi.settings.local import *
logging.basicConfig(level=logging.INFO)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(logging.WARNING... | import logging
from raven import Client
from fluent import sender
from raven.contrib.celery import register_signal
from scrapi.settings.defaults import *
from scrapi.settings.local import *
logging.basicConfig(level=logging.INFO)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(logging.WARNING... | <commit_before>import logging
from raven import Client
from fluent import sender
from raven.contrib.celery import register_signal
from scrapi.settings.defaults import *
from scrapi.settings.local import *
logging.basicConfig(level=logging.INFO)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(... |
96eca23792541979e73ccb247368394cd28e9530 | Code/Native/update_module_builder.py | Code/Native/update_module_builder.py | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | Fix missing __init__ in native directory | Fix missing __init__ in native directory
| Python | mit | croxis/SpaceDrive,croxis/SpaceDrive,croxis/SpaceDrive | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | <commit_before>"""
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/Exam... | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | <commit_before>"""
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/Exam... |
e977331dff6fc4f03eef42be504ec3d747e3f9ad | sana_builder/webapp/models.py | sana_builder/webapp/models.py | from django.db import models
# Create your models here.
| from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True)
version = models.CharField(max_length=50, null=True)
owner = models.ForeignK... | Create a Procedure model and an example Page model | Create a Procedure model and an example Page model
Page only contains a foreign key to a procedure for now.
| Python | bsd-3-clause | SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder | from django.db import models
# Create your models here.
Create a Procedure model and an example Page model
Page only contains a foreign key to a procedure for now. | from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True)
version = models.CharField(max_length=50, null=True)
owner = models.ForeignK... | <commit_before>from django.db import models
# Create your models here.
<commit_msg>Create a Procedure model and an example Page model
Page only contains a foreign key to a procedure for now.<commit_after> | from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
author = models.CharField(max_length=50)
uuid = models.IntegerField(null=True)
version = models.CharField(max_length=50, null=True)
owner = models.ForeignK... | from django.db import models
# Create your models here.
Create a Procedure model and an example Page model
Page only contains a foreign key to a procedure for now.from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title = models.CharField(max_length=50)
au... | <commit_before>from django.db import models
# Create your models here.
<commit_msg>Create a Procedure model and an example Page model
Page only contains a foreign key to a procedure for now.<commit_after>from django.db import models
from django.contrib.auth.models import User
class Procedure(models.Model):
title... |
322cd948a7eef9d0af1d39de682c267094fb7324 | test.py | test.py | import li
import unittest
class LIAPITestSequence(unittest.TestCase):
def setup(self):
pass
def test_get_permits(self):
"""Returns the first 1,000 most recent permits as a list/JSON
"""
results = li.get_permits({})
self.assertEqual(type(results), list)
self.a... | import li
import unittest
class LIAPITestSequence(unittest.TestCase):
def setup(self):
pass
def test_get_permits(self):
"""Returns the first 1,000 most recent permits as a list/JSON
"""
results = li.get_permits({})
self.assertEqual(type(results), list)
self.a... | Remove used of deprecated has_key() and replace with in | Remove used of deprecated has_key() and replace with in
| Python | mit | AxisPhilly/py-li | import li
import unittest
class LIAPITestSequence(unittest.TestCase):
def setup(self):
pass
def test_get_permits(self):
"""Returns the first 1,000 most recent permits as a list/JSON
"""
results = li.get_permits({})
self.assertEqual(type(results), list)
self.a... | import li
import unittest
class LIAPITestSequence(unittest.TestCase):
def setup(self):
pass
def test_get_permits(self):
"""Returns the first 1,000 most recent permits as a list/JSON
"""
results = li.get_permits({})
self.assertEqual(type(results), list)
self.a... | <commit_before>import li
import unittest
class LIAPITestSequence(unittest.TestCase):
def setup(self):
pass
def test_get_permits(self):
"""Returns the first 1,000 most recent permits as a list/JSON
"""
results = li.get_permits({})
self.assertEqual(type(results), list)... | import li
import unittest
class LIAPITestSequence(unittest.TestCase):
def setup(self):
pass
def test_get_permits(self):
"""Returns the first 1,000 most recent permits as a list/JSON
"""
results = li.get_permits({})
self.assertEqual(type(results), list)
self.a... | import li
import unittest
class LIAPITestSequence(unittest.TestCase):
def setup(self):
pass
def test_get_permits(self):
"""Returns the first 1,000 most recent permits as a list/JSON
"""
results = li.get_permits({})
self.assertEqual(type(results), list)
self.a... | <commit_before>import li
import unittest
class LIAPITestSequence(unittest.TestCase):
def setup(self):
pass
def test_get_permits(self):
"""Returns the first 1,000 most recent permits as a list/JSON
"""
results = li.get_permits({})
self.assertEqual(type(results), list)... |
37c3e8f804b508247d3899a63c861102d76d1593 | docs/conf.py | docs/conf.py | import os
import pathlib
import sys
import toml
# Allow autodoc to import listparser.
sys.path.append(os.path.abspath("../src"))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custo... | import os
import pathlib
import sys
import toml
# Allow autodoc to import listparser.
sys.path.append(os.path.abspath("../src"))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custo... | Fix a build error reported by ReadTheDocs | Fix a build error reported by ReadTheDocs
| Python | mit | kurtmckee/listparser | import os
import pathlib
import sys
import toml
# Allow autodoc to import listparser.
sys.path.append(os.path.abspath("../src"))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custo... | import os
import pathlib
import sys
import toml
# Allow autodoc to import listparser.
sys.path.append(os.path.abspath("../src"))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custo... | <commit_before>import os
import pathlib
import sys
import toml
# Allow autodoc to import listparser.
sys.path.append(os.path.abspath("../src"))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*'... | import os
import pathlib
import sys
import toml
# Allow autodoc to import listparser.
sys.path.append(os.path.abspath("../src"))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custo... | import os
import pathlib
import sys
import toml
# Allow autodoc to import listparser.
sys.path.append(os.path.abspath("../src"))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custo... | <commit_before>import os
import pathlib
import sys
import toml
# Allow autodoc to import listparser.
sys.path.append(os.path.abspath("../src"))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*'... |
f571c0754a519f1b2aa6a7ecc4f9de2c23ce0a0c | x10d.py | x10d.py | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
from threading import Thread
import sys
def callback(event):
if event:
print("EVENT: {0.house}{0.unit}: {0.command}".format(event))
def listen(daemon):
house, unit, act = input().split()
unit = int(unit)
... | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
from threading import Thread
import sys
def callback(event):
if event:
print("EVENT: {0.house}{0.unit}: {0.command}".format(event))
def listen(daemon):
house, unit, act = input().split()
unit = int(unit)
... | Add user input to daemon | Add user input to daemon
| Python | unlicense | umbc-hackafe/x10-controller | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
from threading import Thread
import sys
def callback(event):
if event:
print("EVENT: {0.house}{0.unit}: {0.command}".format(event))
def listen(daemon):
house, unit, act = input().split()
unit = int(unit)
... | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
from threading import Thread
import sys
def callback(event):
if event:
print("EVENT: {0.house}{0.unit}: {0.command}".format(event))
def listen(daemon):
house, unit, act = input().split()
unit = int(unit)
... | <commit_before>#!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
from threading import Thread
import sys
def callback(event):
if event:
print("EVENT: {0.house}{0.unit}: {0.command}".format(event))
def listen(daemon):
house, unit, act = input().split()
unit... | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
from threading import Thread
import sys
def callback(event):
if event:
print("EVENT: {0.house}{0.unit}: {0.command}".format(event))
def listen(daemon):
house, unit, act = input().split()
unit = int(unit)
... | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
from threading import Thread
import sys
def callback(event):
if event:
print("EVENT: {0.house}{0.unit}: {0.command}".format(event))
def listen(daemon):
house, unit, act = input().split()
unit = int(unit)
... | <commit_before>#!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
from threading import Thread
import sys
def callback(event):
if event:
print("EVENT: {0.house}{0.unit}: {0.command}".format(event))
def listen(daemon):
house, unit, act = input().split()
unit... |
9a8964281bfb5af0af2128e6d26968a92b110da3 | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
import ogres
requirements = ["tensorflow>=0.10"]
version = ogres.__version__
setup(
name="ogres",
version=version,
url="https://github.com/butternutdog/ogres",
download_url="https://github.com/butternutdog/ogres/tarball/{0}".format(version),
licens... | # -*- coding: utf-8 -*-
from setuptools import setup
import ogres
requirements = [] # Requires tensorflow, but no easy install script exist
version = ogres.__version__
setup(
name="ogres",
version=version,
url="https://github.com/butternutdog/ogres",
download_url="https://github.com/butternutdog/ogres/t... | Remove tensorflow as dependency for now | Remove tensorflow as dependency for now
| Python | mit | butternutdog/ogres | # -*- coding: utf-8 -*-
from setuptools import setup
import ogres
requirements = ["tensorflow>=0.10"]
version = ogres.__version__
setup(
name="ogres",
version=version,
url="https://github.com/butternutdog/ogres",
download_url="https://github.com/butternutdog/ogres/tarball/{0}".format(version),
licens... | # -*- coding: utf-8 -*-
from setuptools import setup
import ogres
requirements = [] # Requires tensorflow, but no easy install script exist
version = ogres.__version__
setup(
name="ogres",
version=version,
url="https://github.com/butternutdog/ogres",
download_url="https://github.com/butternutdog/ogres/t... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
import ogres
requirements = ["tensorflow>=0.10"]
version = ogres.__version__
setup(
name="ogres",
version=version,
url="https://github.com/butternutdog/ogres",
download_url="https://github.com/butternutdog/ogres/tarball/{0}".format(vers... | # -*- coding: utf-8 -*-
from setuptools import setup
import ogres
requirements = [] # Requires tensorflow, but no easy install script exist
version = ogres.__version__
setup(
name="ogres",
version=version,
url="https://github.com/butternutdog/ogres",
download_url="https://github.com/butternutdog/ogres/t... | # -*- coding: utf-8 -*-
from setuptools import setup
import ogres
requirements = ["tensorflow>=0.10"]
version = ogres.__version__
setup(
name="ogres",
version=version,
url="https://github.com/butternutdog/ogres",
download_url="https://github.com/butternutdog/ogres/tarball/{0}".format(version),
licens... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
import ogres
requirements = ["tensorflow>=0.10"]
version = ogres.__version__
setup(
name="ogres",
version=version,
url="https://github.com/butternutdog/ogres",
download_url="https://github.com/butternutdog/ogres/tarball/{0}".format(vers... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.