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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eb165c0eb929b542178daea7057c258718d1ba6a | testfixtures/snippet.py | testfixtures/snippet.py | # -*- coding: utf-8 -*-
"""
testfixtures.snippet
~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.blueprints.snippet.models.snippet import \
CurrentVersionAssociation, Snippet, SnippetVersion
def create_snippet(party, name):
re... | # -*- coding: utf-8 -*-
"""
testfixtures.snippet
~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.blueprints.snippet.models.snippet import \
CurrentVersionAssociation, Snippet, SnippetVersion
def create_snippet(party, name):
re... | Set creation date via field, not via constructor | Set creation date via field, not via constructor
| Python | bsd-3-clause | m-ober/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps | # -*- coding: utf-8 -*-
"""
testfixtures.snippet
~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.blueprints.snippet.models.snippet import \
CurrentVersionAssociation, Snippet, SnippetVersion
def create_snippet(party, name):
re... | # -*- coding: utf-8 -*-
"""
testfixtures.snippet
~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.blueprints.snippet.models.snippet import \
CurrentVersionAssociation, Snippet, SnippetVersion
def create_snippet(party, name):
re... | <commit_before># -*- coding: utf-8 -*-
"""
testfixtures.snippet
~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.blueprints.snippet.models.snippet import \
CurrentVersionAssociation, Snippet, SnippetVersion
def create_snippet(party... | # -*- coding: utf-8 -*-
"""
testfixtures.snippet
~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.blueprints.snippet.models.snippet import \
CurrentVersionAssociation, Snippet, SnippetVersion
def create_snippet(party, name):
re... | # -*- coding: utf-8 -*-
"""
testfixtures.snippet
~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.blueprints.snippet.models.snippet import \
CurrentVersionAssociation, Snippet, SnippetVersion
def create_snippet(party, name):
re... | <commit_before># -*- coding: utf-8 -*-
"""
testfixtures.snippet
~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.blueprints.snippet.models.snippet import \
CurrentVersionAssociation, Snippet, SnippetVersion
def create_snippet(party... |
88b984a084385574bb420a0b81627914229f08e9 | nova/policies/quota_class_sets.py | nova/policies/quota_class_sets.py | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | Add policy description for os-quota-classes | Add policy description for os-quota-classes
This commit adds policy doc for os-quota-classes policies.
Partial implement blueprint policy-docs
Change-Id: Ic7568b77ebfaa012e4310c3c1beac68587bd19f6
| Python | apache-2.0 | rahulunair/nova,klmitch/nova,klmitch/nova,mikalstill/nova,vmturbo/nova,jianghuaw/nova,Juniper/nova,Juniper/nova,gooddata/openstack-nova,klmitch/nova,phenoxim/nova,openstack/nova,gooddata/openstack-nova,mikalstill/nova,mahak/nova,vmturbo/nova,openstack/nova,vmturbo/nova,rajalokan/nova,jianghuaw/nova,vmturbo/nova,rahulun... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | <commit_before># Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | <commit_before># Copyright 2016 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... |
c370fdfc405d1ff3dd31d9f6a589b0b795c28c55 | examples/06-list-activated-methods.py | examples/06-list-activated-methods.py | # Example: How to get the currently activated payment methods.
#
import os
from mollie.api.client import Client
from mollie.api.error import Error
def main():
try:
#
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.com/dashboard/settings/profile... | # Example: How to get the currently activated payment methods.
#
import os
from mollie.api.client import Client
from mollie.api.error import Error
def main():
try:
#
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.com/dashboard/settings/profile... | Fix typo in methods example. | Fix typo in methods example.
| Python | bsd-2-clause | mollie/mollie-api-python | # Example: How to get the currently activated payment methods.
#
import os
from mollie.api.client import Client
from mollie.api.error import Error
def main():
try:
#
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.com/dashboard/settings/profile... | # Example: How to get the currently activated payment methods.
#
import os
from mollie.api.client import Client
from mollie.api.error import Error
def main():
try:
#
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.com/dashboard/settings/profile... | <commit_before># Example: How to get the currently activated payment methods.
#
import os
from mollie.api.client import Client
from mollie.api.error import Error
def main():
try:
#
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.com/dashboard/s... | # Example: How to get the currently activated payment methods.
#
import os
from mollie.api.client import Client
from mollie.api.error import Error
def main():
try:
#
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.com/dashboard/settings/profile... | # Example: How to get the currently activated payment methods.
#
import os
from mollie.api.client import Client
from mollie.api.error import Error
def main():
try:
#
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.com/dashboard/settings/profile... | <commit_before># Example: How to get the currently activated payment methods.
#
import os
from mollie.api.client import Client
from mollie.api.error import Error
def main():
try:
#
# Initialize the Mollie API library with your API key.
#
# See: https://www.mollie.com/dashboard/s... |
1249c93696f9baa0eefefa373edcc8189802cce5 | script/blender_2cloud.py | script/blender_2cloud.py | import os
import sys
import bpy
# file loader per extension
loader_factory = {
'.obj': lambda file: bpy.ops.import_scene.obj(filepath=file, axis_forward='Y', axis_up='Z'),
'.wrl': lambda file: bpy.ops.import_scene.x3d(filepath=file, axis_forward='Y', axis_up='Z')
}
def convert(input_filename, output_filename):... | import os
import sys
import bpy
# file loader per extension
loader_factory = {
'.ply': lambda file: bpy.ops.import_mesh.ply(filepath=file),
'.stl': lambda file: bpy.ops.import_mesh.stl(filepath=file),
'.3ds': lambda file: bpy.ops.import_scene.autodesk_3ds(filepath=file, axis_forward='Y', axis_up='Z'),
'.obj'... | Add ply, stl and 3ds support to blendel_2cloud.py. | Add ply, stl and 3ds support to blendel_2cloud.py.
| Python | bsd-2-clause | jrl-umi3218/sch-creator,jrl-umi3218/sch-creator,jrl-umi3218/sch-creator | import os
import sys
import bpy
# file loader per extension
loader_factory = {
'.obj': lambda file: bpy.ops.import_scene.obj(filepath=file, axis_forward='Y', axis_up='Z'),
'.wrl': lambda file: bpy.ops.import_scene.x3d(filepath=file, axis_forward='Y', axis_up='Z')
}
def convert(input_filename, output_filename):... | import os
import sys
import bpy
# file loader per extension
loader_factory = {
'.ply': lambda file: bpy.ops.import_mesh.ply(filepath=file),
'.stl': lambda file: bpy.ops.import_mesh.stl(filepath=file),
'.3ds': lambda file: bpy.ops.import_scene.autodesk_3ds(filepath=file, axis_forward='Y', axis_up='Z'),
'.obj'... | <commit_before>import os
import sys
import bpy
# file loader per extension
loader_factory = {
'.obj': lambda file: bpy.ops.import_scene.obj(filepath=file, axis_forward='Y', axis_up='Z'),
'.wrl': lambda file: bpy.ops.import_scene.x3d(filepath=file, axis_forward='Y', axis_up='Z')
}
def convert(input_filename, ou... | import os
import sys
import bpy
# file loader per extension
loader_factory = {
'.ply': lambda file: bpy.ops.import_mesh.ply(filepath=file),
'.stl': lambda file: bpy.ops.import_mesh.stl(filepath=file),
'.3ds': lambda file: bpy.ops.import_scene.autodesk_3ds(filepath=file, axis_forward='Y', axis_up='Z'),
'.obj'... | import os
import sys
import bpy
# file loader per extension
loader_factory = {
'.obj': lambda file: bpy.ops.import_scene.obj(filepath=file, axis_forward='Y', axis_up='Z'),
'.wrl': lambda file: bpy.ops.import_scene.x3d(filepath=file, axis_forward='Y', axis_up='Z')
}
def convert(input_filename, output_filename):... | <commit_before>import os
import sys
import bpy
# file loader per extension
loader_factory = {
'.obj': lambda file: bpy.ops.import_scene.obj(filepath=file, axis_forward='Y', axis_up='Z'),
'.wrl': lambda file: bpy.ops.import_scene.x3d(filepath=file, axis_forward='Y', axis_up='Z')
}
def convert(input_filename, ou... |
a64d6f6de26302e5b8764e248c5df0a529a86343 | fireplace/cards/league/collectible.py | fireplace/cards/league/collectible.py | from ..utils import *
##
# Minions
# Obsidian Destroyer
class LOE_009:
events = OWN_TURN_END.on(Summon(CONTROLLER, "LOE_009t"))
# Sacred Trial
class LOE_027:
events = Play(OPPONENT, MINION | HERO).after(
(Count(ENEMY_MINIONS) >= 4) &
(Reveal(SELF), Destroy(Play.CARD))
)
##
# Spells
# Forgotten Torch
clas... | from ..utils import *
##
# Minions
# Obsidian Destroyer
class LOE_009:
events = OWN_TURN_END.on(Summon(CONTROLLER, "LOE_009t"))
##
# Spells
# Forgotten Torch
class LOE_002:
play = Hit(TARGET, 3), Shuffle(CONTROLLER, "LOE_002t")
class LOE_002t:
play = Hit(TARGET, 6)
# Raven Idol
class LOE_115:
choose = ("LO... | Move Sacred Trial to secret section | Move Sacred Trial to secret section
| Python | agpl-3.0 | amw2104/fireplace,jleclanche/fireplace,amw2104/fireplace,NightKev/fireplace,smallnamespace/fireplace,Ragowit/fireplace,Ragowit/fireplace,beheh/fireplace,smallnamespace/fireplace | from ..utils import *
##
# Minions
# Obsidian Destroyer
class LOE_009:
events = OWN_TURN_END.on(Summon(CONTROLLER, "LOE_009t"))
# Sacred Trial
class LOE_027:
events = Play(OPPONENT, MINION | HERO).after(
(Count(ENEMY_MINIONS) >= 4) &
(Reveal(SELF), Destroy(Play.CARD))
)
##
# Spells
# Forgotten Torch
clas... | from ..utils import *
##
# Minions
# Obsidian Destroyer
class LOE_009:
events = OWN_TURN_END.on(Summon(CONTROLLER, "LOE_009t"))
##
# Spells
# Forgotten Torch
class LOE_002:
play = Hit(TARGET, 3), Shuffle(CONTROLLER, "LOE_002t")
class LOE_002t:
play = Hit(TARGET, 6)
# Raven Idol
class LOE_115:
choose = ("LO... | <commit_before>from ..utils import *
##
# Minions
# Obsidian Destroyer
class LOE_009:
events = OWN_TURN_END.on(Summon(CONTROLLER, "LOE_009t"))
# Sacred Trial
class LOE_027:
events = Play(OPPONENT, MINION | HERO).after(
(Count(ENEMY_MINIONS) >= 4) &
(Reveal(SELF), Destroy(Play.CARD))
)
##
# Spells
# Forgo... | from ..utils import *
##
# Minions
# Obsidian Destroyer
class LOE_009:
events = OWN_TURN_END.on(Summon(CONTROLLER, "LOE_009t"))
##
# Spells
# Forgotten Torch
class LOE_002:
play = Hit(TARGET, 3), Shuffle(CONTROLLER, "LOE_002t")
class LOE_002t:
play = Hit(TARGET, 6)
# Raven Idol
class LOE_115:
choose = ("LO... | from ..utils import *
##
# Minions
# Obsidian Destroyer
class LOE_009:
events = OWN_TURN_END.on(Summon(CONTROLLER, "LOE_009t"))
# Sacred Trial
class LOE_027:
events = Play(OPPONENT, MINION | HERO).after(
(Count(ENEMY_MINIONS) >= 4) &
(Reveal(SELF), Destroy(Play.CARD))
)
##
# Spells
# Forgotten Torch
clas... | <commit_before>from ..utils import *
##
# Minions
# Obsidian Destroyer
class LOE_009:
events = OWN_TURN_END.on(Summon(CONTROLLER, "LOE_009t"))
# Sacred Trial
class LOE_027:
events = Play(OPPONENT, MINION | HERO).after(
(Count(ENEMY_MINIONS) >= 4) &
(Reveal(SELF), Destroy(Play.CARD))
)
##
# Spells
# Forgo... |
6a293fef25b5760d8b783ad0db1d00a3d5cf4e7f | packs/puppet/actions/lib/python_actions.py | packs/puppet/actions/lib/python_actions.py | from st2actions.runners.pythonrunner import Action
from lib.puppet_client import PuppetHTTPAPIClient
class PuppetBasePythonAction(Action):
def __init__(self):
super(PupperBasePythonAction, self).__init__()
self.client = self._get_client()
def _get_client(self):
master_config = self.c... | from st2actions.runners.pythonrunner import Action
from lib.puppet_client import PuppetHTTPAPIClient
class PuppetBasePythonAction(Action):
def __init__(self, config):
super(PuppetBasePythonAction, self).__init__(config=config)
self.client = self._get_client()
def _get_client(self):
m... | Update affected Puppet action constructor to take in "config" argument. | Update affected Puppet action constructor to take in "config" argument.
| Python | apache-2.0 | Aamir-raza-1/st2contrib,digideskio/st2contrib,dennybaa/st2contrib,armab/st2contrib,lmEshoo/st2contrib,armab/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,pearsontechnology/st2contrib,jtopjian/st2contrib,digideskio/st2contrib,pidah/st2contrib,tonybaloney/st2contrib,pinterb/st2contrib,StackStorm/st2contr... | from st2actions.runners.pythonrunner import Action
from lib.puppet_client import PuppetHTTPAPIClient
class PuppetBasePythonAction(Action):
def __init__(self):
super(PupperBasePythonAction, self).__init__()
self.client = self._get_client()
def _get_client(self):
master_config = self.c... | from st2actions.runners.pythonrunner import Action
from lib.puppet_client import PuppetHTTPAPIClient
class PuppetBasePythonAction(Action):
def __init__(self, config):
super(PuppetBasePythonAction, self).__init__(config=config)
self.client = self._get_client()
def _get_client(self):
m... | <commit_before>from st2actions.runners.pythonrunner import Action
from lib.puppet_client import PuppetHTTPAPIClient
class PuppetBasePythonAction(Action):
def __init__(self):
super(PupperBasePythonAction, self).__init__()
self.client = self._get_client()
def _get_client(self):
master_... | from st2actions.runners.pythonrunner import Action
from lib.puppet_client import PuppetHTTPAPIClient
class PuppetBasePythonAction(Action):
def __init__(self, config):
super(PuppetBasePythonAction, self).__init__(config=config)
self.client = self._get_client()
def _get_client(self):
m... | from st2actions.runners.pythonrunner import Action
from lib.puppet_client import PuppetHTTPAPIClient
class PuppetBasePythonAction(Action):
def __init__(self):
super(PupperBasePythonAction, self).__init__()
self.client = self._get_client()
def _get_client(self):
master_config = self.c... | <commit_before>from st2actions.runners.pythonrunner import Action
from lib.puppet_client import PuppetHTTPAPIClient
class PuppetBasePythonAction(Action):
def __init__(self):
super(PupperBasePythonAction, self).__init__()
self.client = self._get_client()
def _get_client(self):
master_... |
6023fa1fdec83c0a4568529982a69ae64801ad5f | src/cli/_actions/_pool.py | src/cli/_actions/_pool.py | """
Miscellaneous pool-level actions.
"""
from __future__ import print_function
from .._errors import StratisCliValueUnimplementedError
def create_pool(dbus_thing, namespace):
"""
Create a stratis pool.
"""
if namespace.force:
raise StratisCliValueUnimplementedError(
namespace.forc... | """
Miscellaneous pool-level actions.
"""
from __future__ import print_function
from .._errors import StratisCliValueUnimplementedError
def create_pool(dbus_thing, namespace):
"""
Create a stratis pool.
"""
if namespace.force:
raise StratisCliValueUnimplementedError(
namespace.forc... | Add some extra output for create and destroy. | Add some extra output for create and destroy.
Signed-off-by: mulhern <[email protected]>
| Python | apache-2.0 | stratis-storage/stratis-cli,stratis-storage/stratis-cli | """
Miscellaneous pool-level actions.
"""
from __future__ import print_function
from .._errors import StratisCliValueUnimplementedError
def create_pool(dbus_thing, namespace):
"""
Create a stratis pool.
"""
if namespace.force:
raise StratisCliValueUnimplementedError(
namespace.forc... | """
Miscellaneous pool-level actions.
"""
from __future__ import print_function
from .._errors import StratisCliValueUnimplementedError
def create_pool(dbus_thing, namespace):
"""
Create a stratis pool.
"""
if namespace.force:
raise StratisCliValueUnimplementedError(
namespace.forc... | <commit_before>"""
Miscellaneous pool-level actions.
"""
from __future__ import print_function
from .._errors import StratisCliValueUnimplementedError
def create_pool(dbus_thing, namespace):
"""
Create a stratis pool.
"""
if namespace.force:
raise StratisCliValueUnimplementedError(
... | """
Miscellaneous pool-level actions.
"""
from __future__ import print_function
from .._errors import StratisCliValueUnimplementedError
def create_pool(dbus_thing, namespace):
"""
Create a stratis pool.
"""
if namespace.force:
raise StratisCliValueUnimplementedError(
namespace.forc... | """
Miscellaneous pool-level actions.
"""
from __future__ import print_function
from .._errors import StratisCliValueUnimplementedError
def create_pool(dbus_thing, namespace):
"""
Create a stratis pool.
"""
if namespace.force:
raise StratisCliValueUnimplementedError(
namespace.forc... | <commit_before>"""
Miscellaneous pool-level actions.
"""
from __future__ import print_function
from .._errors import StratisCliValueUnimplementedError
def create_pool(dbus_thing, namespace):
"""
Create a stratis pool.
"""
if namespace.force:
raise StratisCliValueUnimplementedError(
... |
ee9b869f2bb43e00da7c208cc2cfc9641d631b1a | examples/canvas/repeat_texture.py | examples/canvas/repeat_texture.py | '''
Demonstrate repeating textures
==============================
This was a test to fix an issue with repeating texture and window reloading.
'''
from kivy.app import App
from kivy.uix.image import Image
from kivy.properties import ObjectProperty
from kivy.lang import Builder
kv = '''
FloatLayout:
canvas.before... | '''
Demonstrate repeating textures
==============================
This was a test to fix an issue with repeating texture and window reloading.
'''
from kivy.app import App
from kivy.uix.image import Image
from kivy.uix.label import Label
from kivy.properties import ObjectProperty, ListProperty
from kivy.lang import B... | Add background color to size message. | Add background color to size message.
Added a colored background to the label because it kept getting lost in
the white ‘K’ field. Also changed the label color to cyan for
readability.
| Python | mit | jkankiewicz/kivy,bob-the-hamster/kivy,KeyWeeUsr/kivy,LogicalDash/kivy,ernstp/kivy,yoelk/kivy,jegger/kivy,LogicalDash/kivy,darkopevec/kivy,akshayaurora/kivy,gonzafirewall/kivy,rafalo1333/kivy,thezawad/kivy,bhargav2408/kivy,aron-bordin/kivy,Cheaterman/kivy,andnovar/kivy,MiyamotoAkira/kivy,youprofit/kivy,VinGarcia/kivy,el... | '''
Demonstrate repeating textures
==============================
This was a test to fix an issue with repeating texture and window reloading.
'''
from kivy.app import App
from kivy.uix.image import Image
from kivy.properties import ObjectProperty
from kivy.lang import Builder
kv = '''
FloatLayout:
canvas.before... | '''
Demonstrate repeating textures
==============================
This was a test to fix an issue with repeating texture and window reloading.
'''
from kivy.app import App
from kivy.uix.image import Image
from kivy.uix.label import Label
from kivy.properties import ObjectProperty, ListProperty
from kivy.lang import B... | <commit_before>'''
Demonstrate repeating textures
==============================
This was a test to fix an issue with repeating texture and window reloading.
'''
from kivy.app import App
from kivy.uix.image import Image
from kivy.properties import ObjectProperty
from kivy.lang import Builder
kv = '''
FloatLayout:
... | '''
Demonstrate repeating textures
==============================
This was a test to fix an issue with repeating texture and window reloading.
'''
from kivy.app import App
from kivy.uix.image import Image
from kivy.uix.label import Label
from kivy.properties import ObjectProperty, ListProperty
from kivy.lang import B... | '''
Demonstrate repeating textures
==============================
This was a test to fix an issue with repeating texture and window reloading.
'''
from kivy.app import App
from kivy.uix.image import Image
from kivy.properties import ObjectProperty
from kivy.lang import Builder
kv = '''
FloatLayout:
canvas.before... | <commit_before>'''
Demonstrate repeating textures
==============================
This was a test to fix an issue with repeating texture and window reloading.
'''
from kivy.app import App
from kivy.uix.image import Image
from kivy.properties import ObjectProperty
from kivy.lang import Builder
kv = '''
FloatLayout:
... |
bfc7a13439114313897526ea461f404539cc3fe5 | tests/test_publisher.py | tests/test_publisher.py | import gc
import sys
import warnings
import weakref
from lektor.publisher import Command
def test_Command_triggers_no_warnings():
# This excercises the issue where publishing via rsync resulted
# in ResourceWarnings about unclosed streams.
with warnings.catch_warnings():
warnings.simplefilter("e... | import gc
import os
import sys
import warnings
import weakref
import pytest
from lektor.publisher import Command
from lektor.publisher import publish
def test_Command_triggers_no_warnings():
# This excercises the issue where publishing via rsync resulted
# in ResourceWarnings about unclosed streams.
wi... | Test that local rsync publishing works (with and w/o delete option) | Test that local rsync publishing works (with and w/o delete option)
This excercises #946
| Python | bsd-3-clause | lektor/lektor,lektor/lektor,lektor/lektor,lektor/lektor | import gc
import sys
import warnings
import weakref
from lektor.publisher import Command
def test_Command_triggers_no_warnings():
# This excercises the issue where publishing via rsync resulted
# in ResourceWarnings about unclosed streams.
with warnings.catch_warnings():
warnings.simplefilter("e... | import gc
import os
import sys
import warnings
import weakref
import pytest
from lektor.publisher import Command
from lektor.publisher import publish
def test_Command_triggers_no_warnings():
# This excercises the issue where publishing via rsync resulted
# in ResourceWarnings about unclosed streams.
wi... | <commit_before>import gc
import sys
import warnings
import weakref
from lektor.publisher import Command
def test_Command_triggers_no_warnings():
# This excercises the issue where publishing via rsync resulted
# in ResourceWarnings about unclosed streams.
with warnings.catch_warnings():
warnings.... | import gc
import os
import sys
import warnings
import weakref
import pytest
from lektor.publisher import Command
from lektor.publisher import publish
def test_Command_triggers_no_warnings():
# This excercises the issue where publishing via rsync resulted
# in ResourceWarnings about unclosed streams.
wi... | import gc
import sys
import warnings
import weakref
from lektor.publisher import Command
def test_Command_triggers_no_warnings():
# This excercises the issue where publishing via rsync resulted
# in ResourceWarnings about unclosed streams.
with warnings.catch_warnings():
warnings.simplefilter("e... | <commit_before>import gc
import sys
import warnings
import weakref
from lektor.publisher import Command
def test_Command_triggers_no_warnings():
# This excercises the issue where publishing via rsync resulted
# in ResourceWarnings about unclosed streams.
with warnings.catch_warnings():
warnings.... |
88e165ffb0ec856fcce4af57292bdb45dd6eecfc | thumbor/app.py | thumbor/app.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com [email protected]
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com [email protected]
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | Disable REST Upload by default | Disable REST Upload by default
| Python | mit | marcelometal/thumbor,Jimdo/thumbor,2947721120/thumbor,BetterCollective/thumbor,scorphus/thumbor,adeboisanger/thumbor,adeboisanger/thumbor,wking/thumbor,gselva/thumbor,davduran/thumbor,gi11es/thumbor,gselva/thumbor,camargoanderso/thumbor,camargoanderso/thumbor,abaldwin1/thumbor,wking/thumbor,gselva/thumbor,2947721120/th... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com [email protected]
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com [email protected]
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com [email protected]
import tornado.web
import tornado.ioloop
from thumbor... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com [email protected]
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com [email protected]
import tornado.web
import tornado.ioloop
from thumbor.handlers.healt... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com [email protected]
import tornado.web
import tornado.ioloop
from thumbor... |
37bb334a1c59920d92649b0cedddf62863bf6da8 | scipy/weave/tests/test_inline_tools.py | scipy/weave/tests/test_inline_tools.py | from numpy import *
from numpy.testing import *
from scipy.weave import inline_tools
class TestInline(TestCase):
""" These are long running tests...
I'd like to benchmark these things somehow.
"""
@dec.slow
def test_exceptions(self):
a = 3
code = """
if (a < 2)... | from numpy import *
from numpy.testing import *
from scipy.weave import inline_tools
class TestInline(TestCase):
""" These are long running tests...
I'd like to benchmark these things somehow.
"""
@dec.slow
def test_exceptions(self):
a = 3
code = """
if (a < 2)... | Disable weave tests that cause compilation failure, since this causes distutils to do a SystemExit, which break the test suite. | Disable weave tests that cause compilation failure, since this causes
distutils to do a SystemExit, which break the test suite.
| Python | bsd-3-clause | kalvdans/scipy,chatcannon/scipy,trankmichael/scipy,ilayn/scipy,jsilter/scipy,tylerjereddy/scipy,mikebenfield/scipy,minhlongdo/scipy,trankmichael/scipy,WillieMaddox/scipy,piyush0609/scipy,surhudm/scipy,Dapid/scipy,chatcannon/scipy,grlee77/scipy,vanpact/scipy,Kamp9/scipy,Srisai85/scipy,ilayn/scipy,dch312/scipy,chatcannon... | from numpy import *
from numpy.testing import *
from scipy.weave import inline_tools
class TestInline(TestCase):
""" These are long running tests...
I'd like to benchmark these things somehow.
"""
@dec.slow
def test_exceptions(self):
a = 3
code = """
if (a < 2)... | from numpy import *
from numpy.testing import *
from scipy.weave import inline_tools
class TestInline(TestCase):
""" These are long running tests...
I'd like to benchmark these things somehow.
"""
@dec.slow
def test_exceptions(self):
a = 3
code = """
if (a < 2)... | <commit_before>from numpy import *
from numpy.testing import *
from scipy.weave import inline_tools
class TestInline(TestCase):
""" These are long running tests...
I'd like to benchmark these things somehow.
"""
@dec.slow
def test_exceptions(self):
a = 3
code = """
... | from numpy import *
from numpy.testing import *
from scipy.weave import inline_tools
class TestInline(TestCase):
""" These are long running tests...
I'd like to benchmark these things somehow.
"""
@dec.slow
def test_exceptions(self):
a = 3
code = """
if (a < 2)... | from numpy import *
from numpy.testing import *
from scipy.weave import inline_tools
class TestInline(TestCase):
""" These are long running tests...
I'd like to benchmark these things somehow.
"""
@dec.slow
def test_exceptions(self):
a = 3
code = """
if (a < 2)... | <commit_before>from numpy import *
from numpy.testing import *
from scipy.weave import inline_tools
class TestInline(TestCase):
""" These are long running tests...
I'd like to benchmark these things somehow.
"""
@dec.slow
def test_exceptions(self):
a = 3
code = """
... |
10ea9d7e542807e064e36b5f9ce8bccd32990fb4 | app.py | app.py | import requests
from flask import Flask, render_template
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
sources = {
"bbc": "bbc-news",
"cnn": "cnn",
"hackernews": "hacker-news"
}
def create_link(source):
if source in sources.keys():
return f"https:... | import requests
from flask import Flask, render_template, request
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
sources = {
"bbc": "bbc-news",
"cnn": "cnn",
"hackernews": "hacker-news"
}
def create_link(source):
if source in sources.keys():
retur... | Use GET request arguments to determine the news source. | Use GET request arguments to determine the news source.
| Python | mit | alchermd/headlines,alchermd/headlines | import requests
from flask import Flask, render_template
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
sources = {
"bbc": "bbc-news",
"cnn": "cnn",
"hackernews": "hacker-news"
}
def create_link(source):
if source in sources.keys():
return f"https:... | import requests
from flask import Flask, render_template, request
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
sources = {
"bbc": "bbc-news",
"cnn": "cnn",
"hackernews": "hacker-news"
}
def create_link(source):
if source in sources.keys():
retur... | <commit_before>import requests
from flask import Flask, render_template
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
sources = {
"bbc": "bbc-news",
"cnn": "cnn",
"hackernews": "hacker-news"
}
def create_link(source):
if source in sources.keys():
... | import requests
from flask import Flask, render_template, request
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
sources = {
"bbc": "bbc-news",
"cnn": "cnn",
"hackernews": "hacker-news"
}
def create_link(source):
if source in sources.keys():
retur... | import requests
from flask import Flask, render_template
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
sources = {
"bbc": "bbc-news",
"cnn": "cnn",
"hackernews": "hacker-news"
}
def create_link(source):
if source in sources.keys():
return f"https:... | <commit_before>import requests
from flask import Flask, render_template
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile("appconfig.py")
sources = {
"bbc": "bbc-news",
"cnn": "cnn",
"hackernews": "hacker-news"
}
def create_link(source):
if source in sources.keys():
... |
1ca86b0d7ca23adcc6a5cb925b00d8c8925ed8cc | app.py | app.py | import sys
import asyncio
import telepot
from telepot.delegate import per_chat_id
from telepot.async.delegate import create_open
"""
$ python3.4 countera.py <token>
Count number of messages. Start over if silent for 10 seconds.
"""
class MessageCounter(telepot.helper.ChatHandler):
def __init__(self, seed_tuple, ... | """
import sys
import time
import random
import datetime
"""
import telepot
from telepot.delegate import per_chat_id, create_open
class VeryCruel(telepot.helper.ChatHandler):
def __init__(self, seed_tuple, timeout):
super(VeryCruel, self).__init__(seed_tuple,timeout)
def reply_to_serjant(self,m):
... | Rewrite bot to answer private or public messages | Rewrite bot to answer private or public messages
| Python | mit | vasua/verycruelbot | import sys
import asyncio
import telepot
from telepot.delegate import per_chat_id
from telepot.async.delegate import create_open
"""
$ python3.4 countera.py <token>
Count number of messages. Start over if silent for 10 seconds.
"""
class MessageCounter(telepot.helper.ChatHandler):
def __init__(self, seed_tuple, ... | """
import sys
import time
import random
import datetime
"""
import telepot
from telepot.delegate import per_chat_id, create_open
class VeryCruel(telepot.helper.ChatHandler):
def __init__(self, seed_tuple, timeout):
super(VeryCruel, self).__init__(seed_tuple,timeout)
def reply_to_serjant(self,m):
... | <commit_before>import sys
import asyncio
import telepot
from telepot.delegate import per_chat_id
from telepot.async.delegate import create_open
"""
$ python3.4 countera.py <token>
Count number of messages. Start over if silent for 10 seconds.
"""
class MessageCounter(telepot.helper.ChatHandler):
def __init__(sel... | """
import sys
import time
import random
import datetime
"""
import telepot
from telepot.delegate import per_chat_id, create_open
class VeryCruel(telepot.helper.ChatHandler):
def __init__(self, seed_tuple, timeout):
super(VeryCruel, self).__init__(seed_tuple,timeout)
def reply_to_serjant(self,m):
... | import sys
import asyncio
import telepot
from telepot.delegate import per_chat_id
from telepot.async.delegate import create_open
"""
$ python3.4 countera.py <token>
Count number of messages. Start over if silent for 10 seconds.
"""
class MessageCounter(telepot.helper.ChatHandler):
def __init__(self, seed_tuple, ... | <commit_before>import sys
import asyncio
import telepot
from telepot.delegate import per_chat_id
from telepot.async.delegate import create_open
"""
$ python3.4 countera.py <token>
Count number of messages. Start over if silent for 10 seconds.
"""
class MessageCounter(telepot.helper.ChatHandler):
def __init__(sel... |
0de818d8ff2aa77fc172199226aea3abffa7f3b1 | bot.py | bot.py | from discord.ext.commands import Bot
from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument
class BeattieBot(Bot):
async def reply(self, ctx, message):
return await ctx.send(f'{ctx.message.author.mention}\n{message}')
async def handle_error(self, exception, ctx):
... | from discord.ext.commands import Bot, CommandInvokeError
from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument
class BeattieBot(Bot):
async def reply(self, ctx, message):
return await ctx.send(f'{ctx.message.author.mention}\n{message}')
async def handle_error(self, ex... | Change hasattr check to isinstance check because it's faster. | Change hasattr check to isinstance check because it's faster.
| Python | mit | BeatButton/beattie,BeatButton/beattie-bot | from discord.ext.commands import Bot
from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument
class BeattieBot(Bot):
async def reply(self, ctx, message):
return await ctx.send(f'{ctx.message.author.mention}\n{message}')
async def handle_error(self, exception, ctx):
... | from discord.ext.commands import Bot, CommandInvokeError
from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument
class BeattieBot(Bot):
async def reply(self, ctx, message):
return await ctx.send(f'{ctx.message.author.mention}\n{message}')
async def handle_error(self, ex... | <commit_before>from discord.ext.commands import Bot
from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument
class BeattieBot(Bot):
async def reply(self, ctx, message):
return await ctx.send(f'{ctx.message.author.mention}\n{message}')
async def handle_error(self, excepti... | from discord.ext.commands import Bot, CommandInvokeError
from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument
class BeattieBot(Bot):
async def reply(self, ctx, message):
return await ctx.send(f'{ctx.message.author.mention}\n{message}')
async def handle_error(self, ex... | from discord.ext.commands import Bot
from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument
class BeattieBot(Bot):
async def reply(self, ctx, message):
return await ctx.send(f'{ctx.message.author.mention}\n{message}')
async def handle_error(self, exception, ctx):
... | <commit_before>from discord.ext.commands import Bot
from discord.ext.commands.errors import CommandNotFound, MissingRequiredArgument
class BeattieBot(Bot):
async def reply(self, ctx, message):
return await ctx.send(f'{ctx.message.author.mention}\n{message}')
async def handle_error(self, excepti... |
60fc1add06ffb54aff2b0bf1c28d0cb476d35aae | polling_stations/settings/local.example.py | polling_stations/settings/local.example.py | DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "polling_stations",
"USER": "postgres",
"PASSWORD": "",
"HOST": "", # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
"PORT": "", # Set to emp... | DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "polling_stations",
"USER": "postgres",
"PASSWORD": "",
"HOST": "", # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
"PORT": "", # Set to emp... | Send email to console as local default | Send email to console as local default
| Python | bsd-3-clause | DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations | DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "polling_stations",
"USER": "postgres",
"PASSWORD": "",
"HOST": "", # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
"PORT": "", # Set to emp... | DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "polling_stations",
"USER": "postgres",
"PASSWORD": "",
"HOST": "", # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
"PORT": "", # Set to emp... | <commit_before>DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "polling_stations",
"USER": "postgres",
"PASSWORD": "",
"HOST": "", # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
"PORT": ""... | DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "polling_stations",
"USER": "postgres",
"PASSWORD": "",
"HOST": "", # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
"PORT": "", # Set to emp... | DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "polling_stations",
"USER": "postgres",
"PASSWORD": "",
"HOST": "", # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
"PORT": "", # Set to emp... | <commit_before>DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "polling_stations",
"USER": "postgres",
"PASSWORD": "",
"HOST": "", # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
"PORT": ""... |
9f83315c1be0268836a3a10fade9ba832d614e79 | regserver/regulations/tests/views_sidebar_tests.py | regserver/regulations/tests/views_sidebar_tests.py | import re
from unittest import TestCase
from mock import patch
from django.test.client import Client
class ViewsSideBarViewTest(TestCase):
"""Integration tests for the sidebar"""
@patch('regulations.views.sidebar.api_reader')
def test_get(self, api_reader):
api_reader.Client.return_value.layer.r... | import re
from unittest import TestCase
from mock import patch
from django.test.client import Client
class ViewsSideBarViewTest(TestCase):
"""Integration tests for the sidebar"""
@patch('regulations.views.sidebar.api_reader')
def test_get(self, api_reader):
api_reader.Client.return_value.layer.r... | Use a 'valid' doc number | Use a 'valid' doc number
| Python | cc0-1.0 | tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,grapesmoker/regulations-site,grapesmoker/regulations-site,jeremiak/regulations-site,eregs/regulations-site,ascott1/regulations-site,18F/regulations-site,grapesmoker/regulations-site,18F/regulations-site,eregs/regulations-site,eregs/regulations-site,ascott1... | import re
from unittest import TestCase
from mock import patch
from django.test.client import Client
class ViewsSideBarViewTest(TestCase):
"""Integration tests for the sidebar"""
@patch('regulations.views.sidebar.api_reader')
def test_get(self, api_reader):
api_reader.Client.return_value.layer.r... | import re
from unittest import TestCase
from mock import patch
from django.test.client import Client
class ViewsSideBarViewTest(TestCase):
"""Integration tests for the sidebar"""
@patch('regulations.views.sidebar.api_reader')
def test_get(self, api_reader):
api_reader.Client.return_value.layer.r... | <commit_before>import re
from unittest import TestCase
from mock import patch
from django.test.client import Client
class ViewsSideBarViewTest(TestCase):
"""Integration tests for the sidebar"""
@patch('regulations.views.sidebar.api_reader')
def test_get(self, api_reader):
api_reader.Client.retur... | import re
from unittest import TestCase
from mock import patch
from django.test.client import Client
class ViewsSideBarViewTest(TestCase):
"""Integration tests for the sidebar"""
@patch('regulations.views.sidebar.api_reader')
def test_get(self, api_reader):
api_reader.Client.return_value.layer.r... | import re
from unittest import TestCase
from mock import patch
from django.test.client import Client
class ViewsSideBarViewTest(TestCase):
"""Integration tests for the sidebar"""
@patch('regulations.views.sidebar.api_reader')
def test_get(self, api_reader):
api_reader.Client.return_value.layer.r... | <commit_before>import re
from unittest import TestCase
from mock import patch
from django.test.client import Client
class ViewsSideBarViewTest(TestCase):
"""Integration tests for the sidebar"""
@patch('regulations.views.sidebar.api_reader')
def test_get(self, api_reader):
api_reader.Client.retur... |
22a024856b6fa602ee9d6fd7fb6031dde359cc9c | pytablewriter/writer/text/_csv.py | pytablewriter/writer/text/_csv.py | from typing import List
import typepy
from ._text_writer import TextTableWriter
class CsvTableWriter(TextTableWriter):
"""
A table writer class for character separated values format.
The default separated character is a comma (``","``).
:Example:
:ref:`example-csv-table-writer`
... | from typing import List
import typepy
from ._text_writer import TextTableWriter
class CsvTableWriter(TextTableWriter):
"""
A table writer class for character separated values format.
The default separated character is a comma (``","``).
:Example:
:ref:`example-csv-table-writer`
... | Modify initialization to be more properly for CsvTableWriter class | Modify initialization to be more properly for CsvTableWriter class
| Python | mit | thombashi/pytablewriter | from typing import List
import typepy
from ._text_writer import TextTableWriter
class CsvTableWriter(TextTableWriter):
"""
A table writer class for character separated values format.
The default separated character is a comma (``","``).
:Example:
:ref:`example-csv-table-writer`
... | from typing import List
import typepy
from ._text_writer import TextTableWriter
class CsvTableWriter(TextTableWriter):
"""
A table writer class for character separated values format.
The default separated character is a comma (``","``).
:Example:
:ref:`example-csv-table-writer`
... | <commit_before>from typing import List
import typepy
from ._text_writer import TextTableWriter
class CsvTableWriter(TextTableWriter):
"""
A table writer class for character separated values format.
The default separated character is a comma (``","``).
:Example:
:ref:`example-csv-tab... | from typing import List
import typepy
from ._text_writer import TextTableWriter
class CsvTableWriter(TextTableWriter):
"""
A table writer class for character separated values format.
The default separated character is a comma (``","``).
:Example:
:ref:`example-csv-table-writer`
... | from typing import List
import typepy
from ._text_writer import TextTableWriter
class CsvTableWriter(TextTableWriter):
"""
A table writer class for character separated values format.
The default separated character is a comma (``","``).
:Example:
:ref:`example-csv-table-writer`
... | <commit_before>from typing import List
import typepy
from ._text_writer import TextTableWriter
class CsvTableWriter(TextTableWriter):
"""
A table writer class for character separated values format.
The default separated character is a comma (``","``).
:Example:
:ref:`example-csv-tab... |
9543d080bf39503a47879b74960f0999e8e94172 | linked_list.py | linked_list.py | #!/usr/bin/env python
from __future__ import print_function
class Node(object):
def __init__(self, value):
self._val = value
self._next = None
@property
def next(self):
return self._next
@next.setter
def next(self, value):
self._next = value
@property
de... | #!/usr/bin/env python
from __future__ import print_function
class Node(object):
def __init__(self, value):
self._val = value
self._next = None
@property
def next(self):
return self._next
@next.setter
def next(self, value):
self._next = value
@property
de... | Add working search function v1 | Nick: Add working search function v1
| Python | mit | constanthatz/data-structures | #!/usr/bin/env python
from __future__ import print_function
class Node(object):
def __init__(self, value):
self._val = value
self._next = None
@property
def next(self):
return self._next
@next.setter
def next(self, value):
self._next = value
@property
de... | #!/usr/bin/env python
from __future__ import print_function
class Node(object):
def __init__(self, value):
self._val = value
self._next = None
@property
def next(self):
return self._next
@next.setter
def next(self, value):
self._next = value
@property
de... | <commit_before>#!/usr/bin/env python
from __future__ import print_function
class Node(object):
def __init__(self, value):
self._val = value
self._next = None
@property
def next(self):
return self._next
@next.setter
def next(self, value):
self._next = value
@... | #!/usr/bin/env python
from __future__ import print_function
class Node(object):
def __init__(self, value):
self._val = value
self._next = None
@property
def next(self):
return self._next
@next.setter
def next(self, value):
self._next = value
@property
de... | #!/usr/bin/env python
from __future__ import print_function
class Node(object):
def __init__(self, value):
self._val = value
self._next = None
@property
def next(self):
return self._next
@next.setter
def next(self, value):
self._next = value
@property
de... | <commit_before>#!/usr/bin/env python
from __future__ import print_function
class Node(object):
def __init__(self, value):
self._val = value
self._next = None
@property
def next(self):
return self._next
@next.setter
def next(self, value):
self._next = value
@... |
de24375a9d23f07eced1a8e7f2cffcf02e34bdf2 | integration_tests/conftest.py | integration_tests/conftest.py | import os
import subprocess
import sys
import time
import pytest
ARGS = [
'--debug',
'--deployment-name', 'integration_test',
'--dbuser', 'zoeuser',
'--dbhost', 'postgres',
'--dbport', '5432',
'--dbname', 'zoe',
'--dbpass', 'zoepass',
'--master-url', 'tcp://localhost:4850',
'--auth... | import os
import subprocess
import sys
import time
import pytest
ARGS = [
'--debug',
'--deployment-name', 'integration_test',
'--dbuser', 'zoeuser',
'--dbhost', 'postgres',
'--dbport', '5432',
'--dbname', 'zoe',
'--dbpass', 'zoepass',
'--master-url', 'tcp://localhost:4850',
'--list... | Remove auth-type option from tests | Remove auth-type option from tests
| Python | apache-2.0 | DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe | import os
import subprocess
import sys
import time
import pytest
ARGS = [
'--debug',
'--deployment-name', 'integration_test',
'--dbuser', 'zoeuser',
'--dbhost', 'postgres',
'--dbport', '5432',
'--dbname', 'zoe',
'--dbpass', 'zoepass',
'--master-url', 'tcp://localhost:4850',
'--auth... | import os
import subprocess
import sys
import time
import pytest
ARGS = [
'--debug',
'--deployment-name', 'integration_test',
'--dbuser', 'zoeuser',
'--dbhost', 'postgres',
'--dbport', '5432',
'--dbname', 'zoe',
'--dbpass', 'zoepass',
'--master-url', 'tcp://localhost:4850',
'--list... | <commit_before>import os
import subprocess
import sys
import time
import pytest
ARGS = [
'--debug',
'--deployment-name', 'integration_test',
'--dbuser', 'zoeuser',
'--dbhost', 'postgres',
'--dbport', '5432',
'--dbname', 'zoe',
'--dbpass', 'zoepass',
'--master-url', 'tcp://localhost:485... | import os
import subprocess
import sys
import time
import pytest
ARGS = [
'--debug',
'--deployment-name', 'integration_test',
'--dbuser', 'zoeuser',
'--dbhost', 'postgres',
'--dbport', '5432',
'--dbname', 'zoe',
'--dbpass', 'zoepass',
'--master-url', 'tcp://localhost:4850',
'--list... | import os
import subprocess
import sys
import time
import pytest
ARGS = [
'--debug',
'--deployment-name', 'integration_test',
'--dbuser', 'zoeuser',
'--dbhost', 'postgres',
'--dbport', '5432',
'--dbname', 'zoe',
'--dbpass', 'zoepass',
'--master-url', 'tcp://localhost:4850',
'--auth... | <commit_before>import os
import subprocess
import sys
import time
import pytest
ARGS = [
'--debug',
'--deployment-name', 'integration_test',
'--dbuser', 'zoeuser',
'--dbhost', 'postgres',
'--dbport', '5432',
'--dbname', 'zoe',
'--dbpass', 'zoepass',
'--master-url', 'tcp://localhost:485... |
f1afb7700ade910ca79a105ec9fe94448cb57d8d | byceps/blueprints/shop_order_admin/forms.py | byceps/blueprints/shop_order_admin/forms.py | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_order_admin.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import TextAreaField
from wtforms.validators import InputRequired
from ...util.l10n import Locali... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_order_admin.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import TextAreaField
from wtforms.validators import InputRequired, Length
from ...util.l10n impor... | Validate length of cancelation reason supplied via form | Validate length of cancelation reason supplied via form
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_order_admin.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import TextAreaField
from wtforms.validators import InputRequired
from ...util.l10n import Locali... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_order_admin.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import TextAreaField
from wtforms.validators import InputRequired, Length
from ...util.l10n impor... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_order_admin.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import TextAreaField
from wtforms.validators import InputRequired
from ...util.l10... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_order_admin.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import TextAreaField
from wtforms.validators import InputRequired, Length
from ...util.l10n impor... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_order_admin.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import TextAreaField
from wtforms.validators import InputRequired
from ...util.l10n import Locali... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_order_admin.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from wtforms import TextAreaField
from wtforms.validators import InputRequired
from ...util.l10... |
73252b6c5600ebd857d8904c01a4b9b04d316da7 | hpcbench/cli/__init__.py | hpcbench/cli/__init__.py | """Provide all package executables
"""
import logging
from docopt import docopt
from hpcbench import __version__
from hpcbench.toolbox.loader import load_components
def setup_logger(verbose):
"""Prepare root logger
:param verbose: integer greater than 0 to indicate verbosity level
"""
level = loggin... | """Provide all package executables
"""
import logging
from docopt import docopt
from hpcbench import __version__
from hpcbench.toolbox.loader import load_components
LOGGING_FORMAT = "%(asctime)-15s:%(levelname)s:%(name)s:%(message)s"
def setup_logger(verbose):
"""Prepare root logger
:param verbose: integer... | Add date in log format | Add date in log format
| Python | mit | tristan0x/hpcbench,tristan0x/hpcbench,tristan0x/hpcbench | """Provide all package executables
"""
import logging
from docopt import docopt
from hpcbench import __version__
from hpcbench.toolbox.loader import load_components
def setup_logger(verbose):
"""Prepare root logger
:param verbose: integer greater than 0 to indicate verbosity level
"""
level = loggin... | """Provide all package executables
"""
import logging
from docopt import docopt
from hpcbench import __version__
from hpcbench.toolbox.loader import load_components
LOGGING_FORMAT = "%(asctime)-15s:%(levelname)s:%(name)s:%(message)s"
def setup_logger(verbose):
"""Prepare root logger
:param verbose: integer... | <commit_before>"""Provide all package executables
"""
import logging
from docopt import docopt
from hpcbench import __version__
from hpcbench.toolbox.loader import load_components
def setup_logger(verbose):
"""Prepare root logger
:param verbose: integer greater than 0 to indicate verbosity level
"""
... | """Provide all package executables
"""
import logging
from docopt import docopt
from hpcbench import __version__
from hpcbench.toolbox.loader import load_components
LOGGING_FORMAT = "%(asctime)-15s:%(levelname)s:%(name)s:%(message)s"
def setup_logger(verbose):
"""Prepare root logger
:param verbose: integer... | """Provide all package executables
"""
import logging
from docopt import docopt
from hpcbench import __version__
from hpcbench.toolbox.loader import load_components
def setup_logger(verbose):
"""Prepare root logger
:param verbose: integer greater than 0 to indicate verbosity level
"""
level = loggin... | <commit_before>"""Provide all package executables
"""
import logging
from docopt import docopt
from hpcbench import __version__
from hpcbench.toolbox.loader import load_components
def setup_logger(verbose):
"""Prepare root logger
:param verbose: integer greater than 0 to indicate verbosity level
"""
... |
5ff16a552e167eb9405713f6c919a729f27f84ee | busbus/util/__init__.py | busbus/util/__init__.py | from abc import ABCMeta, abstractmethod
import six
import busbus
@six.add_metaclass(ABCMeta)
class Iterable(object):
def __iter__(self):
return self
@abstractmethod
def __next__(self):
return NotImplemented
# Python 2 compatibility
def next(self):
return self.__next__()... | from abc import ABCMeta, abstractmethod
import six
import busbus
@six.add_metaclass(ABCMeta)
class Iterable(object):
def __iter__(self):
return self
@abstractmethod
def __next__(self):
return NotImplemented
# Python 2 compatibility
def next(self):
return self.__next__()... | Remove spurious print statement in busbus.util.Lazy | Remove spurious print statement in busbus.util.Lazy
| Python | mit | spaceboats/busbus | from abc import ABCMeta, abstractmethod
import six
import busbus
@six.add_metaclass(ABCMeta)
class Iterable(object):
def __iter__(self):
return self
@abstractmethod
def __next__(self):
return NotImplemented
# Python 2 compatibility
def next(self):
return self.__next__()... | from abc import ABCMeta, abstractmethod
import six
import busbus
@six.add_metaclass(ABCMeta)
class Iterable(object):
def __iter__(self):
return self
@abstractmethod
def __next__(self):
return NotImplemented
# Python 2 compatibility
def next(self):
return self.__next__()... | <commit_before>from abc import ABCMeta, abstractmethod
import six
import busbus
@six.add_metaclass(ABCMeta)
class Iterable(object):
def __iter__(self):
return self
@abstractmethod
def __next__(self):
return NotImplemented
# Python 2 compatibility
def next(self):
return ... | from abc import ABCMeta, abstractmethod
import six
import busbus
@six.add_metaclass(ABCMeta)
class Iterable(object):
def __iter__(self):
return self
@abstractmethod
def __next__(self):
return NotImplemented
# Python 2 compatibility
def next(self):
return self.__next__()... | from abc import ABCMeta, abstractmethod
import six
import busbus
@six.add_metaclass(ABCMeta)
class Iterable(object):
def __iter__(self):
return self
@abstractmethod
def __next__(self):
return NotImplemented
# Python 2 compatibility
def next(self):
return self.__next__()... | <commit_before>from abc import ABCMeta, abstractmethod
import six
import busbus
@six.add_metaclass(ABCMeta)
class Iterable(object):
def __iter__(self):
return self
@abstractmethod
def __next__(self):
return NotImplemented
# Python 2 compatibility
def next(self):
return ... |
a40a925c29b04b1b6822566e72db4afa5552479c | pygame/_error.py | pygame/_error.py | """ SDL errors.def
"""
from pygame._sdl import sdl, ffi
class SDLError(Exception):
"""SDL error."""
@classmethod
def from_sdl_error(cls):
return cls(ffi.string(sdl.SDL_GetError()))
def unpack_rect(rect):
"""Unpack the size and raise a type error if needed."""
if (not hasattr(rect, '__i... | """ SDL errors.def
"""
from pygame._sdl import sdl, ffi
from numbers import Number
class SDLError(Exception):
"""SDL error."""
@classmethod
def from_sdl_error(cls):
return cls(ffi.string(sdl.SDL_GetError()))
def unpack_rect(rect):
"""Unpack the size and raise a type error if needed."""
... | Support arbitary numeric types for creating pygame surfaces | Support arbitary numeric types for creating pygame surfaces
| Python | lgpl-2.1 | CTPUG/pygame_cffi,CTPUG/pygame_cffi,CTPUG/pygame_cffi | """ SDL errors.def
"""
from pygame._sdl import sdl, ffi
class SDLError(Exception):
"""SDL error."""
@classmethod
def from_sdl_error(cls):
return cls(ffi.string(sdl.SDL_GetError()))
def unpack_rect(rect):
"""Unpack the size and raise a type error if needed."""
if (not hasattr(rect, '__i... | """ SDL errors.def
"""
from pygame._sdl import sdl, ffi
from numbers import Number
class SDLError(Exception):
"""SDL error."""
@classmethod
def from_sdl_error(cls):
return cls(ffi.string(sdl.SDL_GetError()))
def unpack_rect(rect):
"""Unpack the size and raise a type error if needed."""
... | <commit_before>""" SDL errors.def
"""
from pygame._sdl import sdl, ffi
class SDLError(Exception):
"""SDL error."""
@classmethod
def from_sdl_error(cls):
return cls(ffi.string(sdl.SDL_GetError()))
def unpack_rect(rect):
"""Unpack the size and raise a type error if needed."""
if (not has... | """ SDL errors.def
"""
from pygame._sdl import sdl, ffi
from numbers import Number
class SDLError(Exception):
"""SDL error."""
@classmethod
def from_sdl_error(cls):
return cls(ffi.string(sdl.SDL_GetError()))
def unpack_rect(rect):
"""Unpack the size and raise a type error if needed."""
... | """ SDL errors.def
"""
from pygame._sdl import sdl, ffi
class SDLError(Exception):
"""SDL error."""
@classmethod
def from_sdl_error(cls):
return cls(ffi.string(sdl.SDL_GetError()))
def unpack_rect(rect):
"""Unpack the size and raise a type error if needed."""
if (not hasattr(rect, '__i... | <commit_before>""" SDL errors.def
"""
from pygame._sdl import sdl, ffi
class SDLError(Exception):
"""SDL error."""
@classmethod
def from_sdl_error(cls):
return cls(ffi.string(sdl.SDL_GetError()))
def unpack_rect(rect):
"""Unpack the size and raise a type error if needed."""
if (not has... |
75df2d93a2624f091eac5d1ff076985b0a2fd462 | src/core/migrations/0019_set_default_news_items.py | src/core/migrations/0019_set_default_news_items.py | from __future__ import unicode_literals
from django.db import migrations, connection
def set_default_news_items(apps, schema_editor):
Plugin = apps.get_model("utils", "Plugin")
Journal = apps.get_model("journal", "Journal")
PluginSetting = apps.get_model("utils", "PluginSetting")
PluginSettingValue =... | from __future__ import unicode_literals
from django.db import migrations, connection
def set_default_news_items(apps, schema_editor):
Plugin = apps.get_model("utils", "Plugin")
Journal = apps.get_model("journal", "Journal")
PluginSetting = apps.get_model("utils", "PluginSetting")
PluginSettingValue =... | Handle setting values of '' and ' ' | 747: Handle setting values of '' and ' '
| Python | agpl-3.0 | BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway | from __future__ import unicode_literals
from django.db import migrations, connection
def set_default_news_items(apps, schema_editor):
Plugin = apps.get_model("utils", "Plugin")
Journal = apps.get_model("journal", "Journal")
PluginSetting = apps.get_model("utils", "PluginSetting")
PluginSettingValue =... | from __future__ import unicode_literals
from django.db import migrations, connection
def set_default_news_items(apps, schema_editor):
Plugin = apps.get_model("utils", "Plugin")
Journal = apps.get_model("journal", "Journal")
PluginSetting = apps.get_model("utils", "PluginSetting")
PluginSettingValue =... | <commit_before>from __future__ import unicode_literals
from django.db import migrations, connection
def set_default_news_items(apps, schema_editor):
Plugin = apps.get_model("utils", "Plugin")
Journal = apps.get_model("journal", "Journal")
PluginSetting = apps.get_model("utils", "PluginSetting")
Plugi... | from __future__ import unicode_literals
from django.db import migrations, connection
def set_default_news_items(apps, schema_editor):
Plugin = apps.get_model("utils", "Plugin")
Journal = apps.get_model("journal", "Journal")
PluginSetting = apps.get_model("utils", "PluginSetting")
PluginSettingValue =... | from __future__ import unicode_literals
from django.db import migrations, connection
def set_default_news_items(apps, schema_editor):
Plugin = apps.get_model("utils", "Plugin")
Journal = apps.get_model("journal", "Journal")
PluginSetting = apps.get_model("utils", "PluginSetting")
PluginSettingValue =... | <commit_before>from __future__ import unicode_literals
from django.db import migrations, connection
def set_default_news_items(apps, schema_editor):
Plugin = apps.get_model("utils", "Plugin")
Journal = apps.get_model("journal", "Journal")
PluginSetting = apps.get_model("utils", "PluginSetting")
Plugi... |
67a60baad538f70decad3cb9d51676068965f240 | lucid/optvis/param/images.py | lucid/optvis/param/images.py | # Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | # Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | Fix image width and height switching | Fix image width and height switching
| Python | apache-2.0 | tensorflow/lucid,tensorflow/lucid,tensorflow/lucid,tensorflow/lucid | # Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | # Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | <commit_before># Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | # Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | # Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | <commit_before># Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... |
9d08d3b463e99eb665844f16ff30e7b83b4b8dfd | client_logging/views.py | client_logging/views.py | from django.views import View
from django import http
from uxhelpers.utils import json_response
import logging
logger = logging.getLogger(__name__)
LEVELS = {
'CRITICAL': 50,
'ERROR': 40,
'WARNING': 30,
'INFO': 20,
'DEBUG': 10,
'NOTSET': 0
}
class LogPostView(View):
def post(self, requ... | from django.views import View
from django import http
from uxhelpers.utils import json_response
import json
import logging
logger = logging.getLogger(__name__)
LEVELS = {
'CRITICAL': 50,
'ERROR': 40,
'WARNING': 30,
'INFO': 20,
'DEBUG': 10,
'NOTSET': 0
}
class LogPostView(View):
def pos... | Add another missing import and only handle specific exceptions | Add another missing import and only handle specific exceptions
| Python | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | from django.views import View
from django import http
from uxhelpers.utils import json_response
import logging
logger = logging.getLogger(__name__)
LEVELS = {
'CRITICAL': 50,
'ERROR': 40,
'WARNING': 30,
'INFO': 20,
'DEBUG': 10,
'NOTSET': 0
}
class LogPostView(View):
def post(self, requ... | from django.views import View
from django import http
from uxhelpers.utils import json_response
import json
import logging
logger = logging.getLogger(__name__)
LEVELS = {
'CRITICAL': 50,
'ERROR': 40,
'WARNING': 30,
'INFO': 20,
'DEBUG': 10,
'NOTSET': 0
}
class LogPostView(View):
def pos... | <commit_before>from django.views import View
from django import http
from uxhelpers.utils import json_response
import logging
logger = logging.getLogger(__name__)
LEVELS = {
'CRITICAL': 50,
'ERROR': 40,
'WARNING': 30,
'INFO': 20,
'DEBUG': 10,
'NOTSET': 0
}
class LogPostView(View):
def ... | from django.views import View
from django import http
from uxhelpers.utils import json_response
import json
import logging
logger = logging.getLogger(__name__)
LEVELS = {
'CRITICAL': 50,
'ERROR': 40,
'WARNING': 30,
'INFO': 20,
'DEBUG': 10,
'NOTSET': 0
}
class LogPostView(View):
def pos... | from django.views import View
from django import http
from uxhelpers.utils import json_response
import logging
logger = logging.getLogger(__name__)
LEVELS = {
'CRITICAL': 50,
'ERROR': 40,
'WARNING': 30,
'INFO': 20,
'DEBUG': 10,
'NOTSET': 0
}
class LogPostView(View):
def post(self, requ... | <commit_before>from django.views import View
from django import http
from uxhelpers.utils import json_response
import logging
logger = logging.getLogger(__name__)
LEVELS = {
'CRITICAL': 50,
'ERROR': 40,
'WARNING': 30,
'INFO': 20,
'DEBUG': 10,
'NOTSET': 0
}
class LogPostView(View):
def ... |
860636fa3d0354b8358b490c28ed92d727207744 | pola/views.py | pola/views.py | from django.views.generic import TemplateView
from braces.views import LoginRequiredMixin
from product.models import Product
from company.models import Company
from report.models import Report
class FrontPageView(LoginRequiredMixin, TemplateView):
template_name = 'pages/home-cms.html'
def get_context_data(se... | from django.views.generic import TemplateView
from braces.views import LoginRequiredMixin
from product.models import Product
from company.models import Company
from report.models import Report
class FrontPageView(LoginRequiredMixin, TemplateView):
template_name = 'pages/home-cms.html'
def get_context_data(se... | Add extra condition to home page's box | Add extra condition to home page's box
| Python | bsd-3-clause | KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend,KlubJagiellonski/pola-backend | from django.views.generic import TemplateView
from braces.views import LoginRequiredMixin
from product.models import Product
from company.models import Company
from report.models import Report
class FrontPageView(LoginRequiredMixin, TemplateView):
template_name = 'pages/home-cms.html'
def get_context_data(se... | from django.views.generic import TemplateView
from braces.views import LoginRequiredMixin
from product.models import Product
from company.models import Company
from report.models import Report
class FrontPageView(LoginRequiredMixin, TemplateView):
template_name = 'pages/home-cms.html'
def get_context_data(se... | <commit_before>from django.views.generic import TemplateView
from braces.views import LoginRequiredMixin
from product.models import Product
from company.models import Company
from report.models import Report
class FrontPageView(LoginRequiredMixin, TemplateView):
template_name = 'pages/home-cms.html'
def get_... | from django.views.generic import TemplateView
from braces.views import LoginRequiredMixin
from product.models import Product
from company.models import Company
from report.models import Report
class FrontPageView(LoginRequiredMixin, TemplateView):
template_name = 'pages/home-cms.html'
def get_context_data(se... | from django.views.generic import TemplateView
from braces.views import LoginRequiredMixin
from product.models import Product
from company.models import Company
from report.models import Report
class FrontPageView(LoginRequiredMixin, TemplateView):
template_name = 'pages/home-cms.html'
def get_context_data(se... | <commit_before>from django.views.generic import TemplateView
from braces.views import LoginRequiredMixin
from product.models import Product
from company.models import Company
from report.models import Report
class FrontPageView(LoginRequiredMixin, TemplateView):
template_name = 'pages/home-cms.html'
def get_... |
1aec583a52ac9edc95138f5df356da60451dfe2b | enthought/tvtk/view/parametric_function_source_view.py | enthought/tvtk/view/parametric_function_source_view.py | from enthought.traits.ui.api import View, HGroup, Item
view = View((['generate_texture_coordinates'], ['scalar_mode'],
HGroup(Item('u_resolution', label = 'u'),
Item('v_resolution', label = 'v'),
Item('w_resolution', label = 'w'),
label = 'Resolution', show_border = True)),... | from enthought.traits.ui.api import View, HGroup, Item
from enthought.tvtk.tvtk_base import TVTKBaseHandler
view = View((['generate_texture_coordinates'], ['scalar_mode'],
HGroup(Item('u_resolution', label = 'u'),
Item('v_resolution', label = 'v'),
Item('w_resolution', label = 'w'),
... | Add handler to the view. | Add handler to the view.
| Python | bsd-3-clause | liulion/mayavi,liulion/mayavi,alexandreleroux/mayavi,dmsurti/mayavi,dmsurti/mayavi,alexandreleroux/mayavi | from enthought.traits.ui.api import View, HGroup, Item
view = View((['generate_texture_coordinates'], ['scalar_mode'],
HGroup(Item('u_resolution', label = 'u'),
Item('v_resolution', label = 'v'),
Item('w_resolution', label = 'w'),
label = 'Resolution', show_border = True)),... | from enthought.traits.ui.api import View, HGroup, Item
from enthought.tvtk.tvtk_base import TVTKBaseHandler
view = View((['generate_texture_coordinates'], ['scalar_mode'],
HGroup(Item('u_resolution', label = 'u'),
Item('v_resolution', label = 'v'),
Item('w_resolution', label = 'w'),
... | <commit_before>from enthought.traits.ui.api import View, HGroup, Item
view = View((['generate_texture_coordinates'], ['scalar_mode'],
HGroup(Item('u_resolution', label = 'u'),
Item('v_resolution', label = 'v'),
Item('w_resolution', label = 'w'),
label = 'Resolution', show_b... | from enthought.traits.ui.api import View, HGroup, Item
from enthought.tvtk.tvtk_base import TVTKBaseHandler
view = View((['generate_texture_coordinates'], ['scalar_mode'],
HGroup(Item('u_resolution', label = 'u'),
Item('v_resolution', label = 'v'),
Item('w_resolution', label = 'w'),
... | from enthought.traits.ui.api import View, HGroup, Item
view = View((['generate_texture_coordinates'], ['scalar_mode'],
HGroup(Item('u_resolution', label = 'u'),
Item('v_resolution', label = 'v'),
Item('w_resolution', label = 'w'),
label = 'Resolution', show_border = True)),... | <commit_before>from enthought.traits.ui.api import View, HGroup, Item
view = View((['generate_texture_coordinates'], ['scalar_mode'],
HGroup(Item('u_resolution', label = 'u'),
Item('v_resolution', label = 'v'),
Item('w_resolution', label = 'w'),
label = 'Resolution', show_b... |
11095d00dd1e4805739ffc376328e4ad2a6893fb | h2o-py/tests/testdir_algos/gbm/pyunit_cv_nfolds_gbm.py | h2o-py/tests/testdir_algos/gbm/pyunit_cv_nfolds_gbm.py | from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gbm import H2OGradientBoostingEstimator
def cv_nfolds_gbm():
prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv"))
prostate[1] = prostate[1].asfactor()
... | from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gbm import H2OGradientBoostingEstimator
def cv_nfolds_gbm():
prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv"))
prostate[1] = prostate[1].asfactor()
... | Add pyunit test for model_performance(xval=True) | PUBDEV-2984: Add pyunit test for model_performance(xval=True)
| Python | apache-2.0 | mathemage/h2o-3,h2oai/h2o-dev,mathemage/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,spennihana/h2o-3,spennihana/h2o-3,mathemage/h2o-3,h2oai/h2o-3,h2oai/h2o-dev,mathemage/h2o-3,spennihana/h2o-3,h2oai/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,michalkurka/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,jangorecki/h2... | from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gbm import H2OGradientBoostingEstimator
def cv_nfolds_gbm():
prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv"))
prostate[1] = prostate[1].asfactor()
... | from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gbm import H2OGradientBoostingEstimator
def cv_nfolds_gbm():
prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv"))
prostate[1] = prostate[1].asfactor()
... | <commit_before>from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gbm import H2OGradientBoostingEstimator
def cv_nfolds_gbm():
prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv"))
prostate[1] = prostate... | from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gbm import H2OGradientBoostingEstimator
def cv_nfolds_gbm():
prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv"))
prostate[1] = prostate[1].asfactor()
... | from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gbm import H2OGradientBoostingEstimator
def cv_nfolds_gbm():
prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv"))
prostate[1] = prostate[1].asfactor()
... | <commit_before>from builtins import range
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gbm import H2OGradientBoostingEstimator
def cv_nfolds_gbm():
prostate = h2o.import_file(path=pyunit_utils.locate("smalldata/logreg/prostate.csv"))
prostate[1] = prostate... |
97041c2b874dde32632485f210e3f9885aac95df | commands/get_popular.py | commands/get_popular.py | from importlib import import_module
from application import APPLICATION as APP
from utils.movie_util import update_moviedata
def get_popular():
APP.debug("Fetching popular movies...")
provider_module = import_module(APP.setting("POPULARITY_PROVIDER"))
provider = provider_module.Provider()
APP.debug("Fe... | from importlib import import_module
from application import APPLICATION as APP
from utils.movie_util import update_moviedata
def get_popular():
APP.debug("Fetching popular movies...")
provider_module = import_module(APP.setting("POPULARITY_PROVIDER"))
provider = provider_module.Provider()
APP.debug("Fe... | Stop adding database misses to output array. | Stop adding database misses to output array.
| Python | mit | EmilStenstrom/nephele | from importlib import import_module
from application import APPLICATION as APP
from utils.movie_util import update_moviedata
def get_popular():
APP.debug("Fetching popular movies...")
provider_module = import_module(APP.setting("POPULARITY_PROVIDER"))
provider = provider_module.Provider()
APP.debug("Fe... | from importlib import import_module
from application import APPLICATION as APP
from utils.movie_util import update_moviedata
def get_popular():
APP.debug("Fetching popular movies...")
provider_module = import_module(APP.setting("POPULARITY_PROVIDER"))
provider = provider_module.Provider()
APP.debug("Fe... | <commit_before>from importlib import import_module
from application import APPLICATION as APP
from utils.movie_util import update_moviedata
def get_popular():
APP.debug("Fetching popular movies...")
provider_module = import_module(APP.setting("POPULARITY_PROVIDER"))
provider = provider_module.Provider()
... | from importlib import import_module
from application import APPLICATION as APP
from utils.movie_util import update_moviedata
def get_popular():
APP.debug("Fetching popular movies...")
provider_module = import_module(APP.setting("POPULARITY_PROVIDER"))
provider = provider_module.Provider()
APP.debug("Fe... | from importlib import import_module
from application import APPLICATION as APP
from utils.movie_util import update_moviedata
def get_popular():
APP.debug("Fetching popular movies...")
provider_module = import_module(APP.setting("POPULARITY_PROVIDER"))
provider = provider_module.Provider()
APP.debug("Fe... | <commit_before>from importlib import import_module
from application import APPLICATION as APP
from utils.movie_util import update_moviedata
def get_popular():
APP.debug("Fetching popular movies...")
provider_module = import_module(APP.setting("POPULARITY_PROVIDER"))
provider = provider_module.Provider()
... |
4c4c5d7d1854d0810e9bd6f4acd00dcb6ea25a6b | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ethan Zimmerman,,,
# Copyright (c) 2014 Ethan Zimmerman,,,
#
# License: MIT
#
"""This module exports the RamlCop plugin class."""
from SublimeLinter.lint import NodeLinter, util
class RamlCop(NodeLinter):
"""... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ethan Zimmerman,,,
# Copyright (c) 2014 Ethan Zimmerman,,,
#
# License: MIT
#
"""This module exports the RamlCop plugin class."""
from SublimeLinter.lint import NodeLinter
class RamlCop(NodeLinter):
"""Provid... | Remove unnecessary import of util | Remove unnecessary import of util | Python | mit | thebinarypenguin/SublimeLinter-contrib-raml-cop | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ethan Zimmerman,,,
# Copyright (c) 2014 Ethan Zimmerman,,,
#
# License: MIT
#
"""This module exports the RamlCop plugin class."""
from SublimeLinter.lint import NodeLinter, util
class RamlCop(NodeLinter):
"""... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ethan Zimmerman,,,
# Copyright (c) 2014 Ethan Zimmerman,,,
#
# License: MIT
#
"""This module exports the RamlCop plugin class."""
from SublimeLinter.lint import NodeLinter
class RamlCop(NodeLinter):
"""Provid... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ethan Zimmerman,,,
# Copyright (c) 2014 Ethan Zimmerman,,,
#
# License: MIT
#
"""This module exports the RamlCop plugin class."""
from SublimeLinter.lint import NodeLinter, util
class RamlCop(NodeLi... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ethan Zimmerman,,,
# Copyright (c) 2014 Ethan Zimmerman,,,
#
# License: MIT
#
"""This module exports the RamlCop plugin class."""
from SublimeLinter.lint import NodeLinter
class RamlCop(NodeLinter):
"""Provid... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ethan Zimmerman,,,
# Copyright (c) 2014 Ethan Zimmerman,,,
#
# License: MIT
#
"""This module exports the RamlCop plugin class."""
from SublimeLinter.lint import NodeLinter, util
class RamlCop(NodeLinter):
"""... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ethan Zimmerman,,,
# Copyright (c) 2014 Ethan Zimmerman,,,
#
# License: MIT
#
"""This module exports the RamlCop plugin class."""
from SublimeLinter.lint import NodeLinter, util
class RamlCop(NodeLi... |
185b93373c6f792619ec9e8225e3d699e6bd41e0 | l10n_br_data_base/__manifest__.py | l10n_br_data_base/__manifest__.py | # -*- coding: utf-8 -*-
# Copyright (C) 2009 - TODAY Renato Lima - Akretion #
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Brazilian Localisation Data Extension for Base',
'license': 'AGPL-3',
'author': 'Akretion, Odoo Community Association (OCA)',
... | # -*- coding: utf-8 -*-
# Copyright (C) 2009 - TODAY Renato Lima - Akretion #
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Brazilian Localisation Data Extension for Base',
'license': 'AGPL-3',
'author': 'Akretion, Odoo Community Association (OCA)',
... | Migrate l10n_br_data_base to version 10 | [MIG] Migrate l10n_br_data_base to version 10
| Python | agpl-3.0 | thinkopensolutions/l10n-brazil,thinkopensolutions/l10n-brazil,odoo-brazil/l10n-brazil-wip,odoo-brazil/l10n-brazil-wip | # -*- coding: utf-8 -*-
# Copyright (C) 2009 - TODAY Renato Lima - Akretion #
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Brazilian Localisation Data Extension for Base',
'license': 'AGPL-3',
'author': 'Akretion, Odoo Community Association (OCA)',
... | # -*- coding: utf-8 -*-
# Copyright (C) 2009 - TODAY Renato Lima - Akretion #
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Brazilian Localisation Data Extension for Base',
'license': 'AGPL-3',
'author': 'Akretion, Odoo Community Association (OCA)',
... | <commit_before># -*- coding: utf-8 -*-
# Copyright (C) 2009 - TODAY Renato Lima - Akretion #
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Brazilian Localisation Data Extension for Base',
'license': 'AGPL-3',
'author': 'Akretion, Odoo Community Associ... | # -*- coding: utf-8 -*-
# Copyright (C) 2009 - TODAY Renato Lima - Akretion #
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Brazilian Localisation Data Extension for Base',
'license': 'AGPL-3',
'author': 'Akretion, Odoo Community Association (OCA)',
... | # -*- coding: utf-8 -*-
# Copyright (C) 2009 - TODAY Renato Lima - Akretion #
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Brazilian Localisation Data Extension for Base',
'license': 'AGPL-3',
'author': 'Akretion, Odoo Community Association (OCA)',
... | <commit_before># -*- coding: utf-8 -*-
# Copyright (C) 2009 - TODAY Renato Lima - Akretion #
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Brazilian Localisation Data Extension for Base',
'license': 'AGPL-3',
'author': 'Akretion, Odoo Community Associ... |
c6edb08cdb5ee34accb8a6d74a78f372e2b8addb | tests/chainer_tests/training_tests/test_trainer.py | tests/chainer_tests/training_tests/test_trainer.py | import collections
import os
import tempfile
import time
import unittest
import mock
from chainer import serializers
from chainer import testing
from chainer import training
class TestTrainerElapsedTime(unittest.TestCase):
def setUp(self):
self.trainer = _get_mocked_trainer()
def test_elapsed_time... | import collections
import os
import shutil
import tempfile
import time
import unittest
import mock
from chainer import serializers
from chainer import testing
from chainer import training
class TestTrainerElapsedTime(unittest.TestCase):
def setUp(self):
self.trainer = _get_mocked_trainer()
def tes... | Clean up temporary directory after the test | Clean up temporary directory after the test
| Python | mit | chainer/chainer,ronekko/chainer,chainer/chainer,okuta/chainer,jnishi/chainer,jnishi/chainer,pfnet/chainer,ktnyt/chainer,jnishi/chainer,niboshi/chainer,wkentaro/chainer,keisuke-umezawa/chainer,okuta/chainer,wkentaro/chainer,chainer/chainer,ysekky/chainer,wkentaro/chainer,cupy/cupy,chainer/chainer,keisuke-umezawa/chainer... | import collections
import os
import tempfile
import time
import unittest
import mock
from chainer import serializers
from chainer import testing
from chainer import training
class TestTrainerElapsedTime(unittest.TestCase):
def setUp(self):
self.trainer = _get_mocked_trainer()
def test_elapsed_time... | import collections
import os
import shutil
import tempfile
import time
import unittest
import mock
from chainer import serializers
from chainer import testing
from chainer import training
class TestTrainerElapsedTime(unittest.TestCase):
def setUp(self):
self.trainer = _get_mocked_trainer()
def tes... | <commit_before>import collections
import os
import tempfile
import time
import unittest
import mock
from chainer import serializers
from chainer import testing
from chainer import training
class TestTrainerElapsedTime(unittest.TestCase):
def setUp(self):
self.trainer = _get_mocked_trainer()
def te... | import collections
import os
import shutil
import tempfile
import time
import unittest
import mock
from chainer import serializers
from chainer import testing
from chainer import training
class TestTrainerElapsedTime(unittest.TestCase):
def setUp(self):
self.trainer = _get_mocked_trainer()
def tes... | import collections
import os
import tempfile
import time
import unittest
import mock
from chainer import serializers
from chainer import testing
from chainer import training
class TestTrainerElapsedTime(unittest.TestCase):
def setUp(self):
self.trainer = _get_mocked_trainer()
def test_elapsed_time... | <commit_before>import collections
import os
import tempfile
import time
import unittest
import mock
from chainer import serializers
from chainer import testing
from chainer import training
class TestTrainerElapsedTime(unittest.TestCase):
def setUp(self):
self.trainer = _get_mocked_trainer()
def te... |
1639a91f018e29c4572242a94c5faf7281b15a6e | netdisco/discoverables/belkin_wemo.py | netdisco/discoverables/belkin_wemo.py | """ Discovers Belkin Wemo devices. """
from . import SSDPDiscoverable
class Discoverable(SSDPDiscoverable):
""" Adds support for discovering Belkin WeMo platform devices. """
def info_from_entry(self, entry):
""" Returns most important info from a uPnP entry. """
device = entry.description['... | """ Discovers Belkin Wemo devices. """
from . import SSDPDiscoverable
class Discoverable(SSDPDiscoverable):
""" Adds support for discovering Belkin WeMo platform devices. """
def info_from_entry(self, entry):
""" Returns most important info from a uPnP entry. """
device = entry.description['... | Handle mac address missing in early wemo firmware. | Handle mac address missing in early wemo firmware.
| Python | mit | balloob/netdisco,sfam/netdisco,brburns/netdisco | """ Discovers Belkin Wemo devices. """
from . import SSDPDiscoverable
class Discoverable(SSDPDiscoverable):
""" Adds support for discovering Belkin WeMo platform devices. """
def info_from_entry(self, entry):
""" Returns most important info from a uPnP entry. """
device = entry.description['... | """ Discovers Belkin Wemo devices. """
from . import SSDPDiscoverable
class Discoverable(SSDPDiscoverable):
""" Adds support for discovering Belkin WeMo platform devices. """
def info_from_entry(self, entry):
""" Returns most important info from a uPnP entry. """
device = entry.description['... | <commit_before>""" Discovers Belkin Wemo devices. """
from . import SSDPDiscoverable
class Discoverable(SSDPDiscoverable):
""" Adds support for discovering Belkin WeMo platform devices. """
def info_from_entry(self, entry):
""" Returns most important info from a uPnP entry. """
device = entr... | """ Discovers Belkin Wemo devices. """
from . import SSDPDiscoverable
class Discoverable(SSDPDiscoverable):
""" Adds support for discovering Belkin WeMo platform devices. """
def info_from_entry(self, entry):
""" Returns most important info from a uPnP entry. """
device = entry.description['... | """ Discovers Belkin Wemo devices. """
from . import SSDPDiscoverable
class Discoverable(SSDPDiscoverable):
""" Adds support for discovering Belkin WeMo platform devices. """
def info_from_entry(self, entry):
""" Returns most important info from a uPnP entry. """
device = entry.description['... | <commit_before>""" Discovers Belkin Wemo devices. """
from . import SSDPDiscoverable
class Discoverable(SSDPDiscoverable):
""" Adds support for discovering Belkin WeMo platform devices. """
def info_from_entry(self, entry):
""" Returns most important info from a uPnP entry. """
device = entr... |
3767fc5d1bf21d4321342e7332f569a97b7396b4 | ipython/config_helper_functions.py | ipython/config_helper_functions.py | import os
import IPython.ipapi
ip = IPython.ipapi.get()
# some config helper functions you can use
def import_mod(modules):
""" Usage: import_mod("os sys") """
for m in modules.split():
ip.ex("import %s" % m)
def import_all(modules):
""" Usage: import_all("os sys") """
for m in modules.split():
ip.ex("f... | """Some config helper functions you can use"""
import os
import IPython.ipapi
ip = IPython.ipapi.get()
def import_mod(modules):
""" Usage: import_mod("os sys") """
for m in modules.split():
ip.ex("import %s" % m)
def import_all(modules):
""" Usage: import_all("os sys") """
for m in modules.split():
ip.ex... | Use triple quotes for docstrings | Use triple quotes for docstrings
git-svn-id: 71e07130022bd36facd9e5e4cff6aac120a9d616@756 f6a8b572-8bf8-43d5-8295-329fc01c5294
| Python | mit | jalanb/jab,jalanb/dotjab,jalanb/dotjab,jalanb/jab | import os
import IPython.ipapi
ip = IPython.ipapi.get()
# some config helper functions you can use
def import_mod(modules):
""" Usage: import_mod("os sys") """
for m in modules.split():
ip.ex("import %s" % m)
def import_all(modules):
""" Usage: import_all("os sys") """
for m in modules.split():
ip.ex("f... | """Some config helper functions you can use"""
import os
import IPython.ipapi
ip = IPython.ipapi.get()
def import_mod(modules):
""" Usage: import_mod("os sys") """
for m in modules.split():
ip.ex("import %s" % m)
def import_all(modules):
""" Usage: import_all("os sys") """
for m in modules.split():
ip.ex... | <commit_before>import os
import IPython.ipapi
ip = IPython.ipapi.get()
# some config helper functions you can use
def import_mod(modules):
""" Usage: import_mod("os sys") """
for m in modules.split():
ip.ex("import %s" % m)
def import_all(modules):
""" Usage: import_all("os sys") """
for m in modules.spli... | """Some config helper functions you can use"""
import os
import IPython.ipapi
ip = IPython.ipapi.get()
def import_mod(modules):
""" Usage: import_mod("os sys") """
for m in modules.split():
ip.ex("import %s" % m)
def import_all(modules):
""" Usage: import_all("os sys") """
for m in modules.split():
ip.ex... | import os
import IPython.ipapi
ip = IPython.ipapi.get()
# some config helper functions you can use
def import_mod(modules):
""" Usage: import_mod("os sys") """
for m in modules.split():
ip.ex("import %s" % m)
def import_all(modules):
""" Usage: import_all("os sys") """
for m in modules.split():
ip.ex("f... | <commit_before>import os
import IPython.ipapi
ip = IPython.ipapi.get()
# some config helper functions you can use
def import_mod(modules):
""" Usage: import_mod("os sys") """
for m in modules.split():
ip.ex("import %s" % m)
def import_all(modules):
""" Usage: import_all("os sys") """
for m in modules.spli... |
5e3c81a34944c5877f0fd5e3824216ac7057f413 | src/waypoints_reader/scripts/yaml_reader.py | src/waypoints_reader/scripts/yaml_reader.py | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher('goal_sequence'... | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher('goal_sequence'... | Update read method for dictionaly type | Update read method for dictionaly type
| Python | bsd-3-clause | CIR-KIT/fifth_robot_pkg,CIR-KIT/fifth_robot_pkg,CIR-KIT/fifth_robot_pkg | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher('goal_sequence'... | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher('goal_sequence'... | <commit_before>#!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher(... | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher('goal_sequence'... | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher('goal_sequence'... | <commit_before>#!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def pub_data():
pub = rospy.Publisher(... |
5e87af4770a05bc187df7efbb5292c876393aef0 | nbgrader/apps/formgradeapp.py | nbgrader/apps/formgradeapp.py | from IPython.config.loader import Config
from IPython.config.application import catch_config_error
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp impor... | from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templates import get_t... | Make form grade server be a flag | Make form grade server be a flag
| Python | bsd-3-clause | modulexcite/nbgrader,jupyter/nbgrader,ellisonbg/nbgrader,EdwardJKim/nbgrader,ellisonbg/nbgrader,modulexcite/nbgrader,alope107/nbgrader,EdwardJKim/nbgrader,ellisonbg/nbgrader,dementrock/nbgrader,EdwardJKim/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jupyter/nbgrader,EdwardJKim/nbgrader,MatKallada/nbgrad... | from IPython.config.loader import Config
from IPython.config.application import catch_config_error
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp impor... | from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templates import get_t... | <commit_before>from IPython.config.loader import Config
from IPython.config.application import catch_config_error
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbc... | from IPython.config.loader import Config
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp import flags as base_flags
from nbgrader.templates import get_t... | from IPython.config.loader import Config
from IPython.config.application import catch_config_error
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbconvertapp impor... | <commit_before>from IPython.config.loader import Config
from IPython.config.application import catch_config_error
from IPython.utils.traitlets import Unicode
from nbgrader.apps.customnbconvertapp import CustomNbConvertApp
from nbgrader.apps.customnbconvertapp import aliases as base_aliases
from nbgrader.apps.customnbc... |
6aa95264e31f7b2eebb34432eace9440de5f0cb2 | s3authbasic/tests/test_views.py | s3authbasic/tests/test_views.py | from s3authbasic.testing import BaseAppTest, AUTH_ENVIRON
class ViewsTests(BaseAppTest):
def test_validpath(self):
for (path, expect) in (
('/', 'home'),
('/index.html', 'home'),
('/level1', 'level 1'),
('/level1/', 'level 1'),
('/level1/index.h... | from s3authbasic.testing import BaseAppTest, AUTH_ENVIRON
class ViewsTests(BaseAppTest):
def test_validpath(self):
for (path, expect) in (
('/', 'home'),
('/index.html', 'home'),
('/level1', 'level 1'),
('/level1/', 'level 1'),
('/level1/index.h... | Fix tests python 2.6 support | Fix tests python 2.6 support
| Python | mit | ant30/s3authbasic | from s3authbasic.testing import BaseAppTest, AUTH_ENVIRON
class ViewsTests(BaseAppTest):
def test_validpath(self):
for (path, expect) in (
('/', 'home'),
('/index.html', 'home'),
('/level1', 'level 1'),
('/level1/', 'level 1'),
('/level1/index.h... | from s3authbasic.testing import BaseAppTest, AUTH_ENVIRON
class ViewsTests(BaseAppTest):
def test_validpath(self):
for (path, expect) in (
('/', 'home'),
('/index.html', 'home'),
('/level1', 'level 1'),
('/level1/', 'level 1'),
('/level1/index.h... | <commit_before>from s3authbasic.testing import BaseAppTest, AUTH_ENVIRON
class ViewsTests(BaseAppTest):
def test_validpath(self):
for (path, expect) in (
('/', 'home'),
('/index.html', 'home'),
('/level1', 'level 1'),
('/level1/', 'level 1'),
('... | from s3authbasic.testing import BaseAppTest, AUTH_ENVIRON
class ViewsTests(BaseAppTest):
def test_validpath(self):
for (path, expect) in (
('/', 'home'),
('/index.html', 'home'),
('/level1', 'level 1'),
('/level1/', 'level 1'),
('/level1/index.h... | from s3authbasic.testing import BaseAppTest, AUTH_ENVIRON
class ViewsTests(BaseAppTest):
def test_validpath(self):
for (path, expect) in (
('/', 'home'),
('/index.html', 'home'),
('/level1', 'level 1'),
('/level1/', 'level 1'),
('/level1/index.h... | <commit_before>from s3authbasic.testing import BaseAppTest, AUTH_ENVIRON
class ViewsTests(BaseAppTest):
def test_validpath(self):
for (path, expect) in (
('/', 'home'),
('/index.html', 'home'),
('/level1', 'level 1'),
('/level1/', 'level 1'),
('... |
79f672d6fb129c90306afb3d8ad7ed599063bc07 | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-pgallery",
version=__import__("pgallery").__version__,
description="Photo gallery app for PostgreSQL and Django.",
long_description=read("... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-pgallery",
version=__import__("pgallery").__version__,
description="Photo gallery app for PostgreSQL and Django.",
long_description=read("... | Add classifier for Python 3.7. | Add classifier for Python 3.7.
| Python | mit | zsiciarz/django-pgallery,zsiciarz/django-pgallery | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-pgallery",
version=__import__("pgallery").__version__,
description="Photo gallery app for PostgreSQL and Django.",
long_description=read("... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-pgallery",
version=__import__("pgallery").__version__,
description="Photo gallery app for PostgreSQL and Django.",
long_description=read("... | <commit_before>import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-pgallery",
version=__import__("pgallery").__version__,
description="Photo gallery app for PostgreSQL and Django.",
long_des... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-pgallery",
version=__import__("pgallery").__version__,
description="Photo gallery app for PostgreSQL and Django.",
long_description=read("... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-pgallery",
version=__import__("pgallery").__version__,
description="Photo gallery app for PostgreSQL and Django.",
long_description=read("... | <commit_before>import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-pgallery",
version=__import__("pgallery").__version__,
description="Photo gallery app for PostgreSQL and Django.",
long_des... |
673da77b56cf21b540c9b7afbd483fecd6f43d7a | setup.py | setup.py | import setuptools
setuptools.setup(
name="nbresuse",
version='0.1.0',
url="https://github.com/yuvipanda/nbresuse",
author="Yuvi Panda",
description="Simple Jupyter extension to show how much resources (RAM) your notebook is using",
packages=setuptools.find_packages(),
install_requires=[
... | import setuptools
setuptools.setup(
name="nbresuse",
version='0.1.0',
url="https://github.com/yuvipanda/nbresuse",
author="Yuvi Panda",
description="Simple Jupyter extension to show how much resources (RAM) your notebook is using",
packages=setuptools.find_packages(),
install_requires=[
... | Add 'notebook' as a dependency | Add 'notebook' as a dependency
| Python | bsd-2-clause | allanlwu/allangdrive,allanlwu/allangdrive,yuvipanda/nbresuse,yuvipanda/nbresuse | import setuptools
setuptools.setup(
name="nbresuse",
version='0.1.0',
url="https://github.com/yuvipanda/nbresuse",
author="Yuvi Panda",
description="Simple Jupyter extension to show how much resources (RAM) your notebook is using",
packages=setuptools.find_packages(),
install_requires=[
... | import setuptools
setuptools.setup(
name="nbresuse",
version='0.1.0',
url="https://github.com/yuvipanda/nbresuse",
author="Yuvi Panda",
description="Simple Jupyter extension to show how much resources (RAM) your notebook is using",
packages=setuptools.find_packages(),
install_requires=[
... | <commit_before>import setuptools
setuptools.setup(
name="nbresuse",
version='0.1.0',
url="https://github.com/yuvipanda/nbresuse",
author="Yuvi Panda",
description="Simple Jupyter extension to show how much resources (RAM) your notebook is using",
packages=setuptools.find_packages(),
install... | import setuptools
setuptools.setup(
name="nbresuse",
version='0.1.0',
url="https://github.com/yuvipanda/nbresuse",
author="Yuvi Panda",
description="Simple Jupyter extension to show how much resources (RAM) your notebook is using",
packages=setuptools.find_packages(),
install_requires=[
... | import setuptools
setuptools.setup(
name="nbresuse",
version='0.1.0',
url="https://github.com/yuvipanda/nbresuse",
author="Yuvi Panda",
description="Simple Jupyter extension to show how much resources (RAM) your notebook is using",
packages=setuptools.find_packages(),
install_requires=[
... | <commit_before>import setuptools
setuptools.setup(
name="nbresuse",
version='0.1.0',
url="https://github.com/yuvipanda/nbresuse",
author="Yuvi Panda",
description="Simple Jupyter extension to show how much resources (RAM) your notebook is using",
packages=setuptools.find_packages(),
install... |
7b61dd4a9d67b81565349114f953c841de447a4c | setup.py | setup.py | from setuptools import setup, find_packages
import os
version = '0.4.3'
here = os.path.abspath(os.path.dirname(__file__))
long_description = open(os.path.join(here, 'README.rst')).read()
setup(name='specloud',
version=version,
description="install nosetests and plugins to ease bdd unit specs",
long_... | from setuptools import setup, find_packages
import os
version = '0.4.3'
here = os.path.abspath(os.path.dirname(__file__))
long_description = open(os.path.join(here, 'README.rst')).read()
setup(name='specloud',
version=version,
description="install nosetests and plugins to ease bdd unit specs",
long_... | Update to get newest nose version. | Update to get newest nose version.
| Python | mit | hltbra/specloud | from setuptools import setup, find_packages
import os
version = '0.4.3'
here = os.path.abspath(os.path.dirname(__file__))
long_description = open(os.path.join(here, 'README.rst')).read()
setup(name='specloud',
version=version,
description="install nosetests and plugins to ease bdd unit specs",
long_... | from setuptools import setup, find_packages
import os
version = '0.4.3'
here = os.path.abspath(os.path.dirname(__file__))
long_description = open(os.path.join(here, 'README.rst')).read()
setup(name='specloud',
version=version,
description="install nosetests and plugins to ease bdd unit specs",
long_... | <commit_before>from setuptools import setup, find_packages
import os
version = '0.4.3'
here = os.path.abspath(os.path.dirname(__file__))
long_description = open(os.path.join(here, 'README.rst')).read()
setup(name='specloud',
version=version,
description="install nosetests and plugins to ease bdd unit spec... | from setuptools import setup, find_packages
import os
version = '0.4.3'
here = os.path.abspath(os.path.dirname(__file__))
long_description = open(os.path.join(here, 'README.rst')).read()
setup(name='specloud',
version=version,
description="install nosetests and plugins to ease bdd unit specs",
long_... | from setuptools import setup, find_packages
import os
version = '0.4.3'
here = os.path.abspath(os.path.dirname(__file__))
long_description = open(os.path.join(here, 'README.rst')).read()
setup(name='specloud',
version=version,
description="install nosetests and plugins to ease bdd unit specs",
long_... | <commit_before>from setuptools import setup, find_packages
import os
version = '0.4.3'
here = os.path.abspath(os.path.dirname(__file__))
long_description = open(os.path.join(here, 'README.rst')).read()
setup(name='specloud',
version=version,
description="install nosetests and plugins to ease bdd unit spec... |
bf9f55d60087624df84c32ec6d1e5cf58045ed25 | setup.py | setup.py | # -*- coding: utf-8 -*-
"""Packaging implementation"""
from os.path import dirname, join
from setuptools import setup
def read_file(filename):
with open(join(dirname(__file__), filename)) as file:
return file.read()
setup(
name='dj-email-url',
version='1.0.4',
url='https://github.com/migonza... | # -*- coding: utf-8 -*-
"""Packaging implementation"""
from os.path import dirname, join
from setuptools import setup
def read_file(filename):
with open(join(dirname(__file__), filename)) as file:
return file.read()
setup(
name='dj-email-url',
version='1.0.4',
url='https://github.com/migonza... | Add long description content type | Add long description content type
| Python | bsd-2-clause | migonzalvar/dj-email-url | # -*- coding: utf-8 -*-
"""Packaging implementation"""
from os.path import dirname, join
from setuptools import setup
def read_file(filename):
with open(join(dirname(__file__), filename)) as file:
return file.read()
setup(
name='dj-email-url',
version='1.0.4',
url='https://github.com/migonza... | # -*- coding: utf-8 -*-
"""Packaging implementation"""
from os.path import dirname, join
from setuptools import setup
def read_file(filename):
with open(join(dirname(__file__), filename)) as file:
return file.read()
setup(
name='dj-email-url',
version='1.0.4',
url='https://github.com/migonza... | <commit_before># -*- coding: utf-8 -*-
"""Packaging implementation"""
from os.path import dirname, join
from setuptools import setup
def read_file(filename):
with open(join(dirname(__file__), filename)) as file:
return file.read()
setup(
name='dj-email-url',
version='1.0.4',
url='https://git... | # -*- coding: utf-8 -*-
"""Packaging implementation"""
from os.path import dirname, join
from setuptools import setup
def read_file(filename):
with open(join(dirname(__file__), filename)) as file:
return file.read()
setup(
name='dj-email-url',
version='1.0.4',
url='https://github.com/migonza... | # -*- coding: utf-8 -*-
"""Packaging implementation"""
from os.path import dirname, join
from setuptools import setup
def read_file(filename):
with open(join(dirname(__file__), filename)) as file:
return file.read()
setup(
name='dj-email-url',
version='1.0.4',
url='https://github.com/migonza... | <commit_before># -*- coding: utf-8 -*-
"""Packaging implementation"""
from os.path import dirname, join
from setuptools import setup
def read_file(filename):
with open(join(dirname(__file__), filename)) as file:
return file.read()
setup(
name='dj-email-url',
version='1.0.4',
url='https://git... |
401efb45b472b27c6e08fe5216040d39ea521b94 | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'envitro',
version = '0.1.0',
packages = find_packages(),
description = '',
license = 'Apache 2',
author = 'Marc Meszaros',
author_email = '[email protected]',
url = 'https://github.com/MarcMeszaros/envi... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'envitro',
version = '0.1.0',
packages = find_packages(),
description = 'A module to read environment variables.',
license = 'Apache 2',
author = 'Marc Meszaros',
author_email = '[email protected]',
url ... | Add a description for the package | Add a description for the package
| Python | apache-2.0 | MarcMeszaros/envitro | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'envitro',
version = '0.1.0',
packages = find_packages(),
description = '',
license = 'Apache 2',
author = 'Marc Meszaros',
author_email = '[email protected]',
url = 'https://github.com/MarcMeszaros/envi... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'envitro',
version = '0.1.0',
packages = find_packages(),
description = 'A module to read environment variables.',
license = 'Apache 2',
author = 'Marc Meszaros',
author_email = '[email protected]',
url ... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'envitro',
version = '0.1.0',
packages = find_packages(),
description = '',
license = 'Apache 2',
author = 'Marc Meszaros',
author_email = '[email protected]',
url = 'https://github.com/Ma... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'envitro',
version = '0.1.0',
packages = find_packages(),
description = 'A module to read environment variables.',
license = 'Apache 2',
author = 'Marc Meszaros',
author_email = '[email protected]',
url ... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'envitro',
version = '0.1.0',
packages = find_packages(),
description = '',
license = 'Apache 2',
author = 'Marc Meszaros',
author_email = '[email protected]',
url = 'https://github.com/MarcMeszaros/envi... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'envitro',
version = '0.1.0',
packages = find_packages(),
description = '',
license = 'Apache 2',
author = 'Marc Meszaros',
author_email = '[email protected]',
url = 'https://github.com/Ma... |
c955f4c7aa281286cabd2dcb5ca33ac5b21bec2b | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='webp',
version='0.1.0a17',
url='https://github.com/anibali/pywebp',
packages=find_packages(include=['webp', 'webp.*', 'webp_build']),
package_data={'webp_build': ['*.h', '*.c']},
author='Aiden Nibali',
descrip... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='webp',
version='0.1.0a17',
url='https://github.com/anibali/pywebp',
packages=find_packages(include=['webp', 'webp.*', 'webp_build']),
package_data={'webp_build': ['*.h', '*.c']},
author='Aiden Nibali',
descrip... | Make minimum cffi versions consistent | Make minimum cffi versions consistent
| Python | mit | anibali/pywebp,anibali/pywebp,anibali/pywebp | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='webp',
version='0.1.0a17',
url='https://github.com/anibali/pywebp',
packages=find_packages(include=['webp', 'webp.*', 'webp_build']),
package_data={'webp_build': ['*.h', '*.c']},
author='Aiden Nibali',
descrip... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='webp',
version='0.1.0a17',
url='https://github.com/anibali/pywebp',
packages=find_packages(include=['webp', 'webp.*', 'webp_build']),
package_data={'webp_build': ['*.h', '*.c']},
author='Aiden Nibali',
descrip... | <commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='webp',
version='0.1.0a17',
url='https://github.com/anibali/pywebp',
packages=find_packages(include=['webp', 'webp.*', 'webp_build']),
package_data={'webp_build': ['*.h', '*.c']},
author='Aiden Nibal... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='webp',
version='0.1.0a17',
url='https://github.com/anibali/pywebp',
packages=find_packages(include=['webp', 'webp.*', 'webp_build']),
package_data={'webp_build': ['*.h', '*.c']},
author='Aiden Nibali',
descrip... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='webp',
version='0.1.0a17',
url='https://github.com/anibali/pywebp',
packages=find_packages(include=['webp', 'webp.*', 'webp_build']),
package_data={'webp_build': ['*.h', '*.c']},
author='Aiden Nibali',
descrip... | <commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='webp',
version='0.1.0a17',
url='https://github.com/anibali/pywebp',
packages=find_packages(include=['webp', 'webp.*', 'webp_build']),
package_data={'webp_build': ['*.h', '*.c']},
author='Aiden Nibal... |
f56dedd5ed73291c749a980c7d16f1e0b5a122c5 | setup.py | setup.py | """
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.3",
url="http://github.com/codeforamerica/three",
author="Zach Williams",
author_email="[email protected]",
description... | """
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.4",
url="http://github.com/codeforamerica/three",
author="Zach Williams",
author_email="[email protected]",
description... | Add new version to PyPi | Add new version to PyPi
| Python | bsd-3-clause | codeforamerica/three | """
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.3",
url="http://github.com/codeforamerica/three",
author="Zach Williams",
author_email="[email protected]",
description... | """
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.4",
url="http://github.com/codeforamerica/three",
author="Zach Williams",
author_email="[email protected]",
description... | <commit_before>"""
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.3",
url="http://github.com/codeforamerica/three",
author="Zach Williams",
author_email="[email protected]",
... | """
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.4",
url="http://github.com/codeforamerica/three",
author="Zach Williams",
author_email="[email protected]",
description... | """
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.3",
url="http://github.com/codeforamerica/three",
author="Zach Williams",
author_email="[email protected]",
description... | <commit_before>"""
Setup and installation for the package.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="three",
version="0.3",
url="http://github.com/codeforamerica/three",
author="Zach Williams",
author_email="[email protected]",
... |
73a566525d94de0f1c0a35a93592d18d1c71eda5 | setup.py | setup.py | from __future__ import unicode_literals
import re
from setuptools import setup, find_packages
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Python-Tunigo',
version=get_version('... | from __future__ import unicode_literals
import re
from setuptools import setup, find_packages
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='tunigo',
version=get_version('tunigo/... | Remove python prefix from name | Remove python prefix from name
| Python | apache-2.0 | trygveaa/python-tunigo | from __future__ import unicode_literals
import re
from setuptools import setup, find_packages
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Python-Tunigo',
version=get_version('... | from __future__ import unicode_literals
import re
from setuptools import setup, find_packages
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='tunigo',
version=get_version('tunigo/... | <commit_before>from __future__ import unicode_literals
import re
from setuptools import setup, find_packages
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Python-Tunigo',
versio... | from __future__ import unicode_literals
import re
from setuptools import setup, find_packages
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='tunigo',
version=get_version('tunigo/... | from __future__ import unicode_literals
import re
from setuptools import setup, find_packages
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Python-Tunigo',
version=get_version('... | <commit_before>from __future__ import unicode_literals
import re
from setuptools import setup, find_packages
def get_version(filename):
content = open(filename).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content))
return metadata['version']
setup(
name='Python-Tunigo',
versio... |
9f668ed8039b0c2c5702625583f0d5c8b47cf27a | setup.py | setup.py | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='trufflehog',
version='0.1',
packages=['trufflehog'],
include_package_data=True,
license='M... | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='trufflehog',
version='0.1.1',
packages=['trufflehog'],
include_package_data=True,
license=... | Update to new version :) | Update to new version :)
| Python | mit | jleeothon/trufflehog | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='trufflehog',
version='0.1',
packages=['trufflehog'],
include_package_data=True,
license='M... | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='trufflehog',
version='0.1.1',
packages=['trufflehog'],
include_package_data=True,
license=... | <commit_before>import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='trufflehog',
version='0.1',
packages=['trufflehog'],
include_package_data=True,... | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='trufflehog',
version='0.1.1',
packages=['trufflehog'],
include_package_data=True,
license=... | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='trufflehog',
version='0.1',
packages=['trufflehog'],
include_package_data=True,
license='M... | <commit_before>import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='trufflehog',
version='0.1',
packages=['trufflehog'],
include_package_data=True,... |
59196bea40b8d77f01d2d6d57212167870fb504d | setup.py | setup.py | from setuptools import setup
setup(
name='snappass',
version='1.3.0',
description="It's like SnapChat... for Passwords.",
long_description=(open('README.rst').read() + '\n\n' +
open('AUTHORS.rst').read()),
url='http://github.com/Pinterest/snappass/',
install_requires=['Fla... | from setuptools import setup
setup(
name='snappass',
version='1.3.0',
description="It's like SnapChat... for Passwords.",
long_description=(open('README.rst').read() + '\n\n' +
open('AUTHORS.rst').read()),
url='http://github.com/Pinterest/snappass/',
install_requires=['Fla... | Update Trove classifier to include Python 3.7 | Update Trove classifier to include Python 3.7
| Python | mit | samteezy/snappass-heroku,samteezy/snappass-heroku,pinterest/snappass,samteezy/snappass-heroku,pinterest/snappass,pinterest/snappass | from setuptools import setup
setup(
name='snappass',
version='1.3.0',
description="It's like SnapChat... for Passwords.",
long_description=(open('README.rst').read() + '\n\n' +
open('AUTHORS.rst').read()),
url='http://github.com/Pinterest/snappass/',
install_requires=['Fla... | from setuptools import setup
setup(
name='snappass',
version='1.3.0',
description="It's like SnapChat... for Passwords.",
long_description=(open('README.rst').read() + '\n\n' +
open('AUTHORS.rst').read()),
url='http://github.com/Pinterest/snappass/',
install_requires=['Fla... | <commit_before>from setuptools import setup
setup(
name='snappass',
version='1.3.0',
description="It's like SnapChat... for Passwords.",
long_description=(open('README.rst').read() + '\n\n' +
open('AUTHORS.rst').read()),
url='http://github.com/Pinterest/snappass/',
install... | from setuptools import setup
setup(
name='snappass',
version='1.3.0',
description="It's like SnapChat... for Passwords.",
long_description=(open('README.rst').read() + '\n\n' +
open('AUTHORS.rst').read()),
url='http://github.com/Pinterest/snappass/',
install_requires=['Fla... | from setuptools import setup
setup(
name='snappass',
version='1.3.0',
description="It's like SnapChat... for Passwords.",
long_description=(open('README.rst').read() + '\n\n' +
open('AUTHORS.rst').read()),
url='http://github.com/Pinterest/snappass/',
install_requires=['Fla... | <commit_before>from setuptools import setup
setup(
name='snappass',
version='1.3.0',
description="It's like SnapChat... for Passwords.",
long_description=(open('README.rst').read() + '\n\n' +
open('AUTHORS.rst').read()),
url='http://github.com/Pinterest/snappass/',
install... |
24994d0e9c7bf35a12baad371cdbe16b836588c3 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='datacube-experiments',
description='Experimental Datacube v2 Ingestor',
version='0.0.1',
packages=['ingester'],
url='http://github.com/omad/datacube-experiments',
install_requires=[
'click',
'eodatasets',
'... | #!/usr/bin/env python
from setuptools import setup
setup(
name='datacube-experiments',
description='Experimental Datacube v2 Ingestor',
version='0.0.1',
packages=['ingester'],
url='http://github.com/omad/datacube-experiments',
install_requires=[
'click',
'eodatasets',
'... | Fix typo when renaming ingestor -> ingester | Fix typo when renaming ingestor -> ingester
| Python | bsd-3-clause | omad/datacube-experiments | #!/usr/bin/env python
from setuptools import setup
setup(
name='datacube-experiments',
description='Experimental Datacube v2 Ingestor',
version='0.0.1',
packages=['ingester'],
url='http://github.com/omad/datacube-experiments',
install_requires=[
'click',
'eodatasets',
'... | #!/usr/bin/env python
from setuptools import setup
setup(
name='datacube-experiments',
description='Experimental Datacube v2 Ingestor',
version='0.0.1',
packages=['ingester'],
url='http://github.com/omad/datacube-experiments',
install_requires=[
'click',
'eodatasets',
'... | <commit_before>#!/usr/bin/env python
from setuptools import setup
setup(
name='datacube-experiments',
description='Experimental Datacube v2 Ingestor',
version='0.0.1',
packages=['ingester'],
url='http://github.com/omad/datacube-experiments',
install_requires=[
'click',
'eodatas... | #!/usr/bin/env python
from setuptools import setup
setup(
name='datacube-experiments',
description='Experimental Datacube v2 Ingestor',
version='0.0.1',
packages=['ingester'],
url='http://github.com/omad/datacube-experiments',
install_requires=[
'click',
'eodatasets',
'... | #!/usr/bin/env python
from setuptools import setup
setup(
name='datacube-experiments',
description='Experimental Datacube v2 Ingestor',
version='0.0.1',
packages=['ingester'],
url='http://github.com/omad/datacube-experiments',
install_requires=[
'click',
'eodatasets',
'... | <commit_before>#!/usr/bin/env python
from setuptools import setup
setup(
name='datacube-experiments',
description='Experimental Datacube v2 Ingestor',
version='0.0.1',
packages=['ingester'],
url='http://github.com/omad/datacube-experiments',
install_requires=[
'click',
'eodatas... |
2fbf7ea2dd7f163bb86f60e5c607af2fd43e1739 | kicost/currency_converter/download_rates.py | kicost/currency_converter/download_rates.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnología Industrial
# License: Apache 2.0
# Project: KiCost
"""
Simple helper to download the exchange rates.
"""
import sys
from bs4 import BeautifulSoup
if sys.version_info[0] < 3:
from... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnología Industrial
# License: Apache 2.0
# Project: KiCost
"""
Simple helper to download the exchange rates.
"""
import os
import sys
from bs4 import BeautifulSoup
if sys.version_info[0] < 3... | Allow to fake the currency rates. | Allow to fake the currency rates.
- The envidonment variable KICOST_CURRENCY_RATES can be used to fake
the cunrrency rates.
- It must indicate the name of an XML file containing the desired
rates.
- The format is the one used by the European Central Bank.
| Python | mit | xesscorp/KiCost,xesscorp/KiCost,hildogjr/KiCost,hildogjr/KiCost,xesscorp/KiCost,hildogjr/KiCost | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnología Industrial
# License: Apache 2.0
# Project: KiCost
"""
Simple helper to download the exchange rates.
"""
import sys
from bs4 import BeautifulSoup
if sys.version_info[0] < 3:
from... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnología Industrial
# License: Apache 2.0
# Project: KiCost
"""
Simple helper to download the exchange rates.
"""
import os
import sys
from bs4 import BeautifulSoup
if sys.version_info[0] < 3... | <commit_before>#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnología Industrial
# License: Apache 2.0
# Project: KiCost
"""
Simple helper to download the exchange rates.
"""
import sys
from bs4 import BeautifulSoup
if sys.version_info[0... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnología Industrial
# License: Apache 2.0
# Project: KiCost
"""
Simple helper to download the exchange rates.
"""
import os
import sys
from bs4 import BeautifulSoup
if sys.version_info[0] < 3... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnología Industrial
# License: Apache 2.0
# Project: KiCost
"""
Simple helper to download the exchange rates.
"""
import sys
from bs4 import BeautifulSoup
if sys.version_info[0] < 3:
from... | <commit_before>#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnología Industrial
# License: Apache 2.0
# Project: KiCost
"""
Simple helper to download the exchange rates.
"""
import sys
from bs4 import BeautifulSoup
if sys.version_info[0... |
ff3c3c3842790cc9eb06f1241d6da77f828859c1 | IPython/external/qt.py | IPython/external/qt.py | """ A Qt API selector that can be used to switch between PyQt and PySide.
"""
import os
# Use PyQt by default until PySide is stable.
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
# For PySide compatibility, use the new string API that automatically
# converts QStrings to unicode Python stri... | """ A Qt API selector that can be used to switch between PyQt and PySide.
"""
import os
# Available APIs.
QT_API_PYQT = 'pyqt'
QT_API_PYSIDE = 'pyside'
# Use PyQt by default until PySide is stable.
QT_API = os.environ.get('QT_API', QT_API_PYQT)
if QT_API == QT_API_PYQT:
# For PySide compatibility, use the new s... | Clean up in Qt API switcher. | Clean up in Qt API switcher.
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | """ A Qt API selector that can be used to switch between PyQt and PySide.
"""
import os
# Use PyQt by default until PySide is stable.
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
# For PySide compatibility, use the new string API that automatically
# converts QStrings to unicode Python stri... | """ A Qt API selector that can be used to switch between PyQt and PySide.
"""
import os
# Available APIs.
QT_API_PYQT = 'pyqt'
QT_API_PYSIDE = 'pyside'
# Use PyQt by default until PySide is stable.
QT_API = os.environ.get('QT_API', QT_API_PYQT)
if QT_API == QT_API_PYQT:
# For PySide compatibility, use the new s... | <commit_before>""" A Qt API selector that can be used to switch between PyQt and PySide.
"""
import os
# Use PyQt by default until PySide is stable.
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
# For PySide compatibility, use the new string API that automatically
# converts QStrings to unic... | """ A Qt API selector that can be used to switch between PyQt and PySide.
"""
import os
# Available APIs.
QT_API_PYQT = 'pyqt'
QT_API_PYSIDE = 'pyside'
# Use PyQt by default until PySide is stable.
QT_API = os.environ.get('QT_API', QT_API_PYQT)
if QT_API == QT_API_PYQT:
# For PySide compatibility, use the new s... | """ A Qt API selector that can be used to switch between PyQt and PySide.
"""
import os
# Use PyQt by default until PySide is stable.
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
# For PySide compatibility, use the new string API that automatically
# converts QStrings to unicode Python stri... | <commit_before>""" A Qt API selector that can be used to switch between PyQt and PySide.
"""
import os
# Use PyQt by default until PySide is stable.
qt_api = os.environ.get('QT_API', 'pyqt')
if qt_api == 'pyqt':
# For PySide compatibility, use the new string API that automatically
# converts QStrings to unic... |
d5ded8c16f91c1171d7435749b050c5c13c3ce1b | echo_client.py | echo_client.py | import socket
import sys
def client(msg):
client_socket = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
client_socket.connect(('127.0.0.1', 50000))
# sends command line message to server, closes socket to writing
client_socket.sendall(msg)
client_so... | import socket
import sys
def client(msg):
client_socket = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
client_socket.connect(('127.0.0.1', 50000))
# sends command line message to server, closes socket to writing
client_socket.sendall(msg)
client_so... | Return response instead of print on client side | Return response instead of print on client side
| Python | mit | jwarren116/network-tools,jwarren116/network-tools | import socket
import sys
def client(msg):
client_socket = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
client_socket.connect(('127.0.0.1', 50000))
# sends command line message to server, closes socket to writing
client_socket.sendall(msg)
client_so... | import socket
import sys
def client(msg):
client_socket = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
client_socket.connect(('127.0.0.1', 50000))
# sends command line message to server, closes socket to writing
client_socket.sendall(msg)
client_so... | <commit_before>import socket
import sys
def client(msg):
client_socket = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
client_socket.connect(('127.0.0.1', 50000))
# sends command line message to server, closes socket to writing
client_socket.sendall(msg... | import socket
import sys
def client(msg):
client_socket = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
client_socket.connect(('127.0.0.1', 50000))
# sends command line message to server, closes socket to writing
client_socket.sendall(msg)
client_so... | import socket
import sys
def client(msg):
client_socket = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
client_socket.connect(('127.0.0.1', 50000))
# sends command line message to server, closes socket to writing
client_socket.sendall(msg)
client_so... | <commit_before>import socket
import sys
def client(msg):
client_socket = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
client_socket.connect(('127.0.0.1', 50000))
# sends command line message to server, closes socket to writing
client_socket.sendall(msg... |
975664ce73283d89b1b3e9422366da87c67860ad | girder/test_girder/test_web_client.py | girder/test_girder/test_web_client.py | import os
import pytest
from pytest_girder.web_client import runWebClientTest
from .girder_utilities import girderWorker # noqa
@pytest.mark.usefixtures('girderWorker') # noqa
@pytest.mark.parametrize('spec', (
'annotationListSpec.js',
'annotationSpec.js',
'geojsAnnotationSpec.js',
'geojsSpec.js',
... | import os
import pytest
from pytest_girder.web_client import runWebClientTest
from .girder_utilities import girderWorker # noqa
@pytest.mark.usefixtures('girderWorker') # noqa
@pytest.mark.parametrize('spec', (
'annotationListSpec.js',
# 'annotationSpec.js',
'geojsAnnotationSpec.js',
'geojsSpec.js'... | Disable the annotationSpec so that CI will pass until we fix it. | Disable the annotationSpec so that CI will pass until we fix it.
| Python | apache-2.0 | DigitalSlideArchive/large_image,girder/large_image,DigitalSlideArchive/large_image,DigitalSlideArchive/large_image,girder/large_image,girder/large_image | import os
import pytest
from pytest_girder.web_client import runWebClientTest
from .girder_utilities import girderWorker # noqa
@pytest.mark.usefixtures('girderWorker') # noqa
@pytest.mark.parametrize('spec', (
'annotationListSpec.js',
'annotationSpec.js',
'geojsAnnotationSpec.js',
'geojsSpec.js',
... | import os
import pytest
from pytest_girder.web_client import runWebClientTest
from .girder_utilities import girderWorker # noqa
@pytest.mark.usefixtures('girderWorker') # noqa
@pytest.mark.parametrize('spec', (
'annotationListSpec.js',
# 'annotationSpec.js',
'geojsAnnotationSpec.js',
'geojsSpec.js'... | <commit_before>import os
import pytest
from pytest_girder.web_client import runWebClientTest
from .girder_utilities import girderWorker # noqa
@pytest.mark.usefixtures('girderWorker') # noqa
@pytest.mark.parametrize('spec', (
'annotationListSpec.js',
'annotationSpec.js',
'geojsAnnotationSpec.js',
'... | import os
import pytest
from pytest_girder.web_client import runWebClientTest
from .girder_utilities import girderWorker # noqa
@pytest.mark.usefixtures('girderWorker') # noqa
@pytest.mark.parametrize('spec', (
'annotationListSpec.js',
# 'annotationSpec.js',
'geojsAnnotationSpec.js',
'geojsSpec.js'... | import os
import pytest
from pytest_girder.web_client import runWebClientTest
from .girder_utilities import girderWorker # noqa
@pytest.mark.usefixtures('girderWorker') # noqa
@pytest.mark.parametrize('spec', (
'annotationListSpec.js',
'annotationSpec.js',
'geojsAnnotationSpec.js',
'geojsSpec.js',
... | <commit_before>import os
import pytest
from pytest_girder.web_client import runWebClientTest
from .girder_utilities import girderWorker # noqa
@pytest.mark.usefixtures('girderWorker') # noqa
@pytest.mark.parametrize('spec', (
'annotationListSpec.js',
'annotationSpec.js',
'geojsAnnotationSpec.js',
'... |
f14329dd4449c352cdf82ff2ffab0bfb9bcff882 | parser.py | parser.py | from collections import namedtuple
IRCMsg = namedtuple('IRCMsg', 'prefix cmd params postfix')
def parse(line):
""" Parses line and returns a named tuple IRCMsg
with fields (prefix, cmd, params, postfix).
- prefix is the first part starting with : (colon), without the :
- cmd is the command... | from collections import namedtuple
IRCMsg = namedtuple('IRCMsg', 'prefix cmd params postfix')
def parse(line):
""" Parses line and returns a named tuple IRCMsg
with fields (prefix, cmd, params, postfix).
- prefix is the first part starting with : (colon), without the :
- cmd is the command... | Fix parsing irc messages with empty list of parameters | Fix parsing irc messages with empty list of parameters
| Python | mit | aalien/mib | from collections import namedtuple
IRCMsg = namedtuple('IRCMsg', 'prefix cmd params postfix')
def parse(line):
""" Parses line and returns a named tuple IRCMsg
with fields (prefix, cmd, params, postfix).
- prefix is the first part starting with : (colon), without the :
- cmd is the command... | from collections import namedtuple
IRCMsg = namedtuple('IRCMsg', 'prefix cmd params postfix')
def parse(line):
""" Parses line and returns a named tuple IRCMsg
with fields (prefix, cmd, params, postfix).
- prefix is the first part starting with : (colon), without the :
- cmd is the command... | <commit_before>from collections import namedtuple
IRCMsg = namedtuple('IRCMsg', 'prefix cmd params postfix')
def parse(line):
""" Parses line and returns a named tuple IRCMsg
with fields (prefix, cmd, params, postfix).
- prefix is the first part starting with : (colon), without the :
- cmd... | from collections import namedtuple
IRCMsg = namedtuple('IRCMsg', 'prefix cmd params postfix')
def parse(line):
""" Parses line and returns a named tuple IRCMsg
with fields (prefix, cmd, params, postfix).
- prefix is the first part starting with : (colon), without the :
- cmd is the command... | from collections import namedtuple
IRCMsg = namedtuple('IRCMsg', 'prefix cmd params postfix')
def parse(line):
""" Parses line and returns a named tuple IRCMsg
with fields (prefix, cmd, params, postfix).
- prefix is the first part starting with : (colon), without the :
- cmd is the command... | <commit_before>from collections import namedtuple
IRCMsg = namedtuple('IRCMsg', 'prefix cmd params postfix')
def parse(line):
""" Parses line and returns a named tuple IRCMsg
with fields (prefix, cmd, params, postfix).
- prefix is the first part starting with : (colon), without the :
- cmd... |
d6a054b4d59081920c68917c659ecd51a4517086 | client.py | client.py | import json
import requests
import requests_jwt
try:
from config import credentials, urls
except ImportError:
print('Config.py not found. Copy config.in to config.py and edit to suit.')
exit()
PAGE_SIZE = 20
def login(email, password):
r = requests.post(urls.login,
json={"email... | import json
import requests
import requests_jwt
try:
from config import credentials, urls
except ImportError:
print('Config.py not found. Copy config.in to config.py and edit to suit.')
exit()
PAGE_SIZE = 20
def login(email, password):
r = requests.post(urls.login,
json={"email... | Add Range header for GET that should be HEAD | Add Range header for GET that should be HEAD
| Python | mit | davidthewatson/postgrest_python_requests_client | import json
import requests
import requests_jwt
try:
from config import credentials, urls
except ImportError:
print('Config.py not found. Copy config.in to config.py and edit to suit.')
exit()
PAGE_SIZE = 20
def login(email, password):
r = requests.post(urls.login,
json={"email... | import json
import requests
import requests_jwt
try:
from config import credentials, urls
except ImportError:
print('Config.py not found. Copy config.in to config.py and edit to suit.')
exit()
PAGE_SIZE = 20
def login(email, password):
r = requests.post(urls.login,
json={"email... | <commit_before>import json
import requests
import requests_jwt
try:
from config import credentials, urls
except ImportError:
print('Config.py not found. Copy config.in to config.py and edit to suit.')
exit()
PAGE_SIZE = 20
def login(email, password):
r = requests.post(urls.login,
... | import json
import requests
import requests_jwt
try:
from config import credentials, urls
except ImportError:
print('Config.py not found. Copy config.in to config.py and edit to suit.')
exit()
PAGE_SIZE = 20
def login(email, password):
r = requests.post(urls.login,
json={"email... | import json
import requests
import requests_jwt
try:
from config import credentials, urls
except ImportError:
print('Config.py not found. Copy config.in to config.py and edit to suit.')
exit()
PAGE_SIZE = 20
def login(email, password):
r = requests.post(urls.login,
json={"email... | <commit_before>import json
import requests
import requests_jwt
try:
from config import credentials, urls
except ImportError:
print('Config.py not found. Copy config.in to config.py and edit to suit.')
exit()
PAGE_SIZE = 20
def login(email, password):
r = requests.post(urls.login,
... |
d7241f9c22ae6e962a2a7a7b2d9cf2a8eb1044a6 | scripts/stops.py | scripts/stops.py | #!/usr/bin/python
import sys
import csv
import json
def main(argv):
if len(argv) < 1:
print "Usage: ./stops.py outFile.js [/path/to/stops.txt]"
csvFile = open(argv[1] if argv[1] else "stops.txt")
features = []
for row in csv.DictReader(csvFile):
feature = {
'type': 'Featu... | #!/usr/bin/python
# Written by Taylor Denouden March 17, 2014
# Script to convert GTFS stops to geojson
import sys
import csv
import json
def main(argv):
if len(argv) < 1:
print "Usage: ./stops.py outFile.js [/path/to/stops.txt]"
csvFile = open(argv[1] if argv[1] else "stops.txt")
features = []
... | Add author note and description | Add author note and description
| Python | mit | bus-viz/bus-viz,bus-viz/bus-viz,bus-viz/bus-viz | #!/usr/bin/python
import sys
import csv
import json
def main(argv):
if len(argv) < 1:
print "Usage: ./stops.py outFile.js [/path/to/stops.txt]"
csvFile = open(argv[1] if argv[1] else "stops.txt")
features = []
for row in csv.DictReader(csvFile):
feature = {
'type': 'Featu... | #!/usr/bin/python
# Written by Taylor Denouden March 17, 2014
# Script to convert GTFS stops to geojson
import sys
import csv
import json
def main(argv):
if len(argv) < 1:
print "Usage: ./stops.py outFile.js [/path/to/stops.txt]"
csvFile = open(argv[1] if argv[1] else "stops.txt")
features = []
... | <commit_before>#!/usr/bin/python
import sys
import csv
import json
def main(argv):
if len(argv) < 1:
print "Usage: ./stops.py outFile.js [/path/to/stops.txt]"
csvFile = open(argv[1] if argv[1] else "stops.txt")
features = []
for row in csv.DictReader(csvFile):
feature = {
... | #!/usr/bin/python
# Written by Taylor Denouden March 17, 2014
# Script to convert GTFS stops to geojson
import sys
import csv
import json
def main(argv):
if len(argv) < 1:
print "Usage: ./stops.py outFile.js [/path/to/stops.txt]"
csvFile = open(argv[1] if argv[1] else "stops.txt")
features = []
... | #!/usr/bin/python
import sys
import csv
import json
def main(argv):
if len(argv) < 1:
print "Usage: ./stops.py outFile.js [/path/to/stops.txt]"
csvFile = open(argv[1] if argv[1] else "stops.txt")
features = []
for row in csv.DictReader(csvFile):
feature = {
'type': 'Featu... | <commit_before>#!/usr/bin/python
import sys
import csv
import json
def main(argv):
if len(argv) < 1:
print "Usage: ./stops.py outFile.js [/path/to/stops.txt]"
csvFile = open(argv[1] if argv[1] else "stops.txt")
features = []
for row in csv.DictReader(csvFile):
feature = {
... |
56a08fae0947f1c3057aebc39a898a4dd390da6e | st2common/st2common/constants/scheduler.py | st2common/st2common/constants/scheduler.py | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | Fix st2actions tests so they pass under Python 3. | Fix st2actions tests so they pass under Python 3.
| Python | apache-2.0 | Plexxi/st2,nzlosh/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,StackStorm/st2,nzlosh/st2,Plexxi/st2,Plexxi/st2,StackStorm/st2,Plexxi/st2,nzlosh/st2 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | <commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you... | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | <commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you... |
ca348485b0acf2dbc41f2b4e52140d69e318327c | conanfile.py | conanfile.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class CtreConan(ConanFile):
name = "CTRE"
version = "2.0"
license = "MIT"
url = "https://github.com/hanickadot/compile-time-regular-expressions.git"
author = "Hana Dusíková ([email protected])"
description = "Compile Tim... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class CtreConan(ConanFile):
name = "CTRE"
version = "2.0"
license = "MIT"
url = "https://github.com/hanickadot/compile-time-regular-expressions"
author = "Hana Dusíková ([email protected])"
description = "Compile Time Re... | Use SCM feature to build Conan package | Use SCM feature to build Conan package
- SCM could export all project files helping to build
Signed-off-by: Uilian Ries <[email protected]>
| Python | apache-2.0 | hanickadot/compile-time-regular-expressions,hanickadot/syntax-parser,hanickadot/compile-time-regular-expressions,hanickadot/compile-time-regular-expressions | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class CtreConan(ConanFile):
name = "CTRE"
version = "2.0"
license = "MIT"
url = "https://github.com/hanickadot/compile-time-regular-expressions.git"
author = "Hana Dusíková ([email protected])"
description = "Compile Tim... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class CtreConan(ConanFile):
name = "CTRE"
version = "2.0"
license = "MIT"
url = "https://github.com/hanickadot/compile-time-regular-expressions"
author = "Hana Dusíková ([email protected])"
description = "Compile Time Re... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class CtreConan(ConanFile):
name = "CTRE"
version = "2.0"
license = "MIT"
url = "https://github.com/hanickadot/compile-time-regular-expressions.git"
author = "Hana Dusíková ([email protected])"
description... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class CtreConan(ConanFile):
name = "CTRE"
version = "2.0"
license = "MIT"
url = "https://github.com/hanickadot/compile-time-regular-expressions"
author = "Hana Dusíková ([email protected])"
description = "Compile Time Re... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class CtreConan(ConanFile):
name = "CTRE"
version = "2.0"
license = "MIT"
url = "https://github.com/hanickadot/compile-time-regular-expressions.git"
author = "Hana Dusíková ([email protected])"
description = "Compile Tim... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class CtreConan(ConanFile):
name = "CTRE"
version = "2.0"
license = "MIT"
url = "https://github.com/hanickadot/compile-time-regular-expressions.git"
author = "Hana Dusíková ([email protected])"
description... |
47dd560f71649cc20199089fc680ca81d924d5a1 | livereload/middleware.py | livereload/middleware.py | """
Middleware for injecting the live-reload script.
"""
from bs4 import BeautifulSoup
from django.utils.encoding import smart_str
from django.conf import settings
from livereload import livereload_port
class LiveReloadScript(object):
"""
Inject the live-reload script into your webpages.
"""
def pro... | """
Middleware for injecting the live-reload script.
"""
from bs4 import BeautifulSoup
from django.utils.encoding import smart_str
from django.conf import settings
from livereload import livereload_port
class LiveReloadScript(object):
"""
Injects the live-reload script into your webpages.
"""
def pr... | Check that response is not a StreamingResponse. | Check that response is not a StreamingResponse.
| Python | bsd-3-clause | tjwalch/django-livereload-server | """
Middleware for injecting the live-reload script.
"""
from bs4 import BeautifulSoup
from django.utils.encoding import smart_str
from django.conf import settings
from livereload import livereload_port
class LiveReloadScript(object):
"""
Inject the live-reload script into your webpages.
"""
def pro... | """
Middleware for injecting the live-reload script.
"""
from bs4 import BeautifulSoup
from django.utils.encoding import smart_str
from django.conf import settings
from livereload import livereload_port
class LiveReloadScript(object):
"""
Injects the live-reload script into your webpages.
"""
def pr... | <commit_before>"""
Middleware for injecting the live-reload script.
"""
from bs4 import BeautifulSoup
from django.utils.encoding import smart_str
from django.conf import settings
from livereload import livereload_port
class LiveReloadScript(object):
"""
Inject the live-reload script into your webpages.
"... | """
Middleware for injecting the live-reload script.
"""
from bs4 import BeautifulSoup
from django.utils.encoding import smart_str
from django.conf import settings
from livereload import livereload_port
class LiveReloadScript(object):
"""
Injects the live-reload script into your webpages.
"""
def pr... | """
Middleware for injecting the live-reload script.
"""
from bs4 import BeautifulSoup
from django.utils.encoding import smart_str
from django.conf import settings
from livereload import livereload_port
class LiveReloadScript(object):
"""
Inject the live-reload script into your webpages.
"""
def pro... | <commit_before>"""
Middleware for injecting the live-reload script.
"""
from bs4 import BeautifulSoup
from django.utils.encoding import smart_str
from django.conf import settings
from livereload import livereload_port
class LiveReloadScript(object):
"""
Inject the live-reload script into your webpages.
"... |
e6274c801e9c5233ef40b4f4423072f4626f16e5 | config.py | config.py | from zirc import Sasl
# zIRC
sasl = Sasl(username="BigWolfy1339", password="")
# IRC
channels = ["##wolfy1339", "##powder-bots", "##jeffl35"]
# Logging
logFormat = '%(levelname)s %(asctime)s %(message)s'
colorized = True
timestampFormat = '%Y-%m-%dT%H:%M:%S'
logLevel = 20 # INFO
# Bot
commandChar = '?'
owners = ['b... | from zirc import Sasl, Caps
# zIRC
sasl = Sasl(username="BigWolfy1339", password="")
caps = Caps(sasl, "multi-prefix")
# IRC
channels = ["##wolfy1339", "##powder-bots", "##jeffl35"]
# Logging
logFormat = '%(levelname)s %(asctime)s %(message)s'
colorized = True
timestampFormat = '%Y-%m-%dT%H:%M:%S'
logLevel = 20 # I... | Add new caps variable, fix line length | Add new caps variable, fix line length | Python | mit | wolfy1339/Python-IRC-Bot | from zirc import Sasl
# zIRC
sasl = Sasl(username="BigWolfy1339", password="")
# IRC
channels = ["##wolfy1339", "##powder-bots", "##jeffl35"]
# Logging
logFormat = '%(levelname)s %(asctime)s %(message)s'
colorized = True
timestampFormat = '%Y-%m-%dT%H:%M:%S'
logLevel = 20 # INFO
# Bot
commandChar = '?'
owners = ['b... | from zirc import Sasl, Caps
# zIRC
sasl = Sasl(username="BigWolfy1339", password="")
caps = Caps(sasl, "multi-prefix")
# IRC
channels = ["##wolfy1339", "##powder-bots", "##jeffl35"]
# Logging
logFormat = '%(levelname)s %(asctime)s %(message)s'
colorized = True
timestampFormat = '%Y-%m-%dT%H:%M:%S'
logLevel = 20 # I... | <commit_before>from zirc import Sasl
# zIRC
sasl = Sasl(username="BigWolfy1339", password="")
# IRC
channels = ["##wolfy1339", "##powder-bots", "##jeffl35"]
# Logging
logFormat = '%(levelname)s %(asctime)s %(message)s'
colorized = True
timestampFormat = '%Y-%m-%dT%H:%M:%S'
logLevel = 20 # INFO
# Bot
commandChar = '... | from zirc import Sasl, Caps
# zIRC
sasl = Sasl(username="BigWolfy1339", password="")
caps = Caps(sasl, "multi-prefix")
# IRC
channels = ["##wolfy1339", "##powder-bots", "##jeffl35"]
# Logging
logFormat = '%(levelname)s %(asctime)s %(message)s'
colorized = True
timestampFormat = '%Y-%m-%dT%H:%M:%S'
logLevel = 20 # I... | from zirc import Sasl
# zIRC
sasl = Sasl(username="BigWolfy1339", password="")
# IRC
channels = ["##wolfy1339", "##powder-bots", "##jeffl35"]
# Logging
logFormat = '%(levelname)s %(asctime)s %(message)s'
colorized = True
timestampFormat = '%Y-%m-%dT%H:%M:%S'
logLevel = 20 # INFO
# Bot
commandChar = '?'
owners = ['b... | <commit_before>from zirc import Sasl
# zIRC
sasl = Sasl(username="BigWolfy1339", password="")
# IRC
channels = ["##wolfy1339", "##powder-bots", "##jeffl35"]
# Logging
logFormat = '%(levelname)s %(asctime)s %(message)s'
colorized = True
timestampFormat = '%Y-%m-%dT%H:%M:%S'
logLevel = 20 # INFO
# Bot
commandChar = '... |
d1330eb44b1842571ff7deacef175b9aa92e09c0 | openacademy/models/res_partner.py | openacademy/models/res_partner.py | # -*- coding: utf-8 -*-
from openerp import models, fields
class Partner(models.Model):
_inherit = 'res.partner'
instructor = fields.Boolean(help="This partner give train our course")
| # -*- coding: utf-8 -*-
from openerp import models, fields
class Partner(models.Model):
_inherit = 'res.partner'
instructor = fields.Boolean(default=False,help="This partner give train our course")
sessions = fields.Many2many('session', string="Session as instructor", readonly=True)
| Add partner view injerit and model inherit | [REF] openacademy: Add partner view injerit and model inherit
| Python | apache-2.0 | juancr83/DockerOpenacademy-proyect | # -*- coding: utf-8 -*-
from openerp import models, fields
class Partner(models.Model):
_inherit = 'res.partner'
instructor = fields.Boolean(help="This partner give train our course")
[REF] openacademy: Add partner view injerit and model inherit | # -*- coding: utf-8 -*-
from openerp import models, fields
class Partner(models.Model):
_inherit = 'res.partner'
instructor = fields.Boolean(default=False,help="This partner give train our course")
sessions = fields.Many2many('session', string="Session as instructor", readonly=True)
| <commit_before># -*- coding: utf-8 -*-
from openerp import models, fields
class Partner(models.Model):
_inherit = 'res.partner'
instructor = fields.Boolean(help="This partner give train our course")
<commit_msg>[REF] openacademy: Add partner view injerit and model inherit<commit_after> | # -*- coding: utf-8 -*-
from openerp import models, fields
class Partner(models.Model):
_inherit = 'res.partner'
instructor = fields.Boolean(default=False,help="This partner give train our course")
sessions = fields.Many2many('session', string="Session as instructor", readonly=True)
| # -*- coding: utf-8 -*-
from openerp import models, fields
class Partner(models.Model):
_inherit = 'res.partner'
instructor = fields.Boolean(help="This partner give train our course")
[REF] openacademy: Add partner view injerit and model inherit# -*- coding: utf-8 -*-
from openerp import models, fields
c... | <commit_before># -*- coding: utf-8 -*-
from openerp import models, fields
class Partner(models.Model):
_inherit = 'res.partner'
instructor = fields.Boolean(help="This partner give train our course")
<commit_msg>[REF] openacademy: Add partner view injerit and model inherit<commit_after># -*- coding: utf-8 -... |
ac0267d318939e4e7a62342b5dc6a09c3264ea74 | flocker/node/_deploy.py | flocker/node/_deploy.py | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-
"""
Deploy applications on nodes.
"""
class Deployment(object):
"""
"""
_gear_client = None
def start_container(self, application):
"""
Launch the supplied application ... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-
"""
Deploy applications on nodes.
"""
from .gear import GearClient
class Deployment(object):
"""
"""
def __init__(self, gear_client=None):
"""
:param IGearClient gear_clien... | Allow a fake gear client to be supplied | Allow a fake gear client to be supplied
| Python | apache-2.0 | wallnerryan/flocker-profiles,hackday-profilers/flocker,lukemarsden/flocker,Azulinho/flocker,w4ngyi/flocker,hackday-profilers/flocker,LaynePeng/flocker,lukemarsden/flocker,AndyHuu/flocker,beni55/flocker,mbrukman/flocker,1d4Nf6/flocker,w4ngyi/flocker,beni55/flocker,adamtheturtle/flocker,hackday-profilers/flocker,achanda/... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-
"""
Deploy applications on nodes.
"""
class Deployment(object):
"""
"""
_gear_client = None
def start_container(self, application):
"""
Launch the supplied application ... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-
"""
Deploy applications on nodes.
"""
from .gear import GearClient
class Deployment(object):
"""
"""
def __init__(self, gear_client=None):
"""
:param IGearClient gear_clien... | <commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-
"""
Deploy applications on nodes.
"""
class Deployment(object):
"""
"""
_gear_client = None
def start_container(self, application):
"""
Launch the suppli... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-
"""
Deploy applications on nodes.
"""
from .gear import GearClient
class Deployment(object):
"""
"""
def __init__(self, gear_client=None):
"""
:param IGearClient gear_clien... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-
"""
Deploy applications on nodes.
"""
class Deployment(object):
"""
"""
_gear_client = None
def start_container(self, application):
"""
Launch the supplied application ... | <commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-
"""
Deploy applications on nodes.
"""
class Deployment(object):
"""
"""
_gear_client = None
def start_container(self, application):
"""
Launch the suppli... |
20bcdcfd2eee5e20e76299a81a71ac80c09f2b56 | post_office/test_settings.py | post_office/test_settings.py | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 36000,
'KEY_PREFIX': 'post-office',
},
'post_office': {
'BACKEND'... | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 36000,
'KEY_PREFIX': 'post-office',
},
'post_office': {
'BACKEND'... | Make tests pass in Django 1.4. | Make tests pass in Django 1.4.
| Python | mit | JostCrow/django-post_office,ekohl/django-post_office,fapelhanz/django-post_office,ui/django-post_office,jrief/django-post_office,RafRaf/django-post_office,yprez/django-post_office,ui/django-post_office | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 36000,
'KEY_PREFIX': 'post-office',
},
'post_office': {
'BACKEND'... | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 36000,
'KEY_PREFIX': 'post-office',
},
'post_office': {
'BACKEND'... | <commit_before># -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 36000,
'KEY_PREFIX': 'post-office',
},
'post_office': {
... | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 36000,
'KEY_PREFIX': 'post-office',
},
'post_office': {
'BACKEND'... | # -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 36000,
'KEY_PREFIX': 'post-office',
},
'post_office': {
'BACKEND'... | <commit_before># -*- coding: utf-8 -*-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'TIMEOUT': 36000,
'KEY_PREFIX': 'post-office',
},
'post_office': {
... |
550befeed6ff3b2c64454c05f9e05b586d16ff64 | googlevoice/__init__.py | googlevoice/__init__.py | """
This project aims to bring the power of the Google Voice API to
the Python language in a simple,
easy-to-use manner. Currently it allows you to place calls, send sms,
download voicemails/recorded messages, and search the various
folders of your Google Voice Accounts.
You can use the Python API or command line scrip... | """
This project aims to bring the power of the Google Voice API to
the Python language in a simple,
easy-to-use manner. Currently it allows you to place calls, send sms,
download voicemails/recorded messages, and search the various
folders of your Google Voice Accounts.
You can use the Python API or command line scrip... | Load the version from the package metadata. | Load the version from the package metadata.
| Python | bsd-3-clause | pettazz/pygooglevoice | """
This project aims to bring the power of the Google Voice API to
the Python language in a simple,
easy-to-use manner. Currently it allows you to place calls, send sms,
download voicemails/recorded messages, and search the various
folders of your Google Voice Accounts.
You can use the Python API or command line scrip... | """
This project aims to bring the power of the Google Voice API to
the Python language in a simple,
easy-to-use manner. Currently it allows you to place calls, send sms,
download voicemails/recorded messages, and search the various
folders of your Google Voice Accounts.
You can use the Python API or command line scrip... | <commit_before>"""
This project aims to bring the power of the Google Voice API to
the Python language in a simple,
easy-to-use manner. Currently it allows you to place calls, send sms,
download voicemails/recorded messages, and search the various
folders of your Google Voice Accounts.
You can use the Python API or com... | """
This project aims to bring the power of the Google Voice API to
the Python language in a simple,
easy-to-use manner. Currently it allows you to place calls, send sms,
download voicemails/recorded messages, and search the various
folders of your Google Voice Accounts.
You can use the Python API or command line scrip... | """
This project aims to bring the power of the Google Voice API to
the Python language in a simple,
easy-to-use manner. Currently it allows you to place calls, send sms,
download voicemails/recorded messages, and search the various
folders of your Google Voice Accounts.
You can use the Python API or command line scrip... | <commit_before>"""
This project aims to bring the power of the Google Voice API to
the Python language in a simple,
easy-to-use manner. Currently it allows you to place calls, send sms,
download voicemails/recorded messages, and search the various
folders of your Google Voice Accounts.
You can use the Python API or com... |
bb347838ad78d61e6a81a1c14657323ad7eeb82b | analysis/smooth-data.py | analysis/smooth-data.py | import climate
import database
@climate.annotate(
root='load data files from this directory tree',
output='save smoothed data files to this directory tree',
accuracy=('fit SVT with this accuracy', 'option', None, float),
threshold=('SVT threshold', 'option', None, float),
frames=('number of frame... | import climate
import database
@climate.annotate(
root='load data files from this directory tree',
output='save smoothed data files to this directory tree',
frame_rate=('reindex frames to this rate', 'option', None, float),
accuracy=('fit SVT with this accuracy', 'option', None, float),
threshold... | Add parameter for frame rate. | Add parameter for frame rate.
| Python | mit | lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment | import climate
import database
@climate.annotate(
root='load data files from this directory tree',
output='save smoothed data files to this directory tree',
accuracy=('fit SVT with this accuracy', 'option', None, float),
threshold=('SVT threshold', 'option', None, float),
frames=('number of frame... | import climate
import database
@climate.annotate(
root='load data files from this directory tree',
output='save smoothed data files to this directory tree',
frame_rate=('reindex frames to this rate', 'option', None, float),
accuracy=('fit SVT with this accuracy', 'option', None, float),
threshold... | <commit_before>import climate
import database
@climate.annotate(
root='load data files from this directory tree',
output='save smoothed data files to this directory tree',
accuracy=('fit SVT with this accuracy', 'option', None, float),
threshold=('SVT threshold', 'option', None, float),
frames=('... | import climate
import database
@climate.annotate(
root='load data files from this directory tree',
output='save smoothed data files to this directory tree',
frame_rate=('reindex frames to this rate', 'option', None, float),
accuracy=('fit SVT with this accuracy', 'option', None, float),
threshold... | import climate
import database
@climate.annotate(
root='load data files from this directory tree',
output='save smoothed data files to this directory tree',
accuracy=('fit SVT with this accuracy', 'option', None, float),
threshold=('SVT threshold', 'option', None, float),
frames=('number of frame... | <commit_before>import climate
import database
@climate.annotate(
root='load data files from this directory tree',
output='save smoothed data files to this directory tree',
accuracy=('fit SVT with this accuracy', 'option', None, float),
threshold=('SVT threshold', 'option', None, float),
frames=('... |
dc7a1566fdb581c592554af9c5e7193d06e3724e | tests/query_test/test_hbase_queries.py | tests/query_test/test_hbase_queries.py | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted Impala HBase Tests
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestHBaseQueries(ImpalaTestSuite):
@classmethod
def get_workload(self):
return 'f... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted Impala HBase Tests
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestHBaseQueries(ImpalaTestSuite):
@classmethod
def get_workload(self):
return 'f... | Disable some tests in test_hbase_insert to fix the build. | Disable some tests in test_hbase_insert to fix the build.
Change-Id: I037b292d0eb93c5c743a201b2045eb2ba0712ae7
Reviewed-on: http://gerrit.ent.cloudera.com:8080/387
Reviewed-by: Ishaan Joshi <[email protected]>
Tested-by: Ishaan Joshi <d1d1e60202ec9f2503deb1b724986485a125d802@clouder... | Python | apache-2.0 | michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted Impala HBase Tests
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestHBaseQueries(ImpalaTestSuite):
@classmethod
def get_workload(self):
return 'f... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted Impala HBase Tests
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestHBaseQueries(ImpalaTestSuite):
@classmethod
def get_workload(self):
return 'f... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted Impala HBase Tests
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestHBaseQueries(ImpalaTestSuite):
@classmethod
def get_workload(self)... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted Impala HBase Tests
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestHBaseQueries(ImpalaTestSuite):
@classmethod
def get_workload(self):
return 'f... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted Impala HBase Tests
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestHBaseQueries(ImpalaTestSuite):
@classmethod
def get_workload(self):
return 'f... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Targeted Impala HBase Tests
#
import logging
import pytest
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestHBaseQueries(ImpalaTestSuite):
@classmethod
def get_workload(self)... |
6fd4e2e4158c968a095832f3bf669109dc9f1481 | mopidy_mpris/__init__.py | mopidy_mpris/__init__.py | import os
from mopidy import config, exceptions, ext
__version__ = "2.0.0"
class Extension(ext.Extension):
dist_name = "Mopidy-MPRIS"
ext_name = "mpris"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.dirname(__file__), "ext.conf")
return config... | import pathlib
from mopidy import config, exceptions, ext
__version__ = "2.0.0"
class Extension(ext.Extension):
dist_name = "Mopidy-MPRIS"
ext_name = "mpris"
version = __version__
def get_default_config(self):
return config.read(pathlib.Path(__file__).parent / "ext.conf")
def get_conf... | Use pathlib to read ext.conf | Use pathlib to read ext.conf
| Python | apache-2.0 | mopidy/mopidy-mpris | import os
from mopidy import config, exceptions, ext
__version__ = "2.0.0"
class Extension(ext.Extension):
dist_name = "Mopidy-MPRIS"
ext_name = "mpris"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.dirname(__file__), "ext.conf")
return config... | import pathlib
from mopidy import config, exceptions, ext
__version__ = "2.0.0"
class Extension(ext.Extension):
dist_name = "Mopidy-MPRIS"
ext_name = "mpris"
version = __version__
def get_default_config(self):
return config.read(pathlib.Path(__file__).parent / "ext.conf")
def get_conf... | <commit_before>import os
from mopidy import config, exceptions, ext
__version__ = "2.0.0"
class Extension(ext.Extension):
dist_name = "Mopidy-MPRIS"
ext_name = "mpris"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.dirname(__file__), "ext.conf")
... | import pathlib
from mopidy import config, exceptions, ext
__version__ = "2.0.0"
class Extension(ext.Extension):
dist_name = "Mopidy-MPRIS"
ext_name = "mpris"
version = __version__
def get_default_config(self):
return config.read(pathlib.Path(__file__).parent / "ext.conf")
def get_conf... | import os
from mopidy import config, exceptions, ext
__version__ = "2.0.0"
class Extension(ext.Extension):
dist_name = "Mopidy-MPRIS"
ext_name = "mpris"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.dirname(__file__), "ext.conf")
return config... | <commit_before>import os
from mopidy import config, exceptions, ext
__version__ = "2.0.0"
class Extension(ext.Extension):
dist_name = "Mopidy-MPRIS"
ext_name = "mpris"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.dirname(__file__), "ext.conf")
... |
ac2b2f54eef719d633a4135e244497cbc499a70f | wapps/templatetags/commons.py | wapps/templatetags/commons.py | from datetime import datetime
import jinja2
from django.utils.safestring import mark_safe
from django_jinja import library
from .. import json
from ..jsonld import graph
@library.filter(name='json')
def json_encode(data):
return json.dumps(data)
@library.filter
@library.global_function
@jinja2.contextfunctio... | from datetime import datetime
import jinja2
from django.utils.safestring import mark_safe
from django_jinja import library
from .. import json
from ..jsonld import graph
@library.filter(name='json')
def json_encode(data):
return json.dumps(data)
@library.filter
@library.global_function
@jinja2.contextfunctio... | Fix Syntax error for Python<3.5 | Fix Syntax error for Python<3.5
| Python | mit | apihackers/wapps,apihackers/wapps,apihackers/wapps,apihackers/wapps | from datetime import datetime
import jinja2
from django.utils.safestring import mark_safe
from django_jinja import library
from .. import json
from ..jsonld import graph
@library.filter(name='json')
def json_encode(data):
return json.dumps(data)
@library.filter
@library.global_function
@jinja2.contextfunctio... | from datetime import datetime
import jinja2
from django.utils.safestring import mark_safe
from django_jinja import library
from .. import json
from ..jsonld import graph
@library.filter(name='json')
def json_encode(data):
return json.dumps(data)
@library.filter
@library.global_function
@jinja2.contextfunctio... | <commit_before>from datetime import datetime
import jinja2
from django.utils.safestring import mark_safe
from django_jinja import library
from .. import json
from ..jsonld import graph
@library.filter(name='json')
def json_encode(data):
return json.dumps(data)
@library.filter
@library.global_function
@jinja2... | from datetime import datetime
import jinja2
from django.utils.safestring import mark_safe
from django_jinja import library
from .. import json
from ..jsonld import graph
@library.filter(name='json')
def json_encode(data):
return json.dumps(data)
@library.filter
@library.global_function
@jinja2.contextfunctio... | from datetime import datetime
import jinja2
from django.utils.safestring import mark_safe
from django_jinja import library
from .. import json
from ..jsonld import graph
@library.filter(name='json')
def json_encode(data):
return json.dumps(data)
@library.filter
@library.global_function
@jinja2.contextfunctio... | <commit_before>from datetime import datetime
import jinja2
from django.utils.safestring import mark_safe
from django_jinja import library
from .. import json
from ..jsonld import graph
@library.filter(name='json')
def json_encode(data):
return json.dumps(data)
@library.filter
@library.global_function
@jinja2... |
f473ebe7ce68560952a68247341bde46c2f26c97 | shoop/core/order_creator/_modifier.py | shoop/core/order_creator/_modifier.py | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.transaction import atomic
from shoop.core.models import Orde... | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.transaction import atomic
from shoop.core.models import Orde... | Enable modifying orders with taxes | Core: Enable modifying orders with taxes
Refs SHOOP-2338 / SHOOP-2578
| Python | agpl-3.0 | shawnadelic/shuup,shoopio/shoop,suutari/shoop,hrayr-artunyan/shuup,shawnadelic/shuup,suutari/shoop,hrayr-artunyan/shuup,suutari-ai/shoop,suutari-ai/shoop,suutari-ai/shoop,suutari/shoop,hrayr-artunyan/shuup,shoopio/shoop,shawnadelic/shuup,shoopio/shoop | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.transaction import atomic
from shoop.core.models import Orde... | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.transaction import atomic
from shoop.core.models import Orde... | <commit_before># -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.transaction import atomic
from shoop.core.mod... | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.transaction import atomic
from shoop.core.models import Orde... | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.transaction import atomic
from shoop.core.models import Orde... | <commit_before># -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.transaction import atomic
from shoop.core.mod... |
5c806fbd52da5ddb006c24b922967e6468e73221 | zerver/tornado/application.py | zerver/tornado/application.py | import atexit
import tornado.web
from django.conf import settings
from zerver.lib.queue import get_queue_client
from zerver.tornado import autoreload
from zerver.tornado.handlers import AsyncDjangoHandler
def setup_tornado_rabbitmq() -> None: # nocoverage
# When tornado is shut down, disconnect cleanly from ra... | import atexit
import tornado.web
from django.conf import settings
from zerver.lib.queue import get_queue_client
from zerver.tornado import autoreload
from zerver.tornado.handlers import AsyncDjangoHandler
def setup_tornado_rabbitmq() -> None: # nocoverage
# When tornado is shut down, disconnect cleanly from ra... | Remove a misleading comment and reformat. | tornado: Remove a misleading comment and reformat.
tornado.web.Application does not share any inheritance with Django at
all; it has a similar router interface, but tornado.web.Application is
not an instance of Django anything.
Refold the long lines that follow it.
| Python | apache-2.0 | zulip/zulip,rht/zulip,kou/zulip,zulip/zulip,kou/zulip,rht/zulip,rht/zulip,eeshangarg/zulip,andersk/zulip,showell/zulip,hackerkid/zulip,punchagan/zulip,showell/zulip,rht/zulip,rht/zulip,zulip/zulip,zulip/zulip,andersk/zulip,andersk/zulip,eeshangarg/zulip,eeshangarg/zulip,kou/zulip,eeshangarg/zulip,hackerkid/zulip,anders... | import atexit
import tornado.web
from django.conf import settings
from zerver.lib.queue import get_queue_client
from zerver.tornado import autoreload
from zerver.tornado.handlers import AsyncDjangoHandler
def setup_tornado_rabbitmq() -> None: # nocoverage
# When tornado is shut down, disconnect cleanly from ra... | import atexit
import tornado.web
from django.conf import settings
from zerver.lib.queue import get_queue_client
from zerver.tornado import autoreload
from zerver.tornado.handlers import AsyncDjangoHandler
def setup_tornado_rabbitmq() -> None: # nocoverage
# When tornado is shut down, disconnect cleanly from ra... | <commit_before>import atexit
import tornado.web
from django.conf import settings
from zerver.lib.queue import get_queue_client
from zerver.tornado import autoreload
from zerver.tornado.handlers import AsyncDjangoHandler
def setup_tornado_rabbitmq() -> None: # nocoverage
# When tornado is shut down, disconnect ... | import atexit
import tornado.web
from django.conf import settings
from zerver.lib.queue import get_queue_client
from zerver.tornado import autoreload
from zerver.tornado.handlers import AsyncDjangoHandler
def setup_tornado_rabbitmq() -> None: # nocoverage
# When tornado is shut down, disconnect cleanly from ra... | import atexit
import tornado.web
from django.conf import settings
from zerver.lib.queue import get_queue_client
from zerver.tornado import autoreload
from zerver.tornado.handlers import AsyncDjangoHandler
def setup_tornado_rabbitmq() -> None: # nocoverage
# When tornado is shut down, disconnect cleanly from ra... | <commit_before>import atexit
import tornado.web
from django.conf import settings
from zerver.lib.queue import get_queue_client
from zerver.tornado import autoreload
from zerver.tornado.handlers import AsyncDjangoHandler
def setup_tornado_rabbitmq() -> None: # nocoverage
# When tornado is shut down, disconnect ... |
0c327e17dba29a4e94213f264fe7ea931bb26782 | invoke/parser/argument.py | invoke/parser/argument.py | class Argument(object):
def __init__(self, name=None, names=(), kind=str, default=None):
if name and names:
msg = "Cannot give both 'name' and 'names' arguments! Pick one."
raise TypeError(msg)
if not (name or names):
raise TypeError("An Argument must have at leas... | class Argument(object):
def __init__(self, name=None, names=(), kind=str, default=None, help=None):
if name and names:
msg = "Cannot give both 'name' and 'names' arguments! Pick one."
raise TypeError(msg)
if not (name or names):
raise TypeError("An Argument must h... | Add support for per Argument help data | Add support for per Argument help data
| Python | bsd-2-clause | kejbaly2/invoke,mattrobenolt/invoke,pyinvoke/invoke,pfmoore/invoke,sophacles/invoke,kejbaly2/invoke,pfmoore/invoke,mkusz/invoke,mattrobenolt/invoke,mkusz/invoke,tyewang/invoke,pyinvoke/invoke,singingwolfboy/invoke,frol/invoke,frol/invoke,alex/invoke | class Argument(object):
def __init__(self, name=None, names=(), kind=str, default=None):
if name and names:
msg = "Cannot give both 'name' and 'names' arguments! Pick one."
raise TypeError(msg)
if not (name or names):
raise TypeError("An Argument must have at leas... | class Argument(object):
def __init__(self, name=None, names=(), kind=str, default=None, help=None):
if name and names:
msg = "Cannot give both 'name' and 'names' arguments! Pick one."
raise TypeError(msg)
if not (name or names):
raise TypeError("An Argument must h... | <commit_before>class Argument(object):
def __init__(self, name=None, names=(), kind=str, default=None):
if name and names:
msg = "Cannot give both 'name' and 'names' arguments! Pick one."
raise TypeError(msg)
if not (name or names):
raise TypeError("An Argument mu... | class Argument(object):
def __init__(self, name=None, names=(), kind=str, default=None, help=None):
if name and names:
msg = "Cannot give both 'name' and 'names' arguments! Pick one."
raise TypeError(msg)
if not (name or names):
raise TypeError("An Argument must h... | class Argument(object):
def __init__(self, name=None, names=(), kind=str, default=None):
if name and names:
msg = "Cannot give both 'name' and 'names' arguments! Pick one."
raise TypeError(msg)
if not (name or names):
raise TypeError("An Argument must have at leas... | <commit_before>class Argument(object):
def __init__(self, name=None, names=(), kind=str, default=None):
if name and names:
msg = "Cannot give both 'name' and 'names' arguments! Pick one."
raise TypeError(msg)
if not (name or names):
raise TypeError("An Argument mu... |
0d8cd57b6d5d4755709ca853856eb14b4b63f437 | servant.py | servant.py | import os
import sys
import zipfile
from nose import core as nose_core
if sys.argv[1] == "remove_extension":
try:
os.remove("coverage/tracer.so")
except OSError:
pass
elif sys.argv[1] == "test_with_tracer":
os.environ["COVERAGE_TEST_TRACER"] = sys.argv[2]
del sys.argv[1:3]
nose_co... | import os
import sys
import zipfile
from nose import core as nose_core
if sys.argv[1] == "remove_extension":
so_names = """
tracer.so
tracer.cpython-32m.so
""".split()
for filename in so_names:
try:
os.remove(os.path.join("coverage", filename))
except OSErr... | Make tox with with py3.2: the .so is named differently there. | Make tox with with py3.2: the .so is named differently there.
| Python | apache-2.0 | nedbat/coveragepy,nedbat/coveragepy,larsbutler/coveragepy,larsbutler/coveragepy,blueyed/coveragepy,blueyed/coveragepy,hugovk/coveragepy,7WebPages/coveragepy,larsbutler/coveragepy,nedbat/coveragepy,hugovk/coveragepy,7WebPages/coveragepy,jayhetee/coveragepy,larsbutler/coveragepy,nedbat/coveragepy,jayhetee/coveragepy,hugo... | import os
import sys
import zipfile
from nose import core as nose_core
if sys.argv[1] == "remove_extension":
try:
os.remove("coverage/tracer.so")
except OSError:
pass
elif sys.argv[1] == "test_with_tracer":
os.environ["COVERAGE_TEST_TRACER"] = sys.argv[2]
del sys.argv[1:3]
nose_co... | import os
import sys
import zipfile
from nose import core as nose_core
if sys.argv[1] == "remove_extension":
so_names = """
tracer.so
tracer.cpython-32m.so
""".split()
for filename in so_names:
try:
os.remove(os.path.join("coverage", filename))
except OSErr... | <commit_before>import os
import sys
import zipfile
from nose import core as nose_core
if sys.argv[1] == "remove_extension":
try:
os.remove("coverage/tracer.so")
except OSError:
pass
elif sys.argv[1] == "test_with_tracer":
os.environ["COVERAGE_TEST_TRACER"] = sys.argv[2]
del sys.argv[1... | import os
import sys
import zipfile
from nose import core as nose_core
if sys.argv[1] == "remove_extension":
so_names = """
tracer.so
tracer.cpython-32m.so
""".split()
for filename in so_names:
try:
os.remove(os.path.join("coverage", filename))
except OSErr... | import os
import sys
import zipfile
from nose import core as nose_core
if sys.argv[1] == "remove_extension":
try:
os.remove("coverage/tracer.so")
except OSError:
pass
elif sys.argv[1] == "test_with_tracer":
os.environ["COVERAGE_TEST_TRACER"] = sys.argv[2]
del sys.argv[1:3]
nose_co... | <commit_before>import os
import sys
import zipfile
from nose import core as nose_core
if sys.argv[1] == "remove_extension":
try:
os.remove("coverage/tracer.so")
except OSError:
pass
elif sys.argv[1] == "test_with_tracer":
os.environ["COVERAGE_TEST_TRACER"] = sys.argv[2]
del sys.argv[1... |
172c0123d5ce59ce4f162d806fc706dc50eb4312 | distarray/tests/test_client.py | distarray/tests/test_client.py | import unittest
import numpy as np
from IPython.parallel import Client
from distarray.client import DistArrayContext
class TestDistArrayContext(unittest.TestCase):
def setUp(self):
self.client = Client()
self.dv = self.client[:]
def test_create_DAC(self):
'''Can we create a plain van... | import unittest
from IPython.parallel import Client
from distarray.client import DistArrayContext
class TestDistArrayContext(unittest.TestCase):
def setUp(self):
self.client = Client()
self.dv = self.client[:]
def test_create_DAC(self):
'''Can we create a plain vanilla context?'''
... | Test DAP getitem and setitem together. | Test DAP getitem and setitem together. | Python | bsd-3-clause | RaoUmer/distarray,enthought/distarray,RaoUmer/distarray,enthought/distarray | import unittest
import numpy as np
from IPython.parallel import Client
from distarray.client import DistArrayContext
class TestDistArrayContext(unittest.TestCase):
def setUp(self):
self.client = Client()
self.dv = self.client[:]
def test_create_DAC(self):
'''Can we create a plain van... | import unittest
from IPython.parallel import Client
from distarray.client import DistArrayContext
class TestDistArrayContext(unittest.TestCase):
def setUp(self):
self.client = Client()
self.dv = self.client[:]
def test_create_DAC(self):
'''Can we create a plain vanilla context?'''
... | <commit_before>import unittest
import numpy as np
from IPython.parallel import Client
from distarray.client import DistArrayContext
class TestDistArrayContext(unittest.TestCase):
def setUp(self):
self.client = Client()
self.dv = self.client[:]
def test_create_DAC(self):
'''Can we cre... | import unittest
from IPython.parallel import Client
from distarray.client import DistArrayContext
class TestDistArrayContext(unittest.TestCase):
def setUp(self):
self.client = Client()
self.dv = self.client[:]
def test_create_DAC(self):
'''Can we create a plain vanilla context?'''
... | import unittest
import numpy as np
from IPython.parallel import Client
from distarray.client import DistArrayContext
class TestDistArrayContext(unittest.TestCase):
def setUp(self):
self.client = Client()
self.dv = self.client[:]
def test_create_DAC(self):
'''Can we create a plain van... | <commit_before>import unittest
import numpy as np
from IPython.parallel import Client
from distarray.client import DistArrayContext
class TestDistArrayContext(unittest.TestCase):
def setUp(self):
self.client = Client()
self.dv = self.client[:]
def test_create_DAC(self):
'''Can we cre... |
ff3b4ebfa2a493460532b9a21a661d99fb17df54 | orchestrator/__init__.py | orchestrator/__init__.py | from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.0'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.1'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| Update to next dev version | Update to next dev version | Python | mit | totem/cluster-orchestrator,totem/cluster-orchestrator,totem/cluster-orchestrator | from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.0'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
Update to next dev version | from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.1'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| <commit_before>from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.0'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
<commit_msg>Update to next dev version<commit_after> | from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.1'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
| from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.0'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
Update to next dev versionfrom __future__ import absolute_import
from... | <commit_before>from __future__ import absolute_import
from celery.signals import setup_logging
import orchestrator.logger
__version__ = '0.5.0'
__author__ = 'sukrit'
orchestrator.logger.init_logging()
setup_logging.connect(orchestrator.logger.init_celery_logging)
<commit_msg>Update to next dev version<commit_after>fr... |
0f24e70486b60e27535479c856f41b8ec18ee0f9 | entity_networks/activations.py | entity_networks/activations.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
def prelu(features, initializer=None, scope=None):
"""
Implementation of [Parametric ReLU](https://arxiv.org/abs/1502.01852) borrowed from Keras.
"""
with tf.variable_sc... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
def prelu(features, initializer=None, scope=None):
"""
Implementation of [Parametric ReLU](https://arxiv.org/abs/1502.01852) borrowed from Keras.
"""
with tf.variable_sc... | Remove alpha clipping as it did not help | Remove alpha clipping as it did not help
| Python | mit | jimfleming/recurrent-entity-networks,jimfleming/recurrent-entity-networks,mikalyoung/recurrent-entity-networks,mikalyoung/recurrent-entity-networks | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
def prelu(features, initializer=None, scope=None):
"""
Implementation of [Parametric ReLU](https://arxiv.org/abs/1502.01852) borrowed from Keras.
"""
with tf.variable_sc... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
def prelu(features, initializer=None, scope=None):
"""
Implementation of [Parametric ReLU](https://arxiv.org/abs/1502.01852) borrowed from Keras.
"""
with tf.variable_sc... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
def prelu(features, initializer=None, scope=None):
"""
Implementation of [Parametric ReLU](https://arxiv.org/abs/1502.01852) borrowed from Keras.
"""
with... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
def prelu(features, initializer=None, scope=None):
"""
Implementation of [Parametric ReLU](https://arxiv.org/abs/1502.01852) borrowed from Keras.
"""
with tf.variable_sc... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
def prelu(features, initializer=None, scope=None):
"""
Implementation of [Parametric ReLU](https://arxiv.org/abs/1502.01852) borrowed from Keras.
"""
with tf.variable_sc... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import tensorflow as tf
def prelu(features, initializer=None, scope=None):
"""
Implementation of [Parametric ReLU](https://arxiv.org/abs/1502.01852) borrowed from Keras.
"""
with... |
c38598f5a6afe6057869dccf65e2950d9fd49fe1 | scripts/validate-resources.py | scripts/validate-resources.py | import sys
import json
from openshift3.resources import load, dumps
resources = load(sys.argv[1])
print(repr(resources))
import pprint
pprint.pprint(json.loads(dumps(resources)))
| import sys
import json
from openshift3.resources import load, dumps
path = len(sys.argv) >= 2 and sys.argv[1] or None
resources = load(path)
print(repr(resources))
import pprint
pprint.pprint(json.loads(dumps(resources)))
| Allow resource definitions from standard input. | Allow resource definitions from standard input.
| Python | bsd-2-clause | getwarped/powershift | import sys
import json
from openshift3.resources import load, dumps
resources = load(sys.argv[1])
print(repr(resources))
import pprint
pprint.pprint(json.loads(dumps(resources)))
Allow resource definitions from standard input. | import sys
import json
from openshift3.resources import load, dumps
path = len(sys.argv) >= 2 and sys.argv[1] or None
resources = load(path)
print(repr(resources))
import pprint
pprint.pprint(json.loads(dumps(resources)))
| <commit_before>import sys
import json
from openshift3.resources import load, dumps
resources = load(sys.argv[1])
print(repr(resources))
import pprint
pprint.pprint(json.loads(dumps(resources)))
<commit_msg>Allow resource definitions from standard input.<commit_after> | import sys
import json
from openshift3.resources import load, dumps
path = len(sys.argv) >= 2 and sys.argv[1] or None
resources = load(path)
print(repr(resources))
import pprint
pprint.pprint(json.loads(dumps(resources)))
| import sys
import json
from openshift3.resources import load, dumps
resources = load(sys.argv[1])
print(repr(resources))
import pprint
pprint.pprint(json.loads(dumps(resources)))
Allow resource definitions from standard input.import sys
import json
from openshift3.resources import load, dumps
path = len(sys.argv) ... | <commit_before>import sys
import json
from openshift3.resources import load, dumps
resources = load(sys.argv[1])
print(repr(resources))
import pprint
pprint.pprint(json.loads(dumps(resources)))
<commit_msg>Allow resource definitions from standard input.<commit_after>import sys
import json
from openshift3.resources ... |
3588f5e30e40f82fb085d01063af64b838528b6a | scripts/fix_merged_user_quickfiles.py | scripts/fix_merged_user_quickfiles.py | import logging
import sys
from django.db import transaction
from django.db.models import F
from website.app import setup_django
setup_django()
from osf.models import QuickFilesNode
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def main():
dry = '--dry' in sys.argv
if not dr... | import logging
import sys
from django.db import transaction
from django.db.models import F, Count
from website.app import setup_django
setup_django()
from osf.models import QuickFilesNode
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def main():
dry = '--dry' in sys.argv
if... | Exclude QuickFilesNodes that don't have contributors | Exclude QuickFilesNodes that don't have contributors
| Python | apache-2.0 | TomBaxter/osf.io,leb2dg/osf.io,cslzchen/osf.io,binoculars/osf.io,CenterForOpenScience/osf.io,mfraezz/osf.io,aaxelb/osf.io,felliott/osf.io,sloria/osf.io,cslzchen/osf.io,cslzchen/osf.io,baylee-d/osf.io,adlius/osf.io,aaxelb/osf.io,Johnetordoff/osf.io,saradbowman/osf.io,mattclark/osf.io,leb2dg/osf.io,CenterForOpenScience/o... | import logging
import sys
from django.db import transaction
from django.db.models import F
from website.app import setup_django
setup_django()
from osf.models import QuickFilesNode
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def main():
dry = '--dry' in sys.argv
if not dr... | import logging
import sys
from django.db import transaction
from django.db.models import F, Count
from website.app import setup_django
setup_django()
from osf.models import QuickFilesNode
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def main():
dry = '--dry' in sys.argv
if... | <commit_before>import logging
import sys
from django.db import transaction
from django.db.models import F
from website.app import setup_django
setup_django()
from osf.models import QuickFilesNode
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def main():
dry = '--dry' in sys.arg... | import logging
import sys
from django.db import transaction
from django.db.models import F, Count
from website.app import setup_django
setup_django()
from osf.models import QuickFilesNode
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def main():
dry = '--dry' in sys.argv
if... | import logging
import sys
from django.db import transaction
from django.db.models import F
from website.app import setup_django
setup_django()
from osf.models import QuickFilesNode
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def main():
dry = '--dry' in sys.argv
if not dr... | <commit_before>import logging
import sys
from django.db import transaction
from django.db.models import F
from website.app import setup_django
setup_django()
from osf.models import QuickFilesNode
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def main():
dry = '--dry' in sys.arg... |
6c29d671f95668e5f4a337bfe1df23d3bc6b5b0e | arxiv_vanity/sitemaps.py | arxiv_vanity/sitemaps.py | from django.contrib.sitemaps import Sitemap
from .papers.models import Paper
class PaperSitemap(Sitemap):
changefreq = "monthly"
priority = 0.5
limit = 5000
def items(self):
return Paper.objects.all()
def lastmod(self, obj):
return obj.updated
| from django.contrib.sitemaps import Sitemap
from .papers.models import Paper
class PaperSitemap(Sitemap):
changefreq = "monthly"
priority = 0.5
limit = 1000
def items(self):
return Paper.objects.only("arxiv_id", "updated").all()
def lastmod(self, obj):
return obj.updated
| Make sitemap yet more efficient | Make sitemap yet more efficient
| Python | apache-2.0 | arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity | from django.contrib.sitemaps import Sitemap
from .papers.models import Paper
class PaperSitemap(Sitemap):
changefreq = "monthly"
priority = 0.5
limit = 5000
def items(self):
return Paper.objects.all()
def lastmod(self, obj):
return obj.updated
Make sitemap yet more efficient | from django.contrib.sitemaps import Sitemap
from .papers.models import Paper
class PaperSitemap(Sitemap):
changefreq = "monthly"
priority = 0.5
limit = 1000
def items(self):
return Paper.objects.only("arxiv_id", "updated").all()
def lastmod(self, obj):
return obj.updated
| <commit_before>from django.contrib.sitemaps import Sitemap
from .papers.models import Paper
class PaperSitemap(Sitemap):
changefreq = "monthly"
priority = 0.5
limit = 5000
def items(self):
return Paper.objects.all()
def lastmod(self, obj):
return obj.updated
<commit_msg>Make site... | from django.contrib.sitemaps import Sitemap
from .papers.models import Paper
class PaperSitemap(Sitemap):
changefreq = "monthly"
priority = 0.5
limit = 1000
def items(self):
return Paper.objects.only("arxiv_id", "updated").all()
def lastmod(self, obj):
return obj.updated
| from django.contrib.sitemaps import Sitemap
from .papers.models import Paper
class PaperSitemap(Sitemap):
changefreq = "monthly"
priority = 0.5
limit = 5000
def items(self):
return Paper.objects.all()
def lastmod(self, obj):
return obj.updated
Make sitemap yet more efficientfrom ... | <commit_before>from django.contrib.sitemaps import Sitemap
from .papers.models import Paper
class PaperSitemap(Sitemap):
changefreq = "monthly"
priority = 0.5
limit = 5000
def items(self):
return Paper.objects.all()
def lastmod(self, obj):
return obj.updated
<commit_msg>Make site... |
d6832747545a541eba13f823a38e7fca054cab9d | labelingbot/__init__.py | labelingbot/__init__.py | import os
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import telegram
from config import config
APP_ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
APP_STATIC_PATH = os.path.join(APP_ROOT_PATH, 'static')
APP_TEMPLA... | import os
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import telegram
from config import config
APP_ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
APP_STATIC_PATH = os.path.join(APP_ROOT_PATH, 'static')
APP_TEMPLA... | Fix templates path error (template -> templates) | Fix templates path error (template -> templates)
| Python | mit | Lee-W/Sentence-Labeling-Bot,Lee-W/Sentence-Labeling-Bot | import os
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import telegram
from config import config
APP_ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
APP_STATIC_PATH = os.path.join(APP_ROOT_PATH, 'static')
APP_TEMPLA... | import os
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import telegram
from config import config
APP_ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
APP_STATIC_PATH = os.path.join(APP_ROOT_PATH, 'static')
APP_TEMPLA... | <commit_before>import os
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import telegram
from config import config
APP_ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
APP_STATIC_PATH = os.path.join(APP_ROOT_PATH, 'stat... | import os
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import telegram
from config import config
APP_ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
APP_STATIC_PATH = os.path.join(APP_ROOT_PATH, 'static')
APP_TEMPLA... | import os
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import telegram
from config import config
APP_ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
APP_STATIC_PATH = os.path.join(APP_ROOT_PATH, 'static')
APP_TEMPLA... | <commit_before>import os
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
import telegram
from config import config
APP_ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
APP_STATIC_PATH = os.path.join(APP_ROOT_PATH, 'stat... |
c99ea848a39d22cb4347606b6cba97b98ce627fd | timesketch/api/v1/resources/information.py | timesketch/api/v1/resources/information.py | # Copyright 2020 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2020 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Fix method docstring (copy paste error) | Fix method docstring (copy paste error)
Guess there was a copy paste error in this PR: https://github.com/google/timesketch/commit/64157452b7b8285ea928e4949434d46592791d47
As the method does not return user info. | Python | apache-2.0 | google/timesketch,google/timesketch,google/timesketch,google/timesketch | # Copyright 2020 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2020 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2020 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | # Copyright 2020 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2020 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | <commit_before># Copyright 2020 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
185d66fa562f931e9910f845e8986620da142c49 | tests/test_api_views.py | tests/test_api_views.py | import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings")
import pytest
import django
from django.test import TestCase
from rest_framework.test import APIRequestFactory
from api.webview.views import DocumentList
django.setup()
# TODO - make this work without Django.
class APIViewTests(TestCase... | import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings")
import django
from django.test import TestCase
from rest_framework.test import APIRequestFactory
from api.webview.views import DocumentList
django.setup()
class APIViewTests(TestCase):
def setUp(self):
self.factory = APIRequ... | Add some more views tests | Add some more views tests
| Python | apache-2.0 | mehanig/scrapi,erinspace/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,mehanig/scrapi,erinspace/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi | import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings")
import pytest
import django
from django.test import TestCase
from rest_framework.test import APIRequestFactory
from api.webview.views import DocumentList
django.setup()
# TODO - make this work without Django.
class APIViewTests(TestCase... | import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings")
import django
from django.test import TestCase
from rest_framework.test import APIRequestFactory
from api.webview.views import DocumentList
django.setup()
class APIViewTests(TestCase):
def setUp(self):
self.factory = APIRequ... | <commit_before>import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings")
import pytest
import django
from django.test import TestCase
from rest_framework.test import APIRequestFactory
from api.webview.views import DocumentList
django.setup()
# TODO - make this work without Django.
class APIVie... | import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings")
import django
from django.test import TestCase
from rest_framework.test import APIRequestFactory
from api.webview.views import DocumentList
django.setup()
class APIViewTests(TestCase):
def setUp(self):
self.factory = APIRequ... | import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings")
import pytest
import django
from django.test import TestCase
from rest_framework.test import APIRequestFactory
from api.webview.views import DocumentList
django.setup()
# TODO - make this work without Django.
class APIViewTests(TestCase... | <commit_before>import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.api.settings")
import pytest
import django
from django.test import TestCase
from rest_framework.test import APIRequestFactory
from api.webview.views import DocumentList
django.setup()
# TODO - make this work without Django.
class APIVie... |
e830aae894ac2256e70d1bef1d3784dff4cb8bdb | metaci/repository/urls.py | metaci/repository/urls.py | from django.conf.urls import url
from metaci.repository import views as repository_views
urlpatterns = [
url(
r'(?P<owner>\w+)/(?P<name>[^/].*)/branch/(?P<branch>.*)$',
repository_views.branch_detail,
name='branch_detail',
),
url(
r'(?P<owner>\w+)/(?P<name>[^/].*)/commit/(... | from django.conf.urls import url
from metaci.repository import views as repository_views
urlpatterns = [
url(
r'(?P<owner>[-\w]+)/(?P<name>[^/].*)/branch/(?P<branch>.*)$',
repository_views.branch_detail,
name='branch_detail',
),
url(
r'(?P<owner>[-\w]+)/(?P<name>[^/].*)/co... | Support -'s in github repo and owner name | Support -'s in github repo and owner name
| Python | bsd-3-clause | SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci | from django.conf.urls import url
from metaci.repository import views as repository_views
urlpatterns = [
url(
r'(?P<owner>\w+)/(?P<name>[^/].*)/branch/(?P<branch>.*)$',
repository_views.branch_detail,
name='branch_detail',
),
url(
r'(?P<owner>\w+)/(?P<name>[^/].*)/commit/(... | from django.conf.urls import url
from metaci.repository import views as repository_views
urlpatterns = [
url(
r'(?P<owner>[-\w]+)/(?P<name>[^/].*)/branch/(?P<branch>.*)$',
repository_views.branch_detail,
name='branch_detail',
),
url(
r'(?P<owner>[-\w]+)/(?P<name>[^/].*)/co... | <commit_before>from django.conf.urls import url
from metaci.repository import views as repository_views
urlpatterns = [
url(
r'(?P<owner>\w+)/(?P<name>[^/].*)/branch/(?P<branch>.*)$',
repository_views.branch_detail,
name='branch_detail',
),
url(
r'(?P<owner>\w+)/(?P<name>[... | from django.conf.urls import url
from metaci.repository import views as repository_views
urlpatterns = [
url(
r'(?P<owner>[-\w]+)/(?P<name>[^/].*)/branch/(?P<branch>.*)$',
repository_views.branch_detail,
name='branch_detail',
),
url(
r'(?P<owner>[-\w]+)/(?P<name>[^/].*)/co... | from django.conf.urls import url
from metaci.repository import views as repository_views
urlpatterns = [
url(
r'(?P<owner>\w+)/(?P<name>[^/].*)/branch/(?P<branch>.*)$',
repository_views.branch_detail,
name='branch_detail',
),
url(
r'(?P<owner>\w+)/(?P<name>[^/].*)/commit/(... | <commit_before>from django.conf.urls import url
from metaci.repository import views as repository_views
urlpatterns = [
url(
r'(?P<owner>\w+)/(?P<name>[^/].*)/branch/(?P<branch>.*)$',
repository_views.branch_detail,
name='branch_detail',
),
url(
r'(?P<owner>\w+)/(?P<name>[... |
8631a61b9b243e5c1724fb2df06f33b1400fb59e | tests/test_koji_sign.py | tests/test_koji_sign.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Tests for koji_sign module.
"""
import unittest
import os
import sys
DIR = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(DIR, ".."))
from releng_sop.common import Environment # noqa: E402
from releng_sop.koji_sign import get_rpmsign_class, LocalRPMSign ... | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Tests for koji_sign module.
"""
import unittest
import os
import sys
# HACK: inject empty koji module to silence failing tests.
# We need to add koji to deps (currently not possible)
# or create a mock object for testing.
import imp
sys.modules["koji"] = imp.new_modu... | Fix failing tests by injecting an empty koji module. | Fix failing tests by injecting an empty koji module.
| Python | mit | release-engineering/releng-sop,release-engineering/releng-sop | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Tests for koji_sign module.
"""
import unittest
import os
import sys
DIR = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(DIR, ".."))
from releng_sop.common import Environment # noqa: E402
from releng_sop.koji_sign import get_rpmsign_class, LocalRPMSign ... | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Tests for koji_sign module.
"""
import unittest
import os
import sys
# HACK: inject empty koji module to silence failing tests.
# We need to add koji to deps (currently not possible)
# or create a mock object for testing.
import imp
sys.modules["koji"] = imp.new_modu... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Tests for koji_sign module.
"""
import unittest
import os
import sys
DIR = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(DIR, ".."))
from releng_sop.common import Environment # noqa: E402
from releng_sop.koji_sign import get_rpmsign_class,... | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Tests for koji_sign module.
"""
import unittest
import os
import sys
# HACK: inject empty koji module to silence failing tests.
# We need to add koji to deps (currently not possible)
# or create a mock object for testing.
import imp
sys.modules["koji"] = imp.new_modu... | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Tests for koji_sign module.
"""
import unittest
import os
import sys
DIR = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(DIR, ".."))
from releng_sop.common import Environment # noqa: E402
from releng_sop.koji_sign import get_rpmsign_class, LocalRPMSign ... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Tests for koji_sign module.
"""
import unittest
import os
import sys
DIR = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(DIR, ".."))
from releng_sop.common import Environment # noqa: E402
from releng_sop.koji_sign import get_rpmsign_class,... |
648e2907a5ea5f9157b5aabe4cec10a3d952f5a7 | tests/test_scale.py | tests/test_scale.py | from hypothesis import assume, given
from ppb_vector import Vector
from utils import angle_isclose, floats, isclose, lengths, vectors
@given(x=vectors(), length=floats())
def test_scale_to_length(x: Vector, length: float):
"""Test that the length of x.scale_to(length) is length.
Additionally, Vector.scale_t... | from hypothesis import assume, given, strategies as st
from pytest import raises # type: ignore
from ppb_vector import Vector
from utils import angle_isclose, isclose, lengths, vectors
@given(v=vectors(), length=st.floats(max_value=0))
def test_scale_negative_length(v: Vector, length: float):
"""Test that Vecto... | Make a separate test for negative lengths | tests/scale: Make a separate test for negative lengths
Previously, we didn't check that negative lengths raise a ValueError,
but that *if* a ValueError was raised, then the length was negative.
| Python | artistic-2.0 | ppb/ppb-vector,ppb/ppb-vector | from hypothesis import assume, given
from ppb_vector import Vector
from utils import angle_isclose, floats, isclose, lengths, vectors
@given(x=vectors(), length=floats())
def test_scale_to_length(x: Vector, length: float):
"""Test that the length of x.scale_to(length) is length.
Additionally, Vector.scale_t... | from hypothesis import assume, given, strategies as st
from pytest import raises # type: ignore
from ppb_vector import Vector
from utils import angle_isclose, isclose, lengths, vectors
@given(v=vectors(), length=st.floats(max_value=0))
def test_scale_negative_length(v: Vector, length: float):
"""Test that Vecto... | <commit_before>from hypothesis import assume, given
from ppb_vector import Vector
from utils import angle_isclose, floats, isclose, lengths, vectors
@given(x=vectors(), length=floats())
def test_scale_to_length(x: Vector, length: float):
"""Test that the length of x.scale_to(length) is length.
Additionally,... | from hypothesis import assume, given, strategies as st
from pytest import raises # type: ignore
from ppb_vector import Vector
from utils import angle_isclose, isclose, lengths, vectors
@given(v=vectors(), length=st.floats(max_value=0))
def test_scale_negative_length(v: Vector, length: float):
"""Test that Vecto... | from hypothesis import assume, given
from ppb_vector import Vector
from utils import angle_isclose, floats, isclose, lengths, vectors
@given(x=vectors(), length=floats())
def test_scale_to_length(x: Vector, length: float):
"""Test that the length of x.scale_to(length) is length.
Additionally, Vector.scale_t... | <commit_before>from hypothesis import assume, given
from ppb_vector import Vector
from utils import angle_isclose, floats, isclose, lengths, vectors
@given(x=vectors(), length=floats())
def test_scale_to_length(x: Vector, length: float):
"""Test that the length of x.scale_to(length) is length.
Additionally,... |
e3fe8c01855e3462ae5e4fd51473a75355fe416d | tests/test_utils.py | tests/test_utils.py | from parsel.utils import shorten
from pytest import mark, raises
import six
@mark.parametrize(
'width,expected',
(
(-1, ValueError),
(0, u''),
(1, u'.'),
(2, u'..'),
(3, u'...'),
(4, u'f...'),
(5, u'fo...'),
(6, u'foobar'),
(7, u'foobar'... | from parsel.utils import shorten, extract_regex
from pytest import mark, raises
import six
@mark.parametrize(
'width,expected',
(
(-1, ValueError),
(0, u''),
(1, u'.'),
(2, u'..'),
(3, u'...'),
(4, u'f...'),
(5, u'fo...'),
(6, u'foobar'),
... | Add tests for `extract_regex` function. | Add tests for `extract_regex` function.
| Python | bsd-3-clause | scrapy/parsel | from parsel.utils import shorten
from pytest import mark, raises
import six
@mark.parametrize(
'width,expected',
(
(-1, ValueError),
(0, u''),
(1, u'.'),
(2, u'..'),
(3, u'...'),
(4, u'f...'),
(5, u'fo...'),
(6, u'foobar'),
(7, u'foobar'... | from parsel.utils import shorten, extract_regex
from pytest import mark, raises
import six
@mark.parametrize(
'width,expected',
(
(-1, ValueError),
(0, u''),
(1, u'.'),
(2, u'..'),
(3, u'...'),
(4, u'f...'),
(5, u'fo...'),
(6, u'foobar'),
... | <commit_before>from parsel.utils import shorten
from pytest import mark, raises
import six
@mark.parametrize(
'width,expected',
(
(-1, ValueError),
(0, u''),
(1, u'.'),
(2, u'..'),
(3, u'...'),
(4, u'f...'),
(5, u'fo...'),
(6, u'foobar'),
... | from parsel.utils import shorten, extract_regex
from pytest import mark, raises
import six
@mark.parametrize(
'width,expected',
(
(-1, ValueError),
(0, u''),
(1, u'.'),
(2, u'..'),
(3, u'...'),
(4, u'f...'),
(5, u'fo...'),
(6, u'foobar'),
... | from parsel.utils import shorten
from pytest import mark, raises
import six
@mark.parametrize(
'width,expected',
(
(-1, ValueError),
(0, u''),
(1, u'.'),
(2, u'..'),
(3, u'...'),
(4, u'f...'),
(5, u'fo...'),
(6, u'foobar'),
(7, u'foobar'... | <commit_before>from parsel.utils import shorten
from pytest import mark, raises
import six
@mark.parametrize(
'width,expected',
(
(-1, ValueError),
(0, u''),
(1, u'.'),
(2, u'..'),
(3, u'...'),
(4, u'f...'),
(5, u'fo...'),
(6, u'foobar'),
... |
bea03e81141dcb912e1697fbf22b7ca1d5fd0d4d | tingbot/__init__.py | tingbot/__init__.py | from . import platform_specific, input
from .graphics import screen, Surface, Image
from .run_loop import main_run_loop, every
from .input import touch
from .button import press
from .web import webhook
platform_specific.fixup_env()
def run(loop=None):
if loop is not None:
every(seconds=1.0/30)(loop)
... | try:
import pygame
except ImportError:
print 'Failed to import pygame'
print '-----------------------'
print ''
print 'tingbot-python requires pygame. Please download and install pygame 1.9.1'
print 'or later from http://www.pygame.org/download.shtml'
print ''
print "If you're using a vi... | Add import-time check for pygame (since we can't install automatically) | Add import-time check for pygame (since we can't install automatically)
| Python | bsd-2-clause | furbrain/tingbot-python | from . import platform_specific, input
from .graphics import screen, Surface, Image
from .run_loop import main_run_loop, every
from .input import touch
from .button import press
from .web import webhook
platform_specific.fixup_env()
def run(loop=None):
if loop is not None:
every(seconds=1.0/30)(loop)
... | try:
import pygame
except ImportError:
print 'Failed to import pygame'
print '-----------------------'
print ''
print 'tingbot-python requires pygame. Please download and install pygame 1.9.1'
print 'or later from http://www.pygame.org/download.shtml'
print ''
print "If you're using a vi... | <commit_before>from . import platform_specific, input
from .graphics import screen, Surface, Image
from .run_loop import main_run_loop, every
from .input import touch
from .button import press
from .web import webhook
platform_specific.fixup_env()
def run(loop=None):
if loop is not None:
every(seconds=1... | try:
import pygame
except ImportError:
print 'Failed to import pygame'
print '-----------------------'
print ''
print 'tingbot-python requires pygame. Please download and install pygame 1.9.1'
print 'or later from http://www.pygame.org/download.shtml'
print ''
print "If you're using a vi... | from . import platform_specific, input
from .graphics import screen, Surface, Image
from .run_loop import main_run_loop, every
from .input import touch
from .button import press
from .web import webhook
platform_specific.fixup_env()
def run(loop=None):
if loop is not None:
every(seconds=1.0/30)(loop)
... | <commit_before>from . import platform_specific, input
from .graphics import screen, Surface, Image
from .run_loop import main_run_loop, every
from .input import touch
from .button import press
from .web import webhook
platform_specific.fixup_env()
def run(loop=None):
if loop is not None:
every(seconds=1... |
df55e36869789e3b4b94114a339dd2390156fc0b | account/urls.py | account/urls.py | from django.conf.urls import url
from django.contrib.auth.views import (
password_change,
password_change_done,
password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete,
LoginView,
LogoutView,
)
from .views import AccountView
urlpatterns = [
url(r'^$', A... | from django.conf.urls import url
from django.contrib.auth.views import (
password_change,
password_change_done,
password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete,
LoginView,
LogoutView,
)
from .views import AccountView
urlpatterns = [
url(r'^$', A... | Add profile view - default login redirect | Add profile view - default login redirect
| Python | mit | uda/djaccount,uda/djaccount | from django.conf.urls import url
from django.contrib.auth.views import (
password_change,
password_change_done,
password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete,
LoginView,
LogoutView,
)
from .views import AccountView
urlpatterns = [
url(r'^$', A... | from django.conf.urls import url
from django.contrib.auth.views import (
password_change,
password_change_done,
password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete,
LoginView,
LogoutView,
)
from .views import AccountView
urlpatterns = [
url(r'^$', A... | <commit_before>from django.conf.urls import url
from django.contrib.auth.views import (
password_change,
password_change_done,
password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete,
LoginView,
LogoutView,
)
from .views import AccountView
urlpatterns = [
... | from django.conf.urls import url
from django.contrib.auth.views import (
password_change,
password_change_done,
password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete,
LoginView,
LogoutView,
)
from .views import AccountView
urlpatterns = [
url(r'^$', A... | from django.conf.urls import url
from django.contrib.auth.views import (
password_change,
password_change_done,
password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete,
LoginView,
LogoutView,
)
from .views import AccountView
urlpatterns = [
url(r'^$', A... | <commit_before>from django.conf.urls import url
from django.contrib.auth.views import (
password_change,
password_change_done,
password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete,
LoginView,
LogoutView,
)
from .views import AccountView
urlpatterns = [
... |
aacb30d2d87cf83c3f09225532c06d81e399cae2 | spanky/commands/cmd_roster.py | spanky/commands/cmd_roster.py | import json
import click
from spanky.cli import pass_context
from spanky.lib.enroll import roster
@click.command('roster', short_help='Enroll / leave')
@click.argument('name')
@pass_context
def cli(ctx, name):
config = ctx.config.load('enroll.yml')
click.echo(json.dumps(list(roster(config, name))))
| import json
import click
from spanky.cli import pass_context
from spanky.lib.enroll import roster
@click.command('roster', short_help='Enroll / leave')
@click.argument('name')
@pass_context
def cli(ctx, name):
config = ctx.config.load('enroll.yml')
members = list(roster(config, name))
click.echo(json.du... | Return members in roster cmd out. | Return members in roster cmd out.
| Python | bsd-3-clause | pglbutt/spanky,pglbutt/spanky,pglbutt/spanky | import json
import click
from spanky.cli import pass_context
from spanky.lib.enroll import roster
@click.command('roster', short_help='Enroll / leave')
@click.argument('name')
@pass_context
def cli(ctx, name):
config = ctx.config.load('enroll.yml')
click.echo(json.dumps(list(roster(config, name))))
Return m... | import json
import click
from spanky.cli import pass_context
from spanky.lib.enroll import roster
@click.command('roster', short_help='Enroll / leave')
@click.argument('name')
@pass_context
def cli(ctx, name):
config = ctx.config.load('enroll.yml')
members = list(roster(config, name))
click.echo(json.du... | <commit_before>import json
import click
from spanky.cli import pass_context
from spanky.lib.enroll import roster
@click.command('roster', short_help='Enroll / leave')
@click.argument('name')
@pass_context
def cli(ctx, name):
config = ctx.config.load('enroll.yml')
click.echo(json.dumps(list(roster(config, na... | import json
import click
from spanky.cli import pass_context
from spanky.lib.enroll import roster
@click.command('roster', short_help='Enroll / leave')
@click.argument('name')
@pass_context
def cli(ctx, name):
config = ctx.config.load('enroll.yml')
members = list(roster(config, name))
click.echo(json.du... | import json
import click
from spanky.cli import pass_context
from spanky.lib.enroll import roster
@click.command('roster', short_help='Enroll / leave')
@click.argument('name')
@pass_context
def cli(ctx, name):
config = ctx.config.load('enroll.yml')
click.echo(json.dumps(list(roster(config, name))))
Return m... | <commit_before>import json
import click
from spanky.cli import pass_context
from spanky.lib.enroll import roster
@click.command('roster', short_help='Enroll / leave')
@click.argument('name')
@pass_context
def cli(ctx, name):
config = ctx.config.load('enroll.yml')
click.echo(json.dumps(list(roster(config, na... |
3da17f4732d0b1987f3a9362eb8dfa70fb21e39b | rabbitpy/utils.py | rabbitpy/utils.py | """Utilities to make Python 3 support easier, providing wrapper methods which
can call the appropriate method for either Python 2 or Python 3 but creating
a single API point for rabbitpy to use.
"""
__since__ = '2013-03-24'
from pamqp import PYTHON3
if PYTHON3:
from urllib import parse as urlparse
else:
impo... | """Utilities to make Python 3 support easier, providing wrapper methods which
can call the appropriate method for either Python 2 or Python 3 but creating
a single API point for rabbitpy to use.
"""
from pamqp import PYTHON3
try:
from urllib import parse as _urlparse
except ImportError:
import urlparse as _ur... | Fix urlparse name collision with method | Fix urlparse name collision with method
| Python | bsd-3-clause | gmr/rabbitpy,gmr/rabbitpy,jonahbull/rabbitpy | """Utilities to make Python 3 support easier, providing wrapper methods which
can call the appropriate method for either Python 2 or Python 3 but creating
a single API point for rabbitpy to use.
"""
__since__ = '2013-03-24'
from pamqp import PYTHON3
if PYTHON3:
from urllib import parse as urlparse
else:
impo... | """Utilities to make Python 3 support easier, providing wrapper methods which
can call the appropriate method for either Python 2 or Python 3 but creating
a single API point for rabbitpy to use.
"""
from pamqp import PYTHON3
try:
from urllib import parse as _urlparse
except ImportError:
import urlparse as _ur... | <commit_before>"""Utilities to make Python 3 support easier, providing wrapper methods which
can call the appropriate method for either Python 2 or Python 3 but creating
a single API point for rabbitpy to use.
"""
__since__ = '2013-03-24'
from pamqp import PYTHON3
if PYTHON3:
from urllib import parse as urlparse... | """Utilities to make Python 3 support easier, providing wrapper methods which
can call the appropriate method for either Python 2 or Python 3 but creating
a single API point for rabbitpy to use.
"""
from pamqp import PYTHON3
try:
from urllib import parse as _urlparse
except ImportError:
import urlparse as _ur... | """Utilities to make Python 3 support easier, providing wrapper methods which
can call the appropriate method for either Python 2 or Python 3 but creating
a single API point for rabbitpy to use.
"""
__since__ = '2013-03-24'
from pamqp import PYTHON3
if PYTHON3:
from urllib import parse as urlparse
else:
impo... | <commit_before>"""Utilities to make Python 3 support easier, providing wrapper methods which
can call the appropriate method for either Python 2 or Python 3 but creating
a single API point for rabbitpy to use.
"""
__since__ = '2013-03-24'
from pamqp import PYTHON3
if PYTHON3:
from urllib import parse as urlparse... |
c7c47fe11de8ddf43bd007b240b7d9b97a92bbf3 | zerver/lib/url_preview/parsers/base.py | zerver/lib/url_preview/parsers/base.py | from __future__ import absolute_import
from typing import Any, Text
from bs4 import BeautifulSoup
class BaseParser(object):
def __init__(self, html_source):
# type: (Text) -> None
self._soup = BeautifulSoup(html_source, "lxml")
def extract_data(self):
# type: () -> Any
raise N... | from __future__ import absolute_import
from typing import Any, Text
from bs4 import BeautifulSoup
class BaseParser(object):
def __init__(self, html_source):
# type: (Text) -> None
self._soup = BeautifulSoup(html_source, "lxml")
def extract_data(self):
# type: () -> Any
raise N... | Replace buggy NotImplemented with NotImplementedError(). | Replace buggy NotImplemented with NotImplementedError().
| Python | apache-2.0 | brainwane/zulip,rishig/zulip,brainwane/zulip,kou/zulip,eeshangarg/zulip,andersk/zulip,Galexrt/zulip,christi3k/zulip,rishig/zulip,rishig/zulip,jackrzhang/zulip,vabs22/zulip,rht/zulip,brockwhittaker/zulip,tommyip/zulip,amanharitsh123/zulip,showell/zulip,jackrzhang/zulip,amanharitsh123/zulip,rishig/zulip,jrowan/zulip,punc... | from __future__ import absolute_import
from typing import Any, Text
from bs4 import BeautifulSoup
class BaseParser(object):
def __init__(self, html_source):
# type: (Text) -> None
self._soup = BeautifulSoup(html_source, "lxml")
def extract_data(self):
# type: () -> Any
raise N... | from __future__ import absolute_import
from typing import Any, Text
from bs4 import BeautifulSoup
class BaseParser(object):
def __init__(self, html_source):
# type: (Text) -> None
self._soup = BeautifulSoup(html_source, "lxml")
def extract_data(self):
# type: () -> Any
raise N... | <commit_before>from __future__ import absolute_import
from typing import Any, Text
from bs4 import BeautifulSoup
class BaseParser(object):
def __init__(self, html_source):
# type: (Text) -> None
self._soup = BeautifulSoup(html_source, "lxml")
def extract_data(self):
# type: () -> Any
... | from __future__ import absolute_import
from typing import Any, Text
from bs4 import BeautifulSoup
class BaseParser(object):
def __init__(self, html_source):
# type: (Text) -> None
self._soup = BeautifulSoup(html_source, "lxml")
def extract_data(self):
# type: () -> Any
raise N... | from __future__ import absolute_import
from typing import Any, Text
from bs4 import BeautifulSoup
class BaseParser(object):
def __init__(self, html_source):
# type: (Text) -> None
self._soup = BeautifulSoup(html_source, "lxml")
def extract_data(self):
# type: () -> Any
raise N... | <commit_before>from __future__ import absolute_import
from typing import Any, Text
from bs4 import BeautifulSoup
class BaseParser(object):
def __init__(self, html_source):
# type: (Text) -> None
self._soup = BeautifulSoup(html_source, "lxml")
def extract_data(self):
# type: () -> Any
... |
b89f6c766e976a182a958e74859c2df8862c7361 | pale/fields/resource.py | pale/fields/resource.py | from pale.fields.base import BaseField, ListField
from pale.resource import Resource
class ResourceField(BaseField):
"""A field that contains a nested resource"""
value_type = 'resource'
def __init__(self,
description,
details=None,
resource_type=Resource,
... | from pale.fields.base import BaseField, ListField
from pale.resource import Resource
class ResourceField(BaseField):
"""A field that contains a nested resource"""
value_type = 'resource'
def __init__(self,
description,
details=None,
resource_type=Resource,
... | Use normal Resource as default for ResourceList | Use normal Resource as default for ResourceList
to avoid potential circular import.
| Python | mit | Loudr/pale | from pale.fields.base import BaseField, ListField
from pale.resource import Resource
class ResourceField(BaseField):
"""A field that contains a nested resource"""
value_type = 'resource'
def __init__(self,
description,
details=None,
resource_type=Resource,
... | from pale.fields.base import BaseField, ListField
from pale.resource import Resource
class ResourceField(BaseField):
"""A field that contains a nested resource"""
value_type = 'resource'
def __init__(self,
description,
details=None,
resource_type=Resource,
... | <commit_before>from pale.fields.base import BaseField, ListField
from pale.resource import Resource
class ResourceField(BaseField):
"""A field that contains a nested resource"""
value_type = 'resource'
def __init__(self,
description,
details=None,
resource_type=Resou... | from pale.fields.base import BaseField, ListField
from pale.resource import Resource
class ResourceField(BaseField):
"""A field that contains a nested resource"""
value_type = 'resource'
def __init__(self,
description,
details=None,
resource_type=Resource,
... | from pale.fields.base import BaseField, ListField
from pale.resource import Resource
class ResourceField(BaseField):
"""A field that contains a nested resource"""
value_type = 'resource'
def __init__(self,
description,
details=None,
resource_type=Resource,
... | <commit_before>from pale.fields.base import BaseField, ListField
from pale.resource import Resource
class ResourceField(BaseField):
"""A field that contains a nested resource"""
value_type = 'resource'
def __init__(self,
description,
details=None,
resource_type=Resou... |
3d399d33302c004122773af52a740da1c736540e | test/functional/test_miscellaneous.py | test/functional/test_miscellaneous.py | import time
import pytest
def test_version(client):
expected_keys = {"Repo", "Commit", "Version"}
resp_version = client.version()
assert set(resp_version.keys()).issuperset(expected_keys)
def test_id(client):
expected_keys = {"PublicKey", "ProtocolVersion", "ID", "AgentVersion", "Addresses"}
resp_id = client... | import time
import pytest
def test_version(client):
expected_keys = {"Repo", "Commit", "Version"}
resp_version = client.version()
assert set(resp_version.keys()).issuperset(expected_keys)
def test_id(client):
expected_keys = {"PublicKey", "ProtocolVersion", "ID", "AgentVersion", "Addresses"}
resp_id = client... | Increase daemon shutdown timeout to 20s for slow Travis CI Windows runs | Increase daemon shutdown timeout to 20s for slow Travis CI Windows runs | Python | mit | ipfs/py-ipfs-api,ipfs/py-ipfs-api | import time
import pytest
def test_version(client):
expected_keys = {"Repo", "Commit", "Version"}
resp_version = client.version()
assert set(resp_version.keys()).issuperset(expected_keys)
def test_id(client):
expected_keys = {"PublicKey", "ProtocolVersion", "ID", "AgentVersion", "Addresses"}
resp_id = client... | import time
import pytest
def test_version(client):
expected_keys = {"Repo", "Commit", "Version"}
resp_version = client.version()
assert set(resp_version.keys()).issuperset(expected_keys)
def test_id(client):
expected_keys = {"PublicKey", "ProtocolVersion", "ID", "AgentVersion", "Addresses"}
resp_id = client... | <commit_before>import time
import pytest
def test_version(client):
expected_keys = {"Repo", "Commit", "Version"}
resp_version = client.version()
assert set(resp_version.keys()).issuperset(expected_keys)
def test_id(client):
expected_keys = {"PublicKey", "ProtocolVersion", "ID", "AgentVersion", "Addresses"}
r... | import time
import pytest
def test_version(client):
expected_keys = {"Repo", "Commit", "Version"}
resp_version = client.version()
assert set(resp_version.keys()).issuperset(expected_keys)
def test_id(client):
expected_keys = {"PublicKey", "ProtocolVersion", "ID", "AgentVersion", "Addresses"}
resp_id = client... | import time
import pytest
def test_version(client):
expected_keys = {"Repo", "Commit", "Version"}
resp_version = client.version()
assert set(resp_version.keys()).issuperset(expected_keys)
def test_id(client):
expected_keys = {"PublicKey", "ProtocolVersion", "ID", "AgentVersion", "Addresses"}
resp_id = client... | <commit_before>import time
import pytest
def test_version(client):
expected_keys = {"Repo", "Commit", "Version"}
resp_version = client.version()
assert set(resp_version.keys()).issuperset(expected_keys)
def test_id(client):
expected_keys = {"PublicKey", "ProtocolVersion", "ID", "AgentVersion", "Addresses"}
r... |
6bd8ecf5719e15674ef67100b92822be3cf8e5ec | dataportal/tests/test_replay_persistance.py | dataportal/tests/test_replay_persistance.py | import nose
from dataportal.replay.persist import History
h = None
def setup():
h = History(':memory:')
def test_history():
pass
| from nose.tools import assert_equal
from dataportal.replay.persist import History
import dataportal.replay.persist
OBJ_ID_LEN = 36
h = None
def setup():
global h
h = History(':memory:')
def test_history():
run_id = ''.join(['a'] * OBJ_ID_LEN)
# Simple round-trip: put and get
config1 = {'plot_x'... | Add real tests of replay History. | TST: Add real tests of replay History.
| Python | bsd-3-clause | tacaswell/dataportal,danielballan/datamuxer,danielballan/datamuxer,NSLS-II/dataportal,ericdill/datamuxer,danielballan/dataportal,NSLS-II/datamuxer,danielballan/dataportal,ericdill/databroker,tacaswell/dataportal,NSLS-II/dataportal,ericdill/datamuxer,ericdill/databroker | import nose
from dataportal.replay.persist import History
h = None
def setup():
h = History(':memory:')
def test_history():
pass
TST: Add real tests of replay History. | from nose.tools import assert_equal
from dataportal.replay.persist import History
import dataportal.replay.persist
OBJ_ID_LEN = 36
h = None
def setup():
global h
h = History(':memory:')
def test_history():
run_id = ''.join(['a'] * OBJ_ID_LEN)
# Simple round-trip: put and get
config1 = {'plot_x'... | <commit_before>import nose
from dataportal.replay.persist import History
h = None
def setup():
h = History(':memory:')
def test_history():
pass
<commit_msg>TST: Add real tests of replay History.<commit_after> | from nose.tools import assert_equal
from dataportal.replay.persist import History
import dataportal.replay.persist
OBJ_ID_LEN = 36
h = None
def setup():
global h
h = History(':memory:')
def test_history():
run_id = ''.join(['a'] * OBJ_ID_LEN)
# Simple round-trip: put and get
config1 = {'plot_x'... | import nose
from dataportal.replay.persist import History
h = None
def setup():
h = History(':memory:')
def test_history():
pass
TST: Add real tests of replay History.from nose.tools import assert_equal
from dataportal.replay.persist import History
import dataportal.replay.persist
OBJ_ID_LEN = 36
h = None
... | <commit_before>import nose
from dataportal.replay.persist import History
h = None
def setup():
h = History(':memory:')
def test_history():
pass
<commit_msg>TST: Add real tests of replay History.<commit_after>from nose.tools import assert_equal
from dataportal.replay.persist import History
import dataportal.r... |
334c23e313cef141b6a18e8bf34be0fea662043f | cla_public/libs/call_centre_availability.py | cla_public/libs/call_centre_availability.py | import datetime
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), display_string
def suffix(d):
if 11 <= d <= 1... | import datetime
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), displ... | Allow for Day name and ordinal suffix to be translated | Allow for Day name and ordinal suffix to be translated
| Python | mit | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | import datetime
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), display_string
def suffix(d):
if 11 <= d <= 1... | import datetime
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), displ... | <commit_before>import datetime
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), display_string
def suffix(d):
... | import datetime
from flask.ext.babel import lazy_gettext as _
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), displ... | import datetime
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), display_string
def suffix(d):
if 11 <= d <= 1... | <commit_before>import datetime
def time_choice(time):
display_format = "%I:%M %p"
end = time + datetime.timedelta(minutes=30)
display_string = time.strftime(display_format).lstrip("0") + " - " + end.strftime(display_format).lstrip("0")
return time.strftime("%H%M"), display_string
def suffix(d):
... |
b85935bf2dd2b4c92c7aee660c1dbfa175545c16 | moksha/lib/app_globals.py | moksha/lib/app_globals.py | """The application's Globals object"""
import logging
import inspect
from tg import config
from shove import Shove
from moksha.exc import CacheBackendException
from moksha.lib.cache import Cache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throu... | """The application's Globals object"""
import logging
import inspect
from tg import config
from shove import Shove
from moksha.exc import CacheBackendException
from moksha.lib.cache import Cache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throu... | Comment out our global stuff for now | Comment out our global stuff for now
| Python | apache-2.0 | mokshaproject/moksha,ralphbean/moksha,mokshaproject/moksha,lmacken/moksha,pombredanne/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,ralphbean/moksha,pombredanne/moksha,pombredanne/moksha,lmacken/moksha,pombredanne/moksha,mokshaproject/moksha | """The application's Globals object"""
import logging
import inspect
from tg import config
from shove import Shove
from moksha.exc import CacheBackendException
from moksha.lib.cache import Cache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throu... | """The application's Globals object"""
import logging
import inspect
from tg import config
from shove import Shove
from moksha.exc import CacheBackendException
from moksha.lib.cache import Cache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throu... | <commit_before>"""The application's Globals object"""
import logging
import inspect
from tg import config
from shove import Shove
from moksha.exc import CacheBackendException
from moksha.lib.cache import Cache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects ... | """The application's Globals object"""
import logging
import inspect
from tg import config
from shove import Shove
from moksha.exc import CacheBackendException
from moksha.lib.cache import Cache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throu... | """The application's Globals object"""
import logging
import inspect
from tg import config
from shove import Shove
from moksha.exc import CacheBackendException
from moksha.lib.cache import Cache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throu... | <commit_before>"""The application's Globals object"""
import logging
import inspect
from tg import config
from shove import Shove
from moksha.exc import CacheBackendException
from moksha.lib.cache import Cache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects ... |
c5128bb5dd059580f46647cfe881f1b2c154f62f | tests/config_test.py | tests/config_test.py | import os
from testfixtures import tempdir
import unittest
import yaml
from i2ssh.config import Config
FILENAME = '.i2sshrc'
class ConfigTest(unittest.TestCase):
@tempdir()
def test_cluster(self, tmpdir):
cluster_config = {'hosts': ['host1']}
full_config = {'mycluster': cluster_config}
... | import os
from testfixtures import tempdir
import unittest
import yaml
from i2ssh.config import Config
FILENAME = '.i2sshrc'
class ConfigTest(unittest.TestCase):
@tempdir()
def test_cluster(self, tmpdir):
cluster_config = {'hosts': ['host1']}
full_config = {'mycluster': cluster_config}
... | Fix python3 build: Set byte encoding when writing to file. | Fix python3 build: Set byte encoding when writing to file.
| Python | apache-2.0 | mbruggmann/i2ssh | import os
from testfixtures import tempdir
import unittest
import yaml
from i2ssh.config import Config
FILENAME = '.i2sshrc'
class ConfigTest(unittest.TestCase):
@tempdir()
def test_cluster(self, tmpdir):
cluster_config = {'hosts': ['host1']}
full_config = {'mycluster': cluster_config}
... | import os
from testfixtures import tempdir
import unittest
import yaml
from i2ssh.config import Config
FILENAME = '.i2sshrc'
class ConfigTest(unittest.TestCase):
@tempdir()
def test_cluster(self, tmpdir):
cluster_config = {'hosts': ['host1']}
full_config = {'mycluster': cluster_config}
... | <commit_before>import os
from testfixtures import tempdir
import unittest
import yaml
from i2ssh.config import Config
FILENAME = '.i2sshrc'
class ConfigTest(unittest.TestCase):
@tempdir()
def test_cluster(self, tmpdir):
cluster_config = {'hosts': ['host1']}
full_config = {'mycluster': cluster... | import os
from testfixtures import tempdir
import unittest
import yaml
from i2ssh.config import Config
FILENAME = '.i2sshrc'
class ConfigTest(unittest.TestCase):
@tempdir()
def test_cluster(self, tmpdir):
cluster_config = {'hosts': ['host1']}
full_config = {'mycluster': cluster_config}
... | import os
from testfixtures import tempdir
import unittest
import yaml
from i2ssh.config import Config
FILENAME = '.i2sshrc'
class ConfigTest(unittest.TestCase):
@tempdir()
def test_cluster(self, tmpdir):
cluster_config = {'hosts': ['host1']}
full_config = {'mycluster': cluster_config}
... | <commit_before>import os
from testfixtures import tempdir
import unittest
import yaml
from i2ssh.config import Config
FILENAME = '.i2sshrc'
class ConfigTest(unittest.TestCase):
@tempdir()
def test_cluster(self, tmpdir):
cluster_config = {'hosts': ['host1']}
full_config = {'mycluster': cluster... |
da5386234ec66968a1010d073af56ab7f01e4792 | openshift/ose_object.py | openshift/ose_object.py | class OSEObject(object):
"""Superclass to all OSE objects that hold data about remote API."""
def __init__(self, ose):
self.ose = ose
self.refresh()
def refresh(self):
"""Reloads all info about this object.
Uses _request_fresh() method defined by subclasses to obtain
... | class OSEObject(object):
"""Superclass to all OSE objects that hold data about remote API."""
def __init__(self, ose):
self.ose = ose
self.refresh()
def refresh(self):
"""Reloads all info about this object.
Uses _request_fresh() method defined by subclasses to obtain
... | Use the extracted json for getting data from OSEObject to not extract it every time | Use the extracted json for getting data from OSEObject to not extract it every time
| Python | mit | atodorov/python-openshift,atodorov/python-openshift | class OSEObject(object):
"""Superclass to all OSE objects that hold data about remote API."""
def __init__(self, ose):
self.ose = ose
self.refresh()
def refresh(self):
"""Reloads all info about this object.
Uses _request_fresh() method defined by subclasses to obtain
... | class OSEObject(object):
"""Superclass to all OSE objects that hold data about remote API."""
def __init__(self, ose):
self.ose = ose
self.refresh()
def refresh(self):
"""Reloads all info about this object.
Uses _request_fresh() method defined by subclasses to obtain
... | <commit_before>class OSEObject(object):
"""Superclass to all OSE objects that hold data about remote API."""
def __init__(self, ose):
self.ose = ose
self.refresh()
def refresh(self):
"""Reloads all info about this object.
Uses _request_fresh() method defined by subclasses t... | class OSEObject(object):
"""Superclass to all OSE objects that hold data about remote API."""
def __init__(self, ose):
self.ose = ose
self.refresh()
def refresh(self):
"""Reloads all info about this object.
Uses _request_fresh() method defined by subclasses to obtain
... | class OSEObject(object):
"""Superclass to all OSE objects that hold data about remote API."""
def __init__(self, ose):
self.ose = ose
self.refresh()
def refresh(self):
"""Reloads all info about this object.
Uses _request_fresh() method defined by subclasses to obtain
... | <commit_before>class OSEObject(object):
"""Superclass to all OSE objects that hold data about remote API."""
def __init__(self, ose):
self.ose = ose
self.refresh()
def refresh(self):
"""Reloads all info about this object.
Uses _request_fresh() method defined by subclasses t... |
2970f7b866fdf3a6db6bb0f92f0c14780a58a4e4 | tests/test_config.py | tests/test_config.py | from labsys.app import create_app
def test_production_config():
app = create_app('production')
assert app.config['DEBUG'] is False
def test_development_config():
app = create_app('development')
assert app.config['DEBUG'] is True
| import os
from labsys.app import create_app
def test_production_config():
app = create_app('production')
assert app.config['DEBUG'] is False
def test_development_config():
app = create_app('development')
assert app.config['DEBUG'] is True
def test_testing_config():
app = create_app('testing')
... | Add test for testing config | :hammer: Add test for testing config
| Python | mit | gems-uff/labsys,gems-uff/labsys,gems-uff/labsys | from labsys.app import create_app
def test_production_config():
app = create_app('production')
assert app.config['DEBUG'] is False
def test_development_config():
app = create_app('development')
assert app.config['DEBUG'] is True
:hammer: Add test for testing config | import os
from labsys.app import create_app
def test_production_config():
app = create_app('production')
assert app.config['DEBUG'] is False
def test_development_config():
app = create_app('development')
assert app.config['DEBUG'] is True
def test_testing_config():
app = create_app('testing')
... | <commit_before>from labsys.app import create_app
def test_production_config():
app = create_app('production')
assert app.config['DEBUG'] is False
def test_development_config():
app = create_app('development')
assert app.config['DEBUG'] is True
<commit_msg>:hammer: Add test for testing config<commit_a... | import os
from labsys.app import create_app
def test_production_config():
app = create_app('production')
assert app.config['DEBUG'] is False
def test_development_config():
app = create_app('development')
assert app.config['DEBUG'] is True
def test_testing_config():
app = create_app('testing')
... | from labsys.app import create_app
def test_production_config():
app = create_app('production')
assert app.config['DEBUG'] is False
def test_development_config():
app = create_app('development')
assert app.config['DEBUG'] is True
:hammer: Add test for testing configimport os
from labsys.app import cr... | <commit_before>from labsys.app import create_app
def test_production_config():
app = create_app('production')
assert app.config['DEBUG'] is False
def test_development_config():
app = create_app('development')
assert app.config['DEBUG'] is True
<commit_msg>:hammer: Add test for testing config<commit_a... |
86c74e03a4f0038aea8f4cef7f7f75314a43cfe0 | admin_views/templatetags/admin_views.py | admin_views/templatetags/admin_views.py | from django import template
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.admin import site
from ..admin import AdminViews
register = template.Library()
@register.simple_tag
def get_admin_views(app_name):
output = []
STATIC_URL = settings.STATIC_URL
fo... | from django import template
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.admin import site
from ..admin import AdminViews
register = template.Library()
@register.simple_tag
def get_admin_views(app_name):
output = []
STATIC_URL = settings.STATIC_URL
fo... | Use an Unicode object format string when building HTML for the admin, since the arguments can be Unicode as well. | Use an Unicode object format string when building HTML for the admin, since the arguments can be Unicode as well.
Fixes #2. Translated labels are now displayed correctly.
| Python | bsd-3-clause | frankwiles/django-admin-views,mikeumus/django-admin-views,frankwiles/django-admin-views,mikeumus/django-admin-views | from django import template
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.admin import site
from ..admin import AdminViews
register = template.Library()
@register.simple_tag
def get_admin_views(app_name):
output = []
STATIC_URL = settings.STATIC_URL
fo... | from django import template
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.admin import site
from ..admin import AdminViews
register = template.Library()
@register.simple_tag
def get_admin_views(app_name):
output = []
STATIC_URL = settings.STATIC_URL
fo... | <commit_before>from django import template
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.admin import site
from ..admin import AdminViews
register = template.Library()
@register.simple_tag
def get_admin_views(app_name):
output = []
STATIC_URL = settings.STA... | from django import template
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.admin import site
from ..admin import AdminViews
register = template.Library()
@register.simple_tag
def get_admin_views(app_name):
output = []
STATIC_URL = settings.STATIC_URL
fo... | from django import template
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.admin import site
from ..admin import AdminViews
register = template.Library()
@register.simple_tag
def get_admin_views(app_name):
output = []
STATIC_URL = settings.STATIC_URL
fo... | <commit_before>from django import template
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.admin import site
from ..admin import AdminViews
register = template.Library()
@register.simple_tag
def get_admin_views(app_name):
output = []
STATIC_URL = settings.STA... |
1af4c1889c55a2ed6e32e8b59ecd2f0be2eb8fea | tests/test_replay.py | tests/test_replay.py | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecu... | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecu... | Implement test to ensure the replay dir existence is verified | Implement test to ensure the replay dir existence is verified
| Python | bsd-3-clause | venumech/cookiecutter,agconti/cookiecutter,dajose/cookiecutter,benthomasson/cookiecutter,moi65/cookiecutter,willingc/cookiecutter,pjbull/cookiecutter,luzfcb/cookiecutter,agconti/cookiecutter,moi65/cookiecutter,stevepiercy/cookiecutter,audreyr/cookiecutter,luzfcb/cookiecutter,cguardia/cookiecutter,dajose/cookiecutter,au... | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecu... | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecu... | <commit_before># -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expandus... | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecu... | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecu... | <commit_before># -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expandus... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.