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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
921421e4d9e2d536596980e14286db5faa83dd5c | egpackager/cli.py | egpackager/cli.py | #!/usr/bin/env python
import click
import sys
from egpackager.datasources import GspreadDataSource
@click.group()
def cli():
'''
'''
pass
@cli.command()
def register():
click.echo(click.style('Initialized the database', fg='green'))
@cli.command()
def list():
click.echo(click.style('Dropped ... | #!/usr/bin/env python
import click
import sys
from egpackager.registry import RegistryManager
@click.group()
@click.pass_context
def cli(ctx):
'''
'''
ctx.obj = {}
ctx.obj['MANAGER'] = RegistryManager()
@cli.command()
@click.pass_context
@click.option('--type', type=click.Choice(['gspread']), help... | Add basic options for the CLI | Add basic options for the CLI
| Python | mit | VUEG/egpackager | #!/usr/bin/env python
import click
import sys
from egpackager.datasources import GspreadDataSource
@click.group()
def cli():
'''
'''
pass
@cli.command()
def register():
click.echo(click.style('Initialized the database', fg='green'))
@cli.command()
def list():
click.echo(click.style('Dropped ... | #!/usr/bin/env python
import click
import sys
from egpackager.registry import RegistryManager
@click.group()
@click.pass_context
def cli(ctx):
'''
'''
ctx.obj = {}
ctx.obj['MANAGER'] = RegistryManager()
@cli.command()
@click.pass_context
@click.option('--type', type=click.Choice(['gspread']), help... | <commit_before>#!/usr/bin/env python
import click
import sys
from egpackager.datasources import GspreadDataSource
@click.group()
def cli():
'''
'''
pass
@cli.command()
def register():
click.echo(click.style('Initialized the database', fg='green'))
@cli.command()
def list():
click.echo(click.... | #!/usr/bin/env python
import click
import sys
from egpackager.registry import RegistryManager
@click.group()
@click.pass_context
def cli(ctx):
'''
'''
ctx.obj = {}
ctx.obj['MANAGER'] = RegistryManager()
@cli.command()
@click.pass_context
@click.option('--type', type=click.Choice(['gspread']), help... | #!/usr/bin/env python
import click
import sys
from egpackager.datasources import GspreadDataSource
@click.group()
def cli():
'''
'''
pass
@cli.command()
def register():
click.echo(click.style('Initialized the database', fg='green'))
@cli.command()
def list():
click.echo(click.style('Dropped ... | <commit_before>#!/usr/bin/env python
import click
import sys
from egpackager.datasources import GspreadDataSource
@click.group()
def cli():
'''
'''
pass
@cli.command()
def register():
click.echo(click.style('Initialized the database', fg='green'))
@cli.command()
def list():
click.echo(click.... |
bd2d1869894b30eb83eb11ec6e9814e7ab2d4168 | panda/api/activity_log.py | panda/api/activity_log.py | #!/usr/bin/env python
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from panda.api.utils import PandaApiKeyAuthentication, PandaModelResource, PandaSerializer
from panda.models import ActivityLog
class ActivityLogResource(PandaModelResource):
"""
API resource for DataUpl... | #!/usr/bin/env python
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from tastypie.exceptions import ImmediateHttpResponse
from tastypie.http import HttpConflict
from panda.api.utils import PandaApiKeyAuthentication, PandaModelResource, PandaSerializer
from django.db import Integri... | Return 409 for duplicate activity logging. | Return 409 for duplicate activity logging.
| Python | mit | ibrahimcesar/panda,PalmBeachPost/panda,ibrahimcesar/panda,NUKnightLab/panda,pandaproject/panda,datadesk/panda,newsapps/panda,ibrahimcesar/panda,newsapps/panda,pandaproject/panda,PalmBeachPost/panda,PalmBeachPost/panda,NUKnightLab/panda,pandaproject/panda,pandaproject/panda,ibrahimcesar/panda,ibrahimcesar/panda,PalmBeac... | #!/usr/bin/env python
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from panda.api.utils import PandaApiKeyAuthentication, PandaModelResource, PandaSerializer
from panda.models import ActivityLog
class ActivityLogResource(PandaModelResource):
"""
API resource for DataUpl... | #!/usr/bin/env python
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from tastypie.exceptions import ImmediateHttpResponse
from tastypie.http import HttpConflict
from panda.api.utils import PandaApiKeyAuthentication, PandaModelResource, PandaSerializer
from django.db import Integri... | <commit_before>#!/usr/bin/env python
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from panda.api.utils import PandaApiKeyAuthentication, PandaModelResource, PandaSerializer
from panda.models import ActivityLog
class ActivityLogResource(PandaModelResource):
"""
API resou... | #!/usr/bin/env python
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from tastypie.exceptions import ImmediateHttpResponse
from tastypie.http import HttpConflict
from panda.api.utils import PandaApiKeyAuthentication, PandaModelResource, PandaSerializer
from django.db import Integri... | #!/usr/bin/env python
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from panda.api.utils import PandaApiKeyAuthentication, PandaModelResource, PandaSerializer
from panda.models import ActivityLog
class ActivityLogResource(PandaModelResource):
"""
API resource for DataUpl... | <commit_before>#!/usr/bin/env python
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from panda.api.utils import PandaApiKeyAuthentication, PandaModelResource, PandaSerializer
from panda.models import ActivityLog
class ActivityLogResource(PandaModelResource):
"""
API resou... |
fb69cb186b4c82ae5f64551dc65a3ed948650b5e | voteswap/urls.py | voteswap/urls.py | """voteswap URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | """voteswap URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | Make signup just point to landing page | Make signup just point to landing page
| Python | mit | sbuss/voteswap,sbuss/voteswap,sbuss/voteswap,sbuss/voteswap | """voteswap URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | """voteswap URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | <commit_before>"""voteswap URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='... | """voteswap URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | """voteswap URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | <commit_before>"""voteswap URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='... |
6602471252a7c8e3dd3ab94db54e45fccfc6e62f | yarn_api_client/__init__.py | yarn_api_client/__init__.py | # -*- coding: utf-8 -*-
__version__ = '0.3.6'
__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']
from .application_master import ApplicationMaster
from .history_server import HistoryServer
from .node_manager import NodeManager
from .resource_manager import ResourceManager
| # -*- coding: utf-8 -*-
__version__ = '0.3.7.dev'
__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']
from .application_master import ApplicationMaster
from .history_server import HistoryServer
from .node_manager import NodeManager
from .resource_manager import ResourceManager
| Prepare for next development iteration | Prepare for next development iteration
| Python | bsd-3-clause | toidi/hadoop-yarn-api-python-client | # -*- coding: utf-8 -*-
__version__ = '0.3.6'
__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']
from .application_master import ApplicationMaster
from .history_server import HistoryServer
from .node_manager import NodeManager
from .resource_manager import ResourceManager
Prepare for ne... | # -*- coding: utf-8 -*-
__version__ = '0.3.7.dev'
__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']
from .application_master import ApplicationMaster
from .history_server import HistoryServer
from .node_manager import NodeManager
from .resource_manager import ResourceManager
| <commit_before># -*- coding: utf-8 -*-
__version__ = '0.3.6'
__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']
from .application_master import ApplicationMaster
from .history_server import HistoryServer
from .node_manager import NodeManager
from .resource_manager import ResourceManager... | # -*- coding: utf-8 -*-
__version__ = '0.3.7.dev'
__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']
from .application_master import ApplicationMaster
from .history_server import HistoryServer
from .node_manager import NodeManager
from .resource_manager import ResourceManager
| # -*- coding: utf-8 -*-
__version__ = '0.3.6'
__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']
from .application_master import ApplicationMaster
from .history_server import HistoryServer
from .node_manager import NodeManager
from .resource_manager import ResourceManager
Prepare for ne... | <commit_before># -*- coding: utf-8 -*-
__version__ = '0.3.6'
__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']
from .application_master import ApplicationMaster
from .history_server import HistoryServer
from .node_manager import NodeManager
from .resource_manager import ResourceManager... |
8bf5edab5cebb0e713d67c0ec5f866b2d63d537b | wdom/__init__.py | wdom/__init__.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from wdom.log import configure_logger
configure_logger()
| #!/usr/bin/env python3
# -*- coding: utf-8 -*-
| Revert configure logger at initialization | Revert configure logger at initialization
| Python | mit | miyakogi/wdom,miyakogi/wdom,miyakogi/wdom | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from wdom.log import configure_logger
configure_logger()
Revert configure logger at initialization | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
| <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from wdom.log import configure_logger
configure_logger()
<commit_msg>Revert configure logger at initialization<commit_after> | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
| #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from wdom.log import configure_logger
configure_logger()
Revert configure logger at initialization#!/usr/bin/env python3
# -*- coding: utf-8 -*-
| <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from wdom.log import configure_logger
configure_logger()
<commit_msg>Revert configure logger at initialization<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
|
b07964e8b243b151e64af86cb09a37e980f94eb1 | vantage/utils.py | vantage/utils.py | import binascii
import base64
import click
def to_base64(value):
value = base64.urlsafe_b64encode(value.encode("utf-8")).decode("utf-8")
return f"base64:{value}"
def from_base64(value):
if value.startswith("base64:"):
try:
value = base64.urlsafe_b64decode(value[7:]).decode("utf-8")
... | import binascii
import base64
import click
def to_base64(value):
value = base64.urlsafe_b64encode(value.encode("utf-8")).decode("utf-8")
return f"base64:{value}"
def from_base64(value):
if value.startswith("base64:"):
try:
value = base64.urlsafe_b64decode(value[7:]).decode("utf-8")
... | Add optional env kwargs to logging method | Add optional env kwargs to logging method
| Python | mit | vantage-org/vantage,vantage-org/vantage | import binascii
import base64
import click
def to_base64(value):
value = base64.urlsafe_b64encode(value.encode("utf-8")).decode("utf-8")
return f"base64:{value}"
def from_base64(value):
if value.startswith("base64:"):
try:
value = base64.urlsafe_b64decode(value[7:]).decode("utf-8")
... | import binascii
import base64
import click
def to_base64(value):
value = base64.urlsafe_b64encode(value.encode("utf-8")).decode("utf-8")
return f"base64:{value}"
def from_base64(value):
if value.startswith("base64:"):
try:
value = base64.urlsafe_b64decode(value[7:]).decode("utf-8")
... | <commit_before>import binascii
import base64
import click
def to_base64(value):
value = base64.urlsafe_b64encode(value.encode("utf-8")).decode("utf-8")
return f"base64:{value}"
def from_base64(value):
if value.startswith("base64:"):
try:
value = base64.urlsafe_b64decode(value[7:]).d... | import binascii
import base64
import click
def to_base64(value):
value = base64.urlsafe_b64encode(value.encode("utf-8")).decode("utf-8")
return f"base64:{value}"
def from_base64(value):
if value.startswith("base64:"):
try:
value = base64.urlsafe_b64decode(value[7:]).decode("utf-8")
... | import binascii
import base64
import click
def to_base64(value):
value = base64.urlsafe_b64encode(value.encode("utf-8")).decode("utf-8")
return f"base64:{value}"
def from_base64(value):
if value.startswith("base64:"):
try:
value = base64.urlsafe_b64decode(value[7:]).decode("utf-8")
... | <commit_before>import binascii
import base64
import click
def to_base64(value):
value = base64.urlsafe_b64encode(value.encode("utf-8")).decode("utf-8")
return f"base64:{value}"
def from_base64(value):
if value.startswith("base64:"):
try:
value = base64.urlsafe_b64decode(value[7:]).d... |
7a35cc6aa667b3fd144fabfa24bbf2397cd5c011 | vc_zoom/setup.py | vc_zoom/setup.py | # This file is part of the Indico plugins.
# Copyright (C) 2020 - 2021 CERN and ENEA
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from setuptools import setup
setup()
| # This file is part of the Indico plugins.
# Copyright (C) 2020 - 2021 CERN and ENEA
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from setuptools import setup
setup()
| Fix inconsistent linebreaks after file headers | Fix inconsistent linebreaks after file headers
| Python | mit | indico/indico-plugins,indico/indico-plugins,indico/indico-plugins,indico/indico-plugins | # This file is part of the Indico plugins.
# Copyright (C) 2020 - 2021 CERN and ENEA
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from setuptools import setup
setup()
Fix inconsistent linebreaks ... | # This file is part of the Indico plugins.
# Copyright (C) 2020 - 2021 CERN and ENEA
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from setuptools import setup
setup()
| <commit_before># This file is part of the Indico plugins.
# Copyright (C) 2020 - 2021 CERN and ENEA
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from setuptools import setup
setup()
<commit_msg>F... | # This file is part of the Indico plugins.
# Copyright (C) 2020 - 2021 CERN and ENEA
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from setuptools import setup
setup()
| # This file is part of the Indico plugins.
# Copyright (C) 2020 - 2021 CERN and ENEA
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from setuptools import setup
setup()
Fix inconsistent linebreaks ... | <commit_before># This file is part of the Indico plugins.
# Copyright (C) 2020 - 2021 CERN and ENEA
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from setuptools import setup
setup()
<commit_msg>F... |
f11cf81bec8c1590aa8cbeb65209b493f96dd766 | general/zipUnzip.py | general/zipUnzip.py | import os
import zipfile
import zipfile
try:
import zlib
mode= zipfile.ZIP_DEFLATED
except:
mode= zipfile.ZIP_STORED
def unzipDir(inputDir):
for root, dirs, files in os.walk(inputDir):
for f in files:
if f.endswith('.zip'):
inFile = os.path.join(root, f)
... | import os
import zipfile
import zipfile
try:
import zlib
mode= zipfile.ZIP_DEFLATED
except:
mode= zipfile.ZIP_STORED
def unzipDir(inputDir):
for root, dirs, files in os.walk(inputDir):
for f in files:
if f.endswith('.zip'):
inFile = os.path.join(root, f)
... | Create output dir if does not exist. | Create output dir if does not exist.
| Python | mit | borchert/metadata-tools | import os
import zipfile
import zipfile
try:
import zlib
mode= zipfile.ZIP_DEFLATED
except:
mode= zipfile.ZIP_STORED
def unzipDir(inputDir):
for root, dirs, files in os.walk(inputDir):
for f in files:
if f.endswith('.zip'):
inFile = os.path.join(root, f)
... | import os
import zipfile
import zipfile
try:
import zlib
mode= zipfile.ZIP_DEFLATED
except:
mode= zipfile.ZIP_STORED
def unzipDir(inputDir):
for root, dirs, files in os.walk(inputDir):
for f in files:
if f.endswith('.zip'):
inFile = os.path.join(root, f)
... | <commit_before>import os
import zipfile
import zipfile
try:
import zlib
mode= zipfile.ZIP_DEFLATED
except:
mode= zipfile.ZIP_STORED
def unzipDir(inputDir):
for root, dirs, files in os.walk(inputDir):
for f in files:
if f.endswith('.zip'):
inFile = os.path.join(roo... | import os
import zipfile
import zipfile
try:
import zlib
mode= zipfile.ZIP_DEFLATED
except:
mode= zipfile.ZIP_STORED
def unzipDir(inputDir):
for root, dirs, files in os.walk(inputDir):
for f in files:
if f.endswith('.zip'):
inFile = os.path.join(root, f)
... | import os
import zipfile
import zipfile
try:
import zlib
mode= zipfile.ZIP_DEFLATED
except:
mode= zipfile.ZIP_STORED
def unzipDir(inputDir):
for root, dirs, files in os.walk(inputDir):
for f in files:
if f.endswith('.zip'):
inFile = os.path.join(root, f)
... | <commit_before>import os
import zipfile
import zipfile
try:
import zlib
mode= zipfile.ZIP_DEFLATED
except:
mode= zipfile.ZIP_STORED
def unzipDir(inputDir):
for root, dirs, files in os.walk(inputDir):
for f in files:
if f.endswith('.zip'):
inFile = os.path.join(roo... |
f9a4ad56230de8c057e259b14fb14a309b2de0c0 | homedisplay/control_milight/management/commands/run_timed.py | homedisplay/control_milight/management/commands/run_timed.py | from control_milight.models import LightAutomation
from control_milight.views import update_lightstate
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from ledcontroller import LedController
import datetime
import redis
class Com... | from control_milight.models import LightAutomation
from control_milight.views import update_lightstate
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from ledcontroller import LedController
import datetime
import redis
class Com... | Change morning transition color to white | Change morning transition color to white
Fixes #25
| Python | bsd-3-clause | ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display | from control_milight.models import LightAutomation
from control_milight.views import update_lightstate
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from ledcontroller import LedController
import datetime
import redis
class Com... | from control_milight.models import LightAutomation
from control_milight.views import update_lightstate
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from ledcontroller import LedController
import datetime
import redis
class Com... | <commit_before>from control_milight.models import LightAutomation
from control_milight.views import update_lightstate
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from ledcontroller import LedController
import datetime
import re... | from control_milight.models import LightAutomation
from control_milight.views import update_lightstate
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from ledcontroller import LedController
import datetime
import redis
class Com... | from control_milight.models import LightAutomation
from control_milight.views import update_lightstate
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from ledcontroller import LedController
import datetime
import redis
class Com... | <commit_before>from control_milight.models import LightAutomation
from control_milight.views import update_lightstate
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from ledcontroller import LedController
import datetime
import re... |
50784afbb0c95f435c1a25e0840438e406349bbb | plyer/facades/uniqueid.py | plyer/facades/uniqueid.py | '''UniqueID facade.
Returns the following depending on the platform:
* **Android**: Android ID
* **OS X**: Serial number of the device
* **Linux**: Serial number using lshw
* **Windows**: MachineGUID from regkey
Simple Example
--------------
To get the unique ID::
>>> from plyer import uniqueid
>>> uniquei... | '''UniqueID facade.
Returns the following depending on the platform:
* **Android**: Android ID
* **OS X**: Serial number of the device
* **Linux**: Serial number using lshw
* **Windows**: MachineGUID from regkey
* **iOS**: UUID
Simple Example
--------------
To get the unique ID::
>>> from plyer import uniqueid... | Add description for iOS in facade | Add description for iOS in facade
| Python | mit | kivy/plyer,kived/plyer,kivy/plyer,KeyWeeUsr/plyer,KeyWeeUsr/plyer,kived/plyer,kivy/plyer,KeyWeeUsr/plyer | '''UniqueID facade.
Returns the following depending on the platform:
* **Android**: Android ID
* **OS X**: Serial number of the device
* **Linux**: Serial number using lshw
* **Windows**: MachineGUID from regkey
Simple Example
--------------
To get the unique ID::
>>> from plyer import uniqueid
>>> uniquei... | '''UniqueID facade.
Returns the following depending on the platform:
* **Android**: Android ID
* **OS X**: Serial number of the device
* **Linux**: Serial number using lshw
* **Windows**: MachineGUID from regkey
* **iOS**: UUID
Simple Example
--------------
To get the unique ID::
>>> from plyer import uniqueid... | <commit_before>'''UniqueID facade.
Returns the following depending on the platform:
* **Android**: Android ID
* **OS X**: Serial number of the device
* **Linux**: Serial number using lshw
* **Windows**: MachineGUID from regkey
Simple Example
--------------
To get the unique ID::
>>> from plyer import uniqueid
... | '''UniqueID facade.
Returns the following depending on the platform:
* **Android**: Android ID
* **OS X**: Serial number of the device
* **Linux**: Serial number using lshw
* **Windows**: MachineGUID from regkey
* **iOS**: UUID
Simple Example
--------------
To get the unique ID::
>>> from plyer import uniqueid... | '''UniqueID facade.
Returns the following depending on the platform:
* **Android**: Android ID
* **OS X**: Serial number of the device
* **Linux**: Serial number using lshw
* **Windows**: MachineGUID from regkey
Simple Example
--------------
To get the unique ID::
>>> from plyer import uniqueid
>>> uniquei... | <commit_before>'''UniqueID facade.
Returns the following depending on the platform:
* **Android**: Android ID
* **OS X**: Serial number of the device
* **Linux**: Serial number using lshw
* **Windows**: MachineGUID from regkey
Simple Example
--------------
To get the unique ID::
>>> from plyer import uniqueid
... |
96fac3babb22386fd94eccc86abb5bd15c917c53 | rpyc/core/__init__.py | rpyc/core/__init__.py | from rpyc.core.stream import SocketStream, PipeStream
from rpyc.core.channel import Channel
from rpyc.core.protocol import Connection
from rpyc.core.netref import BaseNetref
from rpyc.core.async import AsyncResult, AsyncResultTimeout
from rpyc.core.service import Service, VoidService, SlaveService
from rpyc.core.vinega... | from rpyc.core.stream import SocketStream, PipeStream
from rpyc.core.channel import Channel
from rpyc.core.protocol import Connection
from rpyc.core.netref import BaseNetref
from rpyc.core.async import AsyncResult, AsyncResultTimeout
from rpyc.core.service import Service, VoidService, SlaveService
from rpyc.core.vinega... | Remove Code specific for IronPython - useless with 2.7 | Remove Code specific for IronPython - useless with 2.7
| Python | mit | glpatcern/rpyc,sponce/rpyc,pyq881120/rpyc,pombredanne/rpyc,geromueller/rpyc,kwlzn/rpyc,siemens/rpyc,eplaut/rpyc,gleon99/rpyc | from rpyc.core.stream import SocketStream, PipeStream
from rpyc.core.channel import Channel
from rpyc.core.protocol import Connection
from rpyc.core.netref import BaseNetref
from rpyc.core.async import AsyncResult, AsyncResultTimeout
from rpyc.core.service import Service, VoidService, SlaveService
from rpyc.core.vinega... | from rpyc.core.stream import SocketStream, PipeStream
from rpyc.core.channel import Channel
from rpyc.core.protocol import Connection
from rpyc.core.netref import BaseNetref
from rpyc.core.async import AsyncResult, AsyncResultTimeout
from rpyc.core.service import Service, VoidService, SlaveService
from rpyc.core.vinega... | <commit_before>from rpyc.core.stream import SocketStream, PipeStream
from rpyc.core.channel import Channel
from rpyc.core.protocol import Connection
from rpyc.core.netref import BaseNetref
from rpyc.core.async import AsyncResult, AsyncResultTimeout
from rpyc.core.service import Service, VoidService, SlaveService
from r... | from rpyc.core.stream import SocketStream, PipeStream
from rpyc.core.channel import Channel
from rpyc.core.protocol import Connection
from rpyc.core.netref import BaseNetref
from rpyc.core.async import AsyncResult, AsyncResultTimeout
from rpyc.core.service import Service, VoidService, SlaveService
from rpyc.core.vinega... | from rpyc.core.stream import SocketStream, PipeStream
from rpyc.core.channel import Channel
from rpyc.core.protocol import Connection
from rpyc.core.netref import BaseNetref
from rpyc.core.async import AsyncResult, AsyncResultTimeout
from rpyc.core.service import Service, VoidService, SlaveService
from rpyc.core.vinega... | <commit_before>from rpyc.core.stream import SocketStream, PipeStream
from rpyc.core.channel import Channel
from rpyc.core.protocol import Connection
from rpyc.core.netref import BaseNetref
from rpyc.core.async import AsyncResult, AsyncResultTimeout
from rpyc.core.service import Service, VoidService, SlaveService
from r... |
82cb6d190ce1e805914cc791518c97e063ecdc96 | tests/test_individual.py | tests/test_individual.py | import sys, os
myPath = os.path.dirname(os.path.abspath(__file__))
print(myPath)
sys.path.insert(0, myPath + '/../SATSolver')
from unittest import TestCase
from individual import Individual
from BitVector import BitVector
from bitarray import bitarray
class TestIndividual(TestCase):
"""
Testing class for Ind... | import sys, os
myPath = os.path.dirname(os.path.abspath(__file__))
print(myPath)
sys.path.insert(0, myPath + '/../SATSolver')
from unittest import TestCase
from individual import Individual
from bitarray import bitarray
class TestIndividual(TestCase):
"""
Testing class for Individual.
"""
def test_g... | Remove BitVector import - Build fails | Remove BitVector import - Build fails | Python | mit | Imperium-Software/resolver,Imperium-Software/resolver,Imperium-Software/resolver,Imperium-Software/resolver | import sys, os
myPath = os.path.dirname(os.path.abspath(__file__))
print(myPath)
sys.path.insert(0, myPath + '/../SATSolver')
from unittest import TestCase
from individual import Individual
from BitVector import BitVector
from bitarray import bitarray
class TestIndividual(TestCase):
"""
Testing class for Ind... | import sys, os
myPath = os.path.dirname(os.path.abspath(__file__))
print(myPath)
sys.path.insert(0, myPath + '/../SATSolver')
from unittest import TestCase
from individual import Individual
from bitarray import bitarray
class TestIndividual(TestCase):
"""
Testing class for Individual.
"""
def test_g... | <commit_before>import sys, os
myPath = os.path.dirname(os.path.abspath(__file__))
print(myPath)
sys.path.insert(0, myPath + '/../SATSolver')
from unittest import TestCase
from individual import Individual
from BitVector import BitVector
from bitarray import bitarray
class TestIndividual(TestCase):
"""
Testin... | import sys, os
myPath = os.path.dirname(os.path.abspath(__file__))
print(myPath)
sys.path.insert(0, myPath + '/../SATSolver')
from unittest import TestCase
from individual import Individual
from bitarray import bitarray
class TestIndividual(TestCase):
"""
Testing class for Individual.
"""
def test_g... | import sys, os
myPath = os.path.dirname(os.path.abspath(__file__))
print(myPath)
sys.path.insert(0, myPath + '/../SATSolver')
from unittest import TestCase
from individual import Individual
from BitVector import BitVector
from bitarray import bitarray
class TestIndividual(TestCase):
"""
Testing class for Ind... | <commit_before>import sys, os
myPath = os.path.dirname(os.path.abspath(__file__))
print(myPath)
sys.path.insert(0, myPath + '/../SATSolver')
from unittest import TestCase
from individual import Individual
from BitVector import BitVector
from bitarray import bitarray
class TestIndividual(TestCase):
"""
Testin... |
b2764b9ada2ca3bec548ceb82e71697f7515f14f | citrination_client/__init__.py | citrination_client/__init__.py | import os
import re
from citrination_client.base import *
from citrination_client.search import *
from citrination_client.data import *
from citrination_client.models import *
from citrination_client.views.descriptors import *
from .client import CitrinationClient
from pkg_resources import get_distribution, Distributi... | import os
import re
from citrination_client.base import *
from citrination_client.search import *
from citrination_client.data import *
from citrination_client.models import *
from citrination_client.views.descriptors import *
from .client import CitrinationClient
from pkg_resources import get_distribution, Distributi... | Remove debug print on getVersion | Remove debug print on getVersion
| Python | apache-2.0 | CitrineInformatics/python-citrination-client | import os
import re
from citrination_client.base import *
from citrination_client.search import *
from citrination_client.data import *
from citrination_client.models import *
from citrination_client.views.descriptors import *
from .client import CitrinationClient
from pkg_resources import get_distribution, Distributi... | import os
import re
from citrination_client.base import *
from citrination_client.search import *
from citrination_client.data import *
from citrination_client.models import *
from citrination_client.views.descriptors import *
from .client import CitrinationClient
from pkg_resources import get_distribution, Distributi... | <commit_before>import os
import re
from citrination_client.base import *
from citrination_client.search import *
from citrination_client.data import *
from citrination_client.models import *
from citrination_client.views.descriptors import *
from .client import CitrinationClient
from pkg_resources import get_distribut... | import os
import re
from citrination_client.base import *
from citrination_client.search import *
from citrination_client.data import *
from citrination_client.models import *
from citrination_client.views.descriptors import *
from .client import CitrinationClient
from pkg_resources import get_distribution, Distributi... | import os
import re
from citrination_client.base import *
from citrination_client.search import *
from citrination_client.data import *
from citrination_client.models import *
from citrination_client.views.descriptors import *
from .client import CitrinationClient
from pkg_resources import get_distribution, Distributi... | <commit_before>import os
import re
from citrination_client.base import *
from citrination_client.search import *
from citrination_client.data import *
from citrination_client.models import *
from citrination_client.views.descriptors import *
from .client import CitrinationClient
from pkg_resources import get_distribut... |
2f140327c24a8efab5482a975793dddedd0ebfc4 | nucleus/wsgi.py | nucleus/wsgi.py | # flake8: noqa
"""
WSGI config for nucleus project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
# newrelic.agent must be imported and initialized first
# https://docs.newrelic.com... | # flake8: noqa
# newrelic.agent must be imported and initialized first
# https://docs.newrelic.com/docs/agents/python-agent/installation/python-agent-advanced-integration#manual-integration
import newrelic.agent
newrelic.agent.initialize('newrelic.ini')
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nucleu... | Remove old docstring with link to old django docs | Remove old docstring with link to old django docs
| Python | mpl-2.0 | mozilla/nucleus,mozilla/nucleus,mozilla/nucleus,mozilla/nucleus | # flake8: noqa
"""
WSGI config for nucleus project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
# newrelic.agent must be imported and initialized first
# https://docs.newrelic.com... | # flake8: noqa
# newrelic.agent must be imported and initialized first
# https://docs.newrelic.com/docs/agents/python-agent/installation/python-agent-advanced-integration#manual-integration
import newrelic.agent
newrelic.agent.initialize('newrelic.ini')
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nucleu... | <commit_before># flake8: noqa
"""
WSGI config for nucleus project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
# newrelic.agent must be imported and initialized first
# https://do... | # flake8: noqa
# newrelic.agent must be imported and initialized first
# https://docs.newrelic.com/docs/agents/python-agent/installation/python-agent-advanced-integration#manual-integration
import newrelic.agent
newrelic.agent.initialize('newrelic.ini')
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nucleu... | # flake8: noqa
"""
WSGI config for nucleus project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
# newrelic.agent must be imported and initialized first
# https://docs.newrelic.com... | <commit_before># flake8: noqa
"""
WSGI config for nucleus project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
# newrelic.agent must be imported and initialized first
# https://do... |
18bf9dd5e1e054d0c260959a8379f331940e167f | online_status/__init__.py | online_status/__init__.py | VERSION = (0, 1, 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = "%s %s" % (versio... | VERSION = (0, 1, 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
return version
| Fix 'index out of bound' issue | Fix 'index out of bound' issue
| Python | unlicense | hovel/django-online-status,hovel/django-online-status | VERSION = (0, 1, 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = "%s %s" % (versio... | VERSION = (0, 1, 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
return version
| <commit_before>VERSION = (0, 1, 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = "%... | VERSION = (0, 1, 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
return version
| VERSION = (0, 1, 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = "%s %s" % (versio... | <commit_before>VERSION = (0, 1, 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = "%... |
4b0583f132bac50a0208452d38702f4f819f64c8 | hindkit/__init__.py | hindkit/__init__.py | from __future__ import division, print_function, unicode_literals
__version__ = '0.1.2'
from hindkit.constants import paths, linguistics, styles, templates
from hindkit.family import Family, Master, Style
from hindkit.builder import Builder
def confirm_version(required_version):
if __version__ != required_v... | from __future__ import division, print_function, unicode_literals
__version__ = '0.1.3'
from hindkit.constants import paths, linguistics, styles, templates
from hindkit.family import Family, Master, Style
from hindkit.builder import Builder
def confirm_version(required_version):
if __version__ != required_v... | Change the version number to 0.1.3 | Change the version number to 0.1.3
| Python | mit | mooniak/hindkit,itfoundry/hindkit,itfoundry/hindkit | from __future__ import division, print_function, unicode_literals
__version__ = '0.1.2'
from hindkit.constants import paths, linguistics, styles, templates
from hindkit.family import Family, Master, Style
from hindkit.builder import Builder
def confirm_version(required_version):
if __version__ != required_v... | from __future__ import division, print_function, unicode_literals
__version__ = '0.1.3'
from hindkit.constants import paths, linguistics, styles, templates
from hindkit.family import Family, Master, Style
from hindkit.builder import Builder
def confirm_version(required_version):
if __version__ != required_v... | <commit_before>from __future__ import division, print_function, unicode_literals
__version__ = '0.1.2'
from hindkit.constants import paths, linguistics, styles, templates
from hindkit.family import Family, Master, Style
from hindkit.builder import Builder
def confirm_version(required_version):
if __version_... | from __future__ import division, print_function, unicode_literals
__version__ = '0.1.3'
from hindkit.constants import paths, linguistics, styles, templates
from hindkit.family import Family, Master, Style
from hindkit.builder import Builder
def confirm_version(required_version):
if __version__ != required_v... | from __future__ import division, print_function, unicode_literals
__version__ = '0.1.2'
from hindkit.constants import paths, linguistics, styles, templates
from hindkit.family import Family, Master, Style
from hindkit.builder import Builder
def confirm_version(required_version):
if __version__ != required_v... | <commit_before>from __future__ import division, print_function, unicode_literals
__version__ = '0.1.2'
from hindkit.constants import paths, linguistics, styles, templates
from hindkit.family import Family, Master, Style
from hindkit.builder import Builder
def confirm_version(required_version):
if __version_... |
6d8f79d32194f5b956785a021ee6fad6093a03f1 | insanity/layers.py | insanity/layers.py | import numpy as np
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
from theano.tensor.nnet import softmax
from theano.tensor import shared_randomstreams
from theano.tensor.signal import downsample
class Layer(object):
def __init__(self, numInputs, numNeurons, activation):
self.numInpu... | import numpy as np
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
from theano.tensor.nnet import softmax
from theano.tensor import shared_randomstreams
from theano.tensor.signal import downsample
class Layer(object):
def __init__(self, numInputs, numNeurons, activation, miniBatchSize):... | Add proper use of property setter. | Add proper use of property setter.
| Python | cc0-1.0 | cn04/insanity | import numpy as np
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
from theano.tensor.nnet import softmax
from theano.tensor import shared_randomstreams
from theano.tensor.signal import downsample
class Layer(object):
def __init__(self, numInputs, numNeurons, activation):
self.numInpu... | import numpy as np
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
from theano.tensor.nnet import softmax
from theano.tensor import shared_randomstreams
from theano.tensor.signal import downsample
class Layer(object):
def __init__(self, numInputs, numNeurons, activation, miniBatchSize):... | <commit_before>import numpy as np
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
from theano.tensor.nnet import softmax
from theano.tensor import shared_randomstreams
from theano.tensor.signal import downsample
class Layer(object):
def __init__(self, numInputs, numNeurons, activation):... | import numpy as np
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
from theano.tensor.nnet import softmax
from theano.tensor import shared_randomstreams
from theano.tensor.signal import downsample
class Layer(object):
def __init__(self, numInputs, numNeurons, activation, miniBatchSize):... | import numpy as np
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
from theano.tensor.nnet import softmax
from theano.tensor import shared_randomstreams
from theano.tensor.signal import downsample
class Layer(object):
def __init__(self, numInputs, numNeurons, activation):
self.numInpu... | <commit_before>import numpy as np
import theano
import theano.tensor as T
from theano.tensor.nnet import conv
from theano.tensor.nnet import softmax
from theano.tensor import shared_randomstreams
from theano.tensor.signal import downsample
class Layer(object):
def __init__(self, numInputs, numNeurons, activation):... |
b064d8dbc4be13c12c1c87491ebcb484ab71ac52 | geopy/__init__.py | geopy/__init__.py | """
geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy makes it easy for Python developers to locate the coordinates of
addresses, cities, countries, and landmarks across the globe using third-party
geocoders and other data sources.
geopy is tested against CPython (versions 2.7, 3.4, 3... | """
geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy makes it easy for Python developers to locate the coordinates of
addresses, cities, countries, and landmarks across the globe using third-party
geocoders and other data sources.
geopy is tested against CPython (versions 2.7, 3.4, 3... | Fix geocoder.options being also exported as `geopy.options` | Fix geocoder.options being also exported as `geopy.options`
| Python | mit | geopy/geopy,jmb/geopy | """
geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy makes it easy for Python developers to locate the coordinates of
addresses, cities, countries, and landmarks across the globe using third-party
geocoders and other data sources.
geopy is tested against CPython (versions 2.7, 3.4, 3... | """
geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy makes it easy for Python developers to locate the coordinates of
addresses, cities, countries, and landmarks across the globe using third-party
geocoders and other data sources.
geopy is tested against CPython (versions 2.7, 3.4, 3... | <commit_before>"""
geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy makes it easy for Python developers to locate the coordinates of
addresses, cities, countries, and landmarks across the globe using third-party
geocoders and other data sources.
geopy is tested against CPython (versi... | """
geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy makes it easy for Python developers to locate the coordinates of
addresses, cities, countries, and landmarks across the globe using third-party
geocoders and other data sources.
geopy is tested against CPython (versions 2.7, 3.4, 3... | """
geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy makes it easy for Python developers to locate the coordinates of
addresses, cities, countries, and landmarks across the globe using third-party
geocoders and other data sources.
geopy is tested against CPython (versions 2.7, 3.4, 3... | <commit_before>"""
geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy makes it easy for Python developers to locate the coordinates of
addresses, cities, countries, and landmarks across the globe using third-party
geocoders and other data sources.
geopy is tested against CPython (versi... |
1a3fb78b32fbb95e3efc0f06ef62690834e820e3 | libraries/vytree/__init__.py | libraries/vytree/__init__.py | # vytree.__init__: package init file.
#
# Copyright (C) 2014 VyOS Development Group <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# ver... | # vytree.__init__: package init file.
#
# Copyright (C) 2014 VyOS Development Group <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# ver... | Remove referencetree-related imports from the top level vytree package. | Remove referencetree-related imports from the top level vytree package.
| Python | lgpl-2.1 | vyos-legacy/vyconfd,vyos-legacy/vyconfd | # vytree.__init__: package init file.
#
# Copyright (C) 2014 VyOS Development Group <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# ver... | # vytree.__init__: package init file.
#
# Copyright (C) 2014 VyOS Development Group <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# ver... | <commit_before># vytree.__init__: package init file.
#
# Copyright (C) 2014 VyOS Development Group <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; ... | # vytree.__init__: package init file.
#
# Copyright (C) 2014 VyOS Development Group <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# ver... | # vytree.__init__: package init file.
#
# Copyright (C) 2014 VyOS Development Group <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# ver... | <commit_before># vytree.__init__: package init file.
#
# Copyright (C) 2014 VyOS Development Group <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; ... |
75fd4aadedb4bcdcfe41f9ae61bf62282ffdadea | test/__init__.py | test/__init__.py | import glob, os.path, sys
version = sys.version.split(" ")[0]
majorminor = version[0:3]
# Add path to hiredis.so load path
path = glob.glob("build/lib*-%s/hiredis/*.so" % majorminor)[0]
sys.path.insert(0, os.path.dirname(path))
from unittest import *
from . import reader
def tests():
suite = TestSuite()
suite.a... | import glob, os.path, sys
version = sys.version.split(" ")[0]
majorminor = version[0:3]
# Add path to hiredis.so load path
path = glob.glob("build/lib*-%s/hiredis" % majorminor)[0]
sys.path.insert(0, path)
from unittest import *
from . import reader
def tests():
suite = TestSuite()
suite.addTest(makeSuite(reade... | Fix build path detection on SunOS | Fix build path detection on SunOS
Inside the hiredis directory there is another directory that contains the
shared object. This is specific to the platform so we shouldn't care where the
shared object itself is placed.
| Python | bsd-3-clause | redis/hiredis-py,charsyam/hiredis-py,badboy/hiredis-py-win,badboy/hiredis-py-win,badboy/hiredis-py-win,redis/hiredis-py,charsyam/hiredis-py | import glob, os.path, sys
version = sys.version.split(" ")[0]
majorminor = version[0:3]
# Add path to hiredis.so load path
path = glob.glob("build/lib*-%s/hiredis/*.so" % majorminor)[0]
sys.path.insert(0, os.path.dirname(path))
from unittest import *
from . import reader
def tests():
suite = TestSuite()
suite.a... | import glob, os.path, sys
version = sys.version.split(" ")[0]
majorminor = version[0:3]
# Add path to hiredis.so load path
path = glob.glob("build/lib*-%s/hiredis" % majorminor)[0]
sys.path.insert(0, path)
from unittest import *
from . import reader
def tests():
suite = TestSuite()
suite.addTest(makeSuite(reade... | <commit_before>import glob, os.path, sys
version = sys.version.split(" ")[0]
majorminor = version[0:3]
# Add path to hiredis.so load path
path = glob.glob("build/lib*-%s/hiredis/*.so" % majorminor)[0]
sys.path.insert(0, os.path.dirname(path))
from unittest import *
from . import reader
def tests():
suite = TestSu... | import glob, os.path, sys
version = sys.version.split(" ")[0]
majorminor = version[0:3]
# Add path to hiredis.so load path
path = glob.glob("build/lib*-%s/hiredis" % majorminor)[0]
sys.path.insert(0, path)
from unittest import *
from . import reader
def tests():
suite = TestSuite()
suite.addTest(makeSuite(reade... | import glob, os.path, sys
version = sys.version.split(" ")[0]
majorminor = version[0:3]
# Add path to hiredis.so load path
path = glob.glob("build/lib*-%s/hiredis/*.so" % majorminor)[0]
sys.path.insert(0, os.path.dirname(path))
from unittest import *
from . import reader
def tests():
suite = TestSuite()
suite.a... | <commit_before>import glob, os.path, sys
version = sys.version.split(" ")[0]
majorminor = version[0:3]
# Add path to hiredis.so load path
path = glob.glob("build/lib*-%s/hiredis/*.so" % majorminor)[0]
sys.path.insert(0, os.path.dirname(path))
from unittest import *
from . import reader
def tests():
suite = TestSu... |
a6e6e6bf18c48638d4c6c7d97f894edd3fc3c1ad | ipython_config.py | ipython_config.py | c.InteractiveShellApp.exec_lines = []
# ipython-autoimport - Automatically import modules
c.InteractiveShellApp.exec_lines.append(
"try:\n %load_ext ipython_autoimport\nexcept ImportError: pass")
# Automatically reload modules
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.... | c.InteractiveShellApp.exec_lines = []
# ipython-autoimport - Automatically import modules
c.InteractiveShellApp.exec_lines.append(
"try:\n %load_ext ipython_autoimport\nexcept ImportError: pass")
# Automatically reload modules
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.... | Set default shell editor for ipython to gvim | Set default shell editor for ipython to gvim
| Python | mit | brycepg/dotfiles,brycepg/dotfiles | c.InteractiveShellApp.exec_lines = []
# ipython-autoimport - Automatically import modules
c.InteractiveShellApp.exec_lines.append(
"try:\n %load_ext ipython_autoimport\nexcept ImportError: pass")
# Automatically reload modules
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.... | c.InteractiveShellApp.exec_lines = []
# ipython-autoimport - Automatically import modules
c.InteractiveShellApp.exec_lines.append(
"try:\n %load_ext ipython_autoimport\nexcept ImportError: pass")
# Automatically reload modules
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.... | <commit_before>c.InteractiveShellApp.exec_lines = []
# ipython-autoimport - Automatically import modules
c.InteractiveShellApp.exec_lines.append(
"try:\n %load_ext ipython_autoimport\nexcept ImportError: pass")
# Automatically reload modules
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.Inter... | c.InteractiveShellApp.exec_lines = []
# ipython-autoimport - Automatically import modules
c.InteractiveShellApp.exec_lines.append(
"try:\n %load_ext ipython_autoimport\nexcept ImportError: pass")
# Automatically reload modules
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.... | c.InteractiveShellApp.exec_lines = []
# ipython-autoimport - Automatically import modules
c.InteractiveShellApp.exec_lines.append(
"try:\n %load_ext ipython_autoimport\nexcept ImportError: pass")
# Automatically reload modules
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.... | <commit_before>c.InteractiveShellApp.exec_lines = []
# ipython-autoimport - Automatically import modules
c.InteractiveShellApp.exec_lines.append(
"try:\n %load_ext ipython_autoimport\nexcept ImportError: pass")
# Automatically reload modules
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.Inter... |
bf694ffdf1fd61f6e108f3076ed975d538af5224 | wlauto/common/android/resources.py | wlauto/common/android/resources.py | # Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | # Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | Revert "AndroidResource: Add a UiautoApk resource type." | Revert "AndroidResource: Add a UiautoApk resource type."
This reverts commit bc6af25366aacf394f96b5a93008109904a89e93.
| Python | apache-2.0 | bjackman/workload-automation,bjackman/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-automation,jimboatarm/workload-automation,bjackman/workload-automation,bjackman/workload-automation,jimboatarm/workload-automation,bjackman/workload-automation,jimboatarm/workload-... | # Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | # Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | <commit_before># Copyright 2014-2015 ARM Limited
#
# 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... | # Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | # Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | <commit_before># Copyright 2014-2015 ARM Limited
#
# 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... |
78ca9c6b8393b1b4f4bddf41febc87696796d28a | openpassword/openssl_utils.py | openpassword/openssl_utils.py | from Crypto.Hash import MD5
def derive_openssl_key(key, salt, hash=MD5):
key = key[0:-16]
openssl_key = bytes()
prev = bytes()
while len(openssl_key) < 32:
prev = hash.new(prev + key + salt).digest()
openssl_key += prev
return openssl_key
| from Crypto.Hash import MD5
def derive_openssl_key(key, salt, hashing_function=MD5):
key = key[0:-16]
openssl_key = bytes()
prev = bytes()
while len(openssl_key) < 32:
prev = hashing_function.new(prev + key + salt).digest()
openssl_key += prev
return openssl_key
| Rename hash variable to prevent colision with native method | Rename hash variable to prevent colision with native method
| Python | mit | openpassword/blimey,openpassword/blimey | from Crypto.Hash import MD5
def derive_openssl_key(key, salt, hash=MD5):
key = key[0:-16]
openssl_key = bytes()
prev = bytes()
while len(openssl_key) < 32:
prev = hash.new(prev + key + salt).digest()
openssl_key += prev
return openssl_key
Rename hash variable to prevent colision w... | from Crypto.Hash import MD5
def derive_openssl_key(key, salt, hashing_function=MD5):
key = key[0:-16]
openssl_key = bytes()
prev = bytes()
while len(openssl_key) < 32:
prev = hashing_function.new(prev + key + salt).digest()
openssl_key += prev
return openssl_key
| <commit_before>from Crypto.Hash import MD5
def derive_openssl_key(key, salt, hash=MD5):
key = key[0:-16]
openssl_key = bytes()
prev = bytes()
while len(openssl_key) < 32:
prev = hash.new(prev + key + salt).digest()
openssl_key += prev
return openssl_key
<commit_msg>Rename hash var... | from Crypto.Hash import MD5
def derive_openssl_key(key, salt, hashing_function=MD5):
key = key[0:-16]
openssl_key = bytes()
prev = bytes()
while len(openssl_key) < 32:
prev = hashing_function.new(prev + key + salt).digest()
openssl_key += prev
return openssl_key
| from Crypto.Hash import MD5
def derive_openssl_key(key, salt, hash=MD5):
key = key[0:-16]
openssl_key = bytes()
prev = bytes()
while len(openssl_key) < 32:
prev = hash.new(prev + key + salt).digest()
openssl_key += prev
return openssl_key
Rename hash variable to prevent colision w... | <commit_before>from Crypto.Hash import MD5
def derive_openssl_key(key, salt, hash=MD5):
key = key[0:-16]
openssl_key = bytes()
prev = bytes()
while len(openssl_key) < 32:
prev = hash.new(prev + key + salt).digest()
openssl_key += prev
return openssl_key
<commit_msg>Rename hash var... |
2c6dd79d419699e61970719dbb369aefe359ea6e | tests/test_db.py | tests/test_db.py | from pypinfo import db
CREDS_FILE = '/path/to/creds_file.json'
def test_get_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # Mock
# Assert
assert db.get_credentials() is None
def test_set_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # M... | from pypinfo import db
CREDS_FILE = '/path/to/creds_file.json'
def test_get_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # Mock
# Assert
assert db.get_credentials() is None
def test_set_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # M... | Fix tests for updated TinyDB/Tinyrecord | Fix tests for updated TinyDB/Tinyrecord
| Python | mit | ofek/pypinfo | from pypinfo import db
CREDS_FILE = '/path/to/creds_file.json'
def test_get_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # Mock
# Assert
assert db.get_credentials() is None
def test_set_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # M... | from pypinfo import db
CREDS_FILE = '/path/to/creds_file.json'
def test_get_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # Mock
# Assert
assert db.get_credentials() is None
def test_set_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # M... | <commit_before>from pypinfo import db
CREDS_FILE = '/path/to/creds_file.json'
def test_get_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # Mock
# Assert
assert db.get_credentials() is None
def test_set_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / ... | from pypinfo import db
CREDS_FILE = '/path/to/creds_file.json'
def test_get_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # Mock
# Assert
assert db.get_credentials() is None
def test_set_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # M... | from pypinfo import db
CREDS_FILE = '/path/to/creds_file.json'
def test_get_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # Mock
# Assert
assert db.get_credentials() is None
def test_set_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # M... | <commit_before>from pypinfo import db
CREDS_FILE = '/path/to/creds_file.json'
def test_get_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / 'db.json') # Mock
# Assert
assert db.get_credentials() is None
def test_set_credentials(tmp_path):
# Arrange
db.DB_FILE = str(tmp_path / ... |
3f909cdfba61719dfa0a860aeba1e418fe740f33 | indra/__init__.py | indra/__init__.py | from __future__ import print_function, unicode_literals
import logging
import os
import sys
__version__ = '1.10.0'
__all__ = ['assemblers', 'belief', 'databases', 'explanation', 'literature',
'mechlinker', 'preassembler', 'sources', 'tools', 'util']
logging.basicConfig(format='%(levelname)s: [%(asctime)s] ... | from __future__ import print_function, unicode_literals
import logging
import os
import sys
__version__ = '1.10.0'
__all__ = ['assemblers', 'belief', 'databases', 'explanation', 'literature',
'mechlinker', 'preassembler', 'sources', 'tools', 'util']
logging.basicConfig(format=('%(levelname)s: [%(asctime)s]... | Remove indra prefix from logger | Remove indra prefix from logger
| Python | bsd-2-clause | bgyori/indra,bgyori/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/indra,bgyori/indra,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/belpy,johnbachman/belpy,pvtodorov/indra | from __future__ import print_function, unicode_literals
import logging
import os
import sys
__version__ = '1.10.0'
__all__ = ['assemblers', 'belief', 'databases', 'explanation', 'literature',
'mechlinker', 'preassembler', 'sources', 'tools', 'util']
logging.basicConfig(format='%(levelname)s: [%(asctime)s] ... | from __future__ import print_function, unicode_literals
import logging
import os
import sys
__version__ = '1.10.0'
__all__ = ['assemblers', 'belief', 'databases', 'explanation', 'literature',
'mechlinker', 'preassembler', 'sources', 'tools', 'util']
logging.basicConfig(format=('%(levelname)s: [%(asctime)s]... | <commit_before>from __future__ import print_function, unicode_literals
import logging
import os
import sys
__version__ = '1.10.0'
__all__ = ['assemblers', 'belief', 'databases', 'explanation', 'literature',
'mechlinker', 'preassembler', 'sources', 'tools', 'util']
logging.basicConfig(format='%(levelname)s:... | from __future__ import print_function, unicode_literals
import logging
import os
import sys
__version__ = '1.10.0'
__all__ = ['assemblers', 'belief', 'databases', 'explanation', 'literature',
'mechlinker', 'preassembler', 'sources', 'tools', 'util']
logging.basicConfig(format=('%(levelname)s: [%(asctime)s]... | from __future__ import print_function, unicode_literals
import logging
import os
import sys
__version__ = '1.10.0'
__all__ = ['assemblers', 'belief', 'databases', 'explanation', 'literature',
'mechlinker', 'preassembler', 'sources', 'tools', 'util']
logging.basicConfig(format='%(levelname)s: [%(asctime)s] ... | <commit_before>from __future__ import print_function, unicode_literals
import logging
import os
import sys
__version__ = '1.10.0'
__all__ = ['assemblers', 'belief', 'databases', 'explanation', 'literature',
'mechlinker', 'preassembler', 'sources', 'tools', 'util']
logging.basicConfig(format='%(levelname)s:... |
a4dc298a487fcf6f1975346ab421cca705c025dc | storage/test_driver.py | storage/test_driver.py | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
report_id = 'AVM0dGO... | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
REPORTS = [
{'report_id': 1, 'report': {"/tmp/example": {"MD5": "53f43f9591749b8cae536ff13e48d6de", "SHA256": "815d310bdbc8684c1163b62f583dbaffb2df74b9104e2aadabf8f8491bafab66", "libmagic": "ASCII text"}}},
{'report_id... | Add populate es function to test driver | Add populate es function to test driver
| Python | mpl-2.0 | awest1339/multiscanner,mitre/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,MITRECND/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,mitre/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,MITRECND/multiscanner,jmlong1027/multiscanner | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
report_id = 'AVM0dGO... | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
REPORTS = [
{'report_id': 1, 'report': {"/tmp/example": {"MD5": "53f43f9591749b8cae536ff13e48d6de", "SHA256": "815d310bdbc8684c1163b62f583dbaffb2df74b9104e2aadabf8f8491bafab66", "libmagic": "ASCII text"}}},
{'report_id... | <commit_before>#!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
repor... | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
REPORTS = [
{'report_id': 1, 'report': {"/tmp/example": {"MD5": "53f43f9591749b8cae536ff13e48d6de", "SHA256": "815d310bdbc8684c1163b62f583dbaffb2df74b9104e2aadabf8f8491bafab66", "libmagic": "ASCII text"}}},
{'report_id... | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
report_id = 'AVM0dGO... | <commit_before>#!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
repor... |
e4f28d43eb62791b9679bc775c7bbbeb5944a1d1 | Lib/py_compile.py | Lib/py_compile.py | # Routine to "compile" a .py file to a .pyc file.
# This has intimate knowledge of how Python/import.c does it.
# By Sjoerd Mullender (I forced him to write it :-).
import imp
MAGIC = imp.get_magic()
def wr_long(f, x):
f.write(chr( x & 0xff))
f.write(chr((x >> 8) & 0xff))
f.write(chr((x >> 16) & 0xff))
f.... | # Routine to "compile" a .py file to a .pyc file.
# This has intimate knowledge of how Python/import.c does it.
# By Sjoerd Mullender (I forced him to write it :-).
import imp
MAGIC = imp.get_magic()
def wr_long(f, x):
f.write(chr( x & 0xff))
f.write(chr((x >> 8) & 0xff))
f.write(chr((x >> 16) & 0xff))
f.... | Use the __debug__ flag to determine the proper filename extension to use for the cached module code object. | compile(): Use the __debug__ flag to determine the proper filename extension
to use for the cached module code object.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | # Routine to "compile" a .py file to a .pyc file.
# This has intimate knowledge of how Python/import.c does it.
# By Sjoerd Mullender (I forced him to write it :-).
import imp
MAGIC = imp.get_magic()
def wr_long(f, x):
f.write(chr( x & 0xff))
f.write(chr((x >> 8) & 0xff))
f.write(chr((x >> 16) & 0xff))
f.... | # Routine to "compile" a .py file to a .pyc file.
# This has intimate knowledge of how Python/import.c does it.
# By Sjoerd Mullender (I forced him to write it :-).
import imp
MAGIC = imp.get_magic()
def wr_long(f, x):
f.write(chr( x & 0xff))
f.write(chr((x >> 8) & 0xff))
f.write(chr((x >> 16) & 0xff))
f.... | <commit_before># Routine to "compile" a .py file to a .pyc file.
# This has intimate knowledge of how Python/import.c does it.
# By Sjoerd Mullender (I forced him to write it :-).
import imp
MAGIC = imp.get_magic()
def wr_long(f, x):
f.write(chr( x & 0xff))
f.write(chr((x >> 8) & 0xff))
f.write(chr((x >> 1... | # Routine to "compile" a .py file to a .pyc file.
# This has intimate knowledge of how Python/import.c does it.
# By Sjoerd Mullender (I forced him to write it :-).
import imp
MAGIC = imp.get_magic()
def wr_long(f, x):
f.write(chr( x & 0xff))
f.write(chr((x >> 8) & 0xff))
f.write(chr((x >> 16) & 0xff))
f.... | # Routine to "compile" a .py file to a .pyc file.
# This has intimate knowledge of how Python/import.c does it.
# By Sjoerd Mullender (I forced him to write it :-).
import imp
MAGIC = imp.get_magic()
def wr_long(f, x):
f.write(chr( x & 0xff))
f.write(chr((x >> 8) & 0xff))
f.write(chr((x >> 16) & 0xff))
f.... | <commit_before># Routine to "compile" a .py file to a .pyc file.
# This has intimate knowledge of how Python/import.c does it.
# By Sjoerd Mullender (I forced him to write it :-).
import imp
MAGIC = imp.get_magic()
def wr_long(f, x):
f.write(chr( x & 0xff))
f.write(chr((x >> 8) & 0xff))
f.write(chr((x >> 1... |
4ed027756885c060d0e8b14c2b0c17b2b85dcb59 | demonstrare/mailer/__init__.py | demonstrare/mailer/__init__.py | import logging
import requests
from requests.exceptions import ConnectionError, Timeout
log = logging.getLogger(__name__)
class MailNotifier(object):
url = None
api_key = None
sender = None
@classmethod
def send_message(cls, subject, to, message):
data = {'from': cls.sender, 'to': to, '... | import logging
import requests
from requests.exceptions import ConnectionError, Timeout
log = logging.getLogger(__name__)
class MailNotifier(object):
url = None
api_key = None
sender = None
@classmethod
def send_message(cls, subject, to, message):
data = {'from': cls.sender, 'to': to, '... | Update mailer timeout to 5 seconds | Update mailer timeout to 5 seconds
| Python | mit | josuemontano/api-starter,josuemontano/API-platform,josuemontano/pyramid-angularjs-starter,josuemontano/api-starter,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform,josuemontano/API-platform,josuemontano/API-platform,josuemontano/api-starter,josuemontano/pyramid-angularjs-starter | import logging
import requests
from requests.exceptions import ConnectionError, Timeout
log = logging.getLogger(__name__)
class MailNotifier(object):
url = None
api_key = None
sender = None
@classmethod
def send_message(cls, subject, to, message):
data = {'from': cls.sender, 'to': to, '... | import logging
import requests
from requests.exceptions import ConnectionError, Timeout
log = logging.getLogger(__name__)
class MailNotifier(object):
url = None
api_key = None
sender = None
@classmethod
def send_message(cls, subject, to, message):
data = {'from': cls.sender, 'to': to, '... | <commit_before>import logging
import requests
from requests.exceptions import ConnectionError, Timeout
log = logging.getLogger(__name__)
class MailNotifier(object):
url = None
api_key = None
sender = None
@classmethod
def send_message(cls, subject, to, message):
data = {'from': cls.send... | import logging
import requests
from requests.exceptions import ConnectionError, Timeout
log = logging.getLogger(__name__)
class MailNotifier(object):
url = None
api_key = None
sender = None
@classmethod
def send_message(cls, subject, to, message):
data = {'from': cls.sender, 'to': to, '... | import logging
import requests
from requests.exceptions import ConnectionError, Timeout
log = logging.getLogger(__name__)
class MailNotifier(object):
url = None
api_key = None
sender = None
@classmethod
def send_message(cls, subject, to, message):
data = {'from': cls.sender, 'to': to, '... | <commit_before>import logging
import requests
from requests.exceptions import ConnectionError, Timeout
log = logging.getLogger(__name__)
class MailNotifier(object):
url = None
api_key = None
sender = None
@classmethod
def send_message(cls, subject, to, message):
data = {'from': cls.send... |
4aaab8edebfe416ab814a1f9803b699616bd57da | config-example.py | config-example.py | # Your bucket to delete things from.
BUCKET = 'ADDME'
# How many processes to fork.
PROCESS_COUNT = 10
# Maximum number of objects per bulk request.
MAX_JOB_SIZE = 10000
# Your simple API access key from the APIs tab of
# <https://code.google.com/apis/console>.
DEVKEY = 'ADDME'
# On that same page, create a Client ... | # Your bucket to delete things from.
BUCKET = 'ADDME'
# How many processes to fork.
PROCESS_COUNT = 4
# Maximum number of objects per bulk request.
MAX_JOB_SIZE = 100
# Your simple API access key from the APIs tab of
# <https://code.google.com/apis/console>.
DEVKEY = 'ADDME'
# On that same page, create a Client ID ... | Set more reasonable job sizes | Set more reasonable job sizes
I'll follow this up by adding exponential backoff and then increasing the defaults to something reasonable. | Python | apache-2.0 | googlearchive/storage-bulk-delete-python,jonparrott/storage-bulk-delete-python | # Your bucket to delete things from.
BUCKET = 'ADDME'
# How many processes to fork.
PROCESS_COUNT = 10
# Maximum number of objects per bulk request.
MAX_JOB_SIZE = 10000
# Your simple API access key from the APIs tab of
# <https://code.google.com/apis/console>.
DEVKEY = 'ADDME'
# On that same page, create a Client ... | # Your bucket to delete things from.
BUCKET = 'ADDME'
# How many processes to fork.
PROCESS_COUNT = 4
# Maximum number of objects per bulk request.
MAX_JOB_SIZE = 100
# Your simple API access key from the APIs tab of
# <https://code.google.com/apis/console>.
DEVKEY = 'ADDME'
# On that same page, create a Client ID ... | <commit_before># Your bucket to delete things from.
BUCKET = 'ADDME'
# How many processes to fork.
PROCESS_COUNT = 10
# Maximum number of objects per bulk request.
MAX_JOB_SIZE = 10000
# Your simple API access key from the APIs tab of
# <https://code.google.com/apis/console>.
DEVKEY = 'ADDME'
# On that same page, c... | # Your bucket to delete things from.
BUCKET = 'ADDME'
# How many processes to fork.
PROCESS_COUNT = 4
# Maximum number of objects per bulk request.
MAX_JOB_SIZE = 100
# Your simple API access key from the APIs tab of
# <https://code.google.com/apis/console>.
DEVKEY = 'ADDME'
# On that same page, create a Client ID ... | # Your bucket to delete things from.
BUCKET = 'ADDME'
# How many processes to fork.
PROCESS_COUNT = 10
# Maximum number of objects per bulk request.
MAX_JOB_SIZE = 10000
# Your simple API access key from the APIs tab of
# <https://code.google.com/apis/console>.
DEVKEY = 'ADDME'
# On that same page, create a Client ... | <commit_before># Your bucket to delete things from.
BUCKET = 'ADDME'
# How many processes to fork.
PROCESS_COUNT = 10
# Maximum number of objects per bulk request.
MAX_JOB_SIZE = 10000
# Your simple API access key from the APIs tab of
# <https://code.google.com/apis/console>.
DEVKEY = 'ADDME'
# On that same page, c... |
262cee3ac7da741387ee66e78e6a9fbb9ffc7f31 | chainer/backends/__init__.py | chainer/backends/__init__.py | from chainer.backends import chainerx # NOQA
from chainer.backends import cpu # NOQA
from chainer.backends import cuda # NOQA
from chainer.backends import intel64 # NOQA
| from chainer.backends import chainerx # NOQA
from chainer.backends import cpu # NOQA
from chainer.backends import cuda # NOQA
from chainer.backends import intel64 # NOQA
# TODO(niboshi): Refactor registration of backend modules for functions like
# chainer.get_device().
| Add TODO to refactor backend registration | Add TODO to refactor backend registration
| Python | mit | keisuke-umezawa/chainer,ktnyt/chainer,okuta/chainer,okuta/chainer,okuta/chainer,chainer/chainer,hvy/chainer,keisuke-umezawa/chainer,chainer/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,wkentaro/chainer,pfnet/chainer,chainer/chainer,jnishi/chainer,tkerola/chainer,ktnyt/chainer,jnishi/chainer,niboshi/chainer,w... | from chainer.backends import chainerx # NOQA
from chainer.backends import cpu # NOQA
from chainer.backends import cuda # NOQA
from chainer.backends import intel64 # NOQA
Add TODO to refactor backend registration | from chainer.backends import chainerx # NOQA
from chainer.backends import cpu # NOQA
from chainer.backends import cuda # NOQA
from chainer.backends import intel64 # NOQA
# TODO(niboshi): Refactor registration of backend modules for functions like
# chainer.get_device().
| <commit_before>from chainer.backends import chainerx # NOQA
from chainer.backends import cpu # NOQA
from chainer.backends import cuda # NOQA
from chainer.backends import intel64 # NOQA
<commit_msg>Add TODO to refactor backend registration<commit_after> | from chainer.backends import chainerx # NOQA
from chainer.backends import cpu # NOQA
from chainer.backends import cuda # NOQA
from chainer.backends import intel64 # NOQA
# TODO(niboshi): Refactor registration of backend modules for functions like
# chainer.get_device().
| from chainer.backends import chainerx # NOQA
from chainer.backends import cpu # NOQA
from chainer.backends import cuda # NOQA
from chainer.backends import intel64 # NOQA
Add TODO to refactor backend registrationfrom chainer.backends import chainerx # NOQA
from chainer.backends import cpu # NOQA
from chainer.backe... | <commit_before>from chainer.backends import chainerx # NOQA
from chainer.backends import cpu # NOQA
from chainer.backends import cuda # NOQA
from chainer.backends import intel64 # NOQA
<commit_msg>Add TODO to refactor backend registration<commit_after>from chainer.backends import chainerx # NOQA
from chainer.backe... |
64c2a9ec42fba89225af07a3d0cf84dd9de98e4b | legislators/urls.py | legislators/urls.py | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^find_legislator/', views.find_legislator),
url(r'^get_latlon/', views.get_latlon)
]
| from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^find_legislator/', views.find_legislator),
url(r'^get_latlon/', views.get_latlon, name="get_latlon"),
url(r'^latest_latlon/', views.latest_latlon, name="latest_latlon")
]
| Add url for latest latlon url | Add url for latest latlon url
| Python | mit | jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^find_legislator/', views.find_legislator),
url(r'^get_latlon/', views.get_latlon)
]
Add url for latest latlon url | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^find_legislator/', views.find_legislator),
url(r'^get_latlon/', views.get_latlon, name="get_latlon"),
url(r'^latest_latlon/', views.latest_latlon, name="latest_latlon")
]
| <commit_before>from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^find_legislator/', views.find_legislator),
url(r'^get_latlon/', views.get_latlon)
]
<commit_msg>Add url for latest latlon url<commit_after> | from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^find_legislator/', views.find_legislator),
url(r'^get_latlon/', views.get_latlon, name="get_latlon"),
url(r'^latest_latlon/', views.latest_latlon, name="latest_latlon")
]
| from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^find_legislator/', views.find_legislator),
url(r'^get_latlon/', views.get_latlon)
]
Add url for latest latlon urlfrom . import views
from django.conf.urls import url
urlpatterns = [
url(r'^find_legislator/', views.find_legislato... | <commit_before>from . import views
from django.conf.urls import url
urlpatterns = [
url(r'^find_legislator/', views.find_legislator),
url(r'^get_latlon/', views.get_latlon)
]
<commit_msg>Add url for latest latlon url<commit_after>from . import views
from django.conf.urls import url
urlpatterns = [
url(r... |
26b18cac1164d9e543f02f54fc396b25eb40b5cf | vmware_dvs/agent/__init__.py | vmware_dvs/agent/__init__.py | # Copyright 2016 Mirantis, 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 a... | Apply monkey patch in agent package for direct import main() from dvs_neutron_agent module | Apply monkey patch in agent package for direct import main() from dvs_neutron_agent module
| Python | apache-2.0 | ekosareva/vmware-dvs,ekosareva/vmware-dvs,Mirantis/vmware-dvs,VTabolin/vmware-dvs,Mirantis/vmware-dvs | Apply monkey patch in agent package for direct import main() from dvs_neutron_agent module | # Copyright 2016 Mirantis, 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 a... | <commit_before><commit_msg>Apply monkey patch in agent package for direct import main() from dvs_neutron_agent module<commit_after> | # Copyright 2016 Mirantis, 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 a... | Apply monkey patch in agent package for direct import main() from dvs_neutron_agent module# Copyright 2016 Mirantis, 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 Lic... | <commit_before><commit_msg>Apply monkey patch in agent package for direct import main() from dvs_neutron_agent module<commit_after># Copyright 2016 Mirantis, 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 Licen... | |
2793f9a4e245c79ece58990622ae059a70514592 | actions/aws_decrypt_password_data.py | actions/aws_decrypt_password_data.py | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | Add a workaround since somewhere in the Mistral "publish variable" pipeline, trealing and leading whitespace is removed. | Add a workaround since somewhere in the Mistral "publish variable"
pipeline, trealing and leading whitespace is removed.
| Python | apache-2.0 | StackStorm/st2cd,StackStorm/st2cd | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | <commit_before>#!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpass... | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | #!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpassword.py#L96-L12... | <commit_before>#!/usr/bin/env python
import base64
import rsa
import six
from st2common.runners.base_action import Action
class AwsDecryptPassworData(Action):
def run(self, keyfile, password_data):
# copied from:
# https://github.com/aws/aws-cli/blob/master/awscli/customizations/ec2/decryptpass... |
70b7090a438f7962f28acc23fa78cdb6f5d084a0 | docs/sphinxext/configtraits.py | docs/sphinxext/configtraits.py | """Directives and roles for documenting traitlets config options.
::
.. configtrait:: Application.log_datefmt
Description goes here.
Cross reference like this: :configtrait:`Application.log_datefmt`.
"""
from sphinx.locale import l_
from sphinx.util.docfields import Field
def setup(app):
app.ad... | """Directives and roles for documenting traitlets config options.
::
.. configtrait:: Application.log_datefmt
Description goes here.
Cross reference like this: :configtrait:`Application.log_datefmt`.
"""
def setup(app):
app.add_object_type('configtrait', 'configtrait', objname='Config option')... | Fix compatibility with the latest release of Sphinx | Fix compatibility with the latest release of Sphinx
`l_` from sphinx.locale has been deprecated for a long time.
`_` is the new name for the same function but it seems that the
imports there are useless.
https://github.com/sphinx-doc/sphinx/commit/8d653a406dc0dc6c2632176ab4757ca15474b10f
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | """Directives and roles for documenting traitlets config options.
::
.. configtrait:: Application.log_datefmt
Description goes here.
Cross reference like this: :configtrait:`Application.log_datefmt`.
"""
from sphinx.locale import l_
from sphinx.util.docfields import Field
def setup(app):
app.ad... | """Directives and roles for documenting traitlets config options.
::
.. configtrait:: Application.log_datefmt
Description goes here.
Cross reference like this: :configtrait:`Application.log_datefmt`.
"""
def setup(app):
app.add_object_type('configtrait', 'configtrait', objname='Config option')... | <commit_before>"""Directives and roles for documenting traitlets config options.
::
.. configtrait:: Application.log_datefmt
Description goes here.
Cross reference like this: :configtrait:`Application.log_datefmt`.
"""
from sphinx.locale import l_
from sphinx.util.docfields import Field
def setup(a... | """Directives and roles for documenting traitlets config options.
::
.. configtrait:: Application.log_datefmt
Description goes here.
Cross reference like this: :configtrait:`Application.log_datefmt`.
"""
def setup(app):
app.add_object_type('configtrait', 'configtrait', objname='Config option')... | """Directives and roles for documenting traitlets config options.
::
.. configtrait:: Application.log_datefmt
Description goes here.
Cross reference like this: :configtrait:`Application.log_datefmt`.
"""
from sphinx.locale import l_
from sphinx.util.docfields import Field
def setup(app):
app.ad... | <commit_before>"""Directives and roles for documenting traitlets config options.
::
.. configtrait:: Application.log_datefmt
Description goes here.
Cross reference like this: :configtrait:`Application.log_datefmt`.
"""
from sphinx.locale import l_
from sphinx.util.docfields import Field
def setup(a... |
255a9f65476433be99a9a96cf5681567e4825e65 | dthm4kaiako/config/__init__.py | dthm4kaiako/config/__init__.py | """Configuration for Django system."""
__version__ = "0.11.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.12.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| Increment version number to 0.12.0 | Increment version number to 0.12.0
| Python | mit | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | """Configuration for Django system."""
__version__ = "0.11.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.12.0 | """Configuration for Django system."""
__version__ = "0.12.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| <commit_before>"""Configuration for Django system."""
__version__ = "0.11.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.12.0<commit_after> | """Configuration for Django system."""
__version__ = "0.12.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.11.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.12.0"""Configuration for Django system."""
__version__ = "0.12.0"
__version_info... | <commit_before>"""Configuration for Django system."""
__version__ = "0.11.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.12.0<commit_after>"""Configuration for Django system."... |
02c2551b2760fc225bb4851c560f1881c7d674a4 | txircd/modules/extra/listmodules.py | txircd/modules/extra/listmodules.py | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def lis... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def lis... | Return the correct thing for modules | Return the correct thing for modules
| Python | bsd-3-clause | Heufneutje/txircd | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def lis... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def lis... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModule... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def lis... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModules) ]
def lis... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from zope.interface import implements
class ModulesCommand(ModuleData):
implements(IPlugin, IModuleData)
name = "ModulesCommand"
def actions(self):
return [ ("statsruntype-modules", 1, self.listModule... |
ea39c4ebba3d5ab42dfa202f88f7d76386e505fe | plugins/MeshView/MeshView.py | plugins/MeshView/MeshView.py | from Cura.View.View import View
class MeshView(View):
def __init__(self):
super(MeshView, self).__init__()
def render(self):
scene = self.getController().getScene()
renderer = self.getRenderer()
self._renderObject(scene.getRoot(), renderer)
def _renderObject(self, object,... | from Cura.View.View import View
class MeshView(View):
def __init__(self):
super(MeshView, self).__init__()
def render(self):
scene = self.getController().getScene()
renderer = self.getRenderer()
self._renderObject(scene.getRoot(), renderer)
def _renderObject(self, object,... | Allow SceneObjects to render themselves | Allow SceneObjects to render themselves
| Python | agpl-3.0 | onitake/Uranium,onitake/Uranium | from Cura.View.View import View
class MeshView(View):
def __init__(self):
super(MeshView, self).__init__()
def render(self):
scene = self.getController().getScene()
renderer = self.getRenderer()
self._renderObject(scene.getRoot(), renderer)
def _renderObject(self, object,... | from Cura.View.View import View
class MeshView(View):
def __init__(self):
super(MeshView, self).__init__()
def render(self):
scene = self.getController().getScene()
renderer = self.getRenderer()
self._renderObject(scene.getRoot(), renderer)
def _renderObject(self, object,... | <commit_before>from Cura.View.View import View
class MeshView(View):
def __init__(self):
super(MeshView, self).__init__()
def render(self):
scene = self.getController().getScene()
renderer = self.getRenderer()
self._renderObject(scene.getRoot(), renderer)
def _renderObjec... | from Cura.View.View import View
class MeshView(View):
def __init__(self):
super(MeshView, self).__init__()
def render(self):
scene = self.getController().getScene()
renderer = self.getRenderer()
self._renderObject(scene.getRoot(), renderer)
def _renderObject(self, object,... | from Cura.View.View import View
class MeshView(View):
def __init__(self):
super(MeshView, self).__init__()
def render(self):
scene = self.getController().getScene()
renderer = self.getRenderer()
self._renderObject(scene.getRoot(), renderer)
def _renderObject(self, object,... | <commit_before>from Cura.View.View import View
class MeshView(View):
def __init__(self):
super(MeshView, self).__init__()
def render(self):
scene = self.getController().getScene()
renderer = self.getRenderer()
self._renderObject(scene.getRoot(), renderer)
def _renderObjec... |
e733b0d5192437a95c4eafd1babc02385fb4fcf7 | cms/sitemaps/cms_sitemap.py | cms/sitemaps/cms_sitemap.py | # -*- coding: utf-8 -*-
from django.contrib.sitemaps import Sitemap
from django.utils import translation
from cms.models import Title
def from_iterable(iterables):
"""
Backport of itertools.chain.from_iterable
"""
for it in iterables:
for element in it:
yield element
class CMSSit... | # -*- coding: utf-8 -*-
from django.contrib.sitemaps import Sitemap
from django.db.models import Q
from django.utils import translation
from cms.models import Title
def from_iterable(iterables):
"""
Backport of itertools.chain.from_iterable
"""
for it in iterables:
for element in it:
... | Remove redirected pages from the sitemap | Remove redirected pages from the sitemap
| Python | bsd-3-clause | ScholzVolkmer/django-cms,wyg3958/django-cms,donce/django-cms,robmagee/django-cms,DylannCordel/django-cms,frnhr/django-cms,jrief/django-cms,wuzhihui1123/django-cms,Livefyre/django-cms,dhorelik/django-cms,netzkolchose/django-cms,intip/django-cms,chkir/django-cms,jproffitt/django-cms,selecsosi/django-cms,czpython/django-c... | # -*- coding: utf-8 -*-
from django.contrib.sitemaps import Sitemap
from django.utils import translation
from cms.models import Title
def from_iterable(iterables):
"""
Backport of itertools.chain.from_iterable
"""
for it in iterables:
for element in it:
yield element
class CMSSit... | # -*- coding: utf-8 -*-
from django.contrib.sitemaps import Sitemap
from django.db.models import Q
from django.utils import translation
from cms.models import Title
def from_iterable(iterables):
"""
Backport of itertools.chain.from_iterable
"""
for it in iterables:
for element in it:
... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.sitemaps import Sitemap
from django.utils import translation
from cms.models import Title
def from_iterable(iterables):
"""
Backport of itertools.chain.from_iterable
"""
for it in iterables:
for element in it:
yield element... | # -*- coding: utf-8 -*-
from django.contrib.sitemaps import Sitemap
from django.db.models import Q
from django.utils import translation
from cms.models import Title
def from_iterable(iterables):
"""
Backport of itertools.chain.from_iterable
"""
for it in iterables:
for element in it:
... | # -*- coding: utf-8 -*-
from django.contrib.sitemaps import Sitemap
from django.utils import translation
from cms.models import Title
def from_iterable(iterables):
"""
Backport of itertools.chain.from_iterable
"""
for it in iterables:
for element in it:
yield element
class CMSSit... | <commit_before># -*- coding: utf-8 -*-
from django.contrib.sitemaps import Sitemap
from django.utils import translation
from cms.models import Title
def from_iterable(iterables):
"""
Backport of itertools.chain.from_iterable
"""
for it in iterables:
for element in it:
yield element... |
f48eb543c3ae2222a71080592ae8932c227dc605 | roche/scripts/xml-load.py | roche/scripts/xml-load.py | # coding=utf-8
import sys
sys.path.append('../../')
import roche.settings
from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL
#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)
xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書館', True)
with open('../../../dubl... | # coding=utf-8
#
# Must be called in roche root dir
#
import sys
sys.path.append('.')
import roche.settings
from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL
#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)
xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書... | Fix relative path in relation to app root dir | Fix relative path in relation to app root dir
| Python | mit | beijingren/roche-website,beijingren/roche-website,beijingren/roche-website,beijingren/roche-website | # coding=utf-8
import sys
sys.path.append('../../')
import roche.settings
from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL
#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)
xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書館', True)
with open('../../../dubl... | # coding=utf-8
#
# Must be called in roche root dir
#
import sys
sys.path.append('.')
import roche.settings
from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL
#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)
xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書... | <commit_before># coding=utf-8
import sys
sys.path.append('../../')
import roche.settings
from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL
#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)
xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書館', True)
with open... | # coding=utf-8
#
# Must be called in roche root dir
#
import sys
sys.path.append('.')
import roche.settings
from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL
#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)
xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書... | # coding=utf-8
import sys
sys.path.append('../../')
import roche.settings
from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL
#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)
xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書館', True)
with open('../../../dubl... | <commit_before># coding=utf-8
import sys
sys.path.append('../../')
import roche.settings
from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL
#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)
xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書館', True)
with open... |
eccedb9f938bd74574e4dcdd9ea63f71ac269f20 | nydus/db/routers/__init__.py | nydus/db/routers/__init__.py | """
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from .base import BaseRouter, RoundRobinRouter
| """
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from .base import BaseRouter, RoundRobinRouter, PartitionRouter
| Add partition router to base | Add partition router to base
| Python | apache-2.0 | disqus/nydus | """
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from .base import BaseRouter, RoundRobinRouter
Add partition router to base | """
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from .base import BaseRouter, RoundRobinRouter, PartitionRouter
| <commit_before>"""
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from .base import BaseRouter, RoundRobinRouter
<commit_msg>Add partition router to base<commit_after> | """
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from .base import BaseRouter, RoundRobinRouter, PartitionRouter
| """
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from .base import BaseRouter, RoundRobinRouter
Add partition router to base"""
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE fo... | <commit_before>"""
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from .base import BaseRouter, RoundRobinRouter
<commit_msg>Add partition router to base<commit_after>"""
nydus.db.routers
~~~~~~~~~~~~~~~~
:copyright: (c) 2011 DISQUS.
:li... |
d4dd408e671d14518b3fabb964027cd006366fca | testfixtures/compat.py | testfixtures/compat.py | # compatibility module for different python versions
import sys
if sys.version_info[:2] > (3, 0):
PY2 = False
PY3 = True
Bytes = bytes
Unicode = str
basestring = str
class_type_name = 'class'
ClassType = type
exception_module = 'builtins'
new_class = type
self_name = '__self_... | # compatibility module for different python versions
import sys
if sys.version_info[:2] > (3, 0):
PY2 = False
PY3 = True
Bytes = bytes
Unicode = str
basestring = str
BytesLiteral = lambda x: x.encode('latin1')
UnicodeLiteral = lambda x: x
class_type_name = 'class'
ClassType = typ... | Add Python version agnostic helpers for creating byte and unicode literals. | Add Python version agnostic helpers for creating byte and unicode literals. | Python | mit | Simplistix/testfixtures,nebulans/testfixtures | # compatibility module for different python versions
import sys
if sys.version_info[:2] > (3, 0):
PY2 = False
PY3 = True
Bytes = bytes
Unicode = str
basestring = str
class_type_name = 'class'
ClassType = type
exception_module = 'builtins'
new_class = type
self_name = '__self_... | # compatibility module for different python versions
import sys
if sys.version_info[:2] > (3, 0):
PY2 = False
PY3 = True
Bytes = bytes
Unicode = str
basestring = str
BytesLiteral = lambda x: x.encode('latin1')
UnicodeLiteral = lambda x: x
class_type_name = 'class'
ClassType = typ... | <commit_before># compatibility module for different python versions
import sys
if sys.version_info[:2] > (3, 0):
PY2 = False
PY3 = True
Bytes = bytes
Unicode = str
basestring = str
class_type_name = 'class'
ClassType = type
exception_module = 'builtins'
new_class = type
self_... | # compatibility module for different python versions
import sys
if sys.version_info[:2] > (3, 0):
PY2 = False
PY3 = True
Bytes = bytes
Unicode = str
basestring = str
BytesLiteral = lambda x: x.encode('latin1')
UnicodeLiteral = lambda x: x
class_type_name = 'class'
ClassType = typ... | # compatibility module for different python versions
import sys
if sys.version_info[:2] > (3, 0):
PY2 = False
PY3 = True
Bytes = bytes
Unicode = str
basestring = str
class_type_name = 'class'
ClassType = type
exception_module = 'builtins'
new_class = type
self_name = '__self_... | <commit_before># compatibility module for different python versions
import sys
if sys.version_info[:2] > (3, 0):
PY2 = False
PY3 = True
Bytes = bytes
Unicode = str
basestring = str
class_type_name = 'class'
ClassType = type
exception_module = 'builtins'
new_class = type
self_... |
03dd583c8d75b2b588079c69b517c2510eba71db | wsme/__init__.py | wsme/__init__.py | from wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty
| from wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty, Unset
| Add 'Unset' to the wsme module | Add 'Unset' to the wsme module
| Python | mit | stackforge/wsme | from wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty
Add 'Unset' to the wsme module | from wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty, Unset
| <commit_before>from wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty
<commit_msg>Add 'Unset' to the wsme module<commit_after> | from wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty, Unset
| from wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty
Add 'Unset' to the wsme modulefrom wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty, Unset
| <commit_before>from wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty
<commit_msg>Add 'Unset' to the wsme module<commit_after>from wsme.api import expose, validate
from wsme.root import WSRoot
from wsme.types import wsattr, wsproperty, Unset
|
bb3d9ec2d9932da2abb50f5cb6bceffae5112abb | mrbelvedereci/trigger/admin.py | mrbelvedereci/trigger/admin.py | from django.contrib import admin
from mrbelvedereci.trigger.models import Trigger
class TriggerAdmin(admin.ModelAdmin):
list_display = ('repo', 'type', 'flows', 'org', 'regex', 'active', 'public')
list_filter = ('active', 'public', 'repo', 'org', 'type')
admin.site.register(Trigger, TriggerAdmin)
| from django.contrib import admin
from mrbelvedereci.trigger.models import Trigger
class TriggerAdmin(admin.ModelAdmin):
list_display = ('name', 'repo', 'type', 'flows', 'org', 'regex', 'active', 'public')
list_filter = ('active', 'public', 'type', 'org', 'repo')
admin.site.register(Trigger, TriggerAdmin)
| Add name to trigger list view | Add name to trigger list view
| Python | bsd-3-clause | SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci | from django.contrib import admin
from mrbelvedereci.trigger.models import Trigger
class TriggerAdmin(admin.ModelAdmin):
list_display = ('repo', 'type', 'flows', 'org', 'regex', 'active', 'public')
list_filter = ('active', 'public', 'repo', 'org', 'type')
admin.site.register(Trigger, TriggerAdmin)
Add name to t... | from django.contrib import admin
from mrbelvedereci.trigger.models import Trigger
class TriggerAdmin(admin.ModelAdmin):
list_display = ('name', 'repo', 'type', 'flows', 'org', 'regex', 'active', 'public')
list_filter = ('active', 'public', 'type', 'org', 'repo')
admin.site.register(Trigger, TriggerAdmin)
| <commit_before>from django.contrib import admin
from mrbelvedereci.trigger.models import Trigger
class TriggerAdmin(admin.ModelAdmin):
list_display = ('repo', 'type', 'flows', 'org', 'regex', 'active', 'public')
list_filter = ('active', 'public', 'repo', 'org', 'type')
admin.site.register(Trigger, TriggerAdmin... | from django.contrib import admin
from mrbelvedereci.trigger.models import Trigger
class TriggerAdmin(admin.ModelAdmin):
list_display = ('name', 'repo', 'type', 'flows', 'org', 'regex', 'active', 'public')
list_filter = ('active', 'public', 'type', 'org', 'repo')
admin.site.register(Trigger, TriggerAdmin)
| from django.contrib import admin
from mrbelvedereci.trigger.models import Trigger
class TriggerAdmin(admin.ModelAdmin):
list_display = ('repo', 'type', 'flows', 'org', 'regex', 'active', 'public')
list_filter = ('active', 'public', 'repo', 'org', 'type')
admin.site.register(Trigger, TriggerAdmin)
Add name to t... | <commit_before>from django.contrib import admin
from mrbelvedereci.trigger.models import Trigger
class TriggerAdmin(admin.ModelAdmin):
list_display = ('repo', 'type', 'flows', 'org', 'regex', 'active', 'public')
list_filter = ('active', 'public', 'repo', 'org', 'type')
admin.site.register(Trigger, TriggerAdmin... |
abbc6757df62d1dfbd4158dd50b99a74d204fc95 | sandcats/trivial_tests.py | sandcats/trivial_tests.py | import requests
def register_asheesh():
return requests.post(
'http://localhost:3000/register',
{'rawHostname': 'asheesh',
'email': '[email protected]',
'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pubkey').read()},
)
def register_asheesh2_bad_key_type():
... | import requests
def register_asheesh():
return requests.post(
'http://localhost:3000/register',
{'rawHostname': 'asheesh',
'email': '[email protected]',
'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pubkey').read()},
)
def register_asheesh2_bad_key_type():
... | Add non-working test for X-Forwarded-For | Add non-working test for X-Forwarded-For
| Python | apache-2.0 | sandstorm-io/sandcats,sandstorm-io/sandcats,sandstorm-io/sandcats,sandstorm-io/sandcats | import requests
def register_asheesh():
return requests.post(
'http://localhost:3000/register',
{'rawHostname': 'asheesh',
'email': '[email protected]',
'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pubkey').read()},
)
def register_asheesh2_bad_key_type():
... | import requests
def register_asheesh():
return requests.post(
'http://localhost:3000/register',
{'rawHostname': 'asheesh',
'email': '[email protected]',
'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pubkey').read()},
)
def register_asheesh2_bad_key_type():
... | <commit_before>import requests
def register_asheesh():
return requests.post(
'http://localhost:3000/register',
{'rawHostname': 'asheesh',
'email': '[email protected]',
'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pubkey').read()},
)
def register_asheesh2_bad_... | import requests
def register_asheesh():
return requests.post(
'http://localhost:3000/register',
{'rawHostname': 'asheesh',
'email': '[email protected]',
'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pubkey').read()},
)
def register_asheesh2_bad_key_type():
... | import requests
def register_asheesh():
return requests.post(
'http://localhost:3000/register',
{'rawHostname': 'asheesh',
'email': '[email protected]',
'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pubkey').read()},
)
def register_asheesh2_bad_key_type():
... | <commit_before>import requests
def register_asheesh():
return requests.post(
'http://localhost:3000/register',
{'rawHostname': 'asheesh',
'email': '[email protected]',
'pubkey': open('snakeoil-sample-certs/ssl-cert-snakeoil.pubkey').read()},
)
def register_asheesh2_bad_... |
437eb8432fe91865d3cb24109e1b99818de8ce4e | pysc2/bin/battle_net_maps.py | pysc2/bin/battle_net_maps.py | #!/usr/bin/python
# Copyright 2019 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 ... | #!/usr/bin/python
# Copyright 2019 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 ... | Sort and indent the map lists. | Sort and indent the map lists.
PiperOrigin-RevId: 249276696
| Python | apache-2.0 | deepmind/pysc2 | #!/usr/bin/python
# Copyright 2019 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 ... | #!/usr/bin/python
# Copyright 2019 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 ... | <commit_before>#!/usr/bin/python
# Copyright 2019 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
#
# Unle... | #!/usr/bin/python
# Copyright 2019 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 ... | #!/usr/bin/python
# Copyright 2019 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 ... | <commit_before>#!/usr/bin/python
# Copyright 2019 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
#
# Unle... |
73eb3c7c52c2a5c58cad0e1d4dbe09c1e713beeb | conductor/vendor/_stripe.py | conductor/vendor/_stripe.py | from django.conf import settings
import stripe
stripe.api_key = settings.STRIPE_API_KEY
stripe.api_version = "2018-10-31"
class StripeGateway:
"""A gateway to Stripe
This insulates the rest of the system from Stripe errors
and configures the Stripe module with the API key.
"""
def create_custom... | from django.conf import settings
import stripe
stripe.api_key = settings.STRIPE_API_KEY
class StripeGateway:
"""A gateway to Stripe
This insulates the rest of the system from Stripe errors
and configures the Stripe module with the API key.
"""
def create_customer(self, user: settings.AUTH_USER_... | Remove pinned Stripe API version. | Remove pinned Stripe API version.
| Python | bsd-2-clause | mblayman/lcp,mblayman/lcp,mblayman/lcp | from django.conf import settings
import stripe
stripe.api_key = settings.STRIPE_API_KEY
stripe.api_version = "2018-10-31"
class StripeGateway:
"""A gateway to Stripe
This insulates the rest of the system from Stripe errors
and configures the Stripe module with the API key.
"""
def create_custom... | from django.conf import settings
import stripe
stripe.api_key = settings.STRIPE_API_KEY
class StripeGateway:
"""A gateway to Stripe
This insulates the rest of the system from Stripe errors
and configures the Stripe module with the API key.
"""
def create_customer(self, user: settings.AUTH_USER_... | <commit_before>from django.conf import settings
import stripe
stripe.api_key = settings.STRIPE_API_KEY
stripe.api_version = "2018-10-31"
class StripeGateway:
"""A gateway to Stripe
This insulates the rest of the system from Stripe errors
and configures the Stripe module with the API key.
"""
de... | from django.conf import settings
import stripe
stripe.api_key = settings.STRIPE_API_KEY
class StripeGateway:
"""A gateway to Stripe
This insulates the rest of the system from Stripe errors
and configures the Stripe module with the API key.
"""
def create_customer(self, user: settings.AUTH_USER_... | from django.conf import settings
import stripe
stripe.api_key = settings.STRIPE_API_KEY
stripe.api_version = "2018-10-31"
class StripeGateway:
"""A gateway to Stripe
This insulates the rest of the system from Stripe errors
and configures the Stripe module with the API key.
"""
def create_custom... | <commit_before>from django.conf import settings
import stripe
stripe.api_key = settings.STRIPE_API_KEY
stripe.api_version = "2018-10-31"
class StripeGateway:
"""A gateway to Stripe
This insulates the rest of the system from Stripe errors
and configures the Stripe module with the API key.
"""
de... |
2ca3f9a47a639365a8de4db1b80331ac8e06d0af | modules/pipeitembuilder.py | modules/pipeitembuilder.py | # pipeitembuilder.py
#
import urllib
from pipe2py import util
def pipe_itembuilder(context, _INPUT, conf, **kwargs):
"""This source builds an item.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
conf:
attrs -- key, value pairs
Yields (_OUTPUT):
... | # pipeitembuilder.py
#
import urllib
from pipe2py import util
def pipe_itembuilder(context, _INPUT, conf, **kwargs):
"""This source builds an item.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
conf:
attrs -- key, value pairs
Yields (_OUTPUT):
... | Fix to suit latest Yahoo changes | Fix to suit latest Yahoo changes
| Python | mit | nerevu/riko,nerevu/riko | # pipeitembuilder.py
#
import urllib
from pipe2py import util
def pipe_itembuilder(context, _INPUT, conf, **kwargs):
"""This source builds an item.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
conf:
attrs -- key, value pairs
Yields (_OUTPUT):
... | # pipeitembuilder.py
#
import urllib
from pipe2py import util
def pipe_itembuilder(context, _INPUT, conf, **kwargs):
"""This source builds an item.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
conf:
attrs -- key, value pairs
Yields (_OUTPUT):
... | <commit_before># pipeitembuilder.py
#
import urllib
from pipe2py import util
def pipe_itembuilder(context, _INPUT, conf, **kwargs):
"""This source builds an item.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
conf:
attrs -- key, value pairs
Yie... | # pipeitembuilder.py
#
import urllib
from pipe2py import util
def pipe_itembuilder(context, _INPUT, conf, **kwargs):
"""This source builds an item.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
conf:
attrs -- key, value pairs
Yields (_OUTPUT):
... | # pipeitembuilder.py
#
import urllib
from pipe2py import util
def pipe_itembuilder(context, _INPUT, conf, **kwargs):
"""This source builds an item.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
conf:
attrs -- key, value pairs
Yields (_OUTPUT):
... | <commit_before># pipeitembuilder.py
#
import urllib
from pipe2py import util
def pipe_itembuilder(context, _INPUT, conf, **kwargs):
"""This source builds an item.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
conf:
attrs -- key, value pairs
Yie... |
e5dea3c91cfc82f58f80131ff79be402582a3412 | dthm4kaiako/config/__init__.py | dthm4kaiako/config/__init__.py | """Configuration for Django system."""
__version__ = "0.16.6"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.17.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| Increment version number to 0.17.0 | Increment version number to 0.17.0
| Python | mit | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | """Configuration for Django system."""
__version__ = "0.16.6"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.17.0 | """Configuration for Django system."""
__version__ = "0.17.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| <commit_before>"""Configuration for Django system."""
__version__ = "0.16.6"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.17.0<commit_after> | """Configuration for Django system."""
__version__ = "0.17.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.16.6"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.17.0"""Configuration for Django system."""
__version__ = "0.17.0"
__version_info... | <commit_before>"""Configuration for Django system."""
__version__ = "0.16.6"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.17.0<commit_after>"""Configuration for Django system."... |
9d7f2626294fbf25934e7dda4892b7ac13bd5555 | fireplace/cards/tgt/warlock.py | fireplace/cards/tgt/warlock.py | from ..utils import *
##
# Minions
# Dreadsteed
class AT_019:
deathrattle = Summon(CONTROLLER, "AT_019")
# Tiny Knight of Evil
class AT_021:
events = Discard(FRIENDLY).on(Buff(SELF, "AT_021e"))
# Wrathguard
class AT_026:
events = Damage(SELF).on(Hit(FRIENDLY_HERO, Damage.Args.AMOUNT))
# Wilfred Fizzlebang
cl... | from ..utils import *
##
# Minions
# Dreadsteed
class AT_019:
deathrattle = Summon(CONTROLLER, "AT_019")
# Tiny Knight of Evil
class AT_021:
events = Discard(FRIENDLY).on(Buff(SELF, "AT_021e"))
# Void Crusher
class AT_023:
inspire = Destroy(RANDOM_ENEMY_MINION | RANDOM_FRIENDLY_MINION)
# Wrathguard
class AT... | Implement more TGT Warlock cards | Implement more TGT Warlock cards
| Python | agpl-3.0 | liujimj/fireplace,beheh/fireplace,Ragowit/fireplace,Ragowit/fireplace,amw2104/fireplace,amw2104/fireplace,smallnamespace/fireplace,smallnamespace/fireplace,oftc-ftw/fireplace,liujimj/fireplace,oftc-ftw/fireplace,Meerkov/fireplace,jleclanche/fireplace,Meerkov/fireplace,NightKev/fireplace | from ..utils import *
##
# Minions
# Dreadsteed
class AT_019:
deathrattle = Summon(CONTROLLER, "AT_019")
# Tiny Knight of Evil
class AT_021:
events = Discard(FRIENDLY).on(Buff(SELF, "AT_021e"))
# Wrathguard
class AT_026:
events = Damage(SELF).on(Hit(FRIENDLY_HERO, Damage.Args.AMOUNT))
# Wilfred Fizzlebang
cl... | from ..utils import *
##
# Minions
# Dreadsteed
class AT_019:
deathrattle = Summon(CONTROLLER, "AT_019")
# Tiny Knight of Evil
class AT_021:
events = Discard(FRIENDLY).on(Buff(SELF, "AT_021e"))
# Void Crusher
class AT_023:
inspire = Destroy(RANDOM_ENEMY_MINION | RANDOM_FRIENDLY_MINION)
# Wrathguard
class AT... | <commit_before>from ..utils import *
##
# Minions
# Dreadsteed
class AT_019:
deathrattle = Summon(CONTROLLER, "AT_019")
# Tiny Knight of Evil
class AT_021:
events = Discard(FRIENDLY).on(Buff(SELF, "AT_021e"))
# Wrathguard
class AT_026:
events = Damage(SELF).on(Hit(FRIENDLY_HERO, Damage.Args.AMOUNT))
# Wilfre... | from ..utils import *
##
# Minions
# Dreadsteed
class AT_019:
deathrattle = Summon(CONTROLLER, "AT_019")
# Tiny Knight of Evil
class AT_021:
events = Discard(FRIENDLY).on(Buff(SELF, "AT_021e"))
# Void Crusher
class AT_023:
inspire = Destroy(RANDOM_ENEMY_MINION | RANDOM_FRIENDLY_MINION)
# Wrathguard
class AT... | from ..utils import *
##
# Minions
# Dreadsteed
class AT_019:
deathrattle = Summon(CONTROLLER, "AT_019")
# Tiny Knight of Evil
class AT_021:
events = Discard(FRIENDLY).on(Buff(SELF, "AT_021e"))
# Wrathguard
class AT_026:
events = Damage(SELF).on(Hit(FRIENDLY_HERO, Damage.Args.AMOUNT))
# Wilfred Fizzlebang
cl... | <commit_before>from ..utils import *
##
# Minions
# Dreadsteed
class AT_019:
deathrattle = Summon(CONTROLLER, "AT_019")
# Tiny Knight of Evil
class AT_021:
events = Discard(FRIENDLY).on(Buff(SELF, "AT_021e"))
# Wrathguard
class AT_026:
events = Damage(SELF).on(Hit(FRIENDLY_HERO, Damage.Args.AMOUNT))
# Wilfre... |
27c115ba875136ced13023999fe13fcf0d798f0e | lux_udp_bridge.py | lux_udp_bridge.py | #!/usr/bin/env python
import select
import serial
import socket
def run_lux_udp(host, port, dev):
with serial.Serial(dev, baudrate=3000000, xonxoff=False) as ser:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((host, port))
last_addr = None
serial_buffer = ""
... | #!/usr/bin/env python
import select
import serial
import socket
def run_lux_udp(host, port, dev):
with serial.Serial(dev, baudrate=3000000, xonxoff=False) as ser:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((host, port))
last_addr = None
serial_buffer = ""
... | Fix buffering issue in udp bridge | Fix buffering issue in udp bridge
| Python | mit | zbanks/radiance,zbanks/radiance,zbanks/radiance,zbanks/radiance | #!/usr/bin/env python
import select
import serial
import socket
def run_lux_udp(host, port, dev):
with serial.Serial(dev, baudrate=3000000, xonxoff=False) as ser:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((host, port))
last_addr = None
serial_buffer = ""
... | #!/usr/bin/env python
import select
import serial
import socket
def run_lux_udp(host, port, dev):
with serial.Serial(dev, baudrate=3000000, xonxoff=False) as ser:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((host, port))
last_addr = None
serial_buffer = ""
... | <commit_before>#!/usr/bin/env python
import select
import serial
import socket
def run_lux_udp(host, port, dev):
with serial.Serial(dev, baudrate=3000000, xonxoff=False) as ser:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((host, port))
last_addr = None
serial... | #!/usr/bin/env python
import select
import serial
import socket
def run_lux_udp(host, port, dev):
with serial.Serial(dev, baudrate=3000000, xonxoff=False) as ser:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((host, port))
last_addr = None
serial_buffer = ""
... | #!/usr/bin/env python
import select
import serial
import socket
def run_lux_udp(host, port, dev):
with serial.Serial(dev, baudrate=3000000, xonxoff=False) as ser:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((host, port))
last_addr = None
serial_buffer = ""
... | <commit_before>#!/usr/bin/env python
import select
import serial
import socket
def run_lux_udp(host, port, dev):
with serial.Serial(dev, baudrate=3000000, xonxoff=False) as ser:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((host, port))
last_addr = None
serial... |
4c3e92c8847b35c4afa53a90dd823c89d1d534d1 | mamba/__init__.py | mamba/__init__.py | __version__ = '0.8.6'
| __version__ = '0.8.6'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(message):
pass
def context(message):
pass
def _context(message):
pass
def before():
pass
def after():
pass
| Make mamba more friendly to linters and IDE's | Make mamba more friendly to linters and IDE's
Some empty functions are added and we are able to optionally import them
| Python | mit | nestorsalceda/mamba | __version__ = '0.8.6'
Make mamba more friendly to linters and IDE's
Some empty functions are added and we are able to optionally import them | __version__ = '0.8.6'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(message):
pass
def context(message):
pass
def _context(message):
pass
def before():
pass
def after():
pass
| <commit_before>__version__ = '0.8.6'
<commit_msg>Make mamba more friendly to linters and IDE's
Some empty functions are added and we are able to optionally import them<commit_after> | __version__ = '0.8.6'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(message):
pass
def context(message):
pass
def _context(message):
pass
def before():
pass
def after():
pass
| __version__ = '0.8.6'
Make mamba more friendly to linters and IDE's
Some empty functions are added and we are able to optionally import them__version__ = '0.8.6'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(message):
pass
def context(message):
... | <commit_before>__version__ = '0.8.6'
<commit_msg>Make mamba more friendly to linters and IDE's
Some empty functions are added and we are able to optionally import them<commit_after>__version__ = '0.8.6'
def description(message):
pass
def _description(message):
pass
def it(message):
pass
def _it(mes... |
21bf18a03c485304aa00dc2af86aa91930e4b1ac | tests/test_grammar.py | tests/test_grammar.py | import pytest
from parglare import Grammar
from parglare.exceptions import GrammarError
def test_terminal_nonterminal_conflict():
# Production A is a terminal ("a") and non-terminal at the same time.
g = """
A = "a" | B;
B = "b";
"""
try:
Grammar.from_string(g)
assert False
... | import pytest
from parglare import Grammar
def test_terminal_nonterminal():
# Production A is a terminal ("a") and non-terminal at the same time.
# Thus, it must be recognized as non-terminal.
g = """
S = A B;
A = "a" | B;
B = "b";
"""
Grammar.from_string(g)
# Here A shoud be non... | Fix in tests for terminal definitions. | Fix in tests for terminal definitions.
| Python | mit | igordejanovic/parglare,igordejanovic/parglare | import pytest
from parglare import Grammar
from parglare.exceptions import GrammarError
def test_terminal_nonterminal_conflict():
# Production A is a terminal ("a") and non-terminal at the same time.
g = """
A = "a" | B;
B = "b";
"""
try:
Grammar.from_string(g)
assert False
... | import pytest
from parglare import Grammar
def test_terminal_nonterminal():
# Production A is a terminal ("a") and non-terminal at the same time.
# Thus, it must be recognized as non-terminal.
g = """
S = A B;
A = "a" | B;
B = "b";
"""
Grammar.from_string(g)
# Here A shoud be non... | <commit_before>import pytest
from parglare import Grammar
from parglare.exceptions import GrammarError
def test_terminal_nonterminal_conflict():
# Production A is a terminal ("a") and non-terminal at the same time.
g = """
A = "a" | B;
B = "b";
"""
try:
Grammar.from_string(g)
... | import pytest
from parglare import Grammar
def test_terminal_nonterminal():
# Production A is a terminal ("a") and non-terminal at the same time.
# Thus, it must be recognized as non-terminal.
g = """
S = A B;
A = "a" | B;
B = "b";
"""
Grammar.from_string(g)
# Here A shoud be non... | import pytest
from parglare import Grammar
from parglare.exceptions import GrammarError
def test_terminal_nonterminal_conflict():
# Production A is a terminal ("a") and non-terminal at the same time.
g = """
A = "a" | B;
B = "b";
"""
try:
Grammar.from_string(g)
assert False
... | <commit_before>import pytest
from parglare import Grammar
from parglare.exceptions import GrammarError
def test_terminal_nonterminal_conflict():
# Production A is a terminal ("a") and non-terminal at the same time.
g = """
A = "a" | B;
B = "b";
"""
try:
Grammar.from_string(g)
... |
eacbc67cdaa7016d1098e9f63a50ae7ca6b4924a | app/auth/views.py | app/auth/views.py | # Copyright (C) 2016 University of Zurich. All rights reserved.
#
# This file is part of MSRegistry Backend.
#
# MSRegistry Backend is free software: you can redistribute it and/or
# modify it under the terms of the version 3 of the GNU Affero General
# Public License as published by the Free Software Foundation, or a... | # Copyright (C) 2016 University of Zurich. All rights reserved.
#
# This file is part of MSRegistry Backend.
#
# MSRegistry Backend is free software: you can redistribute it and/or
# modify it under the terms of the version 3 of the GNU Affero General
# Public License as published by the Free Software Foundation, or a... | Use JSON for API GET /auth/test response | Use JSON for API GET /auth/test response
| Python | agpl-3.0 | uzh/msregistry | # Copyright (C) 2016 University of Zurich. All rights reserved.
#
# This file is part of MSRegistry Backend.
#
# MSRegistry Backend is free software: you can redistribute it and/or
# modify it under the terms of the version 3 of the GNU Affero General
# Public License as published by the Free Software Foundation, or a... | # Copyright (C) 2016 University of Zurich. All rights reserved.
#
# This file is part of MSRegistry Backend.
#
# MSRegistry Backend is free software: you can redistribute it and/or
# modify it under the terms of the version 3 of the GNU Affero General
# Public License as published by the Free Software Foundation, or a... | <commit_before># Copyright (C) 2016 University of Zurich. All rights reserved.
#
# This file is part of MSRegistry Backend.
#
# MSRegistry Backend is free software: you can redistribute it and/or
# modify it under the terms of the version 3 of the GNU Affero General
# Public License as published by the Free Software F... | # Copyright (C) 2016 University of Zurich. All rights reserved.
#
# This file is part of MSRegistry Backend.
#
# MSRegistry Backend is free software: you can redistribute it and/or
# modify it under the terms of the version 3 of the GNU Affero General
# Public License as published by the Free Software Foundation, or a... | # Copyright (C) 2016 University of Zurich. All rights reserved.
#
# This file is part of MSRegistry Backend.
#
# MSRegistry Backend is free software: you can redistribute it and/or
# modify it under the terms of the version 3 of the GNU Affero General
# Public License as published by the Free Software Foundation, or a... | <commit_before># Copyright (C) 2016 University of Zurich. All rights reserved.
#
# This file is part of MSRegistry Backend.
#
# MSRegistry Backend is free software: you can redistribute it and/or
# modify it under the terms of the version 3 of the GNU Affero General
# Public License as published by the Free Software F... |
64bff944752cbba16878b22025d6ee332e923007 | pontoon/administration/management/commands/update_projects.py | pontoon/administration/management/commands/update_projects.py |
import datetime
from django.core.management.base import BaseCommand, CommandError
from pontoon.administration.files import (
update_from_repository,
extract_to_database,
)
from pontoon.base.models import Project
class Command(BaseCommand):
args = '<project_id project_id ...>'
help = 'Update projec... |
import datetime
from django.core.management.base import BaseCommand, CommandError
from pontoon.administration.files import (
update_from_repository,
extract_to_database,
)
from pontoon.base.models import Project
class Command(BaseCommand):
args = '<project_id project_id ...>'
help = 'Update projec... | Print new line after operation title | Print new line after operation title
| Python | bsd-3-clause | jotes/pontoon,mathjazz/pontoon,participedia/pontoon,Jobava/mirror-pontoon,mathjazz/pontoon,m8ttyB/pontoon,vivekanand1101/pontoon,sudheesh001/pontoon,mastizada/pontoon,yfdyh000/pontoon,mastizada/pontoon,jotes/pontoon,mastizada/pontoon,vivekanand1101/pontoon,Osmose/pontoon,participedia/pontoon,yfdyh000/pontoon,vivekanand... |
import datetime
from django.core.management.base import BaseCommand, CommandError
from pontoon.administration.files import (
update_from_repository,
extract_to_database,
)
from pontoon.base.models import Project
class Command(BaseCommand):
args = '<project_id project_id ...>'
help = 'Update projec... |
import datetime
from django.core.management.base import BaseCommand, CommandError
from pontoon.administration.files import (
update_from_repository,
extract_to_database,
)
from pontoon.base.models import Project
class Command(BaseCommand):
args = '<project_id project_id ...>'
help = 'Update projec... | <commit_before>
import datetime
from django.core.management.base import BaseCommand, CommandError
from pontoon.administration.files import (
update_from_repository,
extract_to_database,
)
from pontoon.base.models import Project
class Command(BaseCommand):
args = '<project_id project_id ...>'
help =... |
import datetime
from django.core.management.base import BaseCommand, CommandError
from pontoon.administration.files import (
update_from_repository,
extract_to_database,
)
from pontoon.base.models import Project
class Command(BaseCommand):
args = '<project_id project_id ...>'
help = 'Update projec... |
import datetime
from django.core.management.base import BaseCommand, CommandError
from pontoon.administration.files import (
update_from_repository,
extract_to_database,
)
from pontoon.base.models import Project
class Command(BaseCommand):
args = '<project_id project_id ...>'
help = 'Update projec... | <commit_before>
import datetime
from django.core.management.base import BaseCommand, CommandError
from pontoon.administration.files import (
update_from_repository,
extract_to_database,
)
from pontoon.base.models import Project
class Command(BaseCommand):
args = '<project_id project_id ...>'
help =... |
e8b1d0aff6333d6f8cfb4c81262550c670ea7e86 | factory/tools/cat_StartdLog.py | factory/tools/cat_StartdLog.py | #!/bin/env python
#
# cat_StartdLog.py
#
# Print out the StartdLog for a glidein output file
#
# Usage: cat_StartdLog.py logname
#
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StartdLog.py <logname>"
def main():
try:
print gWft... | #!/bin/env python
#
# cat_StartdLog.py
#
# Print out the StartdLog for a glidein output file
#
# Usage: cat_StartdLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StartdLog.py <logname>"
def main():
try:
... | Allow for startup in a different dir | Allow for startup in a different dir
| Python | bsd-3-clause | bbockelm/glideinWMS,bbockelm/glideinWMS,holzman/glideinwms-old,holzman/glideinwms-old,bbockelm/glideinWMS,holzman/glideinwms-old,bbockelm/glideinWMS | #!/bin/env python
#
# cat_StartdLog.py
#
# Print out the StartdLog for a glidein output file
#
# Usage: cat_StartdLog.py logname
#
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StartdLog.py <logname>"
def main():
try:
print gWft... | #!/bin/env python
#
# cat_StartdLog.py
#
# Print out the StartdLog for a glidein output file
#
# Usage: cat_StartdLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StartdLog.py <logname>"
def main():
try:
... | <commit_before>#!/bin/env python
#
# cat_StartdLog.py
#
# Print out the StartdLog for a glidein output file
#
# Usage: cat_StartdLog.py logname
#
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StartdLog.py <logname>"
def main():
try:
... | #!/bin/env python
#
# cat_StartdLog.py
#
# Print out the StartdLog for a glidein output file
#
# Usage: cat_StartdLog.py logname
#
import os.path
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StartdLog.py <logname>"
def main():
try:
... | #!/bin/env python
#
# cat_StartdLog.py
#
# Print out the StartdLog for a glidein output file
#
# Usage: cat_StartdLog.py logname
#
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StartdLog.py <logname>"
def main():
try:
print gWft... | <commit_before>#!/bin/env python
#
# cat_StartdLog.py
#
# Print out the StartdLog for a glidein output file
#
# Usage: cat_StartdLog.py logname
#
import sys
STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"lib"))
import gWftLogParser
USAGE="Usage: cat_StartdLog.py <logname>"
def main():
try:
... |
5835939302048f420bfc91ab027fea8f91e14a02 | pybo/globalopt/__init__.py | pybo/globalopt/__init__.py | from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgsb.__all__
| from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgs.__all__
| Fix a minor bug due to renaming the lbfgs module. | Fix a minor bug due to renaming the lbfgs module.
| Python | bsd-2-clause | jhartford/pybo,mwhoffman/pybo | from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgsb.__all__
Fix a minor bug due to renaming the lbfgs module. | from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgs.__all__
| <commit_before>from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgsb.__all__
<commit_msg>Fix a minor bug due to renaming the lbfgs module.<commit_after> | from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgs.__all__
| from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgsb.__all__
Fix a minor bug due to renaming the lbfgs module.from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgs.__all__
| <commit_before>from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgsb.__all__
<commit_msg>Fix a minor bug due to renaming the lbfgs module.<commit_after>from .direct import *
from .lbfgs import *
__all__ = []
__all__ += direct.__all__
__all__ += lbfgs.__all__
|
7bf4083ef44585116f0eff86753080612a26b374 | src/__init__.py | src/__init__.py | from bayeslite.api import barplot
from bayeslite.api import cardinality
from bayeslite.api import draw_crosscat
from bayeslite.api import estimate_log_likelihood
from bayeslite.api import heatmap
from bayeslite.api import histogram
from bayeslite.api import mi_hist
from bayeslite.api import nullify
from bayeslite.api i... | from bdbcontrib.api import barplot
from bdbcontrib.api import cardinality
from bdbcontrib.api import draw_crosscat
from bdbcontrib.api import estimate_log_likelihood
from bdbcontrib.api import heatmap
from bdbcontrib.api import histogram
from bdbcontrib.api import mi_hist
from bdbcontrib.api import nullify
from bdbcont... | Fix big from bayeslite to bdbcontrib. | Fix big from bayeslite to bdbcontrib.
| Python | apache-2.0 | probcomp/bdbcontrib,probcomp/bdbcontrib | from bayeslite.api import barplot
from bayeslite.api import cardinality
from bayeslite.api import draw_crosscat
from bayeslite.api import estimate_log_likelihood
from bayeslite.api import heatmap
from bayeslite.api import histogram
from bayeslite.api import mi_hist
from bayeslite.api import nullify
from bayeslite.api i... | from bdbcontrib.api import barplot
from bdbcontrib.api import cardinality
from bdbcontrib.api import draw_crosscat
from bdbcontrib.api import estimate_log_likelihood
from bdbcontrib.api import heatmap
from bdbcontrib.api import histogram
from bdbcontrib.api import mi_hist
from bdbcontrib.api import nullify
from bdbcont... | <commit_before>from bayeslite.api import barplot
from bayeslite.api import cardinality
from bayeslite.api import draw_crosscat
from bayeslite.api import estimate_log_likelihood
from bayeslite.api import heatmap
from bayeslite.api import histogram
from bayeslite.api import mi_hist
from bayeslite.api import nullify
from ... | from bdbcontrib.api import barplot
from bdbcontrib.api import cardinality
from bdbcontrib.api import draw_crosscat
from bdbcontrib.api import estimate_log_likelihood
from bdbcontrib.api import heatmap
from bdbcontrib.api import histogram
from bdbcontrib.api import mi_hist
from bdbcontrib.api import nullify
from bdbcont... | from bayeslite.api import barplot
from bayeslite.api import cardinality
from bayeslite.api import draw_crosscat
from bayeslite.api import estimate_log_likelihood
from bayeslite.api import heatmap
from bayeslite.api import histogram
from bayeslite.api import mi_hist
from bayeslite.api import nullify
from bayeslite.api i... | <commit_before>from bayeslite.api import barplot
from bayeslite.api import cardinality
from bayeslite.api import draw_crosscat
from bayeslite.api import estimate_log_likelihood
from bayeslite.api import heatmap
from bayeslite.api import histogram
from bayeslite.api import mi_hist
from bayeslite.api import nullify
from ... |
7a7ff71a4bfe6a14a820d8e90174ea168cb21fb2 | appstack/settings/__init__.py | appstack/settings/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
debug = True
port = 8000
processor = 1
settings = None
app_static_path = None
app_template_path = None
#
# import other settings for different environment
#
try:
from develop_settings import * # DevelopSettings
except ImportError:
pass
try:
from ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Redis
cache_driver="default" # default/socket
cache_host="localhost"
cache_name=""
cache_port=6379 # for Redis
# Posgresql
database_driver="postgresql" # Posgresql
database_host="localhost"
database_name=""
database_password=""
database_port=5432 # for Posgresql
databa... | Rewrite settings to application.very nice~ | Rewrite settings to application.very nice~
| Python | mit | mywaiting/appstack,mywaiting/appstack | #!/usr/bin/env python
# -*- coding: utf-8 -*-
debug = True
port = 8000
processor = 1
settings = None
app_static_path = None
app_template_path = None
#
# import other settings for different environment
#
try:
from develop_settings import * # DevelopSettings
except ImportError:
pass
try:
from ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Redis
cache_driver="default" # default/socket
cache_host="localhost"
cache_name=""
cache_port=6379 # for Redis
# Posgresql
database_driver="postgresql" # Posgresql
database_host="localhost"
database_name=""
database_password=""
database_port=5432 # for Posgresql
databa... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
debug = True
port = 8000
processor = 1
settings = None
app_static_path = None
app_template_path = None
#
# import other settings for different environment
#
try:
from develop_settings import * # DevelopSettings
except ImportError:
pass
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Redis
cache_driver="default" # default/socket
cache_host="localhost"
cache_name=""
cache_port=6379 # for Redis
# Posgresql
database_driver="postgresql" # Posgresql
database_host="localhost"
database_name=""
database_password=""
database_port=5432 # for Posgresql
databa... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
debug = True
port = 8000
processor = 1
settings = None
app_static_path = None
app_template_path = None
#
# import other settings for different environment
#
try:
from develop_settings import * # DevelopSettings
except ImportError:
pass
try:
from ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
debug = True
port = 8000
processor = 1
settings = None
app_static_path = None
app_template_path = None
#
# import other settings for different environment
#
try:
from develop_settings import * # DevelopSettings
except ImportError:
pass
... |
27f503ef57a1582f7cc792d61f537bec71a4b02c | dhcp2nest/util.py | dhcp2nest/util.py | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | Use daemon threads for follow_file() | Use daemon threads for follow_file()
Signed-off-by: Jason Bernardino Alonso <[email protected]>
| Python | mit | jbalonso/dhcp2nest | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | <commit_before>"""
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here... | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | """
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here was inspired b... | <commit_before>"""
Utility functions for dhcp2nest
"""
from queue import Queue
from subprocess import Popen, PIPE
from threading import Thread
def follow_file(fn, max_lines=100):
"""
Return a Queue that is fed lines (up to max_lines) from the given file (fn)
continuously
The implementation given here... |
af0ec29ce0c830f096ab809fd2d69affd887ce16 | feincms/module/page/admin.py | feincms/module/page/admin.py | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import
from django.contrib import admin
from .models import Page
from .modeladmins import PageAdmin
# -----------------... | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import
from django.contrib import admin
from django.core.exceptions import ImproperlyConfigured
from django.db.models imp... | Abort when the page model does not have a template_key field | Abort when the page model does not have a template_key field
| Python | bsd-3-clause | joshuajonah/feincms,mjl/feincms,matthiask/django-content-editor,matthiask/feincms2-content,feincms/feincms,feincms/feincms,pjdelport/feincms,pjdelport/feincms,mjl/feincms,michaelkuty/feincms,matthiask/django-content-editor,joshuajonah/feincms,nickburlett/feincms,matthiask/feincms2-content,matthiask/django-content-edito... | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import
from django.contrib import admin
from .models import Page
from .modeladmins import PageAdmin
# -----------------... | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import
from django.contrib import admin
from django.core.exceptions import ImproperlyConfigured
from django.db.models imp... | <commit_before># ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import
from django.contrib import admin
from .models import Page
from .modeladmins import PageAdmin
# --... | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import
from django.contrib import admin
from django.core.exceptions import ImproperlyConfigured
from django.db.models imp... | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import
from django.contrib import admin
from .models import Page
from .modeladmins import PageAdmin
# -----------------... | <commit_before># ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import
from django.contrib import admin
from .models import Page
from .modeladmins import PageAdmin
# --... |
2c5650ef41aaf8c116f3922be02e7c5e7a79524b | pychecker/pychecker2/File.py | pychecker/pychecker2/File.py | from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | from pychecker2.util import parents
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | Add more ways to suck line numbers from nodes | Add more ways to suck line numbers from nodes
| Python | bsd-3-clause | smspillaz/pychecker,smspillaz/pychecker,smspillaz/pychecker | from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | from pychecker2.util import parents
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | <commit_before>from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.nam... | from pychecker2.util import parents
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.name, other.name)
... | <commit_before>from pychecker2.util import type_filter
from compiler import ast
class File:
def __init__(self, name):
self.name = name
self.parseTree = None
self.scopes = {}
self.root_scope = None
self.warnings = []
def __cmp__(self, other):
return cmp(self.nam... |
2fb27cf8f4399ec6aba36b86d2993e6c3b81d0ee | coalib/bearlib/languages/__init__.py | coalib/bearlib/languages/__init__.py | """
This directory holds means to get generic information for specific languages.
"""
# Start ignoring PyUnusedCodeBear
from .Language import Language
from .Language import Languages
from .definitions.Unknown import Unknown
from .definitions.C import C
from .definitions.CPP import CPP
from .definitions.CSharp import ... | """
This directory holds means to get generic information for specific languages.
"""
# Start ignoring PyUnusedCodeBear
from .Language import Language
from .Language import Languages
from .definitions.Unknown import Unknown
from .definitions.C import C
from .definitions.CPP import CPP
from .definitions.CSharp import ... | Add definition into default import | Language: Add definition into default import
Fixes https://github.com/coala/coala/issues/4688 | Python | agpl-3.0 | coala/coala,SanketDG/coala,shreyans800755/coala,karansingh1559/coala,kartikeys98/coala,kartikeys98/coala,jayvdb/coala,CruiseDevice/coala,Nosferatul/coala,shreyans800755/coala,aptrishu/coala,nemaniarjun/coala,aptrishu/coala,karansingh1559/coala,jayvdb/coala,rimacone/testing2,Asalle/coala,CruiseDevice/coala,shreyans80075... | """
This directory holds means to get generic information for specific languages.
"""
# Start ignoring PyUnusedCodeBear
from .Language import Language
from .Language import Languages
from .definitions.Unknown import Unknown
from .definitions.C import C
from .definitions.CPP import CPP
from .definitions.CSharp import ... | """
This directory holds means to get generic information for specific languages.
"""
# Start ignoring PyUnusedCodeBear
from .Language import Language
from .Language import Languages
from .definitions.Unknown import Unknown
from .definitions.C import C
from .definitions.CPP import CPP
from .definitions.CSharp import ... | <commit_before>"""
This directory holds means to get generic information for specific languages.
"""
# Start ignoring PyUnusedCodeBear
from .Language import Language
from .Language import Languages
from .definitions.Unknown import Unknown
from .definitions.C import C
from .definitions.CPP import CPP
from .definitions... | """
This directory holds means to get generic information for specific languages.
"""
# Start ignoring PyUnusedCodeBear
from .Language import Language
from .Language import Languages
from .definitions.Unknown import Unknown
from .definitions.C import C
from .definitions.CPP import CPP
from .definitions.CSharp import ... | """
This directory holds means to get generic information for specific languages.
"""
# Start ignoring PyUnusedCodeBear
from .Language import Language
from .Language import Languages
from .definitions.Unknown import Unknown
from .definitions.C import C
from .definitions.CPP import CPP
from .definitions.CSharp import ... | <commit_before>"""
This directory holds means to get generic information for specific languages.
"""
# Start ignoring PyUnusedCodeBear
from .Language import Language
from .Language import Languages
from .definitions.Unknown import Unknown
from .definitions.C import C
from .definitions.CPP import CPP
from .definitions... |
88e61076e3a130d3a8579996966aef2fd6ec43ef | verification/tests.py | verification/tests.py | """
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
TESTS = {
"Basics": [
{
... | """
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
TESTS = {
"Basics": [
{
... | Test category example rename for ordering | Test category example rename for ordering
| Python | mit | cielavenir/checkio-task-painting-wall,cielavenir/checkio-task-painting-wall,cielavenir/checkio-task-painting-wall | """
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
TESTS = {
"Basics": [
{
... | """
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
TESTS = {
"Basics": [
{
... | <commit_before>"""
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
TESTS = {
"Basics": [
... | """
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
TESTS = {
"Basics": [
{
... | """
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
TESTS = {
"Basics": [
{
... | <commit_before>"""
TESTS is a dict with all you tests.
Keys for this will be categories' names.
Each test is dict with
"input" -- input data for user function
"answer" -- your right answer
"explanation" -- not necessary key, it's using for additional info in animation.
"""
TESTS = {
"Basics": [
... |
ac25dd0b2bf3188e1f4325ccdab78e79e7f0a937 | spiceminer/kernel/__init__.py | spiceminer/kernel/__init__.py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from .highlevel import Kernel
# Legacy support (DEPRECATED)
from .legacy_support import *
from ..bodies import get
def load(path='.', recursive=True, followlinks=False):
return Kernel.load(**locals())
def unload(path='.', recursive=True, followlinks=False):
retur... | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from .highlevel import Kernel
def load(path='.', recursive=True, followlinks=False, force_reload=False):
return Kernel.load(**locals())
def load_single(cls, path, extension=None, force_reload=False):
return Kernel.load_single(**locals())
def unload(path='.', recu... | Change the interface of the kernel submodule to prepare for the API change. * Remove legacy support * Add load_single() * Fix missing keyword argument in load() | Change the interface of the kernel submodule to prepare for the API change.
* Remove legacy support
* Add load_single()
* Fix missing keyword argument in load()
| Python | mit | DaRasch/spiceminer,DaRasch/spiceminer | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from .highlevel import Kernel
# Legacy support (DEPRECATED)
from .legacy_support import *
from ..bodies import get
def load(path='.', recursive=True, followlinks=False):
return Kernel.load(**locals())
def unload(path='.', recursive=True, followlinks=False):
retur... | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from .highlevel import Kernel
def load(path='.', recursive=True, followlinks=False, force_reload=False):
return Kernel.load(**locals())
def load_single(cls, path, extension=None, force_reload=False):
return Kernel.load_single(**locals())
def unload(path='.', recu... | <commit_before>#!/usr/bin/env python
#-*- coding:utf-8 -*-
from .highlevel import Kernel
# Legacy support (DEPRECATED)
from .legacy_support import *
from ..bodies import get
def load(path='.', recursive=True, followlinks=False):
return Kernel.load(**locals())
def unload(path='.', recursive=True, followlinks=Fa... | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from .highlevel import Kernel
def load(path='.', recursive=True, followlinks=False, force_reload=False):
return Kernel.load(**locals())
def load_single(cls, path, extension=None, force_reload=False):
return Kernel.load_single(**locals())
def unload(path='.', recu... | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from .highlevel import Kernel
# Legacy support (DEPRECATED)
from .legacy_support import *
from ..bodies import get
def load(path='.', recursive=True, followlinks=False):
return Kernel.load(**locals())
def unload(path='.', recursive=True, followlinks=False):
retur... | <commit_before>#!/usr/bin/env python
#-*- coding:utf-8 -*-
from .highlevel import Kernel
# Legacy support (DEPRECATED)
from .legacy_support import *
from ..bodies import get
def load(path='.', recursive=True, followlinks=False):
return Kernel.load(**locals())
def unload(path='.', recursive=True, followlinks=Fa... |
4a4ee00ef79003ed4d98a3daca9e26cffc91210e | Seeder/class_based_comments/views.py | Seeder/class_based_comments/views.py | import forms
from django.views.generic.edit import CreateView
class CommentView(CreateView):
"""
View for creating and listing comments.
"""
anonymous_comment_form = forms.AnonymousCommentForm
registered_comment_form = forms.RegisteredCommentForm
anonymous_threaded_comment_form = forms.Anonym... | import forms
from django.views.generic.detail import SingleObjectMixin
from django.views.generic.edit import CreateView
from models import Comment
class CommentView(CreateView, SingleObjectMixin):
"""
View for creating and listing comments.
"""
anonymous_comment_form = forms.AnonymousCommentForm
... | Comment view with saving and lists | Comment view with saving and lists
| Python | mit | WebArchivCZ/Seeder,WebArchivCZ/Seeder,WebArchivCZ/Seeder,WebArchivCZ/Seeder,WebArchivCZ/Seeder | import forms
from django.views.generic.edit import CreateView
class CommentView(CreateView):
"""
View for creating and listing comments.
"""
anonymous_comment_form = forms.AnonymousCommentForm
registered_comment_form = forms.RegisteredCommentForm
anonymous_threaded_comment_form = forms.Anonym... | import forms
from django.views.generic.detail import SingleObjectMixin
from django.views.generic.edit import CreateView
from models import Comment
class CommentView(CreateView, SingleObjectMixin):
"""
View for creating and listing comments.
"""
anonymous_comment_form = forms.AnonymousCommentForm
... | <commit_before>import forms
from django.views.generic.edit import CreateView
class CommentView(CreateView):
"""
View for creating and listing comments.
"""
anonymous_comment_form = forms.AnonymousCommentForm
registered_comment_form = forms.RegisteredCommentForm
anonymous_threaded_comment_form... | import forms
from django.views.generic.detail import SingleObjectMixin
from django.views.generic.edit import CreateView
from models import Comment
class CommentView(CreateView, SingleObjectMixin):
"""
View for creating and listing comments.
"""
anonymous_comment_form = forms.AnonymousCommentForm
... | import forms
from django.views.generic.edit import CreateView
class CommentView(CreateView):
"""
View for creating and listing comments.
"""
anonymous_comment_form = forms.AnonymousCommentForm
registered_comment_form = forms.RegisteredCommentForm
anonymous_threaded_comment_form = forms.Anonym... | <commit_before>import forms
from django.views.generic.edit import CreateView
class CommentView(CreateView):
"""
View for creating and listing comments.
"""
anonymous_comment_form = forms.AnonymousCommentForm
registered_comment_form = forms.RegisteredCommentForm
anonymous_threaded_comment_form... |
7ea0e2d8387b622f671638613a476dcbff6438e1 | rest_framework_swagger/urls.py | rest_framework_swagger/urls.py | from django.conf.urls import patterns
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView
urlpatterns = patterns(
'',
url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
url(r'^api-docs/$', SwaggerResourcesView.as_... | from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView
urlpatterns = [
url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
url(r'^api-docs/$', SwaggerResourcesView.as_view(), name="django.swagger.resources.view"),
url... | Use the new style urlpatterns syntax to fix Django deprecation warnings | Use the new style urlpatterns syntax to fix Django deprecation warnings
The `patterns()` syntax is now deprecated:
https://docs.djangoproject.com/en/1.8/releases/1.8/#django-conf-urls-patterns
And so under Django 1.8 results in warnings:
rest_framework_swagger/urls.py:10: RemovedInDjango110Warning:
django.conf.urls.p... | Python | bsd-2-clause | pombredanne/django-rest-swagger,aioTV/django-rest-swagger,cancan101/django-rest-swagger,visasq/django-rest-swagger,aioTV/django-rest-swagger,marcgibbons/django-rest-swagger,marcgibbons/django-rest-swagger,aioTV/django-rest-swagger,cancan101/django-rest-swagger,pombredanne/django-rest-swagger,arc6373/django-rest-swagger... | from django.conf.urls import patterns
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView
urlpatterns = patterns(
'',
url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
url(r'^api-docs/$', SwaggerResourcesView.as_... | from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView
urlpatterns = [
url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
url(r'^api-docs/$', SwaggerResourcesView.as_view(), name="django.swagger.resources.view"),
url... | <commit_before>from django.conf.urls import patterns
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView
urlpatterns = patterns(
'',
url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
url(r'^api-docs/$', SwaggerRe... | from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView
urlpatterns = [
url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
url(r'^api-docs/$', SwaggerResourcesView.as_view(), name="django.swagger.resources.view"),
url... | from django.conf.urls import patterns
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView
urlpatterns = patterns(
'',
url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
url(r'^api-docs/$', SwaggerResourcesView.as_... | <commit_before>from django.conf.urls import patterns
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView
urlpatterns = patterns(
'',
url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
url(r'^api-docs/$', SwaggerRe... |
3724f2895c704df595b083ecc56c56c351b6e32f | runbot_pylint/__openerp__.py | runbot_pylint/__openerp__.py | {
'name': 'Runbot Pylint',
'category': 'Website',
'summary': 'Runbot',
'version': '1.0',
'description': "Runbot",
'author': 'OpenERP SA',
'depends': ['runbot'],
'external_dependencies': {
},
'data': [
"view/runbot_pylint_view.xml"
],
'installable': True,
}
| {
'name': 'Runbot Pylint',
'category': 'Website',
'summary': 'Runbot',
'version': '1.0',
'description': "Runbot",
'author': 'OpenERP SA',
'depends': ['runbot'],
'external_dependencies': {
'bin': ['pylint'],
},
'data': [
"view/runbot_pylint_view.xml"
],
'in... | Add external depedencies to pylint bin | Add external depedencies to pylint bin
| Python | agpl-3.0 | amoya-dx/runbot-addons | {
'name': 'Runbot Pylint',
'category': 'Website',
'summary': 'Runbot',
'version': '1.0',
'description': "Runbot",
'author': 'OpenERP SA',
'depends': ['runbot'],
'external_dependencies': {
},
'data': [
"view/runbot_pylint_view.xml"
],
'installable': True,
}
Add ext... | {
'name': 'Runbot Pylint',
'category': 'Website',
'summary': 'Runbot',
'version': '1.0',
'description': "Runbot",
'author': 'OpenERP SA',
'depends': ['runbot'],
'external_dependencies': {
'bin': ['pylint'],
},
'data': [
"view/runbot_pylint_view.xml"
],
'in... | <commit_before>{
'name': 'Runbot Pylint',
'category': 'Website',
'summary': 'Runbot',
'version': '1.0',
'description': "Runbot",
'author': 'OpenERP SA',
'depends': ['runbot'],
'external_dependencies': {
},
'data': [
"view/runbot_pylint_view.xml"
],
'installable': ... | {
'name': 'Runbot Pylint',
'category': 'Website',
'summary': 'Runbot',
'version': '1.0',
'description': "Runbot",
'author': 'OpenERP SA',
'depends': ['runbot'],
'external_dependencies': {
'bin': ['pylint'],
},
'data': [
"view/runbot_pylint_view.xml"
],
'in... | {
'name': 'Runbot Pylint',
'category': 'Website',
'summary': 'Runbot',
'version': '1.0',
'description': "Runbot",
'author': 'OpenERP SA',
'depends': ['runbot'],
'external_dependencies': {
},
'data': [
"view/runbot_pylint_view.xml"
],
'installable': True,
}
Add ext... | <commit_before>{
'name': 'Runbot Pylint',
'category': 'Website',
'summary': 'Runbot',
'version': '1.0',
'description': "Runbot",
'author': 'OpenERP SA',
'depends': ['runbot'],
'external_dependencies': {
},
'data': [
"view/runbot_pylint_view.xml"
],
'installable': ... |
d4722298a0fc03fca6ef17e246e3ffd74efc4d60 | src/isomorphic_strings.py | src/isomorphic_strings.py | class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
if len(s) != len(t):
return False
charDict = {}
for i, c in enumerate(s):
if c not in charDict.keys() and t[i] not in charDict.values():
... | class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
if len(s) != len(t):
return False
charDict = {}
for i, c in enumerate(s):
if c not in charDict.keys() and t[i] not in charDict.values():
... | Add solution for the isomorphic strings | Add solution for the isomorphic strings
| Python | mit | chancyWu/leetcode | class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
if len(s) != len(t):
return False
charDict = {}
for i, c in enumerate(s):
if c not in charDict.keys() and t[i] not in charDict.values():
... | class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
if len(s) != len(t):
return False
charDict = {}
for i, c in enumerate(s):
if c not in charDict.keys() and t[i] not in charDict.values():
... | <commit_before>class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
if len(s) != len(t):
return False
charDict = {}
for i, c in enumerate(s):
if c not in charDict.keys() and t[i] not in charDict.values... | class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
if len(s) != len(t):
return False
charDict = {}
for i, c in enumerate(s):
if c not in charDict.keys() and t[i] not in charDict.values():
... | class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
if len(s) != len(t):
return False
charDict = {}
for i, c in enumerate(s):
if c not in charDict.keys() and t[i] not in charDict.values():
... | <commit_before>class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
if len(s) != len(t):
return False
charDict = {}
for i, c in enumerate(s):
if c not in charDict.keys() and t[i] not in charDict.values... |
0ac82c9410476efd7494026c7089b8ba650061ad | paintings/urls.py | paintings/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
from paintings.views import GalleryDetailView, PaintingDetailView
admin.autodiscover()
urlpatterns = patterns('',
url( r'^(?P<slug>[\w-]+)/$', GalleryDetailView.as_view(), name='gallery' ),
url( r'^(?P<gallery>\w+)/(?P<slug>[\w-]... | from django.conf.urls import patterns, include, url
from django.contrib import admin
from paintings.views import GalleryDetailView, PaintingDetailView
admin.autodiscover()
urlpatterns = patterns('',
url( r'^(?P<slug>[\w-]+)/$', GalleryDetailView.as_view(), name='gallery' ),
url( r'^(?P<gallery>[\w-]+)/(?P<slug>[\... | Fix bug with dash-separated gallery name | Fix bug with dash-separated gallery name
| Python | mit | hombit/olgart,hombit/olgart,hombit/olgart,hombit/olgart | from django.conf.urls import patterns, include, url
from django.contrib import admin
from paintings.views import GalleryDetailView, PaintingDetailView
admin.autodiscover()
urlpatterns = patterns('',
url( r'^(?P<slug>[\w-]+)/$', GalleryDetailView.as_view(), name='gallery' ),
url( r'^(?P<gallery>\w+)/(?P<slug>[\w-]... | from django.conf.urls import patterns, include, url
from django.contrib import admin
from paintings.views import GalleryDetailView, PaintingDetailView
admin.autodiscover()
urlpatterns = patterns('',
url( r'^(?P<slug>[\w-]+)/$', GalleryDetailView.as_view(), name='gallery' ),
url( r'^(?P<gallery>[\w-]+)/(?P<slug>[\... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
from paintings.views import GalleryDetailView, PaintingDetailView
admin.autodiscover()
urlpatterns = patterns('',
url( r'^(?P<slug>[\w-]+)/$', GalleryDetailView.as_view(), name='gallery' ),
url( r'^(?P<gallery>\w+)... | from django.conf.urls import patterns, include, url
from django.contrib import admin
from paintings.views import GalleryDetailView, PaintingDetailView
admin.autodiscover()
urlpatterns = patterns('',
url( r'^(?P<slug>[\w-]+)/$', GalleryDetailView.as_view(), name='gallery' ),
url( r'^(?P<gallery>[\w-]+)/(?P<slug>[\... | from django.conf.urls import patterns, include, url
from django.contrib import admin
from paintings.views import GalleryDetailView, PaintingDetailView
admin.autodiscover()
urlpatterns = patterns('',
url( r'^(?P<slug>[\w-]+)/$', GalleryDetailView.as_view(), name='gallery' ),
url( r'^(?P<gallery>\w+)/(?P<slug>[\w-]... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
from paintings.views import GalleryDetailView, PaintingDetailView
admin.autodiscover()
urlpatterns = patterns('',
url( r'^(?P<slug>[\w-]+)/$', GalleryDetailView.as_view(), name='gallery' ),
url( r'^(?P<gallery>\w+)... |
b19746badd83190b4e908144d6bc830178445dc2 | cc/license/tests/test_cc_license.py | cc/license/tests/test_cc_license.py | """Tests for functionality within the cc.license module.
This file is a catch-all for tests with no place else to go."""
import cc.license
def test_locales():
locales = cc.license.locales()
for l in locales:
assert type(l) == unicode
for c in ('en', 'de', 'he', 'ja', 'fr'):
assert c in ... | """Tests for functionality within the cc.license module.
This file is a catch-all for tests with no place else to go."""
import cc.license
def test_locales():
locales = cc.license.locales()
for l in locales:
assert type(l) == unicode
for c in ('en', 'de', 'he', 'ja', 'fr'):
assert c in ... | Add test to make sure certain classes are always found in cc.license, no matter where they are internally. | Add test to make sure certain classes are always found in cc.license,
no matter where they are internally.
| Python | mit | creativecommons/cc.license,creativecommons/cc.license | """Tests for functionality within the cc.license module.
This file is a catch-all for tests with no place else to go."""
import cc.license
def test_locales():
locales = cc.license.locales()
for l in locales:
assert type(l) == unicode
for c in ('en', 'de', 'he', 'ja', 'fr'):
assert c in ... | """Tests for functionality within the cc.license module.
This file is a catch-all for tests with no place else to go."""
import cc.license
def test_locales():
locales = cc.license.locales()
for l in locales:
assert type(l) == unicode
for c in ('en', 'de', 'he', 'ja', 'fr'):
assert c in ... | <commit_before>"""Tests for functionality within the cc.license module.
This file is a catch-all for tests with no place else to go."""
import cc.license
def test_locales():
locales = cc.license.locales()
for l in locales:
assert type(l) == unicode
for c in ('en', 'de', 'he', 'ja', 'fr'):
... | """Tests for functionality within the cc.license module.
This file is a catch-all for tests with no place else to go."""
import cc.license
def test_locales():
locales = cc.license.locales()
for l in locales:
assert type(l) == unicode
for c in ('en', 'de', 'he', 'ja', 'fr'):
assert c in ... | """Tests for functionality within the cc.license module.
This file is a catch-all for tests with no place else to go."""
import cc.license
def test_locales():
locales = cc.license.locales()
for l in locales:
assert type(l) == unicode
for c in ('en', 'de', 'he', 'ja', 'fr'):
assert c in ... | <commit_before>"""Tests for functionality within the cc.license module.
This file is a catch-all for tests with no place else to go."""
import cc.license
def test_locales():
locales = cc.license.locales()
for l in locales:
assert type(l) == unicode
for c in ('en', 'de', 'he', 'ja', 'fr'):
... |
0ed7e87a6eeaab56d5c59a7e6874b5a5b0bab314 | tests/test_pointcloud.py | tests/test_pointcloud.py | from simulocloud import PointCloud
import json
import numpy as np
_TEST_XYZ = """[[10.0, 12.2, 14.4, 16.6, 18.8],
[11.1, 13.3, 15.5, 17.7, 19.9],
[0.1, 2.1, 4.5, 6.7, 8.9]]"""
_EXPECTED_POINTS = np.array([( 10. , 11.1, 0.1),
( 12.2, 13.3, 2.1),
... | from simulocloud import PointCloud
import json
import numpy as np
_TEST_XYZ = [[10.0, 12.2, 14.4, 16.6, 18.8],
[11.1, 13.3, 15.5, 17.7, 19.9],
[0.1, 2.1, 4.5, 6.7, 8.9]]
_EXPECTED_POINTS = np.array([( 10. , 11.1, 0.1),
( 12.2, 13.3, 2.1),
... | Write test data as list unless otherwise needed | Write test data as list unless otherwise needed
| Python | mit | stainbank/simulocloud | from simulocloud import PointCloud
import json
import numpy as np
_TEST_XYZ = """[[10.0, 12.2, 14.4, 16.6, 18.8],
[11.1, 13.3, 15.5, 17.7, 19.9],
[0.1, 2.1, 4.5, 6.7, 8.9]]"""
_EXPECTED_POINTS = np.array([( 10. , 11.1, 0.1),
( 12.2, 13.3, 2.1),
... | from simulocloud import PointCloud
import json
import numpy as np
_TEST_XYZ = [[10.0, 12.2, 14.4, 16.6, 18.8],
[11.1, 13.3, 15.5, 17.7, 19.9],
[0.1, 2.1, 4.5, 6.7, 8.9]]
_EXPECTED_POINTS = np.array([( 10. , 11.1, 0.1),
( 12.2, 13.3, 2.1),
... | <commit_before>from simulocloud import PointCloud
import json
import numpy as np
_TEST_XYZ = """[[10.0, 12.2, 14.4, 16.6, 18.8],
[11.1, 13.3, 15.5, 17.7, 19.9],
[0.1, 2.1, 4.5, 6.7, 8.9]]"""
_EXPECTED_POINTS = np.array([( 10. , 11.1, 0.1),
( 12.2, 13.3, ... | from simulocloud import PointCloud
import json
import numpy as np
_TEST_XYZ = [[10.0, 12.2, 14.4, 16.6, 18.8],
[11.1, 13.3, 15.5, 17.7, 19.9],
[0.1, 2.1, 4.5, 6.7, 8.9]]
_EXPECTED_POINTS = np.array([( 10. , 11.1, 0.1),
( 12.2, 13.3, 2.1),
... | from simulocloud import PointCloud
import json
import numpy as np
_TEST_XYZ = """[[10.0, 12.2, 14.4, 16.6, 18.8],
[11.1, 13.3, 15.5, 17.7, 19.9],
[0.1, 2.1, 4.5, 6.7, 8.9]]"""
_EXPECTED_POINTS = np.array([( 10. , 11.1, 0.1),
( 12.2, 13.3, 2.1),
... | <commit_before>from simulocloud import PointCloud
import json
import numpy as np
_TEST_XYZ = """[[10.0, 12.2, 14.4, 16.6, 18.8],
[11.1, 13.3, 15.5, 17.7, 19.9],
[0.1, 2.1, 4.5, 6.7, 8.9]]"""
_EXPECTED_POINTS = np.array([( 10. , 11.1, 0.1),
( 12.2, 13.3, ... |
46b17b2798140c09690e5ae50a50794fd5210237 | xdocker/run_worker.py | xdocker/run_worker.py | from rq import Connection, Queue, Worker
from worker.exceptions import WorkerException
def worker_exc_handler(job, exc_type, exc_value, traceback):
if isinstance(exc_type, WorkerException):
job.meta['exc_code'] = exc_type.code
job.meta['exc_message'] = exc_type.message
return True
def main()... | from rq import Connection, Queue, Worker
from worker.exceptions import WorkerException
def worker_exc_handler(job, exc_type, exc_value, traceback):
if issubclass(exc_type, WorkerException):
job.meta['exc_code'] = exc_type.code
job.meta['exc_message'] = exc_type.message
return True
def main()... | Fix exception subclass in worker exception handler | Fix exception subclass in worker exception handler
| Python | apache-2.0 | XDocker/Engine,XDocker/Engine | from rq import Connection, Queue, Worker
from worker.exceptions import WorkerException
def worker_exc_handler(job, exc_type, exc_value, traceback):
if isinstance(exc_type, WorkerException):
job.meta['exc_code'] = exc_type.code
job.meta['exc_message'] = exc_type.message
return True
def main()... | from rq import Connection, Queue, Worker
from worker.exceptions import WorkerException
def worker_exc_handler(job, exc_type, exc_value, traceback):
if issubclass(exc_type, WorkerException):
job.meta['exc_code'] = exc_type.code
job.meta['exc_message'] = exc_type.message
return True
def main()... | <commit_before>from rq import Connection, Queue, Worker
from worker.exceptions import WorkerException
def worker_exc_handler(job, exc_type, exc_value, traceback):
if isinstance(exc_type, WorkerException):
job.meta['exc_code'] = exc_type.code
job.meta['exc_message'] = exc_type.message
return Tr... | from rq import Connection, Queue, Worker
from worker.exceptions import WorkerException
def worker_exc_handler(job, exc_type, exc_value, traceback):
if issubclass(exc_type, WorkerException):
job.meta['exc_code'] = exc_type.code
job.meta['exc_message'] = exc_type.message
return True
def main()... | from rq import Connection, Queue, Worker
from worker.exceptions import WorkerException
def worker_exc_handler(job, exc_type, exc_value, traceback):
if isinstance(exc_type, WorkerException):
job.meta['exc_code'] = exc_type.code
job.meta['exc_message'] = exc_type.message
return True
def main()... | <commit_before>from rq import Connection, Queue, Worker
from worker.exceptions import WorkerException
def worker_exc_handler(job, exc_type, exc_value, traceback):
if isinstance(exc_type, WorkerException):
job.meta['exc_code'] = exc_type.code
job.meta['exc_message'] = exc_type.message
return Tr... |
c8afee155a27632f85891688c096d2fa2b6988e9 | ckanext/ckanext-apply_permissions_for_service/ckanext/apply_permissions_for_service/logic/auth.py | ckanext/ckanext-apply_permissions_for_service/ckanext/apply_permissions_for_service/logic/auth.py | from ckan.plugins import toolkit
from ckanext.apply_permissions_for_service import model
def service_permission_application_list(context, data_dict):
return {'success': True}
def service_permission_application_show(context, data_dict):
permission_application_id = toolkit.get_or_bust(data_dict, 'id')
ap... | from ckan.plugins import toolkit
from ckanext.apply_permissions_for_service import model
def service_permission_application_list(context, data_dict):
return {'success': True}
def service_permission_application_show(context, data_dict):
permission_application_id = toolkit.get_or_bust(data_dict, 'id')
ap... | Use generator instead of list. | Use generator instead of list.
Co-authored-by: Teemu Erkkola <[email protected]> | Python | mit | vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog | from ckan.plugins import toolkit
from ckanext.apply_permissions_for_service import model
def service_permission_application_list(context, data_dict):
return {'success': True}
def service_permission_application_show(context, data_dict):
permission_application_id = toolkit.get_or_bust(data_dict, 'id')
ap... | from ckan.plugins import toolkit
from ckanext.apply_permissions_for_service import model
def service_permission_application_list(context, data_dict):
return {'success': True}
def service_permission_application_show(context, data_dict):
permission_application_id = toolkit.get_or_bust(data_dict, 'id')
ap... | <commit_before>from ckan.plugins import toolkit
from ckanext.apply_permissions_for_service import model
def service_permission_application_list(context, data_dict):
return {'success': True}
def service_permission_application_show(context, data_dict):
permission_application_id = toolkit.get_or_bust(data_dic... | from ckan.plugins import toolkit
from ckanext.apply_permissions_for_service import model
def service_permission_application_list(context, data_dict):
return {'success': True}
def service_permission_application_show(context, data_dict):
permission_application_id = toolkit.get_or_bust(data_dict, 'id')
ap... | from ckan.plugins import toolkit
from ckanext.apply_permissions_for_service import model
def service_permission_application_list(context, data_dict):
return {'success': True}
def service_permission_application_show(context, data_dict):
permission_application_id = toolkit.get_or_bust(data_dict, 'id')
ap... | <commit_before>from ckan.plugins import toolkit
from ckanext.apply_permissions_for_service import model
def service_permission_application_list(context, data_dict):
return {'success': True}
def service_permission_application_show(context, data_dict):
permission_application_id = toolkit.get_or_bust(data_dic... |
8ce14cfb0044d90f2503a7bd940a7f6401c15db2 | wagtail/admin/rich_text/editors/draftail.py | wagtail/admin/rich_text/editors/draftail.py | from django.forms import widgets
from wagtail.admin.edit_handlers import RichTextFieldPanel
from wagtail.admin.rich_text.converters.contentstate import ContentstateConverter
from wagtail.core.rich_text import features
class DraftailRichTextArea(widgets.Textarea):
# this class's constructor accepts a 'features' k... | import json
from django.forms import Media, widgets
from wagtail.admin.edit_handlers import RichTextFieldPanel
from wagtail.admin.rich_text.converters.contentstate import ContentstateConverter
from wagtail.core.rich_text import features
class DraftailRichTextArea(widgets.Textarea):
# this class's constructor ac... | Integrate Draftail-related assets with Django widget | Integrate Draftail-related assets with Django widget
| Python | bsd-3-clause | mikedingjan/wagtail,kaedroho/wagtail,timorieber/wagtail,mixxorz/wagtail,torchbox/wagtail,gasman/wagtail,gasman/wagtail,wagtail/wagtail,timorieber/wagtail,mixxorz/wagtail,nealtodd/wagtail,nimasmi/wagtail,kaedroho/wagtail,mikedingjan/wagtail,takeflight/wagtail,thenewguy/wagtail,zerolab/wagtail,timorieber/wagtail,thenewgu... | from django.forms import widgets
from wagtail.admin.edit_handlers import RichTextFieldPanel
from wagtail.admin.rich_text.converters.contentstate import ContentstateConverter
from wagtail.core.rich_text import features
class DraftailRichTextArea(widgets.Textarea):
# this class's constructor accepts a 'features' k... | import json
from django.forms import Media, widgets
from wagtail.admin.edit_handlers import RichTextFieldPanel
from wagtail.admin.rich_text.converters.contentstate import ContentstateConverter
from wagtail.core.rich_text import features
class DraftailRichTextArea(widgets.Textarea):
# this class's constructor ac... | <commit_before>from django.forms import widgets
from wagtail.admin.edit_handlers import RichTextFieldPanel
from wagtail.admin.rich_text.converters.contentstate import ContentstateConverter
from wagtail.core.rich_text import features
class DraftailRichTextArea(widgets.Textarea):
# this class's constructor accepts... | import json
from django.forms import Media, widgets
from wagtail.admin.edit_handlers import RichTextFieldPanel
from wagtail.admin.rich_text.converters.contentstate import ContentstateConverter
from wagtail.core.rich_text import features
class DraftailRichTextArea(widgets.Textarea):
# this class's constructor ac... | from django.forms import widgets
from wagtail.admin.edit_handlers import RichTextFieldPanel
from wagtail.admin.rich_text.converters.contentstate import ContentstateConverter
from wagtail.core.rich_text import features
class DraftailRichTextArea(widgets.Textarea):
# this class's constructor accepts a 'features' k... | <commit_before>from django.forms import widgets
from wagtail.admin.edit_handlers import RichTextFieldPanel
from wagtail.admin.rich_text.converters.contentstate import ContentstateConverter
from wagtail.core.rich_text import features
class DraftailRichTextArea(widgets.Textarea):
# this class's constructor accepts... |
3db4d306c779ef3a84133dbbfc5614d514d72411 | pi_gpio/handlers.py | pi_gpio/handlers.py | from flask.ext.restful import fields
from meta import BasicResource
from config.pins import PinHttpManager
from pi_gpio import app
HTTP_MANAGER = PinHttpManager()
class Pin(BasicResource):
def __init__(self):
super(Pin, self).__init__()
self.fields = {
"num": fields.Integer,
... | from flask.ext.restful import fields
from meta import BasicResource
from config.pins import PinHttpManager
from pi_gpio import app
HTTP_MANAGER = PinHttpManager()
class Pin(BasicResource):
def __init__(self):
super(Pin, self).__init__()
self.fields = {
"num": fields.Integer,
... | Add new fields to response | Add new fields to response
| Python | mit | projectweekend/Pi-GPIO-Server,projectweekend/Pi-GPIO-Server,thijstriemstra/Pi-GPIO-Server,projectweekend/Pi-GPIO-Server,thijstriemstra/Pi-GPIO-Server,thijstriemstra/Pi-GPIO-Server,projectweekend/Pi-GPIO-Server,thijstriemstra/Pi-GPIO-Server | from flask.ext.restful import fields
from meta import BasicResource
from config.pins import PinHttpManager
from pi_gpio import app
HTTP_MANAGER = PinHttpManager()
class Pin(BasicResource):
def __init__(self):
super(Pin, self).__init__()
self.fields = {
"num": fields.Integer,
... | from flask.ext.restful import fields
from meta import BasicResource
from config.pins import PinHttpManager
from pi_gpio import app
HTTP_MANAGER = PinHttpManager()
class Pin(BasicResource):
def __init__(self):
super(Pin, self).__init__()
self.fields = {
"num": fields.Integer,
... | <commit_before>from flask.ext.restful import fields
from meta import BasicResource
from config.pins import PinHttpManager
from pi_gpio import app
HTTP_MANAGER = PinHttpManager()
class Pin(BasicResource):
def __init__(self):
super(Pin, self).__init__()
self.fields = {
"num": fields.In... | from flask.ext.restful import fields
from meta import BasicResource
from config.pins import PinHttpManager
from pi_gpio import app
HTTP_MANAGER = PinHttpManager()
class Pin(BasicResource):
def __init__(self):
super(Pin, self).__init__()
self.fields = {
"num": fields.Integer,
... | from flask.ext.restful import fields
from meta import BasicResource
from config.pins import PinHttpManager
from pi_gpio import app
HTTP_MANAGER = PinHttpManager()
class Pin(BasicResource):
def __init__(self):
super(Pin, self).__init__()
self.fields = {
"num": fields.Integer,
... | <commit_before>from flask.ext.restful import fields
from meta import BasicResource
from config.pins import PinHttpManager
from pi_gpio import app
HTTP_MANAGER = PinHttpManager()
class Pin(BasicResource):
def __init__(self):
super(Pin, self).__init__()
self.fields = {
"num": fields.In... |
afef9c39ab98ef6614b0fe5103db4e641a9f0d6e | grapheneapi/aio/websocket.py | grapheneapi/aio/websocket.py | # -*- coding: utf-8 -*-
import asyncio
import websockets
import logging
import json
from jsonrpcclient.clients.websockets_client import WebSocketsClient
from .rpc import Rpc
log = logging.getLogger(__name__)
class Websocket(Rpc):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
... | # -*- coding: utf-8 -*-
import asyncio
import websockets
import logging
import json
from jsonrpcclient.clients.websockets_client import WebSocketsClient
from jsonrpcclient.exceptions import ReceivedErrorResponseError
from .rpc import Rpc
log = logging.getLogger(__name__)
class Websocket(Rpc):
def __init__(self... | Fix aio RPC error extraction | Fix aio RPC error extraction
| Python | mit | xeroc/python-graphenelib | # -*- coding: utf-8 -*-
import asyncio
import websockets
import logging
import json
from jsonrpcclient.clients.websockets_client import WebSocketsClient
from .rpc import Rpc
log = logging.getLogger(__name__)
class Websocket(Rpc):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
... | # -*- coding: utf-8 -*-
import asyncio
import websockets
import logging
import json
from jsonrpcclient.clients.websockets_client import WebSocketsClient
from jsonrpcclient.exceptions import ReceivedErrorResponseError
from .rpc import Rpc
log = logging.getLogger(__name__)
class Websocket(Rpc):
def __init__(self... | <commit_before># -*- coding: utf-8 -*-
import asyncio
import websockets
import logging
import json
from jsonrpcclient.clients.websockets_client import WebSocketsClient
from .rpc import Rpc
log = logging.getLogger(__name__)
class Websocket(Rpc):
def __init__(self, *args, **kwargs):
super().__init__(*arg... | # -*- coding: utf-8 -*-
import asyncio
import websockets
import logging
import json
from jsonrpcclient.clients.websockets_client import WebSocketsClient
from jsonrpcclient.exceptions import ReceivedErrorResponseError
from .rpc import Rpc
log = logging.getLogger(__name__)
class Websocket(Rpc):
def __init__(self... | # -*- coding: utf-8 -*-
import asyncio
import websockets
import logging
import json
from jsonrpcclient.clients.websockets_client import WebSocketsClient
from .rpc import Rpc
log = logging.getLogger(__name__)
class Websocket(Rpc):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
... | <commit_before># -*- coding: utf-8 -*-
import asyncio
import websockets
import logging
import json
from jsonrpcclient.clients.websockets_client import WebSocketsClient
from .rpc import Rpc
log = logging.getLogger(__name__)
class Websocket(Rpc):
def __init__(self, *args, **kwargs):
super().__init__(*arg... |
23bbb5737602408ba553b77810103d7b32140c89 | test.py | test.py | #!/usr/bin/env python
import neukrill_net.utils as utils
import neukrill_net.image_processing as image_processing
import csv
import pickle
from sklearn.externals import joblib
import numpy as np
import glob
import os
def main():
settings = utils.Settings('settings.json')
image_fname_dict = settings.image_fn... | #!/usr/bin/env python
import neukrill_net.utils as utils
import neukrill_net.image_processing as image_processing
import csv
import pickle
from sklearn.externals import joblib
import numpy as np
import glob
import os
def main():
settings = utils.Settings('settings.json')
image_fname_dict = settings.image_fn... | Swap to using submission prediction writer function | Swap to using submission prediction writer function
| Python | mit | Neuroglycerin/neukrill-net-work,Neuroglycerin/neukrill-net-work,Neuroglycerin/neukrill-net-work | #!/usr/bin/env python
import neukrill_net.utils as utils
import neukrill_net.image_processing as image_processing
import csv
import pickle
from sklearn.externals import joblib
import numpy as np
import glob
import os
def main():
settings = utils.Settings('settings.json')
image_fname_dict = settings.image_fn... | #!/usr/bin/env python
import neukrill_net.utils as utils
import neukrill_net.image_processing as image_processing
import csv
import pickle
from sklearn.externals import joblib
import numpy as np
import glob
import os
def main():
settings = utils.Settings('settings.json')
image_fname_dict = settings.image_fn... | <commit_before>#!/usr/bin/env python
import neukrill_net.utils as utils
import neukrill_net.image_processing as image_processing
import csv
import pickle
from sklearn.externals import joblib
import numpy as np
import glob
import os
def main():
settings = utils.Settings('settings.json')
image_fname_dict = se... | #!/usr/bin/env python
import neukrill_net.utils as utils
import neukrill_net.image_processing as image_processing
import csv
import pickle
from sklearn.externals import joblib
import numpy as np
import glob
import os
def main():
settings = utils.Settings('settings.json')
image_fname_dict = settings.image_fn... | #!/usr/bin/env python
import neukrill_net.utils as utils
import neukrill_net.image_processing as image_processing
import csv
import pickle
from sklearn.externals import joblib
import numpy as np
import glob
import os
def main():
settings = utils.Settings('settings.json')
image_fname_dict = settings.image_fn... | <commit_before>#!/usr/bin/env python
import neukrill_net.utils as utils
import neukrill_net.image_processing as image_processing
import csv
import pickle
from sklearn.externals import joblib
import numpy as np
import glob
import os
def main():
settings = utils.Settings('settings.json')
image_fname_dict = se... |
17ae37bbc42c9e0f8633eec8fe9b49defb647191 | sjkscan/logging.py | sjkscan/logging.py | import logging
def init_logging():
"""Initialise logging.
Set up basic logging.
"""
logging.basicConfig(
level=logging.DEBUG,
datefmt='%Y-%m-%d %H:%M:%S',
format='%(asctime)s %(message)s',
)
logging.debug('Initialising logging')
| import logging
def init_logging():
"""Initialise logging.
Set up basic logging.
"""
logging.basicConfig(
level=logging.DEBUG,
datefmt='%Y-%m-%d %H:%M:%S',
format='%(asctime)s [%(levelname)s] %(message)s',
)
logging.debug('Initialising logging')
| Add levelname to log output | Add levelname to log output
| Python | bsd-2-clause | sjktje/sjkscan,sjktje/sjkscan | import logging
def init_logging():
"""Initialise logging.
Set up basic logging.
"""
logging.basicConfig(
level=logging.DEBUG,
datefmt='%Y-%m-%d %H:%M:%S',
format='%(asctime)s %(message)s',
)
logging.debug('Initialising logging')
Add levelname to log output | import logging
def init_logging():
"""Initialise logging.
Set up basic logging.
"""
logging.basicConfig(
level=logging.DEBUG,
datefmt='%Y-%m-%d %H:%M:%S',
format='%(asctime)s [%(levelname)s] %(message)s',
)
logging.debug('Initialising logging')
| <commit_before>import logging
def init_logging():
"""Initialise logging.
Set up basic logging.
"""
logging.basicConfig(
level=logging.DEBUG,
datefmt='%Y-%m-%d %H:%M:%S',
format='%(asctime)s %(message)s',
)
logging.debug('Initialising logging')
<commit_msg>Add levelname... | import logging
def init_logging():
"""Initialise logging.
Set up basic logging.
"""
logging.basicConfig(
level=logging.DEBUG,
datefmt='%Y-%m-%d %H:%M:%S',
format='%(asctime)s [%(levelname)s] %(message)s',
)
logging.debug('Initialising logging')
| import logging
def init_logging():
"""Initialise logging.
Set up basic logging.
"""
logging.basicConfig(
level=logging.DEBUG,
datefmt='%Y-%m-%d %H:%M:%S',
format='%(asctime)s %(message)s',
)
logging.debug('Initialising logging')
Add levelname to log outputimport loggin... | <commit_before>import logging
def init_logging():
"""Initialise logging.
Set up basic logging.
"""
logging.basicConfig(
level=logging.DEBUG,
datefmt='%Y-%m-%d %H:%M:%S',
format='%(asctime)s %(message)s',
)
logging.debug('Initialising logging')
<commit_msg>Add levelname... |
9a19da30a933bc2872b9fc5b5966823c43e1982f | website/pages/tests.py | website/pages/tests.py | # -*- coding: utf-8 -*-
"""
File: tests.py
Creator: MazeFX
Date: 12-7-2016
Tests written for testing main website pages (home, about, contact, etc)
"""
from django.core.urlresolvers import resolve
from django.test import TestCase
from django.http import HttpRequest
from django.template.loader import render_to_string... | # -*- coding: utf-8 -*-
"""
File: tests.py
Creator: MazeFX
Date: 12-7-2016
Tests written for testing main website pages (home, about, contact, etc)
Contact page has the ability to send emails through anymail/mailgun.
"""
from django.core.urlresolvers import resolve
from django.test import TestCase
from django.http ... | Change send email to contact namespace | Change send email to contact namespace | Python | mit | MazeFX/cookiecutter_website_project,MazeFX/cookiecutter_website_project,MazeFX/cookiecutter_website_project,MazeFX/cookiecutter_website_project | # -*- coding: utf-8 -*-
"""
File: tests.py
Creator: MazeFX
Date: 12-7-2016
Tests written for testing main website pages (home, about, contact, etc)
"""
from django.core.urlresolvers import resolve
from django.test import TestCase
from django.http import HttpRequest
from django.template.loader import render_to_string... | # -*- coding: utf-8 -*-
"""
File: tests.py
Creator: MazeFX
Date: 12-7-2016
Tests written for testing main website pages (home, about, contact, etc)
Contact page has the ability to send emails through anymail/mailgun.
"""
from django.core.urlresolvers import resolve
from django.test import TestCase
from django.http ... | <commit_before># -*- coding: utf-8 -*-
"""
File: tests.py
Creator: MazeFX
Date: 12-7-2016
Tests written for testing main website pages (home, about, contact, etc)
"""
from django.core.urlresolvers import resolve
from django.test import TestCase
from django.http import HttpRequest
from django.template.loader import r... | # -*- coding: utf-8 -*-
"""
File: tests.py
Creator: MazeFX
Date: 12-7-2016
Tests written for testing main website pages (home, about, contact, etc)
Contact page has the ability to send emails through anymail/mailgun.
"""
from django.core.urlresolvers import resolve
from django.test import TestCase
from django.http ... | # -*- coding: utf-8 -*-
"""
File: tests.py
Creator: MazeFX
Date: 12-7-2016
Tests written for testing main website pages (home, about, contact, etc)
"""
from django.core.urlresolvers import resolve
from django.test import TestCase
from django.http import HttpRequest
from django.template.loader import render_to_string... | <commit_before># -*- coding: utf-8 -*-
"""
File: tests.py
Creator: MazeFX
Date: 12-7-2016
Tests written for testing main website pages (home, about, contact, etc)
"""
from django.core.urlresolvers import resolve
from django.test import TestCase
from django.http import HttpRequest
from django.template.loader import r... |
f185f04f6efdabe161ae29ba72f7208b8adccc41 | bulletin/tools/plugins/models.py | bulletin/tools/plugins/models.py | from django.db import models
from bulletin.models import Post
class Event(Post):
start_date = models.DateTimeField()
end_date = models.DateTimeField(null=True, blank=True)
time = models.CharField(max_length=255,
null=True, blank=True)
organization = models.CharField(max_l... | from django.db import models
from bulletin.models import Post
class Event(Post):
start_date = models.DateTimeField()
end_date = models.DateTimeField(null=True, blank=True)
time = models.CharField(max_length=255,
null=True, blank=True)
organization = models.CharField(max_l... | Set verbose name of NewResource. | Set verbose name of NewResource.
| Python | mit | AASHE/django-bulletin,AASHE/django-bulletin,AASHE/django-bulletin | from django.db import models
from bulletin.models import Post
class Event(Post):
start_date = models.DateTimeField()
end_date = models.DateTimeField(null=True, blank=True)
time = models.CharField(max_length=255,
null=True, blank=True)
organization = models.CharField(max_l... | from django.db import models
from bulletin.models import Post
class Event(Post):
start_date = models.DateTimeField()
end_date = models.DateTimeField(null=True, blank=True)
time = models.CharField(max_length=255,
null=True, blank=True)
organization = models.CharField(max_l... | <commit_before>from django.db import models
from bulletin.models import Post
class Event(Post):
start_date = models.DateTimeField()
end_date = models.DateTimeField(null=True, blank=True)
time = models.CharField(max_length=255,
null=True, blank=True)
organization = models.... | from django.db import models
from bulletin.models import Post
class Event(Post):
start_date = models.DateTimeField()
end_date = models.DateTimeField(null=True, blank=True)
time = models.CharField(max_length=255,
null=True, blank=True)
organization = models.CharField(max_l... | from django.db import models
from bulletin.models import Post
class Event(Post):
start_date = models.DateTimeField()
end_date = models.DateTimeField(null=True, blank=True)
time = models.CharField(max_length=255,
null=True, blank=True)
organization = models.CharField(max_l... | <commit_before>from django.db import models
from bulletin.models import Post
class Event(Post):
start_date = models.DateTimeField()
end_date = models.DateTimeField(null=True, blank=True)
time = models.CharField(max_length=255,
null=True, blank=True)
organization = models.... |
4641b9a1b9a79fdeb0aaa3264de7bd1703b1d1fa | alexandria/web.py | alexandria/web.py | from alexandria import app, mongo
from decorators import *
from flask import render_template, request, jsonify, g, send_from_directory, redirect, url_for, session, flash
import os
import shutil
import requests
from pymongo import MongoClient
from functools import wraps
import bcrypt
from bson.objectid import ObjectId
... | from alexandria import app, mongo
from decorators import *
from flask import render_template, request, jsonify, g, send_from_directory, redirect, url_for, session, flash
import os
import shutil
import requests
from pymongo import MongoClient
from functools import wraps
import bcrypt
from bson.objectid import ObjectId
... | Fix return on active user accessing the portal | Fix return on active user accessing the portal
| Python | mit | citruspi/Alexandria,citruspi/Alexandria | from alexandria import app, mongo
from decorators import *
from flask import render_template, request, jsonify, g, send_from_directory, redirect, url_for, session, flash
import os
import shutil
import requests
from pymongo import MongoClient
from functools import wraps
import bcrypt
from bson.objectid import ObjectId
... | from alexandria import app, mongo
from decorators import *
from flask import render_template, request, jsonify, g, send_from_directory, redirect, url_for, session, flash
import os
import shutil
import requests
from pymongo import MongoClient
from functools import wraps
import bcrypt
from bson.objectid import ObjectId
... | <commit_before>from alexandria import app, mongo
from decorators import *
from flask import render_template, request, jsonify, g, send_from_directory, redirect, url_for, session, flash
import os
import shutil
import requests
from pymongo import MongoClient
from functools import wraps
import bcrypt
from bson.objectid im... | from alexandria import app, mongo
from decorators import *
from flask import render_template, request, jsonify, g, send_from_directory, redirect, url_for, session, flash
import os
import shutil
import requests
from pymongo import MongoClient
from functools import wraps
import bcrypt
from bson.objectid import ObjectId
... | from alexandria import app, mongo
from decorators import *
from flask import render_template, request, jsonify, g, send_from_directory, redirect, url_for, session, flash
import os
import shutil
import requests
from pymongo import MongoClient
from functools import wraps
import bcrypt
from bson.objectid import ObjectId
... | <commit_before>from alexandria import app, mongo
from decorators import *
from flask import render_template, request, jsonify, g, send_from_directory, redirect, url_for, session, flash
import os
import shutil
import requests
from pymongo import MongoClient
from functools import wraps
import bcrypt
from bson.objectid im... |
e3928f489f481c9e44c634d7ee98afc5425b4432 | tests/test_yaml_utils.py | tests/test_yaml_utils.py | import pytest
from apispec import yaml_utils
def test_load_yaml_from_docstring():
def f():
"""
Foo
bar
baz quux
---
herp: 1
derp: 2
"""
result = yaml_utils.load_yaml_from_docstring(f.__doc__)
assert result == {"herp": 1, "derp": 2}
... | import pytest
from apispec import yaml_utils
def test_load_yaml_from_docstring():
def f():
"""
Foo
bar
baz quux
---
herp: 1
derp: 2
"""
result = yaml_utils.load_yaml_from_docstring(f.__doc__)
assert result == {"herp": 1, "derp": 2}
... | Add regression test for generating yaml with unicode | Add regression test for generating yaml with unicode
| Python | mit | marshmallow-code/smore,marshmallow-code/apispec | import pytest
from apispec import yaml_utils
def test_load_yaml_from_docstring():
def f():
"""
Foo
bar
baz quux
---
herp: 1
derp: 2
"""
result = yaml_utils.load_yaml_from_docstring(f.__doc__)
assert result == {"herp": 1, "derp": 2}
... | import pytest
from apispec import yaml_utils
def test_load_yaml_from_docstring():
def f():
"""
Foo
bar
baz quux
---
herp: 1
derp: 2
"""
result = yaml_utils.load_yaml_from_docstring(f.__doc__)
assert result == {"herp": 1, "derp": 2}
... | <commit_before>import pytest
from apispec import yaml_utils
def test_load_yaml_from_docstring():
def f():
"""
Foo
bar
baz quux
---
herp: 1
derp: 2
"""
result = yaml_utils.load_yaml_from_docstring(f.__doc__)
assert result == {"herp":... | import pytest
from apispec import yaml_utils
def test_load_yaml_from_docstring():
def f():
"""
Foo
bar
baz quux
---
herp: 1
derp: 2
"""
result = yaml_utils.load_yaml_from_docstring(f.__doc__)
assert result == {"herp": 1, "derp": 2}
... | import pytest
from apispec import yaml_utils
def test_load_yaml_from_docstring():
def f():
"""
Foo
bar
baz quux
---
herp: 1
derp: 2
"""
result = yaml_utils.load_yaml_from_docstring(f.__doc__)
assert result == {"herp": 1, "derp": 2}
... | <commit_before>import pytest
from apispec import yaml_utils
def test_load_yaml_from_docstring():
def f():
"""
Foo
bar
baz quux
---
herp: 1
derp: 2
"""
result = yaml_utils.load_yaml_from_docstring(f.__doc__)
assert result == {"herp":... |
c380c328b43f399f4d614486c53163709170f33b | cob/celery/app.py | cob/celery/app.py | from celery import Celery
from celery.loaders.base import BaseLoader
class CobLoader(BaseLoader):
def on_worker_init(self):
from ..app import build_app
# this will make the tasks grains to be properly loaded and discovered
build_app()
celery_app = Celery('cob-celery', backend='rpc://',... | from celery import Celery
from celery.loaders.base import BaseLoader
from logbook.compat import LoggingHandler
class CobLoader(BaseLoader):
def on_worker_init(self):
from ..app import build_app
# this will make the tasks grains to be properly loaded and discovered
LoggingHandler(level=lo... | Use LoggingHandler in Celery worker to emit logs from workers | Use LoggingHandler in Celery worker to emit logs from workers
| Python | bsd-3-clause | getweber/weber-cli | from celery import Celery
from celery.loaders.base import BaseLoader
class CobLoader(BaseLoader):
def on_worker_init(self):
from ..app import build_app
# this will make the tasks grains to be properly loaded and discovered
build_app()
celery_app = Celery('cob-celery', backend='rpc://',... | from celery import Celery
from celery.loaders.base import BaseLoader
from logbook.compat import LoggingHandler
class CobLoader(BaseLoader):
def on_worker_init(self):
from ..app import build_app
# this will make the tasks grains to be properly loaded and discovered
LoggingHandler(level=lo... | <commit_before>from celery import Celery
from celery.loaders.base import BaseLoader
class CobLoader(BaseLoader):
def on_worker_init(self):
from ..app import build_app
# this will make the tasks grains to be properly loaded and discovered
build_app()
celery_app = Celery('cob-celery', ba... | from celery import Celery
from celery.loaders.base import BaseLoader
from logbook.compat import LoggingHandler
class CobLoader(BaseLoader):
def on_worker_init(self):
from ..app import build_app
# this will make the tasks grains to be properly loaded and discovered
LoggingHandler(level=lo... | from celery import Celery
from celery.loaders.base import BaseLoader
class CobLoader(BaseLoader):
def on_worker_init(self):
from ..app import build_app
# this will make the tasks grains to be properly loaded and discovered
build_app()
celery_app = Celery('cob-celery', backend='rpc://',... | <commit_before>from celery import Celery
from celery.loaders.base import BaseLoader
class CobLoader(BaseLoader):
def on_worker_init(self):
from ..app import build_app
# this will make the tasks grains to be properly loaded and discovered
build_app()
celery_app = Celery('cob-celery', ba... |
baf09f8b308626abb81431ddca4498409fc9d5ce | campaigns/tests/test_views.py | campaigns/tests/test_views.py | from django.test import TestCase
from django.http import HttpRequest
from campaigns.views import create_campaign
from campaigns.models import Campaign
from campaigns.forms import CampaignForm
class HomePageTest(TestCase):
def test_does_root_url_resolves_the_home_page(self):
called = self.client.get('/')
self.ass... | from django.test import TestCase
from django.http import HttpRequest
from campaigns.views import create_campaign
from campaigns.models import Campaign
from campaigns.forms import CampaignForm
def make_POST_request(titleValue, descriptionValue):
request = HttpRequest()
request.method = 'POST'
request.POST['title'] =... | Refactor some redundancy in the views tests | Refactor some redundancy in the views tests
| Python | apache-2.0 | Springsteen/tues_admission,Springsteen/tues_admission,Springsteen/tues_admission,Springsteen/tues_admission | from django.test import TestCase
from django.http import HttpRequest
from campaigns.views import create_campaign
from campaigns.models import Campaign
from campaigns.forms import CampaignForm
class HomePageTest(TestCase):
def test_does_root_url_resolves_the_home_page(self):
called = self.client.get('/')
self.ass... | from django.test import TestCase
from django.http import HttpRequest
from campaigns.views import create_campaign
from campaigns.models import Campaign
from campaigns.forms import CampaignForm
def make_POST_request(titleValue, descriptionValue):
request = HttpRequest()
request.method = 'POST'
request.POST['title'] =... | <commit_before>from django.test import TestCase
from django.http import HttpRequest
from campaigns.views import create_campaign
from campaigns.models import Campaign
from campaigns.forms import CampaignForm
class HomePageTest(TestCase):
def test_does_root_url_resolves_the_home_page(self):
called = self.client.get(... | from django.test import TestCase
from django.http import HttpRequest
from campaigns.views import create_campaign
from campaigns.models import Campaign
from campaigns.forms import CampaignForm
def make_POST_request(titleValue, descriptionValue):
request = HttpRequest()
request.method = 'POST'
request.POST['title'] =... | from django.test import TestCase
from django.http import HttpRequest
from campaigns.views import create_campaign
from campaigns.models import Campaign
from campaigns.forms import CampaignForm
class HomePageTest(TestCase):
def test_does_root_url_resolves_the_home_page(self):
called = self.client.get('/')
self.ass... | <commit_before>from django.test import TestCase
from django.http import HttpRequest
from campaigns.views import create_campaign
from campaigns.models import Campaign
from campaigns.forms import CampaignForm
class HomePageTest(TestCase):
def test_does_root_url_resolves_the_home_page(self):
called = self.client.get(... |
2ca6f765a3bd1eca6bd255f9c679c9fbea78484a | run_maya_tests.py | run_maya_tests.py | """Use Mayapy for testing
Usage:
$ mayapy run_maya_tests.py
"""
import sys
import nose
import warnings
from nose_exclude import NoseExclude
warnings.filterwarnings("ignore", category=DeprecationWarning)
if __name__ == "__main__":
from maya import standalone
standalone.initialize()
argv = sys.argv... | """Use Mayapy for testing
Usage:
$ mayapy run_maya_tests.py
"""
import sys
import nose
import logging
import warnings
from nose_exclude import NoseExclude
warnings.filterwarnings("ignore", category=DeprecationWarning)
if __name__ == "__main__":
from maya import standalone
standalone.initialize()
... | Enhance readability of test output | Enhance readability of test output
| Python | mit | MoonShineVFX/core,mindbender-studio/core,MoonShineVFX/core,mindbender-studio/core,getavalon/core,getavalon/core | """Use Mayapy for testing
Usage:
$ mayapy run_maya_tests.py
"""
import sys
import nose
import warnings
from nose_exclude import NoseExclude
warnings.filterwarnings("ignore", category=DeprecationWarning)
if __name__ == "__main__":
from maya import standalone
standalone.initialize()
argv = sys.argv... | """Use Mayapy for testing
Usage:
$ mayapy run_maya_tests.py
"""
import sys
import nose
import logging
import warnings
from nose_exclude import NoseExclude
warnings.filterwarnings("ignore", category=DeprecationWarning)
if __name__ == "__main__":
from maya import standalone
standalone.initialize()
... | <commit_before>"""Use Mayapy for testing
Usage:
$ mayapy run_maya_tests.py
"""
import sys
import nose
import warnings
from nose_exclude import NoseExclude
warnings.filterwarnings("ignore", category=DeprecationWarning)
if __name__ == "__main__":
from maya import standalone
standalone.initialize()
... | """Use Mayapy for testing
Usage:
$ mayapy run_maya_tests.py
"""
import sys
import nose
import logging
import warnings
from nose_exclude import NoseExclude
warnings.filterwarnings("ignore", category=DeprecationWarning)
if __name__ == "__main__":
from maya import standalone
standalone.initialize()
... | """Use Mayapy for testing
Usage:
$ mayapy run_maya_tests.py
"""
import sys
import nose
import warnings
from nose_exclude import NoseExclude
warnings.filterwarnings("ignore", category=DeprecationWarning)
if __name__ == "__main__":
from maya import standalone
standalone.initialize()
argv = sys.argv... | <commit_before>"""Use Mayapy for testing
Usage:
$ mayapy run_maya_tests.py
"""
import sys
import nose
import warnings
from nose_exclude import NoseExclude
warnings.filterwarnings("ignore", category=DeprecationWarning)
if __name__ == "__main__":
from maya import standalone
standalone.initialize()
... |
6578b6d2dfca38940be278d82e4f8d8248ae3c79 | convert_codecs.py | convert_codecs.py | #!/usr/env python
# -*- coding: utf-8 -*-
"""Convert file codecs
Usage:
convert_codecs.py <sourceFile> <targetFile> <sourceEncoding> <targetEncoding>
convert_codecs.py (-h | --help)
"""
import codecs
from docopt import docopt
__version__ = '0.1'
__author__ = 'Honghe'
BLOCKSIZE = 1024**2 # size in bytes
d... | #!/usr/env python
# -*- coding: utf-8 -*-
"""Convert file codecs
Usage:
convert_codecs.py <sourceFile> <targetFile> <sourceEncoding> <targetEncoding>
convert_codecs.py (-h | --help)
"""
import codecs
from docopt import docopt
__version__ = '0.1'
__author__ = 'Honghe'
BLOCKSIZE = 1024 # number of character... | Correct the comment of BLOCKSIZE | Correct the comment of BLOCKSIZE
| Python | apache-2.0 | Honghe/convert_codecs | #!/usr/env python
# -*- coding: utf-8 -*-
"""Convert file codecs
Usage:
convert_codecs.py <sourceFile> <targetFile> <sourceEncoding> <targetEncoding>
convert_codecs.py (-h | --help)
"""
import codecs
from docopt import docopt
__version__ = '0.1'
__author__ = 'Honghe'
BLOCKSIZE = 1024**2 # size in bytes
d... | #!/usr/env python
# -*- coding: utf-8 -*-
"""Convert file codecs
Usage:
convert_codecs.py <sourceFile> <targetFile> <sourceEncoding> <targetEncoding>
convert_codecs.py (-h | --help)
"""
import codecs
from docopt import docopt
__version__ = '0.1'
__author__ = 'Honghe'
BLOCKSIZE = 1024 # number of character... | <commit_before>#!/usr/env python
# -*- coding: utf-8 -*-
"""Convert file codecs
Usage:
convert_codecs.py <sourceFile> <targetFile> <sourceEncoding> <targetEncoding>
convert_codecs.py (-h | --help)
"""
import codecs
from docopt import docopt
__version__ = '0.1'
__author__ = 'Honghe'
BLOCKSIZE = 1024**2 # s... | #!/usr/env python
# -*- coding: utf-8 -*-
"""Convert file codecs
Usage:
convert_codecs.py <sourceFile> <targetFile> <sourceEncoding> <targetEncoding>
convert_codecs.py (-h | --help)
"""
import codecs
from docopt import docopt
__version__ = '0.1'
__author__ = 'Honghe'
BLOCKSIZE = 1024 # number of character... | #!/usr/env python
# -*- coding: utf-8 -*-
"""Convert file codecs
Usage:
convert_codecs.py <sourceFile> <targetFile> <sourceEncoding> <targetEncoding>
convert_codecs.py (-h | --help)
"""
import codecs
from docopt import docopt
__version__ = '0.1'
__author__ = 'Honghe'
BLOCKSIZE = 1024**2 # size in bytes
d... | <commit_before>#!/usr/env python
# -*- coding: utf-8 -*-
"""Convert file codecs
Usage:
convert_codecs.py <sourceFile> <targetFile> <sourceEncoding> <targetEncoding>
convert_codecs.py (-h | --help)
"""
import codecs
from docopt import docopt
__version__ = '0.1'
__author__ = 'Honghe'
BLOCKSIZE = 1024**2 # s... |
e0b2ac4b71859708f4b35ae8ef7227b630a6e2d9 | ctypeslib/test/test_toolchain.py | ctypeslib/test/test_toolchain.py | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test_windows(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | Add a test for stdio.h. | Add a test for stdio.h. | Python | mit | sugarmanz/ctypeslib | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test_windows(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | <commit_before>import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test_windows(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... | <commit_before>import unittest
import sys
from ctypeslib import h2xml, xml2py
class ToolchainTest(unittest.TestCase):
if sys.platform == "win32":
def test(self):
h2xml.main(["h2xml", "-q",
"-D WIN32_LEAN_AND_MEAN",
"-D _UNICODE", "-D UNICODE",
... |
649bea9ce3ebaf4ba44919097b731ba915703852 | alembic/versions/30d0a626888_add_username.py | alembic/versions/30d0a626888_add_username.py | """Add username
Revision ID: 30d0a626888
Revises: 51375067b45
Create Date: 2015-10-29 10:32:03.077400
"""
# revision identifiers, used by Alembic.
revision = '30d0a626888'
down_revision = '51375067b45'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_... | """Add username
Revision ID: 30d0a626888
Revises: 51375067b45
Create Date: 2015-10-29 10:32:03.077400
"""
# revision identifiers, used by Alembic.
revision = '30d0a626888'
down_revision = '51375067b45'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
"""
... | Add generate sql example as comment | Add generate sql example as comment
| Python | apache-2.0 | SkygearIO/skygear-server,rickmak/skygear-server,rickmak/skygear-server,SkygearIO/skygear-server,rickmak/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server | """Add username
Revision ID: 30d0a626888
Revises: 51375067b45
Create Date: 2015-10-29 10:32:03.077400
"""
# revision identifiers, used by Alembic.
revision = '30d0a626888'
down_revision = '51375067b45'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_... | """Add username
Revision ID: 30d0a626888
Revises: 51375067b45
Create Date: 2015-10-29 10:32:03.077400
"""
# revision identifiers, used by Alembic.
revision = '30d0a626888'
down_revision = '51375067b45'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
"""
... | <commit_before>"""Add username
Revision ID: 30d0a626888
Revises: 51375067b45
Create Date: 2015-10-29 10:32:03.077400
"""
# revision identifiers, used by Alembic.
revision = '30d0a626888'
down_revision = '51375067b45'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade... | """Add username
Revision ID: 30d0a626888
Revises: 51375067b45
Create Date: 2015-10-29 10:32:03.077400
"""
# revision identifiers, used by Alembic.
revision = '30d0a626888'
down_revision = '51375067b45'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
"""
... | """Add username
Revision ID: 30d0a626888
Revises: 51375067b45
Create Date: 2015-10-29 10:32:03.077400
"""
# revision identifiers, used by Alembic.
revision = '30d0a626888'
down_revision = '51375067b45'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_... | <commit_before>"""Add username
Revision ID: 30d0a626888
Revises: 51375067b45
Create Date: 2015-10-29 10:32:03.077400
"""
# revision identifiers, used by Alembic.
revision = '30d0a626888'
down_revision = '51375067b45'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade... |
281a096cea735845bdb74d60abf14f1422f2c624 | test_runner/executable.py | test_runner/executable.py | import argh
from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter
LOG = Reporter(__name__).setup()
def main(endpoint, username='admin', password='secrete', test_path='api'):
environment = Environment(username, password, endpoint)
with cleanup(environment... | import argh
from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter
LOG = Reporter(__name__).setup()
def main(endpoint, username='admin', password='secrete', test_path='api'):
environment = Environment(username, password, endpoint)
with cleanup(environment... | Move command dispatch into full module | Move command dispatch into full module
| Python | mit | rcbops-qa/test_runner | import argh
from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter
LOG = Reporter(__name__).setup()
def main(endpoint, username='admin', password='secrete', test_path='api'):
environment = Environment(username, password, endpoint)
with cleanup(environment... | import argh
from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter
LOG = Reporter(__name__).setup()
def main(endpoint, username='admin', password='secrete', test_path='api'):
environment = Environment(username, password, endpoint)
with cleanup(environment... | <commit_before>import argh
from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter
LOG = Reporter(__name__).setup()
def main(endpoint, username='admin', password='secrete', test_path='api'):
environment = Environment(username, password, endpoint)
with clea... | import argh
from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter
LOG = Reporter(__name__).setup()
def main(endpoint, username='admin', password='secrete', test_path='api'):
environment = Environment(username, password, endpoint)
with cleanup(environment... | import argh
from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter
LOG = Reporter(__name__).setup()
def main(endpoint, username='admin', password='secrete', test_path='api'):
environment = Environment(username, password, endpoint)
with cleanup(environment... | <commit_before>import argh
from .environments import Environment
from .frameworks import Tempest
from .utils import cleanup, Reporter
LOG = Reporter(__name__).setup()
def main(endpoint, username='admin', password='secrete', test_path='api'):
environment = Environment(username, password, endpoint)
with clea... |
0dd935a383d4b8d066dc091226b61119d245a7f9 | threeOhOne.py | threeOhOne.py | #!/usr/bin/env python
# -*- Coding: utf-8 -*-
"""
" In its present form, it simply takes a comma delimited .csv file and outputs a .txt file containing valid 301 redirect statements for an .htaccess file
"
" author: Claude Müller
" wbsite: http://mediarocket.co.za
"
"""
import csv
class ThreeOhOne:
def __ini__(s... | #!/usr/bin/env python
# -*- Coding: utf-8 -*-
"""
" In its present form, it simply takes a comma delimited .csv file and outputs a .txt file containing valid 301 redirect statements for an .htaccess file
"
" author: Claude Müller
" wbsite: http://mediarocket.co.za
"
"""
import sys
import csv
class ThreeOhOne:
ou... | Add command line argument capability | [py] Add command line argument capability
| Python | mit | claudemuller/301csv2htaccess | #!/usr/bin/env python
# -*- Coding: utf-8 -*-
"""
" In its present form, it simply takes a comma delimited .csv file and outputs a .txt file containing valid 301 redirect statements for an .htaccess file
"
" author: Claude Müller
" wbsite: http://mediarocket.co.za
"
"""
import csv
class ThreeOhOne:
def __ini__(s... | #!/usr/bin/env python
# -*- Coding: utf-8 -*-
"""
" In its present form, it simply takes a comma delimited .csv file and outputs a .txt file containing valid 301 redirect statements for an .htaccess file
"
" author: Claude Müller
" wbsite: http://mediarocket.co.za
"
"""
import sys
import csv
class ThreeOhOne:
ou... | <commit_before>#!/usr/bin/env python
# -*- Coding: utf-8 -*-
"""
" In its present form, it simply takes a comma delimited .csv file and outputs a .txt file containing valid 301 redirect statements for an .htaccess file
"
" author: Claude Müller
" wbsite: http://mediarocket.co.za
"
"""
import csv
class ThreeOhOne:
... | #!/usr/bin/env python
# -*- Coding: utf-8 -*-
"""
" In its present form, it simply takes a comma delimited .csv file and outputs a .txt file containing valid 301 redirect statements for an .htaccess file
"
" author: Claude Müller
" wbsite: http://mediarocket.co.za
"
"""
import sys
import csv
class ThreeOhOne:
ou... | #!/usr/bin/env python
# -*- Coding: utf-8 -*-
"""
" In its present form, it simply takes a comma delimited .csv file and outputs a .txt file containing valid 301 redirect statements for an .htaccess file
"
" author: Claude Müller
" wbsite: http://mediarocket.co.za
"
"""
import csv
class ThreeOhOne:
def __ini__(s... | <commit_before>#!/usr/bin/env python
# -*- Coding: utf-8 -*-
"""
" In its present form, it simply takes a comma delimited .csv file and outputs a .txt file containing valid 301 redirect statements for an .htaccess file
"
" author: Claude Müller
" wbsite: http://mediarocket.co.za
"
"""
import csv
class ThreeOhOne:
... |
464a5ffd02347b17ab6d2263d39e7868a01178f9 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to g... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to g... | Use named capture group "col" for column number | Use named capture group "col" for column number
Reference: http://www.sublimelinter.com/en/latest/linter_attributes.html#regex
| Python | mit | sirreal/SublimeLinter-contrib-govet | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to g... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to g... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to g... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an interface to g... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Jon Surrell
# Copyright (c) 2014 Jon Surrell
#
# License: MIT
#
"""This module exports the Govet plugin class."""
from SublimeLinter.lint import Linter, util
class Govet(Linter):
"""Provides an... |
52c7321c78c8a81b6b557d67fe5af44b8b32df4c | src/octoprint/__main__.py | src/octoprint/__main__.py | #!/usr/bin/env python2
# coding=utf-8
from __future__ import absolute_import, division, print_function
if __name__ == "__main__":
import octoprint
octoprint.main()
| #!/usr/bin/env python2
# coding=utf-8
from __future__ import absolute_import, division, print_function
import sys
if sys.version_info[0] >= 3:
raise Exception("Octoprint does not support Python 3")
if __name__ == "__main__":
import octoprint
octoprint.main()
| Handle unsupported version at runtime. | Handle unsupported version at runtime.
If you have an ancient setuptools, 4a36ddb3aa77b8d1b1a64c197607fa652705856c
won't successfully prevent installing. These changes will at least give a sane error,
rather then just barfing on random syntax errors due to the `unicode` type not
being present in py3k.
Cherry picked ... | Python | agpl-3.0 | Jaesin/OctoPrint,foosel/OctoPrint,Jaesin/OctoPrint,Jaesin/OctoPrint,foosel/OctoPrint,Jaesin/OctoPrint,foosel/OctoPrint,foosel/OctoPrint | #!/usr/bin/env python2
# coding=utf-8
from __future__ import absolute_import, division, print_function
if __name__ == "__main__":
import octoprint
octoprint.main()
Handle unsupported version at runtime.
If you have an ancient setuptools, 4a36ddb3aa77b8d1b1a64c197607fa652705856c
won't successfully prevent installing... | #!/usr/bin/env python2
# coding=utf-8
from __future__ import absolute_import, division, print_function
import sys
if sys.version_info[0] >= 3:
raise Exception("Octoprint does not support Python 3")
if __name__ == "__main__":
import octoprint
octoprint.main()
| <commit_before>#!/usr/bin/env python2
# coding=utf-8
from __future__ import absolute_import, division, print_function
if __name__ == "__main__":
import octoprint
octoprint.main()
<commit_msg>Handle unsupported version at runtime.
If you have an ancient setuptools, 4a36ddb3aa77b8d1b1a64c197607fa652705856c
won't succ... | #!/usr/bin/env python2
# coding=utf-8
from __future__ import absolute_import, division, print_function
import sys
if sys.version_info[0] >= 3:
raise Exception("Octoprint does not support Python 3")
if __name__ == "__main__":
import octoprint
octoprint.main()
| #!/usr/bin/env python2
# coding=utf-8
from __future__ import absolute_import, division, print_function
if __name__ == "__main__":
import octoprint
octoprint.main()
Handle unsupported version at runtime.
If you have an ancient setuptools, 4a36ddb3aa77b8d1b1a64c197607fa652705856c
won't successfully prevent installing... | <commit_before>#!/usr/bin/env python2
# coding=utf-8
from __future__ import absolute_import, division, print_function
if __name__ == "__main__":
import octoprint
octoprint.main()
<commit_msg>Handle unsupported version at runtime.
If you have an ancient setuptools, 4a36ddb3aa77b8d1b1a64c197607fa652705856c
won't succ... |
ca7fb88d36b386defab610388761609539e0a9cf | conary/build/capsulerecipe.py | conary/build/capsulerecipe.py | #
# Copyright (c) 2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | #
# Copyright (c) 2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | Enable building hybrid capsule/non-capsule packages (CNY-3271) | Enable building hybrid capsule/non-capsule packages (CNY-3271)
| Python | apache-2.0 | fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary | #
# Copyright (c) 2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | #
# Copyright (c) 2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | <commit_before>#
# Copyright (c) 2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath... | #
# Copyright (c) 2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | #
# Copyright (c) 2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | <commit_before>#
# Copyright (c) 2009 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath... |
d54e5f25601fe2f57a2c6be5524430f0068e05c4 | image_translate/frames_rendering.py | image_translate/frames_rendering.py | # need to install python-opencv, pygame, numpy, scipy, PIL
import sys
import pygame
from pygame.locals import *
import opencv
#this is important for capturing/displaying images
from opencv import highgui
def get_image(camera):
img = highgui.cvQueryFrame(camera)
# Add the line below if you need it (Ubuntu 8.... | # need to install python-opencv, pygame, numpy, scipy, PIL
import sys
import pygame
from pygame.locals import QUIT, KEYDOWN
import opencv
#this is important for capturing/displaying images
from opencv import highgui
def get_image(camera):
img = highgui.cvQueryFrame(camera)
# Add the line below if you need i... | Remove brute and inconvinient star import | Remove brute and inconvinient star import | Python | mit | duboviy/study_languages | # need to install python-opencv, pygame, numpy, scipy, PIL
import sys
import pygame
from pygame.locals import *
import opencv
#this is important for capturing/displaying images
from opencv import highgui
def get_image(camera):
img = highgui.cvQueryFrame(camera)
# Add the line below if you need it (Ubuntu 8.... | # need to install python-opencv, pygame, numpy, scipy, PIL
import sys
import pygame
from pygame.locals import QUIT, KEYDOWN
import opencv
#this is important for capturing/displaying images
from opencv import highgui
def get_image(camera):
img = highgui.cvQueryFrame(camera)
# Add the line below if you need i... | <commit_before># need to install python-opencv, pygame, numpy, scipy, PIL
import sys
import pygame
from pygame.locals import *
import opencv
#this is important for capturing/displaying images
from opencv import highgui
def get_image(camera):
img = highgui.cvQueryFrame(camera)
# Add the line below if you nee... | # need to install python-opencv, pygame, numpy, scipy, PIL
import sys
import pygame
from pygame.locals import QUIT, KEYDOWN
import opencv
#this is important for capturing/displaying images
from opencv import highgui
def get_image(camera):
img = highgui.cvQueryFrame(camera)
# Add the line below if you need i... | # need to install python-opencv, pygame, numpy, scipy, PIL
import sys
import pygame
from pygame.locals import *
import opencv
#this is important for capturing/displaying images
from opencv import highgui
def get_image(camera):
img = highgui.cvQueryFrame(camera)
# Add the line below if you need it (Ubuntu 8.... | <commit_before># need to install python-opencv, pygame, numpy, scipy, PIL
import sys
import pygame
from pygame.locals import *
import opencv
#this is important for capturing/displaying images
from opencv import highgui
def get_image(camera):
img = highgui.cvQueryFrame(camera)
# Add the line below if you nee... |
1d53f6dc8346a655a86e670d0d4de56f7dc93d04 | gala/sparselol.py | gala/sparselol.py | import numpy as np
from scipy import sparse
from .sparselol_cy import extents_count
def extents(labels):
"""Compute the extents of every integer value in ``arr``.
Parameters
----------
labels : array of ints
The array of values to be mapped.
Returns
-------
locs : sparse.csr_matri... | import numpy as np
from scipy import sparse
from .sparselol_cy import extents_count
def extents(labels):
"""Compute the extents of every integer value in ``arr``.
Parameters
----------
labels : array of ints
The array of values to be mapped.
Returns
-------
locs : sparse.csr_matri... | Use stride tricks to save data memory | Use stride tricks to save data memory
| Python | bsd-3-clause | janelia-flyem/gala,jni/gala | import numpy as np
from scipy import sparse
from .sparselol_cy import extents_count
def extents(labels):
"""Compute the extents of every integer value in ``arr``.
Parameters
----------
labels : array of ints
The array of values to be mapped.
Returns
-------
locs : sparse.csr_matri... | import numpy as np
from scipy import sparse
from .sparselol_cy import extents_count
def extents(labels):
"""Compute the extents of every integer value in ``arr``.
Parameters
----------
labels : array of ints
The array of values to be mapped.
Returns
-------
locs : sparse.csr_matri... | <commit_before>import numpy as np
from scipy import sparse
from .sparselol_cy import extents_count
def extents(labels):
"""Compute the extents of every integer value in ``arr``.
Parameters
----------
labels : array of ints
The array of values to be mapped.
Returns
-------
locs : s... | import numpy as np
from scipy import sparse
from .sparselol_cy import extents_count
def extents(labels):
"""Compute the extents of every integer value in ``arr``.
Parameters
----------
labels : array of ints
The array of values to be mapped.
Returns
-------
locs : sparse.csr_matri... | import numpy as np
from scipy import sparse
from .sparselol_cy import extents_count
def extents(labels):
"""Compute the extents of every integer value in ``arr``.
Parameters
----------
labels : array of ints
The array of values to be mapped.
Returns
-------
locs : sparse.csr_matri... | <commit_before>import numpy as np
from scipy import sparse
from .sparselol_cy import extents_count
def extents(labels):
"""Compute the extents of every integer value in ``arr``.
Parameters
----------
labels : array of ints
The array of values to be mapped.
Returns
-------
locs : s... |
7ebc9a4511d52707ce88a1b8bc2d3fa638e1fb91 | c2rst.py | c2rst.py | import sphinx.parsers
import docutils.parsers.rst as rst
class CStrip(sphinx.parsers.Parser):
def __init__(self):
self.rst_parser = rst.Parser()
def parse(self, inputstring, document):
stripped = []
for line in inputstring.split("\n"):
line = line.strip()
if line == "//|":
stripped... | import docutils.parsers
import docutils.parsers.rst as rst
class CStrip(docutils.parsers.Parser):
def __init__(self):
self.rst_parser = rst.Parser()
def parse(self, inputstring, document):
stripped = []
for line in inputstring.split("\n"):
line = line.strip()
if line == "//|":
stri... | Switch away from sphinx.parsers which isn't available in sphinx 1.3.5 on Read The Docs. | Switch away from sphinx.parsers which isn't available in sphinx 1.3.5 on Read The Docs.
| Python | mit | adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython | import sphinx.parsers
import docutils.parsers.rst as rst
class CStrip(sphinx.parsers.Parser):
def __init__(self):
self.rst_parser = rst.Parser()
def parse(self, inputstring, document):
stripped = []
for line in inputstring.split("\n"):
line = line.strip()
if line == "//|":
stripped... | import docutils.parsers
import docutils.parsers.rst as rst
class CStrip(docutils.parsers.Parser):
def __init__(self):
self.rst_parser = rst.Parser()
def parse(self, inputstring, document):
stripped = []
for line in inputstring.split("\n"):
line = line.strip()
if line == "//|":
stri... | <commit_before>import sphinx.parsers
import docutils.parsers.rst as rst
class CStrip(sphinx.parsers.Parser):
def __init__(self):
self.rst_parser = rst.Parser()
def parse(self, inputstring, document):
stripped = []
for line in inputstring.split("\n"):
line = line.strip()
if line == "//|":
... | import docutils.parsers
import docutils.parsers.rst as rst
class CStrip(docutils.parsers.Parser):
def __init__(self):
self.rst_parser = rst.Parser()
def parse(self, inputstring, document):
stripped = []
for line in inputstring.split("\n"):
line = line.strip()
if line == "//|":
stri... | import sphinx.parsers
import docutils.parsers.rst as rst
class CStrip(sphinx.parsers.Parser):
def __init__(self):
self.rst_parser = rst.Parser()
def parse(self, inputstring, document):
stripped = []
for line in inputstring.split("\n"):
line = line.strip()
if line == "//|":
stripped... | <commit_before>import sphinx.parsers
import docutils.parsers.rst as rst
class CStrip(sphinx.parsers.Parser):
def __init__(self):
self.rst_parser = rst.Parser()
def parse(self, inputstring, document):
stripped = []
for line in inputstring.split("\n"):
line = line.strip()
if line == "//|":
... |
e37c7cace441e837120b820936c6f4ae8de78996 | sts/controller_manager.py | sts/controller_manager.py | from sts.util.console import msg
class ControllerManager(object):
''' Encapsulate a list of controllers objects '''
def __init__(self, controllers):
self.uuid2controller = {
controller.uuid : controller
for controller in controllers
}
@property
def controllers(self):
return self.uuid2c... | from sts.util.console import msg
class ControllerManager(object):
''' Encapsulate a list of controllers objects '''
def __init__(self, controllers):
self.uuid2controller = {
controller.uuid : controller
for controller in controllers
}
@property
def controllers(self):
cs = self.uuid2co... | Make .contollers() deterministic (was using hash.values()) | Make .contollers() deterministic (was using hash.values())
| Python | apache-2.0 | ucb-sts/sts,jmiserez/sts,ucb-sts/sts,jmiserez/sts | from sts.util.console import msg
class ControllerManager(object):
''' Encapsulate a list of controllers objects '''
def __init__(self, controllers):
self.uuid2controller = {
controller.uuid : controller
for controller in controllers
}
@property
def controllers(self):
return self.uuid2c... | from sts.util.console import msg
class ControllerManager(object):
''' Encapsulate a list of controllers objects '''
def __init__(self, controllers):
self.uuid2controller = {
controller.uuid : controller
for controller in controllers
}
@property
def controllers(self):
cs = self.uuid2co... | <commit_before>from sts.util.console import msg
class ControllerManager(object):
''' Encapsulate a list of controllers objects '''
def __init__(self, controllers):
self.uuid2controller = {
controller.uuid : controller
for controller in controllers
}
@property
def controllers(self):
ret... | from sts.util.console import msg
class ControllerManager(object):
''' Encapsulate a list of controllers objects '''
def __init__(self, controllers):
self.uuid2controller = {
controller.uuid : controller
for controller in controllers
}
@property
def controllers(self):
cs = self.uuid2co... | from sts.util.console import msg
class ControllerManager(object):
''' Encapsulate a list of controllers objects '''
def __init__(self, controllers):
self.uuid2controller = {
controller.uuid : controller
for controller in controllers
}
@property
def controllers(self):
return self.uuid2c... | <commit_before>from sts.util.console import msg
class ControllerManager(object):
''' Encapsulate a list of controllers objects '''
def __init__(self, controllers):
self.uuid2controller = {
controller.uuid : controller
for controller in controllers
}
@property
def controllers(self):
ret... |
34b57742801f888af7597378bd00f9d06c2d3b66 | packages/Python/lldbsuite/test/repl/quicklookobject/TestREPLQuickLookObject.py | packages/Python/lldbsuite/test/repl/quicklookobject/TestREPLQuickLookObject.py | # TestREPLQuickLookObject.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CO... | # TestREPLQuickLookObject.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CO... | Use the PlaygroundQuickLook(reflecting:) constructor in this test case | Use the PlaygroundQuickLook(reflecting:) constructor in this test case
| Python | apache-2.0 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | # TestREPLQuickLookObject.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CO... | # TestREPLQuickLookObject.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CO... | <commit_before># TestREPLQuickLookObject.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http... | # TestREPLQuickLookObject.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CO... | # TestREPLQuickLookObject.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CO... | <commit_before># TestREPLQuickLookObject.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http... |
58c13375f7ea4acaf21ccf1151460d79e59bfdf1 | spotify/__init__.py | spotify/__init__.py | from __future__ import unicode_literals
import os
import cffi
__version__ = '2.0.0a1'
_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')
_header = open(_header_file).read()
_header += '#define SPOTIFY_API_VERSION ...\n'
ffi = cffi.FFI()
ffi.cdef(_header)
lib = ffi.verify('#include "libspoti... | from __future__ import unicode_literals
import os
import weakref
import cffi
__version__ = '2.0.0a1'
_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')
_header = open(_header_file).read()
_header += '#define SPOTIFY_API_VERSION ...\n'
ffi = cffi.FFI()
ffi.cdef(_header)
lib = ffi.verify('#in... | Add global_weakrefs dict to keep strings in structs, etc alive | Add global_weakrefs dict to keep strings in structs, etc alive
| Python | apache-2.0 | kotamat/pyspotify,felix1m/pyspotify,jodal/pyspotify,mopidy/pyspotify,jodal/pyspotify,kotamat/pyspotify,mopidy/pyspotify,jodal/pyspotify,felix1m/pyspotify,felix1m/pyspotify,kotamat/pyspotify | from __future__ import unicode_literals
import os
import cffi
__version__ = '2.0.0a1'
_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')
_header = open(_header_file).read()
_header += '#define SPOTIFY_API_VERSION ...\n'
ffi = cffi.FFI()
ffi.cdef(_header)
lib = ffi.verify('#include "libspoti... | from __future__ import unicode_literals
import os
import weakref
import cffi
__version__ = '2.0.0a1'
_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')
_header = open(_header_file).read()
_header += '#define SPOTIFY_API_VERSION ...\n'
ffi = cffi.FFI()
ffi.cdef(_header)
lib = ffi.verify('#in... | <commit_before>from __future__ import unicode_literals
import os
import cffi
__version__ = '2.0.0a1'
_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')
_header = open(_header_file).read()
_header += '#define SPOTIFY_API_VERSION ...\n'
ffi = cffi.FFI()
ffi.cdef(_header)
lib = ffi.verify('#in... | from __future__ import unicode_literals
import os
import weakref
import cffi
__version__ = '2.0.0a1'
_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')
_header = open(_header_file).read()
_header += '#define SPOTIFY_API_VERSION ...\n'
ffi = cffi.FFI()
ffi.cdef(_header)
lib = ffi.verify('#in... | from __future__ import unicode_literals
import os
import cffi
__version__ = '2.0.0a1'
_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')
_header = open(_header_file).read()
_header += '#define SPOTIFY_API_VERSION ...\n'
ffi = cffi.FFI()
ffi.cdef(_header)
lib = ffi.verify('#include "libspoti... | <commit_before>from __future__ import unicode_literals
import os
import cffi
__version__ = '2.0.0a1'
_header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h')
_header = open(_header_file).read()
_header += '#define SPOTIFY_API_VERSION ...\n'
ffi = cffi.FFI()
ffi.cdef(_header)
lib = ffi.verify('#in... |
9c8ae361d680f851c4cddb5fddf309190ce9f2b1 | telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py | telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from telemetry.unittest import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
@benchmark.Enabled('h... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from telemetry.unittest import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
@benchmark.Enabled('h... | Convert GpuBenchmarkingExtension to a gin::Wrappable class | Convert GpuBenchmarkingExtension to a gin::Wrappable class
v8 extensions are slowing down context creation and we're trying to get
rid of them.
BUG=334679
[email protected],[email protected]
Review URL: https://codereview.chromium.org/647433003
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#300... | Python | bsd-3-clause | catapult-project/catapult,catapult-project/catapult,sahiljain/catapult,catapult-project/catapult-csm,sahiljain/catapult,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,catapult-project/catapult,sahiljain/... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from telemetry.unittest import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
@benchmark.Enabled('h... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from telemetry.unittest import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
@benchmark.Enabled('h... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from telemetry.unittest import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
@bench... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from telemetry.unittest import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
@benchmark.Enabled('h... | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from telemetry.unittest import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
@benchmark.Enabled('h... | <commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import benchmark
from telemetry.unittest import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
@bench... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.