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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fe771659b876bfe23e5b16b9648ab7ede5b314e9 | comics/crawler/crawlers/questionablecontent.py | comics/crawler/crawlers/questionablecontent.py | from comics.crawler.crawlers import BaseComicCrawler
class ComicCrawler(BaseComicCrawler):
def _get_url(self):
self.feed_url = 'http://www.questionablecontent.net/QCRSS.xml'
self.parse_feed()
for entry in self.feed['entries']:
if self.timestamp_to_date(entry['updated_parsed']) ... | from comics.crawler.crawlers import BaseComicCrawler
class ComicCrawler(BaseComicCrawler):
def _get_url(self):
self.feed_url = 'http://www.questionablecontent.net/QCRSS.xml'
self.parse_feed()
for entry in self.feed.entries:
if ('updated_parsed' in entry and
self... | Fix error in Questionable Content crawler when feed entry does not contain date | Fix error in Questionable Content crawler when feed entry does not contain date
| Python | agpl-3.0 | datagutten/comics,klette/comics,klette/comics,datagutten/comics,jodal/comics,jodal/comics,datagutten/comics,datagutten/comics,klette/comics,jodal/comics,jodal/comics | from comics.crawler.crawlers import BaseComicCrawler
class ComicCrawler(BaseComicCrawler):
def _get_url(self):
self.feed_url = 'http://www.questionablecontent.net/QCRSS.xml'
self.parse_feed()
for entry in self.feed['entries']:
if self.timestamp_to_date(entry['updated_parsed']) ... | from comics.crawler.crawlers import BaseComicCrawler
class ComicCrawler(BaseComicCrawler):
def _get_url(self):
self.feed_url = 'http://www.questionablecontent.net/QCRSS.xml'
self.parse_feed()
for entry in self.feed.entries:
if ('updated_parsed' in entry and
self... | <commit_before>from comics.crawler.crawlers import BaseComicCrawler
class ComicCrawler(BaseComicCrawler):
def _get_url(self):
self.feed_url = 'http://www.questionablecontent.net/QCRSS.xml'
self.parse_feed()
for entry in self.feed['entries']:
if self.timestamp_to_date(entry['upd... | from comics.crawler.crawlers import BaseComicCrawler
class ComicCrawler(BaseComicCrawler):
def _get_url(self):
self.feed_url = 'http://www.questionablecontent.net/QCRSS.xml'
self.parse_feed()
for entry in self.feed.entries:
if ('updated_parsed' in entry and
self... | from comics.crawler.crawlers import BaseComicCrawler
class ComicCrawler(BaseComicCrawler):
def _get_url(self):
self.feed_url = 'http://www.questionablecontent.net/QCRSS.xml'
self.parse_feed()
for entry in self.feed['entries']:
if self.timestamp_to_date(entry['updated_parsed']) ... | <commit_before>from comics.crawler.crawlers import BaseComicCrawler
class ComicCrawler(BaseComicCrawler):
def _get_url(self):
self.feed_url = 'http://www.questionablecontent.net/QCRSS.xml'
self.parse_feed()
for entry in self.feed['entries']:
if self.timestamp_to_date(entry['upd... |
523293a2785df1229159ad5d0d430195404b9334 | arc_distance/__init__.py | arc_distance/__init__.py | # Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points
This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which proves to be c... | # Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points
This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which proves to be c... | Make arc distance test size bigger to better show the difference. | Make arc distance test size bigger to better show the difference.
Now on the web site, 5 on the 7 test case have speed of 0.001, the minimal value.
| Python | mit | numfocus/python-benchmarks,numfocus/python-benchmarks | # Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points
This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which proves to be c... | # Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points
This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which proves to be c... | <commit_before># Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points
This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which... | # Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points
This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which proves to be c... | # Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points
This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which proves to be c... | <commit_before># Authors: Yuancheng Peng
# License: MIT
"""Computes the arc distance between a collection of points
This code is challenging because it requires efficient vectorisation of
trigonometric functions that are note natively supported in SSE/AVX. The numpy
version makes use of numpy.tile and transpose, which... |
620bb416b0e44cc002679e001f1f0b8ab7792685 | bmi_tester/tests_pytest/test_grid.py | bmi_tester/tests_pytest/test_grid.py | from nose.tools import (assert_is_instance, assert_less_equal, assert_equal,
assert_greater, assert_in)
# from nose import with_setup
# from .utils import setup_func, teardown_func, all_names, all_grids, new_bmi
from .utils import all_names, all_grids
VALID_GRID_TYPES = (
"scalar",
"u... | from nose.tools import (assert_is_instance, assert_less_equal, assert_equal,
assert_greater, assert_in)
# from nose import with_setup
# from .utils import setup_func, teardown_func, all_names, all_grids, new_bmi
from .utils import all_names, all_grids
VALID_GRID_TYPES = (
"scalar",
"v... | Add vector as valid grid type. | Add vector as valid grid type.
| Python | mit | csdms/bmi-tester | from nose.tools import (assert_is_instance, assert_less_equal, assert_equal,
assert_greater, assert_in)
# from nose import with_setup
# from .utils import setup_func, teardown_func, all_names, all_grids, new_bmi
from .utils import all_names, all_grids
VALID_GRID_TYPES = (
"scalar",
"u... | from nose.tools import (assert_is_instance, assert_less_equal, assert_equal,
assert_greater, assert_in)
# from nose import with_setup
# from .utils import setup_func, teardown_func, all_names, all_grids, new_bmi
from .utils import all_names, all_grids
VALID_GRID_TYPES = (
"scalar",
"v... | <commit_before>from nose.tools import (assert_is_instance, assert_less_equal, assert_equal,
assert_greater, assert_in)
# from nose import with_setup
# from .utils import setup_func, teardown_func, all_names, all_grids, new_bmi
from .utils import all_names, all_grids
VALID_GRID_TYPES = (
"... | from nose.tools import (assert_is_instance, assert_less_equal, assert_equal,
assert_greater, assert_in)
# from nose import with_setup
# from .utils import setup_func, teardown_func, all_names, all_grids, new_bmi
from .utils import all_names, all_grids
VALID_GRID_TYPES = (
"scalar",
"v... | from nose.tools import (assert_is_instance, assert_less_equal, assert_equal,
assert_greater, assert_in)
# from nose import with_setup
# from .utils import setup_func, teardown_func, all_names, all_grids, new_bmi
from .utils import all_names, all_grids
VALID_GRID_TYPES = (
"scalar",
"u... | <commit_before>from nose.tools import (assert_is_instance, assert_less_equal, assert_equal,
assert_greater, assert_in)
# from nose import with_setup
# from .utils import setup_func, teardown_func, all_names, all_grids, new_bmi
from .utils import all_names, all_grids
VALID_GRID_TYPES = (
"... |
d7f744cfe542fffc398c3301699541190087ccbd | src/musicbrainz2/__init__.py | src/musicbrainz2/__init__.py | """A collection of classes for MusicBrainz.
This package contains the following modules:
1. L{model}: The MusicBrainz domain model, containing classes like
L{Artist <model.Artist>}, L{Release <model.Release>}, or
L{Track <model.Track>}
2. L{webservice}: An interface to the MusicBrainz XML web service.
3.... | """A collection of classes for MusicBrainz.
This package contains the following modules:
1. L{model}: The MusicBrainz domain model, containing classes like
L{Artist <model.Artist>}, L{Release <model.Release>}, or
L{Track <model.Track>}
2. L{webservice}: An interface to the MusicBrainz XML web service.
3.... | Set the version number to 0.3.0. | Set the version number to 0.3.0.
git-svn-id: f25caaa641ea257ccb5bc415e08f7c71e4161381@214 b0b80210-5d09-0410-99dd-b4bd03f891c0
| Python | bsd-3-clause | mineo/python-musicbrainz2 | """A collection of classes for MusicBrainz.
This package contains the following modules:
1. L{model}: The MusicBrainz domain model, containing classes like
L{Artist <model.Artist>}, L{Release <model.Release>}, or
L{Track <model.Track>}
2. L{webservice}: An interface to the MusicBrainz XML web service.
3.... | """A collection of classes for MusicBrainz.
This package contains the following modules:
1. L{model}: The MusicBrainz domain model, containing classes like
L{Artist <model.Artist>}, L{Release <model.Release>}, or
L{Track <model.Track>}
2. L{webservice}: An interface to the MusicBrainz XML web service.
3.... | <commit_before>"""A collection of classes for MusicBrainz.
This package contains the following modules:
1. L{model}: The MusicBrainz domain model, containing classes like
L{Artist <model.Artist>}, L{Release <model.Release>}, or
L{Track <model.Track>}
2. L{webservice}: An interface to the MusicBrainz XML we... | """A collection of classes for MusicBrainz.
This package contains the following modules:
1. L{model}: The MusicBrainz domain model, containing classes like
L{Artist <model.Artist>}, L{Release <model.Release>}, or
L{Track <model.Track>}
2. L{webservice}: An interface to the MusicBrainz XML web service.
3.... | """A collection of classes for MusicBrainz.
This package contains the following modules:
1. L{model}: The MusicBrainz domain model, containing classes like
L{Artist <model.Artist>}, L{Release <model.Release>}, or
L{Track <model.Track>}
2. L{webservice}: An interface to the MusicBrainz XML web service.
3.... | <commit_before>"""A collection of classes for MusicBrainz.
This package contains the following modules:
1. L{model}: The MusicBrainz domain model, containing classes like
L{Artist <model.Artist>}, L{Release <model.Release>}, or
L{Track <model.Track>}
2. L{webservice}: An interface to the MusicBrainz XML we... |
85c7784982e70b2962af0ae82d65fb0a6c12fa78 | integrations/node_js/my_first_test.py | integrations/node_js/my_first_test.py | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('http://xkcd.com/353/')
self.assert_element('img[alt="Python"]')
self.click('a[rel="license"]')
text = self.get_text("div center")
self.assertTrue("reuse any of my drawings" in t... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('http://xkcd.com/353/')
self.assert_element('img[alt="Python"]')
self.click('a[rel="license"]')
text = self.get_text("div center")
self.assertTrue("reuse any of my drawings" in t... | Update a click in a test | Update a click in a test
| Python | mit | seleniumbase/SeleniumBase,mdmintz/seleniumspot,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('http://xkcd.com/353/')
self.assert_element('img[alt="Python"]')
self.click('a[rel="license"]')
text = self.get_text("div center")
self.assertTrue("reuse any of my drawings" in t... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('http://xkcd.com/353/')
self.assert_element('img[alt="Python"]')
self.click('a[rel="license"]')
text = self.get_text("div center")
self.assertTrue("reuse any of my drawings" in t... | <commit_before>from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('http://xkcd.com/353/')
self.assert_element('img[alt="Python"]')
self.click('a[rel="license"]')
text = self.get_text("div center")
self.assertTrue("reuse any of my... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('http://xkcd.com/353/')
self.assert_element('img[alt="Python"]')
self.click('a[rel="license"]')
text = self.get_text("div center")
self.assertTrue("reuse any of my drawings" in t... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('http://xkcd.com/353/')
self.assert_element('img[alt="Python"]')
self.click('a[rel="license"]')
text = self.get_text("div center")
self.assertTrue("reuse any of my drawings" in t... | <commit_before>from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('http://xkcd.com/353/')
self.assert_element('img[alt="Python"]')
self.click('a[rel="license"]')
text = self.get_text("div center")
self.assertTrue("reuse any of my... |
832f0887eb617691dc50688a35a0bef04e4e3346 | fmcapi/__init__.py | fmcapi/__init__.py | """
The fmcapi __init__.py file is called whenever someone imports the package into their program.
"""
# from .fmc import *
# from .api_objects import *
# from .helper_functions import *
import logging
# logging.getLogger(__name__).addHandler(logging.NullHandler())
# Its always good to set up a log file.
logging_for... | """
The fmcapi __init__.py file is called whenever someone imports the package into their program.
"""
# from .fmc import *
# from .api_objects import *
# from .helper_functions import *
import logging
logging.debug("In the fmcapi __init__.py file.")
def __authorship__():
"""In the FMC __authorship__() class met... | Remove file logger enabled by default | Remove file logger enabled by default
| Python | bsd-3-clause | daxm/fmcapi,daxm/fmcapi | """
The fmcapi __init__.py file is called whenever someone imports the package into their program.
"""
# from .fmc import *
# from .api_objects import *
# from .helper_functions import *
import logging
# logging.getLogger(__name__).addHandler(logging.NullHandler())
# Its always good to set up a log file.
logging_for... | """
The fmcapi __init__.py file is called whenever someone imports the package into their program.
"""
# from .fmc import *
# from .api_objects import *
# from .helper_functions import *
import logging
logging.debug("In the fmcapi __init__.py file.")
def __authorship__():
"""In the FMC __authorship__() class met... | <commit_before>"""
The fmcapi __init__.py file is called whenever someone imports the package into their program.
"""
# from .fmc import *
# from .api_objects import *
# from .helper_functions import *
import logging
# logging.getLogger(__name__).addHandler(logging.NullHandler())
# Its always good to set up a log fi... | """
The fmcapi __init__.py file is called whenever someone imports the package into their program.
"""
# from .fmc import *
# from .api_objects import *
# from .helper_functions import *
import logging
logging.debug("In the fmcapi __init__.py file.")
def __authorship__():
"""In the FMC __authorship__() class met... | """
The fmcapi __init__.py file is called whenever someone imports the package into their program.
"""
# from .fmc import *
# from .api_objects import *
# from .helper_functions import *
import logging
# logging.getLogger(__name__).addHandler(logging.NullHandler())
# Its always good to set up a log file.
logging_for... | <commit_before>"""
The fmcapi __init__.py file is called whenever someone imports the package into their program.
"""
# from .fmc import *
# from .api_objects import *
# from .helper_functions import *
import logging
# logging.getLogger(__name__).addHandler(logging.NullHandler())
# Its always good to set up a log fi... |
3cd3e40f84036dbb12f2281e58696f9104653ecc | src/adhocracy/lib/app_globals.py | src/adhocracy/lib/app_globals.py | """The application's Globals object"""
import logging
import memcache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
def __init__(self, config):
"""One instance of Globals is created... | """The application's Globals object"""
import logging
import memcache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
def __init__(self, config):
"""One instance of Globals is created... | Decrease log level for memcache setup | Decrease log level for memcache setup
| Python | agpl-3.0 | DanielNeugebauer/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,phihag/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,alkadis/vcv,phihag/adhocracy,alkadis/vcv,liqd/adhocracy,alkadis/vcv,alkadis/vcv,alkadis/v... | """The application's Globals object"""
import logging
import memcache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
def __init__(self, config):
"""One instance of Globals is created... | """The application's Globals object"""
import logging
import memcache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
def __init__(self, config):
"""One instance of Globals is created... | <commit_before>"""The application's Globals object"""
import logging
import memcache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
def __init__(self, config):
"""One instance of Glo... | """The application's Globals object"""
import logging
import memcache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
def __init__(self, config):
"""One instance of Globals is created... | """The application's Globals object"""
import logging
import memcache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
def __init__(self, config):
"""One instance of Globals is created... | <commit_before>"""The application's Globals object"""
import logging
import memcache
log = logging.getLogger(__name__)
class Globals(object):
"""Globals acts as a container for objects available throughout the
life of the application
"""
def __init__(self, config):
"""One instance of Glo... |
c7172405b835920d553aa3d5ac6d415da2253d0d | oneflow/core/social_pipeline.py | oneflow/core/social_pipeline.py | # -*- coding: utf-8 -*-
u"""
Copyright 2013-2014 Olivier Cortès <oc@1flow.io>.
This file is part of the 1flow project.
It provides {python,django}-social-auth pipeline helpers.
1flow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by th... | # -*- coding: utf-8 -*-
u"""
Copyright 2013-2014 Olivier Cortès <oc@1flow.io>.
This file is part of the 1flow project.
It provides {python,django}-social-auth pipeline helpers.
1flow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by th... | Remove useless/obsolete social pipeline function (it's done in social_auth post_save()+task to make pipeline independant and faster). | Remove useless/obsolete social pipeline function (it's done in social_auth post_save()+task to make pipeline independant and faster).
| Python | agpl-3.0 | 1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,WillianPaiva/1flow | # -*- coding: utf-8 -*-
u"""
Copyright 2013-2014 Olivier Cortès <oc@1flow.io>.
This file is part of the 1flow project.
It provides {python,django}-social-auth pipeline helpers.
1flow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by th... | # -*- coding: utf-8 -*-
u"""
Copyright 2013-2014 Olivier Cortès <oc@1flow.io>.
This file is part of the 1flow project.
It provides {python,django}-social-auth pipeline helpers.
1flow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by th... | <commit_before># -*- coding: utf-8 -*-
u"""
Copyright 2013-2014 Olivier Cortès <oc@1flow.io>.
This file is part of the 1flow project.
It provides {python,django}-social-auth pipeline helpers.
1flow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
... | # -*- coding: utf-8 -*-
u"""
Copyright 2013-2014 Olivier Cortès <oc@1flow.io>.
This file is part of the 1flow project.
It provides {python,django}-social-auth pipeline helpers.
1flow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by th... | # -*- coding: utf-8 -*-
u"""
Copyright 2013-2014 Olivier Cortès <oc@1flow.io>.
This file is part of the 1flow project.
It provides {python,django}-social-auth pipeline helpers.
1flow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by th... | <commit_before># -*- coding: utf-8 -*-
u"""
Copyright 2013-2014 Olivier Cortès <oc@1flow.io>.
This file is part of the 1flow project.
It provides {python,django}-social-auth pipeline helpers.
1flow is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
... |
44c174807d7362b5d7959f122f2a74ae9ccb7b38 | coney/request.py | coney/request.py | from .exceptions import MalformedRequestException
class Request(object):
def __init__(self, version, metadata, **kwargs):
self._version = version
self._metadata = metadata
self._arguments = kwargs
@property
def version(self):
return self._version
@property
def arg... | from .exceptions import MalformedRequestException
class Request(object):
def __init__(self, version, metadata, arguments):
self._version = version
self._metadata = metadata
self._arguments = arguments
@property
def version(self):
return self._version
@property
def... | Fix rpc argument handling when constructing a Request | Fix rpc argument handling when constructing a Request
| Python | mit | cbigler/jackrabbit | from .exceptions import MalformedRequestException
class Request(object):
def __init__(self, version, metadata, **kwargs):
self._version = version
self._metadata = metadata
self._arguments = kwargs
@property
def version(self):
return self._version
@property
def arg... | from .exceptions import MalformedRequestException
class Request(object):
def __init__(self, version, metadata, arguments):
self._version = version
self._metadata = metadata
self._arguments = arguments
@property
def version(self):
return self._version
@property
def... | <commit_before>from .exceptions import MalformedRequestException
class Request(object):
def __init__(self, version, metadata, **kwargs):
self._version = version
self._metadata = metadata
self._arguments = kwargs
@property
def version(self):
return self._version
@prope... | from .exceptions import MalformedRequestException
class Request(object):
def __init__(self, version, metadata, arguments):
self._version = version
self._metadata = metadata
self._arguments = arguments
@property
def version(self):
return self._version
@property
def... | from .exceptions import MalformedRequestException
class Request(object):
def __init__(self, version, metadata, **kwargs):
self._version = version
self._metadata = metadata
self._arguments = kwargs
@property
def version(self):
return self._version
@property
def arg... | <commit_before>from .exceptions import MalformedRequestException
class Request(object):
def __init__(self, version, metadata, **kwargs):
self._version = version
self._metadata = metadata
self._arguments = kwargs
@property
def version(self):
return self._version
@prope... |
033773dce75dc2c352d657443cf415775e3b30cc | erudite/components/knowledge_provider.py | erudite/components/knowledge_provider.py | """
Knowledge provider that will respond to requests made by the rdf publisher or another bot.
"""
from sleekxmpp.plugins.base import base_plugin
from rhobot.components.storage.client import StoragePayload
from rdflib.namespace import FOAF
from rhobot.namespace import RHO
import logging
logger = logging.getLogger(__na... | """
Knowledge provider that will respond to requests made by the rdf publisher or another bot.
"""
from sleekxmpp.plugins.base import base_plugin
from rhobot.components.storage.client import StoragePayload
from rdflib.namespace import FOAF
from rhobot.namespace import RHO
import logging
logger = logging.getLogger(__na... | Update knowledge provider to work with API changes. | Update knowledge provider to work with API changes.
| Python | bsd-3-clause | rerobins/rho_erudite | """
Knowledge provider that will respond to requests made by the rdf publisher or another bot.
"""
from sleekxmpp.plugins.base import base_plugin
from rhobot.components.storage.client import StoragePayload
from rdflib.namespace import FOAF
from rhobot.namespace import RHO
import logging
logger = logging.getLogger(__na... | """
Knowledge provider that will respond to requests made by the rdf publisher or another bot.
"""
from sleekxmpp.plugins.base import base_plugin
from rhobot.components.storage.client import StoragePayload
from rdflib.namespace import FOAF
from rhobot.namespace import RHO
import logging
logger = logging.getLogger(__na... | <commit_before>"""
Knowledge provider that will respond to requests made by the rdf publisher or another bot.
"""
from sleekxmpp.plugins.base import base_plugin
from rhobot.components.storage.client import StoragePayload
from rdflib.namespace import FOAF
from rhobot.namespace import RHO
import logging
logger = logging... | """
Knowledge provider that will respond to requests made by the rdf publisher or another bot.
"""
from sleekxmpp.plugins.base import base_plugin
from rhobot.components.storage.client import StoragePayload
from rdflib.namespace import FOAF
from rhobot.namespace import RHO
import logging
logger = logging.getLogger(__na... | """
Knowledge provider that will respond to requests made by the rdf publisher or another bot.
"""
from sleekxmpp.plugins.base import base_plugin
from rhobot.components.storage.client import StoragePayload
from rdflib.namespace import FOAF
from rhobot.namespace import RHO
import logging
logger = logging.getLogger(__na... | <commit_before>"""
Knowledge provider that will respond to requests made by the rdf publisher or another bot.
"""
from sleekxmpp.plugins.base import base_plugin
from rhobot.components.storage.client import StoragePayload
from rdflib.namespace import FOAF
from rhobot.namespace import RHO
import logging
logger = logging... |
b4399f3dfb8f15f1a811fbcc31453575ad83d277 | byceps/services/snippet/transfer/models.py | byceps/services/snippet/transfer/models.py | """
byceps.services.snippet.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from enum import Enum
from typing import NewType
from uuid import UUID
from attr import attrib, attrs
from ...site.transfer.models impor... | """
byceps.services.snippet.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from enum import Enum
from typing import NewType
from uuid import UUID
from attr import attrib, attrs
from ...site.transfer.models impor... | Add missing return types to scope factory methods | Add missing return types to scope factory methods
| Python | bsd-3-clause | homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps | """
byceps.services.snippet.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from enum import Enum
from typing import NewType
from uuid import UUID
from attr import attrib, attrs
from ...site.transfer.models impor... | """
byceps.services.snippet.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from enum import Enum
from typing import NewType
from uuid import UUID
from attr import attrib, attrs
from ...site.transfer.models impor... | <commit_before>"""
byceps.services.snippet.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from enum import Enum
from typing import NewType
from uuid import UUID
from attr import attrib, attrs
from ...site.transf... | """
byceps.services.snippet.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from enum import Enum
from typing import NewType
from uuid import UUID
from attr import attrib, attrs
from ...site.transfer.models impor... | """
byceps.services.snippet.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from enum import Enum
from typing import NewType
from uuid import UUID
from attr import attrib, attrs
from ...site.transfer.models impor... | <commit_before>"""
byceps.services.snippet.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from enum import Enum
from typing import NewType
from uuid import UUID
from attr import attrib, attrs
from ...site.transf... |
329fa135faca80bd9dee74989110aa6222e44e2b | landlab/io/vtk/vti.py | landlab/io/vtk/vti.py | #! /bin/env python
from landlab.io.vtk.writer import VtkWriter
from landlab.io.vtk.vtktypes import VtkUniformRectilinear
from landlab.io.vtk.vtkxml import (
VtkRootElement,
VtkGridElement,
VtkPieceElement,
VtkPointDataElement,
VtkCellDataElement,
VtkExtent,
VtkOrigin,
VtkSpacing,
)
cl... | #! /bin/env python
from landlab.io.vtk.writer import VtkWriter
from landlab.io.vtk.vtktypes import VtkUniformRectilinear
from landlab.io.vtk.vtkxml import (
VtkRootElement,
VtkGridElement,
VtkPieceElement,
VtkPointDataElement,
VtkCellDataElement,
VtkExtent,
VtkOrigin,
VtkSpacing,
)
cl... | Fix typos: encoding, data -> self.encoding, self.data | Fix typos: encoding, data -> self.encoding, self.data
| Python | mit | landlab/landlab,landlab/landlab,cmshobe/landlab,cmshobe/landlab,amandersillinois/landlab,cmshobe/landlab,amandersillinois/landlab,landlab/landlab | #! /bin/env python
from landlab.io.vtk.writer import VtkWriter
from landlab.io.vtk.vtktypes import VtkUniformRectilinear
from landlab.io.vtk.vtkxml import (
VtkRootElement,
VtkGridElement,
VtkPieceElement,
VtkPointDataElement,
VtkCellDataElement,
VtkExtent,
VtkOrigin,
VtkSpacing,
)
cl... | #! /bin/env python
from landlab.io.vtk.writer import VtkWriter
from landlab.io.vtk.vtktypes import VtkUniformRectilinear
from landlab.io.vtk.vtkxml import (
VtkRootElement,
VtkGridElement,
VtkPieceElement,
VtkPointDataElement,
VtkCellDataElement,
VtkExtent,
VtkOrigin,
VtkSpacing,
)
cl... | <commit_before>#! /bin/env python
from landlab.io.vtk.writer import VtkWriter
from landlab.io.vtk.vtktypes import VtkUniformRectilinear
from landlab.io.vtk.vtkxml import (
VtkRootElement,
VtkGridElement,
VtkPieceElement,
VtkPointDataElement,
VtkCellDataElement,
VtkExtent,
VtkOrigin,
Vtk... | #! /bin/env python
from landlab.io.vtk.writer import VtkWriter
from landlab.io.vtk.vtktypes import VtkUniformRectilinear
from landlab.io.vtk.vtkxml import (
VtkRootElement,
VtkGridElement,
VtkPieceElement,
VtkPointDataElement,
VtkCellDataElement,
VtkExtent,
VtkOrigin,
VtkSpacing,
)
cl... | #! /bin/env python
from landlab.io.vtk.writer import VtkWriter
from landlab.io.vtk.vtktypes import VtkUniformRectilinear
from landlab.io.vtk.vtkxml import (
VtkRootElement,
VtkGridElement,
VtkPieceElement,
VtkPointDataElement,
VtkCellDataElement,
VtkExtent,
VtkOrigin,
VtkSpacing,
)
cl... | <commit_before>#! /bin/env python
from landlab.io.vtk.writer import VtkWriter
from landlab.io.vtk.vtktypes import VtkUniformRectilinear
from landlab.io.vtk.vtkxml import (
VtkRootElement,
VtkGridElement,
VtkPieceElement,
VtkPointDataElement,
VtkCellDataElement,
VtkExtent,
VtkOrigin,
Vtk... |
1716d38b995638c6060faa0925861bd8ab4c0e2b | statsmodels/stats/tests/test_outliers_influence.py | statsmodels/stats/tests/test_outliers_influence.py | from numpy.testing import assert_almost_equal
from statsmodels.datasets import statecrime
from statsmodels.regression.linear_model import OLS
from statsmodels.stats.outliers_influence import reset_ramsey
from statsmodels.tools import add_constant
data = statecrime.load_pandas().data
def test_reset_stata():
mod ... | from numpy.testing import assert_almost_equal
from statsmodels.datasets import statecrime, get_rdataset
from statsmodels.regression.linear_model import OLS
from statsmodels.stats.outliers_influence import reset_ramsey
from statsmodels.stats.outliers_influence import variance_inflation_factor
from statsmodels.tools imp... | Add pandas dataframe capability in variance_inflation_factor | ENH: Add pandas dataframe capability in variance_inflation_factor
| Python | bsd-3-clause | josef-pkt/statsmodels,statsmodels/statsmodels,josef-pkt/statsmodels,statsmodels/statsmodels,bashtage/statsmodels,josef-pkt/statsmodels,josef-pkt/statsmodels,josef-pkt/statsmodels,bashtage/statsmodels,statsmodels/statsmodels,josef-pkt/statsmodels,bashtage/statsmodels,statsmodels/statsmodels,bashtage/statsmodels,bashtage... | from numpy.testing import assert_almost_equal
from statsmodels.datasets import statecrime
from statsmodels.regression.linear_model import OLS
from statsmodels.stats.outliers_influence import reset_ramsey
from statsmodels.tools import add_constant
data = statecrime.load_pandas().data
def test_reset_stata():
mod ... | from numpy.testing import assert_almost_equal
from statsmodels.datasets import statecrime, get_rdataset
from statsmodels.regression.linear_model import OLS
from statsmodels.stats.outliers_influence import reset_ramsey
from statsmodels.stats.outliers_influence import variance_inflation_factor
from statsmodels.tools imp... | <commit_before>from numpy.testing import assert_almost_equal
from statsmodels.datasets import statecrime
from statsmodels.regression.linear_model import OLS
from statsmodels.stats.outliers_influence import reset_ramsey
from statsmodels.tools import add_constant
data = statecrime.load_pandas().data
def test_reset_st... | from numpy.testing import assert_almost_equal
from statsmodels.datasets import statecrime, get_rdataset
from statsmodels.regression.linear_model import OLS
from statsmodels.stats.outliers_influence import reset_ramsey
from statsmodels.stats.outliers_influence import variance_inflation_factor
from statsmodels.tools imp... | from numpy.testing import assert_almost_equal
from statsmodels.datasets import statecrime
from statsmodels.regression.linear_model import OLS
from statsmodels.stats.outliers_influence import reset_ramsey
from statsmodels.tools import add_constant
data = statecrime.load_pandas().data
def test_reset_stata():
mod ... | <commit_before>from numpy.testing import assert_almost_equal
from statsmodels.datasets import statecrime
from statsmodels.regression.linear_model import OLS
from statsmodels.stats.outliers_influence import reset_ramsey
from statsmodels.tools import add_constant
data = statecrime.load_pandas().data
def test_reset_st... |
c7e4fc5038cb2069193aa888c4978e9aeff995f7 | source/segue/backend/processor/background.py | source/segue/backend/processor/background.py | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import subprocess
import pickle
import base64
try:
from shlex import quote
except ImportError:
from pipes import quote
from .base import Processor
from .. import pickle_support
class BackgroundProcessor(... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import subprocess
import pickle
import base64
try:
from shlex import quote
except ImportError:
from pipes import quote
from .base import Processor
from .. import pickle_support
class BackgroundProcessor(... | Fix failing command on Linux. | Fix failing command on Linux.
| Python | apache-2.0 | 4degrees/segue | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import subprocess
import pickle
import base64
try:
from shlex import quote
except ImportError:
from pipes import quote
from .base import Processor
from .. import pickle_support
class BackgroundProcessor(... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import subprocess
import pickle
import base64
try:
from shlex import quote
except ImportError:
from pipes import quote
from .base import Processor
from .. import pickle_support
class BackgroundProcessor(... | <commit_before># :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import subprocess
import pickle
import base64
try:
from shlex import quote
except ImportError:
from pipes import quote
from .base import Processor
from .. import pickle_support
class Backg... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import subprocess
import pickle
import base64
try:
from shlex import quote
except ImportError:
from pipes import quote
from .base import Processor
from .. import pickle_support
class BackgroundProcessor(... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import subprocess
import pickle
import base64
try:
from shlex import quote
except ImportError:
from pipes import quote
from .base import Processor
from .. import pickle_support
class BackgroundProcessor(... | <commit_before># :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
import subprocess
import pickle
import base64
try:
from shlex import quote
except ImportError:
from pipes import quote
from .base import Processor
from .. import pickle_support
class Backg... |
f2e770ec86fe60c6d1c2b5d7b606bd6c576d167d | common/djangoapps/enrollment/urls.py | common/djangoapps/enrollment/urls.py | """
URLs for the Enrollment API
"""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
EnrollmentView,
EnrollmentListView,
EnrollmentCourseDetailView
)
USERNAME_PATTERN = settings.USERNAME_PATTERN
urlpatterns = patterns(
'enrollment.views',
url(
... | """
URLs for the Enrollment API
"""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
EnrollmentView,
EnrollmentListView,
EnrollmentCourseDetailView
)
USERNAME_PATTERN = settings.USERNAME_PATTERN
urlpatterns = patterns(
'enrollment.views',
url(
... | Revert "enrollment api endpoint has been updated to accept trailing forward slashes" | Revert "enrollment api endpoint has been updated to accept trailing forward slashes"
| Python | agpl-3.0 | Edraak/edx-platform,Edraak/edx-platform,Edraak/edx-platform,Edraak/edx-platform,Edraak/edx-platform | """
URLs for the Enrollment API
"""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
EnrollmentView,
EnrollmentListView,
EnrollmentCourseDetailView
)
USERNAME_PATTERN = settings.USERNAME_PATTERN
urlpatterns = patterns(
'enrollment.views',
url(
... | """
URLs for the Enrollment API
"""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
EnrollmentView,
EnrollmentListView,
EnrollmentCourseDetailView
)
USERNAME_PATTERN = settings.USERNAME_PATTERN
urlpatterns = patterns(
'enrollment.views',
url(
... | <commit_before>"""
URLs for the Enrollment API
"""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
EnrollmentView,
EnrollmentListView,
EnrollmentCourseDetailView
)
USERNAME_PATTERN = settings.USERNAME_PATTERN
urlpatterns = patterns(
'enrollment.views'... | """
URLs for the Enrollment API
"""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
EnrollmentView,
EnrollmentListView,
EnrollmentCourseDetailView
)
USERNAME_PATTERN = settings.USERNAME_PATTERN
urlpatterns = patterns(
'enrollment.views',
url(
... | """
URLs for the Enrollment API
"""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
EnrollmentView,
EnrollmentListView,
EnrollmentCourseDetailView
)
USERNAME_PATTERN = settings.USERNAME_PATTERN
urlpatterns = patterns(
'enrollment.views',
url(
... | <commit_before>"""
URLs for the Enrollment API
"""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
EnrollmentView,
EnrollmentListView,
EnrollmentCourseDetailView
)
USERNAME_PATTERN = settings.USERNAME_PATTERN
urlpatterns = patterns(
'enrollment.views'... |
9a221d5b0ca59a3384b3580c996aa518aaa90b0c | stand/runner/stand_server.py | stand/runner/stand_server.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import gettext
import eventlet
import os
from stand.socketio_events import StandSocketIO
locales_path = os.path.join(os.path.dirname(__file__), '..', 'i18n', 'locales')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argu... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import gettext
import eventlet
import os
from stand.socketio_events import StandSocketIO
locales_path = os.path.join(os.path.dirname(__file__), '..', 'i18n', 'locales')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argu... | Fix problem with Python 2 to 3 | Fix problem with Python 2 to 3
| Python | apache-2.0 | eubr-bigsea/stand,eubr-bigsea/stand | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import gettext
import eventlet
import os
from stand.socketio_events import StandSocketIO
locales_path = os.path.join(os.path.dirname(__file__), '..', 'i18n', 'locales')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argu... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import gettext
import eventlet
import os
from stand.socketio_events import StandSocketIO
locales_path = os.path.join(os.path.dirname(__file__), '..', 'i18n', 'locales')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argu... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import gettext
import eventlet
import os
from stand.socketio_events import StandSocketIO
locales_path = os.path.join(os.path.dirname(__file__), '..', 'i18n', 'locales')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import gettext
import eventlet
import os
from stand.socketio_events import StandSocketIO
locales_path = os.path.join(os.path.dirname(__file__), '..', 'i18n', 'locales')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argu... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import gettext
import eventlet
import os
from stand.socketio_events import StandSocketIO
locales_path = os.path.join(os.path.dirname(__file__), '..', 'i18n', 'locales')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argu... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import gettext
import eventlet
import os
from stand.socketio_events import StandSocketIO
locales_path = os.path.join(os.path.dirname(__file__), '..', 'i18n', 'locales')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
... |
4490e59bfe54874e17d3afd00ede0ad410dc7957 | numba/cuda/tests/cudapy/test_userexc.py | numba/cuda/tests/cudapy/test_userexc.py | from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim
from numba import cuda
from numba.core import config
class MyError(Exception):
pass
regex_pattern = (
r'In function [\'"]test_exc[\'"], file [\.\/\\\-a-zA-Z_0-9]+, line \d+'
)
class TestUserExc(SerialMixin, unittest.TestCase):
def ... | from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim
from numba import cuda
from numba.core import config
class MyError(Exception):
pass
regex_pattern = (
r'In function [\'"]test_exc[\'"], file [\:\.\/\\\-a-zA-Z_0-9]+, line \d+'
)
class TestUserExc(SerialMixin, unittest.TestCase):
de... | Add in windows drive pattern match. | Add in windows drive pattern match.
As title.
| Python | bsd-2-clause | gmarkall/numba,stuartarchibald/numba,stuartarchibald/numba,stonebig/numba,sklam/numba,seibert/numba,numba/numba,stonebig/numba,stuartarchibald/numba,sklam/numba,stuartarchibald/numba,cpcloud/numba,IntelLabs/numba,numba/numba,sklam/numba,cpcloud/numba,stonebig/numba,stonebig/numba,seibert/numba,gmarkall/numba,seibert/nu... | from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim
from numba import cuda
from numba.core import config
class MyError(Exception):
pass
regex_pattern = (
r'In function [\'"]test_exc[\'"], file [\.\/\\\-a-zA-Z_0-9]+, line \d+'
)
class TestUserExc(SerialMixin, unittest.TestCase):
def ... | from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim
from numba import cuda
from numba.core import config
class MyError(Exception):
pass
regex_pattern = (
r'In function [\'"]test_exc[\'"], file [\:\.\/\\\-a-zA-Z_0-9]+, line \d+'
)
class TestUserExc(SerialMixin, unittest.TestCase):
de... | <commit_before>from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim
from numba import cuda
from numba.core import config
class MyError(Exception):
pass
regex_pattern = (
r'In function [\'"]test_exc[\'"], file [\.\/\\\-a-zA-Z_0-9]+, line \d+'
)
class TestUserExc(SerialMixin, unittest.TestC... | from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim
from numba import cuda
from numba.core import config
class MyError(Exception):
pass
regex_pattern = (
r'In function [\'"]test_exc[\'"], file [\:\.\/\\\-a-zA-Z_0-9]+, line \d+'
)
class TestUserExc(SerialMixin, unittest.TestCase):
de... | from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim
from numba import cuda
from numba.core import config
class MyError(Exception):
pass
regex_pattern = (
r'In function [\'"]test_exc[\'"], file [\.\/\\\-a-zA-Z_0-9]+, line \d+'
)
class TestUserExc(SerialMixin, unittest.TestCase):
def ... | <commit_before>from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim
from numba import cuda
from numba.core import config
class MyError(Exception):
pass
regex_pattern = (
r'In function [\'"]test_exc[\'"], file [\.\/\\\-a-zA-Z_0-9]+, line \d+'
)
class TestUserExc(SerialMixin, unittest.TestC... |
15a792e38152e9c7aa6a10bbc251e9b5f0df1341 | aurora/optim/sgd.py | aurora/optim/sgd.py | import numpy as np
from .base import Base
class SGD(Base):
def __init__(self, cost, params, lr=0.1, momentum=0.9):
super().__init__(cost, params, lr)
self.momentum = momentum
self.velocity = self._init_velocity_vec(params)
def step(self, feed_dict):
exe_output = self.executor.... | import numpy as np
from .base import Base
class SGD(Base):
def __init__(self, cost, params, lr=0.1, momentum=0.9):
super().__init__(cost, params, lr)
self.momentum = momentum
self.velocity = [np.zeros_like(param.const)for param in params]
def step(self, feed_dict):
exe_output ... | Improve velocity list initialisation in SGD | Improve velocity list initialisation in SGD
| Python | apache-2.0 | upul/Aurora,upul/Aurora,upul/Aurora | import numpy as np
from .base import Base
class SGD(Base):
def __init__(self, cost, params, lr=0.1, momentum=0.9):
super().__init__(cost, params, lr)
self.momentum = momentum
self.velocity = self._init_velocity_vec(params)
def step(self, feed_dict):
exe_output = self.executor.... | import numpy as np
from .base import Base
class SGD(Base):
def __init__(self, cost, params, lr=0.1, momentum=0.9):
super().__init__(cost, params, lr)
self.momentum = momentum
self.velocity = [np.zeros_like(param.const)for param in params]
def step(self, feed_dict):
exe_output ... | <commit_before>import numpy as np
from .base import Base
class SGD(Base):
def __init__(self, cost, params, lr=0.1, momentum=0.9):
super().__init__(cost, params, lr)
self.momentum = momentum
self.velocity = self._init_velocity_vec(params)
def step(self, feed_dict):
exe_output =... | import numpy as np
from .base import Base
class SGD(Base):
def __init__(self, cost, params, lr=0.1, momentum=0.9):
super().__init__(cost, params, lr)
self.momentum = momentum
self.velocity = [np.zeros_like(param.const)for param in params]
def step(self, feed_dict):
exe_output ... | import numpy as np
from .base import Base
class SGD(Base):
def __init__(self, cost, params, lr=0.1, momentum=0.9):
super().__init__(cost, params, lr)
self.momentum = momentum
self.velocity = self._init_velocity_vec(params)
def step(self, feed_dict):
exe_output = self.executor.... | <commit_before>import numpy as np
from .base import Base
class SGD(Base):
def __init__(self, cost, params, lr=0.1, momentum=0.9):
super().__init__(cost, params, lr)
self.momentum = momentum
self.velocity = self._init_velocity_vec(params)
def step(self, feed_dict):
exe_output =... |
79dc15a4db8f74bed5e06d19c5c4f8d895c04189 | flaskext/debugtoolbar/panels/versions.py | flaskext/debugtoolbar/panels/versions.py | import pkg_resources
from flaskext.debugtoolbar.panels import DebugPanel
_ = lambda x: x
flask_version = pkg_resources.working_set.require('flask')[0].version
class VersionDebugPanel(DebugPanel):
"""
Panel that displays the Django version.
"""
name = 'Version'
has_content = False
def nav_ti... | import pkg_resources
from flaskext.debugtoolbar.panels import DebugPanel
_ = lambda x: x
flask_version = pkg_resources.get_distribution('Flask').version
class VersionDebugPanel(DebugPanel):
"""
Panel that displays the Django version.
"""
name = 'Version'
has_content = False
def nav_title(se... | Modify the flask version retrieval (thanks donri) | Modify the flask version retrieval (thanks donri)
| Python | bsd-3-clause | dianchang/flask-debugtoolbar,lepture/flask-debugtoolbar,lepture/flask-debugtoolbar,dianchang/flask-debugtoolbar,dianchang/flask-debugtoolbar | import pkg_resources
from flaskext.debugtoolbar.panels import DebugPanel
_ = lambda x: x
flask_version = pkg_resources.working_set.require('flask')[0].version
class VersionDebugPanel(DebugPanel):
"""
Panel that displays the Django version.
"""
name = 'Version'
has_content = False
def nav_ti... | import pkg_resources
from flaskext.debugtoolbar.panels import DebugPanel
_ = lambda x: x
flask_version = pkg_resources.get_distribution('Flask').version
class VersionDebugPanel(DebugPanel):
"""
Panel that displays the Django version.
"""
name = 'Version'
has_content = False
def nav_title(se... | <commit_before>import pkg_resources
from flaskext.debugtoolbar.panels import DebugPanel
_ = lambda x: x
flask_version = pkg_resources.working_set.require('flask')[0].version
class VersionDebugPanel(DebugPanel):
"""
Panel that displays the Django version.
"""
name = 'Version'
has_content = False
... | import pkg_resources
from flaskext.debugtoolbar.panels import DebugPanel
_ = lambda x: x
flask_version = pkg_resources.get_distribution('Flask').version
class VersionDebugPanel(DebugPanel):
"""
Panel that displays the Django version.
"""
name = 'Version'
has_content = False
def nav_title(se... | import pkg_resources
from flaskext.debugtoolbar.panels import DebugPanel
_ = lambda x: x
flask_version = pkg_resources.working_set.require('flask')[0].version
class VersionDebugPanel(DebugPanel):
"""
Panel that displays the Django version.
"""
name = 'Version'
has_content = False
def nav_ti... | <commit_before>import pkg_resources
from flaskext.debugtoolbar.panels import DebugPanel
_ = lambda x: x
flask_version = pkg_resources.working_set.require('flask')[0].version
class VersionDebugPanel(DebugPanel):
"""
Panel that displays the Django version.
"""
name = 'Version'
has_content = False
... |
5351ad8324fa8388ea3b82425d03f43ac16d7313 | app.py | app.py | #!/usr/bin/env python
import os, requests, getSchedule
from flask import Flask, request, jsonify, render_template, abort
app = Flask(__name__)
@app.route('/')
def root():
return render_template('index.html')
@app.route('/m')
def mobileView():
stop = request.args.get('stop', 1, type=int)
route = requests.get('htt... | #!/usr/bin/env python
import os, requests, getSchedule
from flask import Flask, request, jsonify, render_template, abort
app = Flask(__name__)
@app.route('/')
def root():
return render_template('index.html')
@app.route('/m')
def mobileView():
stop = request.args.get('stop', 1, type=int)
payload = {'stop': stop}
... | Use Requests to encode stop as query param, verify API status code. | Use Requests to encode stop as query param, verify API status code.
| Python | mit | alykhank/NextRide,alykhank/NextRide | #!/usr/bin/env python
import os, requests, getSchedule
from flask import Flask, request, jsonify, render_template, abort
app = Flask(__name__)
@app.route('/')
def root():
return render_template('index.html')
@app.route('/m')
def mobileView():
stop = request.args.get('stop', 1, type=int)
route = requests.get('htt... | #!/usr/bin/env python
import os, requests, getSchedule
from flask import Flask, request, jsonify, render_template, abort
app = Flask(__name__)
@app.route('/')
def root():
return render_template('index.html')
@app.route('/m')
def mobileView():
stop = request.args.get('stop', 1, type=int)
payload = {'stop': stop}
... | <commit_before>#!/usr/bin/env python
import os, requests, getSchedule
from flask import Flask, request, jsonify, render_template, abort
app = Flask(__name__)
@app.route('/')
def root():
return render_template('index.html')
@app.route('/m')
def mobileView():
stop = request.args.get('stop', 1, type=int)
route = re... | #!/usr/bin/env python
import os, requests, getSchedule
from flask import Flask, request, jsonify, render_template, abort
app = Flask(__name__)
@app.route('/')
def root():
return render_template('index.html')
@app.route('/m')
def mobileView():
stop = request.args.get('stop', 1, type=int)
payload = {'stop': stop}
... | #!/usr/bin/env python
import os, requests, getSchedule
from flask import Flask, request, jsonify, render_template, abort
app = Flask(__name__)
@app.route('/')
def root():
return render_template('index.html')
@app.route('/m')
def mobileView():
stop = request.args.get('stop', 1, type=int)
route = requests.get('htt... | <commit_before>#!/usr/bin/env python
import os, requests, getSchedule
from flask import Flask, request, jsonify, render_template, abort
app = Flask(__name__)
@app.route('/')
def root():
return render_template('index.html')
@app.route('/m')
def mobileView():
stop = request.args.get('stop', 1, type=int)
route = re... |
36b37cc3439b1b99b2496c9a8037de9e412ad151 | account_payment_partner/models/account_move_line.py | account_payment_partner/models/account_move_line.py | # Copyright 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
payment_mode_id = fields.Many2one(
'account.payment.mode',
string='Pay... | # Copyright 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
payment_mode_id = fields.Many2one(
'account.payment.mode',
string='Pay... | Add indexes on account payment models | Add indexes on account payment models
The fields where the indexes are added are used in searches in
account_payment_order, which becomes really slow when a database have
many lines.
| Python | agpl-3.0 | OCA/bank-payment,OCA/bank-payment | # Copyright 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
payment_mode_id = fields.Many2one(
'account.payment.mode',
string='Pay... | # Copyright 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
payment_mode_id = fields.Many2one(
'account.payment.mode',
string='Pay... | <commit_before># Copyright 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
payment_mode_id = fields.Many2one(
'account.payment.mode',
... | # Copyright 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
payment_mode_id = fields.Many2one(
'account.payment.mode',
string='Pay... | # Copyright 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
payment_mode_id = fields.Many2one(
'account.payment.mode',
string='Pay... | <commit_before># Copyright 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
payment_mode_id = fields.Many2one(
'account.payment.mode',
... |
d0fe2fd4bc619a45d18c3e5ba911b15045366849 | api/tests/test_small_scripts.py | api/tests/test_small_scripts.py | """This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def test_wsgi(self):
import apel_rest.wsgi
| """This module tests the small scripts - admin, model, and wsgi."""
# Using unittest and not django.test as no need for overhead of database
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
"""Check that admin is importable."""
import api.admin
def test_models... | Add docstrings and comment to small scripts test | Add docstrings and comment to small scripts test
| Python | apache-2.0 | apel/rest,apel/rest | """This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def test_wsgi(self):
import apel_rest.wsgi
Add docstrings and comment to... | """This module tests the small scripts - admin, model, and wsgi."""
# Using unittest and not django.test as no need for overhead of database
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
"""Check that admin is importable."""
import api.admin
def test_models... | <commit_before>"""This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def test_wsgi(self):
import apel_rest.wsgi
<commit_msg>Ad... | """This module tests the small scripts - admin, model, and wsgi."""
# Using unittest and not django.test as no need for overhead of database
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
"""Check that admin is importable."""
import api.admin
def test_models... | """This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def test_wsgi(self):
import apel_rest.wsgi
Add docstrings and comment to... | <commit_before>"""This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def test_wsgi(self):
import apel_rest.wsgi
<commit_msg>Ad... |
01b17ee30889afe1eadf8ec98c187ca9b856d0f7 | connector/views.py | connector/views.py | from django.conf import settings
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseNotFound
from django.template import Template
from cancer_browser.core.http import HttpResponseSendFile
from django.core.urlresolvers import reverse
import os, re
def client_vars(request, bas... | from django.conf import settings
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseNotFound
from django.template import Template
from cancer_browser.core.http import HttpResponseSendFile
from django.core.urlresolvers import reverse
import os, re
def client_vars(request, bas... | Add mime type for sourcemaps. | Add mime type for sourcemaps.
| Python | apache-2.0 | ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,acthp/ucsc-xena-client | from django.conf import settings
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseNotFound
from django.template import Template
from cancer_browser.core.http import HttpResponseSendFile
from django.core.urlresolvers import reverse
import os, re
def client_vars(request, bas... | from django.conf import settings
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseNotFound
from django.template import Template
from cancer_browser.core.http import HttpResponseSendFile
from django.core.urlresolvers import reverse
import os, re
def client_vars(request, bas... | <commit_before>from django.conf import settings
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseNotFound
from django.template import Template
from cancer_browser.core.http import HttpResponseSendFile
from django.core.urlresolvers import reverse
import os, re
def client_va... | from django.conf import settings
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseNotFound
from django.template import Template
from cancer_browser.core.http import HttpResponseSendFile
from django.core.urlresolvers import reverse
import os, re
def client_vars(request, bas... | from django.conf import settings
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseNotFound
from django.template import Template
from cancer_browser.core.http import HttpResponseSendFile
from django.core.urlresolvers import reverse
import os, re
def client_vars(request, bas... | <commit_before>from django.conf import settings
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseNotFound
from django.template import Template
from cancer_browser.core.http import HttpResponseSendFile
from django.core.urlresolvers import reverse
import os, re
def client_va... |
0bf7bf5ee30ddfd1510d50f189d3bb581ec5048d | tangled/website/resources.py | tangled/website/resources.py | from tangled.web import Resource, config
from tangled.site.resources.entry import Entry
class Docs(Entry):
@config('text/html', template='tangled.website:templates/docs.mako')
def GET(self):
static_dirs = self.app.get_all('static_directory', as_dict=True)
links = []
for prefix, dir_a... | from tangled.web import Resource, config
from tangled.site.resources.entry import Entry
class Docs(Entry):
@config('text/html', template='tangled.website:templates/docs.mako')
def GET(self):
static_dirs = self.app.get_all('static_directory', as_dict=True)
links = []
for prefix, dir_a... | Add trailing slashes to docs links | Add trailing slashes to docs links
This avoids hitting the app only to have it redirect back to nginx.
| Python | mit | TangledWeb/tangled.website | from tangled.web import Resource, config
from tangled.site.resources.entry import Entry
class Docs(Entry):
@config('text/html', template='tangled.website:templates/docs.mako')
def GET(self):
static_dirs = self.app.get_all('static_directory', as_dict=True)
links = []
for prefix, dir_a... | from tangled.web import Resource, config
from tangled.site.resources.entry import Entry
class Docs(Entry):
@config('text/html', template='tangled.website:templates/docs.mako')
def GET(self):
static_dirs = self.app.get_all('static_directory', as_dict=True)
links = []
for prefix, dir_a... | <commit_before>from tangled.web import Resource, config
from tangled.site.resources.entry import Entry
class Docs(Entry):
@config('text/html', template='tangled.website:templates/docs.mako')
def GET(self):
static_dirs = self.app.get_all('static_directory', as_dict=True)
links = []
fo... | from tangled.web import Resource, config
from tangled.site.resources.entry import Entry
class Docs(Entry):
@config('text/html', template='tangled.website:templates/docs.mako')
def GET(self):
static_dirs = self.app.get_all('static_directory', as_dict=True)
links = []
for prefix, dir_a... | from tangled.web import Resource, config
from tangled.site.resources.entry import Entry
class Docs(Entry):
@config('text/html', template='tangled.website:templates/docs.mako')
def GET(self):
static_dirs = self.app.get_all('static_directory', as_dict=True)
links = []
for prefix, dir_a... | <commit_before>from tangled.web import Resource, config
from tangled.site.resources.entry import Entry
class Docs(Entry):
@config('text/html', template='tangled.website:templates/docs.mako')
def GET(self):
static_dirs = self.app.get_all('static_directory', as_dict=True)
links = []
fo... |
ba6b70be6bd329e952491eae387281c613794718 | pyledgertools/plugins/download/ofx.py | pyledgertools/plugins/download/ofx.py | """OFX downloader."""
from ofxtools.Client import OFXClient, BankAcct
from ofxtools.Types import DateTime
from yapsy.IPlugin import IPlugin
def make_date_kwargs(config):
return {k:DateTime().convert(v) for k,v in config.items() if k.startswith('dt')}
class OFXDownload(IPlugin):
"""OFX plugin class."""
... | """OFX downloader."""
from ofxtools.Client import OFXClient, BankAcct
from ofxtools.Types import DateTime
from yapsy.IPlugin import IPlugin
def make_date_kwargs(config):
return {k:DateTime().convert(v) for k,v in config.items() if k.startswith('dt')}
class OFXDownload(IPlugin):
"""OFX plugin class."""
... | Replace bankid with fid to avoid duplicate config options. | Replace bankid with fid to avoid duplicate config options.
| Python | unlicense | cgiacofei/pyledgertools,cgiacofei/pyledgertools | """OFX downloader."""
from ofxtools.Client import OFXClient, BankAcct
from ofxtools.Types import DateTime
from yapsy.IPlugin import IPlugin
def make_date_kwargs(config):
return {k:DateTime().convert(v) for k,v in config.items() if k.startswith('dt')}
class OFXDownload(IPlugin):
"""OFX plugin class."""
... | """OFX downloader."""
from ofxtools.Client import OFXClient, BankAcct
from ofxtools.Types import DateTime
from yapsy.IPlugin import IPlugin
def make_date_kwargs(config):
return {k:DateTime().convert(v) for k,v in config.items() if k.startswith('dt')}
class OFXDownload(IPlugin):
"""OFX plugin class."""
... | <commit_before>"""OFX downloader."""
from ofxtools.Client import OFXClient, BankAcct
from ofxtools.Types import DateTime
from yapsy.IPlugin import IPlugin
def make_date_kwargs(config):
return {k:DateTime().convert(v) for k,v in config.items() if k.startswith('dt')}
class OFXDownload(IPlugin):
"""OFX plugin... | """OFX downloader."""
from ofxtools.Client import OFXClient, BankAcct
from ofxtools.Types import DateTime
from yapsy.IPlugin import IPlugin
def make_date_kwargs(config):
return {k:DateTime().convert(v) for k,v in config.items() if k.startswith('dt')}
class OFXDownload(IPlugin):
"""OFX plugin class."""
... | """OFX downloader."""
from ofxtools.Client import OFXClient, BankAcct
from ofxtools.Types import DateTime
from yapsy.IPlugin import IPlugin
def make_date_kwargs(config):
return {k:DateTime().convert(v) for k,v in config.items() if k.startswith('dt')}
class OFXDownload(IPlugin):
"""OFX plugin class."""
... | <commit_before>"""OFX downloader."""
from ofxtools.Client import OFXClient, BankAcct
from ofxtools.Types import DateTime
from yapsy.IPlugin import IPlugin
def make_date_kwargs(config):
return {k:DateTime().convert(v) for k,v in config.items() if k.startswith('dt')}
class OFXDownload(IPlugin):
"""OFX plugin... |
392f58abf7b163bb34e395f5818daa0a13d05342 | pyscriptic/tests/instructions_test.py | pyscriptic/tests/instructions_test.py |
from unittest import TestCase
from pyscriptic.instructions import PipetteOp, TransferGroup, PrePostMix
class PipetteOpTests(TestCase):
def setUp(self):
self.mix = PrePostMix(
volume="5:microliter",
speed="1:microliter/second",
repetitions=10,
)
def test_tr... |
from unittest import TestCase
from pyscriptic.instructions import PipetteOp, TransferGroup, PrePostMix
from pyscriptic.submit import pyobj_to_std_types
class PipetteOpTests(TestCase):
def setUp(self):
self.mix = PrePostMix(
volume="5:microliter",
speed="0.5:microliter/second",
... | Test conversion of Transfer to standard types works | Test conversion of Transfer to standard types works
| Python | bsd-2-clause | naderm/pytranscriptic,naderm/pytranscriptic |
from unittest import TestCase
from pyscriptic.instructions import PipetteOp, TransferGroup, PrePostMix
class PipetteOpTests(TestCase):
def setUp(self):
self.mix = PrePostMix(
volume="5:microliter",
speed="1:microliter/second",
repetitions=10,
)
def test_tr... |
from unittest import TestCase
from pyscriptic.instructions import PipetteOp, TransferGroup, PrePostMix
from pyscriptic.submit import pyobj_to_std_types
class PipetteOpTests(TestCase):
def setUp(self):
self.mix = PrePostMix(
volume="5:microliter",
speed="0.5:microliter/second",
... | <commit_before>
from unittest import TestCase
from pyscriptic.instructions import PipetteOp, TransferGroup, PrePostMix
class PipetteOpTests(TestCase):
def setUp(self):
self.mix = PrePostMix(
volume="5:microliter",
speed="1:microliter/second",
repetitions=10,
)
... |
from unittest import TestCase
from pyscriptic.instructions import PipetteOp, TransferGroup, PrePostMix
from pyscriptic.submit import pyobj_to_std_types
class PipetteOpTests(TestCase):
def setUp(self):
self.mix = PrePostMix(
volume="5:microliter",
speed="0.5:microliter/second",
... |
from unittest import TestCase
from pyscriptic.instructions import PipetteOp, TransferGroup, PrePostMix
class PipetteOpTests(TestCase):
def setUp(self):
self.mix = PrePostMix(
volume="5:microliter",
speed="1:microliter/second",
repetitions=10,
)
def test_tr... | <commit_before>
from unittest import TestCase
from pyscriptic.instructions import PipetteOp, TransferGroup, PrePostMix
class PipetteOpTests(TestCase):
def setUp(self):
self.mix = PrePostMix(
volume="5:microliter",
speed="1:microliter/second",
repetitions=10,
)
... |
5bb4a72f9541fa59fa3770a52da6edb619f5a897 | submodules-to-glockfile.py | submodules-to-glockfile.py | #!/usr/bin/python
import re
import subprocess
def main():
source = open(".gitmodules").read()
paths = re.findall(r"path = (.*)", source)
for path in paths:
print "{repo} {sha}".format(
repo = path[7:],
sha = path_sha1(path)
)
def path_sha1(path):
cmd = "cd {} ... | #!/usr/bin/python
import re
import subprocess
def main():
source = open(".gitmodules").read()
paths = re.findall(r"path = (.*)", source)
print "github.com/localhots/satan {}".format(path_sha1("."))
for path in paths:
print "{repo} {sha}".format(
repo = path[7:],
sha = ... | Add satan sha to glockfile script | Add satan sha to glockfile script
| Python | mit | localhots/satan,localhots/satan,localhots/satan,localhots/satan | #!/usr/bin/python
import re
import subprocess
def main():
source = open(".gitmodules").read()
paths = re.findall(r"path = (.*)", source)
for path in paths:
print "{repo} {sha}".format(
repo = path[7:],
sha = path_sha1(path)
)
def path_sha1(path):
cmd = "cd {} ... | #!/usr/bin/python
import re
import subprocess
def main():
source = open(".gitmodules").read()
paths = re.findall(r"path = (.*)", source)
print "github.com/localhots/satan {}".format(path_sha1("."))
for path in paths:
print "{repo} {sha}".format(
repo = path[7:],
sha = ... | <commit_before>#!/usr/bin/python
import re
import subprocess
def main():
source = open(".gitmodules").read()
paths = re.findall(r"path = (.*)", source)
for path in paths:
print "{repo} {sha}".format(
repo = path[7:],
sha = path_sha1(path)
)
def path_sha1(path):
... | #!/usr/bin/python
import re
import subprocess
def main():
source = open(".gitmodules").read()
paths = re.findall(r"path = (.*)", source)
print "github.com/localhots/satan {}".format(path_sha1("."))
for path in paths:
print "{repo} {sha}".format(
repo = path[7:],
sha = ... | #!/usr/bin/python
import re
import subprocess
def main():
source = open(".gitmodules").read()
paths = re.findall(r"path = (.*)", source)
for path in paths:
print "{repo} {sha}".format(
repo = path[7:],
sha = path_sha1(path)
)
def path_sha1(path):
cmd = "cd {} ... | <commit_before>#!/usr/bin/python
import re
import subprocess
def main():
source = open(".gitmodules").read()
paths = re.findall(r"path = (.*)", source)
for path in paths:
print "{repo} {sha}".format(
repo = path[7:],
sha = path_sha1(path)
)
def path_sha1(path):
... |
e72b6272469c382f14a6732514777aacbd457322 | rest_framework_json_api/exceptions.py | rest_framework_json_api/exceptions.py | from django.utils import encoding
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.views import exception_handler as drf_exception_handler
from rest_framework_json_api.utils import format_value
def excepti... | from django.utils import encoding
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.views import exception_handler as drf_exception_handler
from rest_framework_json_api.utils import format_value
def excepti... | Fix for some error messages that were split into several messages | Fix for some error messages that were split into several messages
The exception handler expects the error to be a list on line 33. In my
case they were a string, which lead to the split of the string into
multiple errors containing one character
| Python | bsd-2-clause | django-json-api/rest_framework_ember,Instawork/django-rest-framework-json-api,leifurhauks/django-rest-framework-json-api,hnakamur/django-rest-framework-json-api,martinmaillard/django-rest-framework-json-api,pombredanne/django-rest-framework-json-api,lukaslundgren/django-rest-framework-json-api,leo-naeka/rest_framework_... | from django.utils import encoding
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.views import exception_handler as drf_exception_handler
from rest_framework_json_api.utils import format_value
def excepti... | from django.utils import encoding
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.views import exception_handler as drf_exception_handler
from rest_framework_json_api.utils import format_value
def excepti... | <commit_before>from django.utils import encoding
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.views import exception_handler as drf_exception_handler
from rest_framework_json_api.utils import format_valu... | from django.utils import encoding
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.views import exception_handler as drf_exception_handler
from rest_framework_json_api.utils import format_value
def excepti... | from django.utils import encoding
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.views import exception_handler as drf_exception_handler
from rest_framework_json_api.utils import format_value
def excepti... | <commit_before>from django.utils import encoding
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.views import exception_handler as drf_exception_handler
from rest_framework_json_api.utils import format_valu... |
385e9c0b8af79de58efd3cf43b1981b7981d0a53 | sympy/geometry/__init__.py | sympy/geometry/__init__.py | """
A geometry module for the SymPy library. This module contains all of the
entities and functions needed to construct basic geometrical data and to
perform simple informational queries.
Usage:
======
Notes:
======
Currently the geometry module is restricted to the 2-dimensional
Euclidean space.
Examples
=... | """
A geometry module for the SymPy library. This module contains all of the
entities and functions needed to construct basic geometrical data and to
perform simple informational queries.
Usage:
======
Notes:
======
Currently the geometry module is restricted to the 2-dimensional
Euclidean space.
Examples
=... | Remove glob imports from sympy.geometry. | Remove glob imports from sympy.geometry.
| Python | bsd-3-clause | postvakje/sympy,Mitchkoens/sympy,farhaanbukhsh/sympy,sampadsaha5/sympy,kumarkrishna/sympy,MechCoder/sympy,lindsayad/sympy,maniteja123/sympy,yashsharan/sympy,sahilshekhawat/sympy,MechCoder/sympy,rahuldan/sympy,yashsharan/sympy,kevalds51/sympy,Designist/sympy,jaimahajan1997/sympy,emon10005/sympy,skidzo/sympy,mcdaniel67/s... | """
A geometry module for the SymPy library. This module contains all of the
entities and functions needed to construct basic geometrical data and to
perform simple informational queries.
Usage:
======
Notes:
======
Currently the geometry module is restricted to the 2-dimensional
Euclidean space.
Examples
=... | """
A geometry module for the SymPy library. This module contains all of the
entities and functions needed to construct basic geometrical data and to
perform simple informational queries.
Usage:
======
Notes:
======
Currently the geometry module is restricted to the 2-dimensional
Euclidean space.
Examples
=... | <commit_before>"""
A geometry module for the SymPy library. This module contains all of the
entities and functions needed to construct basic geometrical data and to
perform simple informational queries.
Usage:
======
Notes:
======
Currently the geometry module is restricted to the 2-dimensional
Euclidean spa... | """
A geometry module for the SymPy library. This module contains all of the
entities and functions needed to construct basic geometrical data and to
perform simple informational queries.
Usage:
======
Notes:
======
Currently the geometry module is restricted to the 2-dimensional
Euclidean space.
Examples
=... | """
A geometry module for the SymPy library. This module contains all of the
entities and functions needed to construct basic geometrical data and to
perform simple informational queries.
Usage:
======
Notes:
======
Currently the geometry module is restricted to the 2-dimensional
Euclidean space.
Examples
=... | <commit_before>"""
A geometry module for the SymPy library. This module contains all of the
entities and functions needed to construct basic geometrical data and to
perform simple informational queries.
Usage:
======
Notes:
======
Currently the geometry module is restricted to the 2-dimensional
Euclidean spa... |
697fcbd5135c9c3610c4131fe36b9a2723be1eeb | mappyfile/__init__.py | mappyfile/__init__.py | # allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import load, loads, find, findall, dumps, write | # allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import load, loads, find, findall, dumps, write
__version__ = "0.3.0" | Add version to module init | Add version to module init
| Python | mit | geographika/mappyfile,geographika/mappyfile | # allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import load, loads, find, findall, dumps, writeAdd version to module init | # allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import load, loads, find, findall, dumps, write
__version__ = "0.3.0" | <commit_before># allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import load, loads, find, findall, dumps, write<commit_msg>Add version to module init<commit_after> | # allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import load, loads, find, findall, dumps, write
__version__ = "0.3.0" | # allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import load, loads, find, findall, dumps, writeAdd version to module init# allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import load, loads, find, findall, dumps, write... | <commit_before># allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import load, loads, find, findall, dumps, write<commit_msg>Add version to module init<commit_after># allow high-level functions to be accessed directly from the mappyfile module
from mappyfile.utils import... |
683765c26e0c852d06fd06a491e3906369ae14cd | votes/urls.py | votes/urls.py | from django.conf.urls import include, url
from django.views.generic import TemplateView
from votes.views import VoteView
urlpatterns = [
url(r'^(?P<vote_name>[\w-]+)$', VoteView.as_view()),
]
| from django.conf.urls import include, url
from django.views.generic import TemplateView
from votes.views import VoteView
urlpatterns = [
url(r'^(?P<vote_name>[\w-]+)$', VoteView.as_view(), name="vote"),
]
| Add name to vote view URL | Add name to vote view URL
| Python | mit | kuboschek/jay,kuboschek/jay,OpenJUB/jay,kuboschek/jay,OpenJUB/jay,OpenJUB/jay | from django.conf.urls import include, url
from django.views.generic import TemplateView
from votes.views import VoteView
urlpatterns = [
url(r'^(?P<vote_name>[\w-]+)$', VoteView.as_view()),
]
Add name to vote view URL | from django.conf.urls import include, url
from django.views.generic import TemplateView
from votes.views import VoteView
urlpatterns = [
url(r'^(?P<vote_name>[\w-]+)$', VoteView.as_view(), name="vote"),
]
| <commit_before>from django.conf.urls import include, url
from django.views.generic import TemplateView
from votes.views import VoteView
urlpatterns = [
url(r'^(?P<vote_name>[\w-]+)$', VoteView.as_view()),
]
<commit_msg>Add name to vote view URL<commit_after> | from django.conf.urls import include, url
from django.views.generic import TemplateView
from votes.views import VoteView
urlpatterns = [
url(r'^(?P<vote_name>[\w-]+)$', VoteView.as_view(), name="vote"),
]
| from django.conf.urls import include, url
from django.views.generic import TemplateView
from votes.views import VoteView
urlpatterns = [
url(r'^(?P<vote_name>[\w-]+)$', VoteView.as_view()),
]
Add name to vote view URLfrom django.conf.urls import include, url
from django.views.generic import TemplateView
from v... | <commit_before>from django.conf.urls import include, url
from django.views.generic import TemplateView
from votes.views import VoteView
urlpatterns = [
url(r'^(?P<vote_name>[\w-]+)$', VoteView.as_view()),
]
<commit_msg>Add name to vote view URL<commit_after>from django.conf.urls import include, url
from django.... |
0a60495fc2baef1c5115cd34e2c062c363dfedc8 | test/streamparse/cli/test_run.py | test/streamparse/cli/test_run.py | from __future__ import absolute_import, unicode_literals
import argparse
import unittest
from nose.tools import ok_
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from streamparse.cli.run import main, subparser_hook
class RunTestCase(unittest.TestCase):
def test_subpar... | from __future__ import absolute_import, unicode_literals
import argparse
import unittest
from nose.tools import ok_
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from streamparse.cli.run import main, subparser_hook
class RunTestCase(unittest.TestCase):
def test_subpar... | Fix mock needing config_file variable | Fix mock needing config_file variable
| Python | apache-2.0 | Parsely/streamparse,Parsely/streamparse | from __future__ import absolute_import, unicode_literals
import argparse
import unittest
from nose.tools import ok_
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from streamparse.cli.run import main, subparser_hook
class RunTestCase(unittest.TestCase):
def test_subpar... | from __future__ import absolute_import, unicode_literals
import argparse
import unittest
from nose.tools import ok_
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from streamparse.cli.run import main, subparser_hook
class RunTestCase(unittest.TestCase):
def test_subpar... | <commit_before>from __future__ import absolute_import, unicode_literals
import argparse
import unittest
from nose.tools import ok_
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from streamparse.cli.run import main, subparser_hook
class RunTestCase(unittest.TestCase):
... | from __future__ import absolute_import, unicode_literals
import argparse
import unittest
from nose.tools import ok_
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from streamparse.cli.run import main, subparser_hook
class RunTestCase(unittest.TestCase):
def test_subpar... | from __future__ import absolute_import, unicode_literals
import argparse
import unittest
from nose.tools import ok_
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from streamparse.cli.run import main, subparser_hook
class RunTestCase(unittest.TestCase):
def test_subpar... | <commit_before>from __future__ import absolute_import, unicode_literals
import argparse
import unittest
from nose.tools import ok_
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from streamparse.cli.run import main, subparser_hook
class RunTestCase(unittest.TestCase):
... |
b665da9bdebb6736eef08f782d7361a34dcd30c5 | bin/import_media.py | bin/import_media.py | #!/usr/bin/python
import sys
sys.path.append('.')
from vacker.importer import Importer
importer = Importer()
# Need to obtain from arguments
importer.import_directory('../sample_photos')
| #!/usr/bin/python
import sys
sys.path.append('.')
import argparse
from vacker.importer import Importer
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--directory', '-d', type=str, dest='directory',
help='Directory to import', required=True)
args = pa... | Update imported to use arg parser | Update imported to use arg parser
| Python | apache-2.0 | MatthewJohn/vacker,MatthewJohn/vacker,MatthewJohn/vacker | #!/usr/bin/python
import sys
sys.path.append('.')
from vacker.importer import Importer
importer = Importer()
# Need to obtain from arguments
importer.import_directory('../sample_photos')
Update imported to use arg parser | #!/usr/bin/python
import sys
sys.path.append('.')
import argparse
from vacker.importer import Importer
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--directory', '-d', type=str, dest='directory',
help='Directory to import', required=True)
args = pa... | <commit_before>#!/usr/bin/python
import sys
sys.path.append('.')
from vacker.importer import Importer
importer = Importer()
# Need to obtain from arguments
importer.import_directory('../sample_photos')
<commit_msg>Update imported to use arg parser<commit_after> | #!/usr/bin/python
import sys
sys.path.append('.')
import argparse
from vacker.importer import Importer
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--directory', '-d', type=str, dest='directory',
help='Directory to import', required=True)
args = pa... | #!/usr/bin/python
import sys
sys.path.append('.')
from vacker.importer import Importer
importer = Importer()
# Need to obtain from arguments
importer.import_directory('../sample_photos')
Update imported to use arg parser#!/usr/bin/python
import sys
sys.path.append('.')
import argparse
from vacker.importer import I... | <commit_before>#!/usr/bin/python
import sys
sys.path.append('.')
from vacker.importer import Importer
importer = Importer()
# Need to obtain from arguments
importer.import_directory('../sample_photos')
<commit_msg>Update imported to use arg parser<commit_after>#!/usr/bin/python
import sys
sys.path.append('.')
impor... |
07f81307d10062cc15704a09015e542197edcafa | doxylink/setup.py | doxylink/setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as stream:
long_desc = stream.read()
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-doxylink',
version='0.3',
url='http://packages.python.org/sphinxcontrib-doxylink',
download_url='http://pypi.python.... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as stream:
long_desc = stream.read()
requires = ['Sphinx>=0.6', 'pyparsing']
setup(
name='sphinxcontrib-doxylink',
version='0.3',
url='http://packages.python.org/sphinxcontrib-doxylink',
download_url='http:/... | Add pyparsing to the dependencies. | Add pyparsing to the dependencies.
| Python | bsd-2-clause | sphinx-contrib/spelling,sphinx-contrib/spelling | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as stream:
long_desc = stream.read()
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-doxylink',
version='0.3',
url='http://packages.python.org/sphinxcontrib-doxylink',
download_url='http://pypi.python.... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as stream:
long_desc = stream.read()
requires = ['Sphinx>=0.6', 'pyparsing']
setup(
name='sphinxcontrib-doxylink',
version='0.3',
url='http://packages.python.org/sphinxcontrib-doxylink',
download_url='http:/... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as stream:
long_desc = stream.read()
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-doxylink',
version='0.3',
url='http://packages.python.org/sphinxcontrib-doxylink',
download_url='http... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as stream:
long_desc = stream.read()
requires = ['Sphinx>=0.6', 'pyparsing']
setup(
name='sphinxcontrib-doxylink',
version='0.3',
url='http://packages.python.org/sphinxcontrib-doxylink',
download_url='http:/... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as stream:
long_desc = stream.read()
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-doxylink',
version='0.3',
url='http://packages.python.org/sphinxcontrib-doxylink',
download_url='http://pypi.python.... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as stream:
long_desc = stream.read()
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-doxylink',
version='0.3',
url='http://packages.python.org/sphinxcontrib-doxylink',
download_url='http... |
f5aa886ed3a38971fe49c115221c849eae1a8e10 | byceps/util/instances.py | byceps/util/instances.py | # -*- coding: utf-8 -*-
"""
byceps.util.instances
~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
class ReprBuilder(object):
"""An instance representation builder."""
def __init__(self, instance):
self.instance = instance
... | # -*- coding: utf-8 -*-
"""
byceps.util.instances
~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
class ReprBuilder(object):
"""An instance representation builder."""
def __init__(self, instance):
self.instance = instance
... | Apply `repr()` to values passed to `ReprBuilder.add`, too | Apply `repr()` to values passed to `ReprBuilder.add`, too
| Python | bsd-3-clause | m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps | # -*- coding: utf-8 -*-
"""
byceps.util.instances
~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
class ReprBuilder(object):
"""An instance representation builder."""
def __init__(self, instance):
self.instance = instance
... | # -*- coding: utf-8 -*-
"""
byceps.util.instances
~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
class ReprBuilder(object):
"""An instance representation builder."""
def __init__(self, instance):
self.instance = instance
... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.util.instances
~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
class ReprBuilder(object):
"""An instance representation builder."""
def __init__(self, instance):
self.instance = i... | # -*- coding: utf-8 -*-
"""
byceps.util.instances
~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
class ReprBuilder(object):
"""An instance representation builder."""
def __init__(self, instance):
self.instance = instance
... | # -*- coding: utf-8 -*-
"""
byceps.util.instances
~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
class ReprBuilder(object):
"""An instance representation builder."""
def __init__(self, instance):
self.instance = instance
... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.util.instances
~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2016 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
class ReprBuilder(object):
"""An instance representation builder."""
def __init__(self, instance):
self.instance = i... |
2d4310cab029269cd53c776a3da238fa375e2ee1 | DebianChangesBot/mailparsers/accepted_upload.py | DebianChangesBot/mailparsers/accepted_upload.py | # -*- coding: utf-8 -*-
from DebianChangesBot import MailParser
from DebianChangesBot.messages import AcceptedUploadMessage
class AcceptedUploadParser(MailParser):
@staticmethod
def parse(headers, body):
msg = AcceptedUploadMessage()
mapping = {
'Source': 'package',
'... | # -*- coding: utf-8 -*-
from DebianChangesBot import MailParser
from DebianChangesBot.messages import AcceptedUploadMessage
class AcceptedUploadParser(MailParser):
@staticmethod
def parse(headers, body):
if headers.get('List-Id', '') != '<debian-devel-changes.lists.debian.org>':
return
... | Check accepted uploads List-Id, otherwise we get false +ves from bugs-dist | Check accepted uploads List-Id, otherwise we get false +ves from bugs-dist
Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>
| Python | agpl-3.0 | xtaran/debian-devel-changes-bot,sebastinas/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,lamby/debian-devel-changes-bot,lamby/debian-devel-changes-bot,lamby/debian-devel-changes-bot | # -*- coding: utf-8 -*-
from DebianChangesBot import MailParser
from DebianChangesBot.messages import AcceptedUploadMessage
class AcceptedUploadParser(MailParser):
@staticmethod
def parse(headers, body):
msg = AcceptedUploadMessage()
mapping = {
'Source': 'package',
'... | # -*- coding: utf-8 -*-
from DebianChangesBot import MailParser
from DebianChangesBot.messages import AcceptedUploadMessage
class AcceptedUploadParser(MailParser):
@staticmethod
def parse(headers, body):
if headers.get('List-Id', '') != '<debian-devel-changes.lists.debian.org>':
return
... | <commit_before># -*- coding: utf-8 -*-
from DebianChangesBot import MailParser
from DebianChangesBot.messages import AcceptedUploadMessage
class AcceptedUploadParser(MailParser):
@staticmethod
def parse(headers, body):
msg = AcceptedUploadMessage()
mapping = {
'Source': 'package'... | # -*- coding: utf-8 -*-
from DebianChangesBot import MailParser
from DebianChangesBot.messages import AcceptedUploadMessage
class AcceptedUploadParser(MailParser):
@staticmethod
def parse(headers, body):
if headers.get('List-Id', '') != '<debian-devel-changes.lists.debian.org>':
return
... | # -*- coding: utf-8 -*-
from DebianChangesBot import MailParser
from DebianChangesBot.messages import AcceptedUploadMessage
class AcceptedUploadParser(MailParser):
@staticmethod
def parse(headers, body):
msg = AcceptedUploadMessage()
mapping = {
'Source': 'package',
'... | <commit_before># -*- coding: utf-8 -*-
from DebianChangesBot import MailParser
from DebianChangesBot.messages import AcceptedUploadMessage
class AcceptedUploadParser(MailParser):
@staticmethod
def parse(headers, body):
msg = AcceptedUploadMessage()
mapping = {
'Source': 'package'... |
4180680c9964661d3edd9eafad23b8d90699170d | fuzzyfinder/main.py | fuzzyfinder/main.py | # -*- coding: utf-8 -*-
import re
from . import export
@export
def fuzzyfinder(input, collection, accessor=lambda x: x):
"""
Args:
input (str): A partial string which is typically entered by a user.
collection (iterable): A collection of strings which will be filtered
... | # -*- coding: utf-8 -*-
import re
from . import export
@export
def fuzzyfinder(input, collection, accessor=lambda x: x):
"""
Args:
input (str): A partial string which is typically entered by a user.
collection (iterable): A collection of strings which will be filtered
... | Use accessor to use in sort. | Use accessor to use in sort.
| Python | bsd-3-clause | amjith/fuzzyfinder | # -*- coding: utf-8 -*-
import re
from . import export
@export
def fuzzyfinder(input, collection, accessor=lambda x: x):
"""
Args:
input (str): A partial string which is typically entered by a user.
collection (iterable): A collection of strings which will be filtered
... | # -*- coding: utf-8 -*-
import re
from . import export
@export
def fuzzyfinder(input, collection, accessor=lambda x: x):
"""
Args:
input (str): A partial string which is typically entered by a user.
collection (iterable): A collection of strings which will be filtered
... | <commit_before># -*- coding: utf-8 -*-
import re
from . import export
@export
def fuzzyfinder(input, collection, accessor=lambda x: x):
"""
Args:
input (str): A partial string which is typically entered by a user.
collection (iterable): A collection of strings which will be filtered
... | # -*- coding: utf-8 -*-
import re
from . import export
@export
def fuzzyfinder(input, collection, accessor=lambda x: x):
"""
Args:
input (str): A partial string which is typically entered by a user.
collection (iterable): A collection of strings which will be filtered
... | # -*- coding: utf-8 -*-
import re
from . import export
@export
def fuzzyfinder(input, collection, accessor=lambda x: x):
"""
Args:
input (str): A partial string which is typically entered by a user.
collection (iterable): A collection of strings which will be filtered
... | <commit_before># -*- coding: utf-8 -*-
import re
from . import export
@export
def fuzzyfinder(input, collection, accessor=lambda x: x):
"""
Args:
input (str): A partial string which is typically entered by a user.
collection (iterable): A collection of strings which will be filtered
... |
e80d4b35472e692f05e986116a5910e1a9612f74 | build/android/pylib/gtest/gtest_config.py | build/android/pylib/gtest/gtest_config.py | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TEST_SUITES = [
... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TEST_SUITES = [
... | Move andorid webkit tests to main waterfall and CQ | Move andorid webkit tests to main waterfall and CQ
They have been stable and fast on FYI bots for a week.
TBR=yfriedman@chromium.org
Review URL: https://codereview.chromium.org/12093034
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@179266 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,dednal/chromium.src,markYoungH/chromium.src,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,TheTypoMaster... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TEST_SUITES = [
... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TEST_SUITES = [
... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TES... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TEST_SUITES = [
... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TEST_SUITES = [
... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TES... |
17ef821757df8eadfe8bf4769e57503625464f7b | bucketeer/test/test_commit.py | bucketeer/test/test_commit.py | import unittest, boto, os
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
# Constants - TODO move to config file
global existing_bucket, test_dir, test_file
existing_bucket = 'bucket.exists'
test_dir = 'bucketeer_test_dir'
test_file = 'bucketeer_test_file'
def setUp(self):
connec... | import unittest, boto, os
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
# Constants - TODO move to config file
global existing_bucket, test_dir, test_file
existing_bucket = 'bucket.exists'
test_dir = 'bucketeer_test_dir'
test_file = 'bucketeer_test_file'
def setUp(self):
connec... | Refactor test name to include the word 'To' | Refactor test name to include the word 'To'
Previous: testNewFileUploadExistingBucket
Current: testNewFileUploadToExistingBucket
| Python | mit | mgarbacz/bucketeer | import unittest, boto, os
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
# Constants - TODO move to config file
global existing_bucket, test_dir, test_file
existing_bucket = 'bucket.exists'
test_dir = 'bucketeer_test_dir'
test_file = 'bucketeer_test_file'
def setUp(self):
connec... | import unittest, boto, os
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
# Constants - TODO move to config file
global existing_bucket, test_dir, test_file
existing_bucket = 'bucket.exists'
test_dir = 'bucketeer_test_dir'
test_file = 'bucketeer_test_file'
def setUp(self):
connec... | <commit_before>import unittest, boto, os
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
# Constants - TODO move to config file
global existing_bucket, test_dir, test_file
existing_bucket = 'bucket.exists'
test_dir = 'bucketeer_test_dir'
test_file = 'bucketeer_test_file'
def setUp(se... | import unittest, boto, os
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
# Constants - TODO move to config file
global existing_bucket, test_dir, test_file
existing_bucket = 'bucket.exists'
test_dir = 'bucketeer_test_dir'
test_file = 'bucketeer_test_file'
def setUp(self):
connec... | import unittest, boto, os
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
# Constants - TODO move to config file
global existing_bucket, test_dir, test_file
existing_bucket = 'bucket.exists'
test_dir = 'bucketeer_test_dir'
test_file = 'bucketeer_test_file'
def setUp(self):
connec... | <commit_before>import unittest, boto, os
from bucketeer import commit
class BuckeeterTest(unittest.TestCase):
# Constants - TODO move to config file
global existing_bucket, test_dir, test_file
existing_bucket = 'bucket.exists'
test_dir = 'bucketeer_test_dir'
test_file = 'bucketeer_test_file'
def setUp(se... |
b39ea7848141037c7829a01d789591d91a81398e | ceph_medic/tests/test_main.py | ceph_medic/tests/test_main.py | import pytest
import ceph_medic.main
class TestMain(object):
def test_main(self):
assert ceph_medic.main
def test_invalid_ssh_config(self, capsys):
argv = ["ceph-medic", "--ssh-config", "/does/not/exist"]
with pytest.raises(SystemExit):
ceph_medic.main.Medic(argv)
... | import pytest
import ceph_medic.main
class TestMain(object):
def test_main(self):
assert ceph_medic.main
def test_invalid_ssh_config(self, capsys):
argv = ["ceph-medic", "--ssh-config", "/does/not/exist"]
with pytest.raises(SystemExit):
ceph_medic.main.Medic(argv)
... | Add test for valid ssh_config | tests/main: Add test for valid ssh_config
Signed-off-by: Zack Cerza <d7cdf09fc0f0426e98c9978ee42da5d61fa54986@redhat.com>
| Python | mit | alfredodeza/ceph-doctor | import pytest
import ceph_medic.main
class TestMain(object):
def test_main(self):
assert ceph_medic.main
def test_invalid_ssh_config(self, capsys):
argv = ["ceph-medic", "--ssh-config", "/does/not/exist"]
with pytest.raises(SystemExit):
ceph_medic.main.Medic(argv)
... | import pytest
import ceph_medic.main
class TestMain(object):
def test_main(self):
assert ceph_medic.main
def test_invalid_ssh_config(self, capsys):
argv = ["ceph-medic", "--ssh-config", "/does/not/exist"]
with pytest.raises(SystemExit):
ceph_medic.main.Medic(argv)
... | <commit_before>import pytest
import ceph_medic.main
class TestMain(object):
def test_main(self):
assert ceph_medic.main
def test_invalid_ssh_config(self, capsys):
argv = ["ceph-medic", "--ssh-config", "/does/not/exist"]
with pytest.raises(SystemExit):
ceph_medic.main.Medic... | import pytest
import ceph_medic.main
class TestMain(object):
def test_main(self):
assert ceph_medic.main
def test_invalid_ssh_config(self, capsys):
argv = ["ceph-medic", "--ssh-config", "/does/not/exist"]
with pytest.raises(SystemExit):
ceph_medic.main.Medic(argv)
... | import pytest
import ceph_medic.main
class TestMain(object):
def test_main(self):
assert ceph_medic.main
def test_invalid_ssh_config(self, capsys):
argv = ["ceph-medic", "--ssh-config", "/does/not/exist"]
with pytest.raises(SystemExit):
ceph_medic.main.Medic(argv)
... | <commit_before>import pytest
import ceph_medic.main
class TestMain(object):
def test_main(self):
assert ceph_medic.main
def test_invalid_ssh_config(self, capsys):
argv = ["ceph-medic", "--ssh-config", "/does/not/exist"]
with pytest.raises(SystemExit):
ceph_medic.main.Medic... |
36998345ef900286527a3896f70cf4a85414ccf8 | rohrpost/main.py | rohrpost/main.py | import json
from functools import partial
from . import handlers # noqa
from .message import send_error
from .registry import HANDLERS
REQUIRED_FIELDS = ['type', 'id']
try:
DECODE_ERRORS = (json.JSONDecodeError, TypeError)
except AttributeError:
# Python 3.3 and 3.4 raise a ValueError instead of json.JSOND... | import json
from functools import partial
from . import handlers # noqa
from .message import send_error
from .registry import HANDLERS
REQUIRED_FIELDS = ['type', 'id']
try:
DECODE_ERRORS = (json.JSONDecodeError, TypeError)
except AttributeError:
# Python 3.3 and 3.4 raise a ValueError instead of json.JSOND... | Use keyword arguments in code | Use keyword arguments in code
| Python | mit | axsemantics/rohrpost,axsemantics/rohrpost | import json
from functools import partial
from . import handlers # noqa
from .message import send_error
from .registry import HANDLERS
REQUIRED_FIELDS = ['type', 'id']
try:
DECODE_ERRORS = (json.JSONDecodeError, TypeError)
except AttributeError:
# Python 3.3 and 3.4 raise a ValueError instead of json.JSOND... | import json
from functools import partial
from . import handlers # noqa
from .message import send_error
from .registry import HANDLERS
REQUIRED_FIELDS = ['type', 'id']
try:
DECODE_ERRORS = (json.JSONDecodeError, TypeError)
except AttributeError:
# Python 3.3 and 3.4 raise a ValueError instead of json.JSOND... | <commit_before>import json
from functools import partial
from . import handlers # noqa
from .message import send_error
from .registry import HANDLERS
REQUIRED_FIELDS = ['type', 'id']
try:
DECODE_ERRORS = (json.JSONDecodeError, TypeError)
except AttributeError:
# Python 3.3 and 3.4 raise a ValueError instea... | import json
from functools import partial
from . import handlers # noqa
from .message import send_error
from .registry import HANDLERS
REQUIRED_FIELDS = ['type', 'id']
try:
DECODE_ERRORS = (json.JSONDecodeError, TypeError)
except AttributeError:
# Python 3.3 and 3.4 raise a ValueError instead of json.JSOND... | import json
from functools import partial
from . import handlers # noqa
from .message import send_error
from .registry import HANDLERS
REQUIRED_FIELDS = ['type', 'id']
try:
DECODE_ERRORS = (json.JSONDecodeError, TypeError)
except AttributeError:
# Python 3.3 and 3.4 raise a ValueError instead of json.JSOND... | <commit_before>import json
from functools import partial
from . import handlers # noqa
from .message import send_error
from .registry import HANDLERS
REQUIRED_FIELDS = ['type', 'id']
try:
DECODE_ERRORS = (json.JSONDecodeError, TypeError)
except AttributeError:
# Python 3.3 and 3.4 raise a ValueError instea... |
d9a205dce1f67151ff896909413bb7128e54a4ec | dduplicated/cli.py | dduplicated/cli.py | # The client of DDuplicated tool.
from os import path as opath, getcwd
from pprint import pprint
from sys import argv
from dduplicated import commands
def get_paths(params):
paths = []
for param in params:
path = opath.join(getcwd(), param)
if opath.exists(path) and opath.isdir(path) and not opath.islink(path):... | # The client of DDuplicated tool.
from os import path as opath, getcwd
from pprint import pprint
from sys import argv
from dduplicated import commands
def get_paths(params):
paths = []
for param in params:
path = opath.join(getcwd(), param)
if opath.exists(path) and opath.isdir(path) and not opath.islink(path):... | Fix in output to help command. | Fix in output to help command.
Signed-off-by: messiasthi <8562fc1efba9a3c99753c749fdfb1b6932b70fbf@gmail.com>
| Python | mit | messiasthi/dduplicated-cli | # The client of DDuplicated tool.
from os import path as opath, getcwd
from pprint import pprint
from sys import argv
from dduplicated import commands
def get_paths(params):
paths = []
for param in params:
path = opath.join(getcwd(), param)
if opath.exists(path) and opath.isdir(path) and not opath.islink(path):... | # The client of DDuplicated tool.
from os import path as opath, getcwd
from pprint import pprint
from sys import argv
from dduplicated import commands
def get_paths(params):
paths = []
for param in params:
path = opath.join(getcwd(), param)
if opath.exists(path) and opath.isdir(path) and not opath.islink(path):... | <commit_before># The client of DDuplicated tool.
from os import path as opath, getcwd
from pprint import pprint
from sys import argv
from dduplicated import commands
def get_paths(params):
paths = []
for param in params:
path = opath.join(getcwd(), param)
if opath.exists(path) and opath.isdir(path) and not opat... | # The client of DDuplicated tool.
from os import path as opath, getcwd
from pprint import pprint
from sys import argv
from dduplicated import commands
def get_paths(params):
paths = []
for param in params:
path = opath.join(getcwd(), param)
if opath.exists(path) and opath.isdir(path) and not opath.islink(path):... | # The client of DDuplicated tool.
from os import path as opath, getcwd
from pprint import pprint
from sys import argv
from dduplicated import commands
def get_paths(params):
paths = []
for param in params:
path = opath.join(getcwd(), param)
if opath.exists(path) and opath.isdir(path) and not opath.islink(path):... | <commit_before># The client of DDuplicated tool.
from os import path as opath, getcwd
from pprint import pprint
from sys import argv
from dduplicated import commands
def get_paths(params):
paths = []
for param in params:
path = opath.join(getcwd(), param)
if opath.exists(path) and opath.isdir(path) and not opat... |
194557f236016ec0978e5cc465ba40e7b8dff714 | s3backup/main.py | s3backup/main.py | # -*- coding: utf-8 -*-
from s3backup.clients import compare, LocalSyncClient
def sync():
local_client = LocalSyncClient('/home/michael/Notebooks')
current = local_client.get_current_state()
index = local_client.get_index_state()
print(list(compare(current, index)))
local_client.update_index()
| # -*- coding: utf-8 -*-
import os
from s3backup.clients import compare, LocalSyncClient
def sync():
target_folder = os.path.expanduser('~/Notebooks')
local_client = LocalSyncClient(target_folder)
current = local_client.get_current_state()
index = local_client.get_index_state()
print(list(compar... | Use expanduser to prevent hardcoding username | Use expanduser to prevent hardcoding username
| Python | mit | MichaelAquilina/s3backup,MichaelAquilina/s3backup | # -*- coding: utf-8 -*-
from s3backup.clients import compare, LocalSyncClient
def sync():
local_client = LocalSyncClient('/home/michael/Notebooks')
current = local_client.get_current_state()
index = local_client.get_index_state()
print(list(compare(current, index)))
local_client.update_index()
Us... | # -*- coding: utf-8 -*-
import os
from s3backup.clients import compare, LocalSyncClient
def sync():
target_folder = os.path.expanduser('~/Notebooks')
local_client = LocalSyncClient(target_folder)
current = local_client.get_current_state()
index = local_client.get_index_state()
print(list(compar... | <commit_before># -*- coding: utf-8 -*-
from s3backup.clients import compare, LocalSyncClient
def sync():
local_client = LocalSyncClient('/home/michael/Notebooks')
current = local_client.get_current_state()
index = local_client.get_index_state()
print(list(compare(current, index)))
local_client.up... | # -*- coding: utf-8 -*-
import os
from s3backup.clients import compare, LocalSyncClient
def sync():
target_folder = os.path.expanduser('~/Notebooks')
local_client = LocalSyncClient(target_folder)
current = local_client.get_current_state()
index = local_client.get_index_state()
print(list(compar... | # -*- coding: utf-8 -*-
from s3backup.clients import compare, LocalSyncClient
def sync():
local_client = LocalSyncClient('/home/michael/Notebooks')
current = local_client.get_current_state()
index = local_client.get_index_state()
print(list(compare(current, index)))
local_client.update_index()
Us... | <commit_before># -*- coding: utf-8 -*-
from s3backup.clients import compare, LocalSyncClient
def sync():
local_client = LocalSyncClient('/home/michael/Notebooks')
current = local_client.get_current_state()
index = local_client.get_index_state()
print(list(compare(current, index)))
local_client.up... |
a4a37a783efcfd1cbb21acc29077c8096a0a0198 | spacy/lang/pl/__init__.py | spacy/lang/pl/__init__.py | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .stop_words import STOP_WORDS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...language import Language
from ...attrs import LANG
from ...util import update_exc
class Polish(Language):
la... | # coding: utf8
from __future__ import unicode_literals
from .stop_words import STOP_WORDS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...language import Language
from ...attrs import LANG
from ...util import update_exc
class Polish(Language):
lang = 'pl'
class Defaults(Language.Defaults):
... | Remove import from non-existing module | Remove import from non-existing module
| Python | mit | honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy,recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/s... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .stop_words import STOP_WORDS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...language import Language
from ...attrs import LANG
from ...util import update_exc
class Polish(Language):
la... | # coding: utf8
from __future__ import unicode_literals
from .stop_words import STOP_WORDS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...language import Language
from ...attrs import LANG
from ...util import update_exc
class Polish(Language):
lang = 'pl'
class Defaults(Language.Defaults):
... | <commit_before># coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .stop_words import STOP_WORDS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...language import Language
from ...attrs import LANG
from ...util import update_exc
class Polish(La... | # coding: utf8
from __future__ import unicode_literals
from .stop_words import STOP_WORDS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...language import Language
from ...attrs import LANG
from ...util import update_exc
class Polish(Language):
lang = 'pl'
class Defaults(Language.Defaults):
... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .stop_words import STOP_WORDS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...language import Language
from ...attrs import LANG
from ...util import update_exc
class Polish(Language):
la... | <commit_before># coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .stop_words import STOP_WORDS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...language import Language
from ...attrs import LANG
from ...util import update_exc
class Polish(La... |
530b1b09b7fd6215822283c22c126ce7c18ac9a9 | services/rdio.py | services/rdio.py | from werkzeug.urls import url_decode
from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_BODY
import foauth.providers
class Rdio(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.rdio.com/'
docs_url = 'http://developer.rdio.com/docs/REST/'
category = 'Music'
#... | from werkzeug.urls import url_decode
import foauth.providers
class Rdio(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.rdio.com/'
docs_url = 'http://developer.rdio.com/docs/REST/'
category = 'Music'
# URLs to interact with the API
request_token_url = '... | Allow Rdio to use default signature handling | Allow Rdio to use default signature handling
| Python | bsd-3-clause | foauth/foauth.org,foauth/foauth.org,foauth/foauth.org | from werkzeug.urls import url_decode
from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_BODY
import foauth.providers
class Rdio(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.rdio.com/'
docs_url = 'http://developer.rdio.com/docs/REST/'
category = 'Music'
#... | from werkzeug.urls import url_decode
import foauth.providers
class Rdio(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.rdio.com/'
docs_url = 'http://developer.rdio.com/docs/REST/'
category = 'Music'
# URLs to interact with the API
request_token_url = '... | <commit_before>from werkzeug.urls import url_decode
from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_BODY
import foauth.providers
class Rdio(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.rdio.com/'
docs_url = 'http://developer.rdio.com/docs/REST/'
category =... | from werkzeug.urls import url_decode
import foauth.providers
class Rdio(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.rdio.com/'
docs_url = 'http://developer.rdio.com/docs/REST/'
category = 'Music'
# URLs to interact with the API
request_token_url = '... | from werkzeug.urls import url_decode
from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_BODY
import foauth.providers
class Rdio(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.rdio.com/'
docs_url = 'http://developer.rdio.com/docs/REST/'
category = 'Music'
#... | <commit_before>from werkzeug.urls import url_decode
from oauthlib.oauth1.rfc5849 import SIGNATURE_TYPE_BODY
import foauth.providers
class Rdio(foauth.providers.OAuth1):
# General info about the provider
provider_url = 'http://www.rdio.com/'
docs_url = 'http://developer.rdio.com/docs/REST/'
category =... |
7486f423d018aaf53af94bc8af8bde6d46e73e71 | class4/exercise6.py | class4/exercise6.py | from getpass import getpass
from netmiko import ConnectHandler
def main():
password = getpass()
pynet_rtr1 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 22}
pynet_rtr2 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'pa... | # Use Netmiko to execute 'show arp' on pynet-rtr1, pynet-rtr2, and juniper-srx.
from getpass import getpass
from netmiko import ConnectHandler
def main():
password = getpass()
pynet_rtr1 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 22}
pynet_rtr... | Use Netmiko to execute 'show arp' on pynet-rtr1, pynet-rtr2, and juniper-srx. | Use Netmiko to execute 'show arp' on pynet-rtr1, pynet-rtr2, and juniper-srx.
| Python | apache-2.0 | linkdebian/pynet_course | from getpass import getpass
from netmiko import ConnectHandler
def main():
password = getpass()
pynet_rtr1 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 22}
pynet_rtr2 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'pa... | # Use Netmiko to execute 'show arp' on pynet-rtr1, pynet-rtr2, and juniper-srx.
from getpass import getpass
from netmiko import ConnectHandler
def main():
password = getpass()
pynet_rtr1 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 22}
pynet_rtr... | <commit_before>from getpass import getpass
from netmiko import ConnectHandler
def main():
password = getpass()
pynet_rtr1 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 22}
pynet_rtr2 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username':... | # Use Netmiko to execute 'show arp' on pynet-rtr1, pynet-rtr2, and juniper-srx.
from getpass import getpass
from netmiko import ConnectHandler
def main():
password = getpass()
pynet_rtr1 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 22}
pynet_rtr... | from getpass import getpass
from netmiko import ConnectHandler
def main():
password = getpass()
pynet_rtr1 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 22}
pynet_rtr2 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'pa... | <commit_before>from getpass import getpass
from netmiko import ConnectHandler
def main():
password = getpass()
pynet_rtr1 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username': 'pyclass', 'password': password, 'port': 22}
pynet_rtr2 = {'device_type': 'cisco_ios', 'ip': '50.76.53.27', 'username':... |
3decbd1e235a6a43541bb8e9846ea1d08bec1ef8 | tools/linter_lib/pyflakes.py | tools/linter_lib/pyflakes.py | import argparse
from typing import List
from zulint.linters import run_pyflakes
def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:
suppress_patterns = [
("scripts/lib/pythonrc.py", "imported but unused"),
# Intentionally imported by zerver/lib/webhooks/common.py
(... | import argparse
from typing import List
from zulint.linters import run_pyflakes
def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:
suppress_patterns = [
("scripts/lib/pythonrc.py", "imported but unused"),
# Intentionally imported by zerver/lib/webhooks/common.py
(... | Remove settings exemption for possibly undefined star imports. | lint: Remove settings exemption for possibly undefined star imports.
Signed-off-by: Anders Kaseorg <dfdb7392591db597bc41cf266a9c3bc12a2706e5@zulip.com>
| Python | apache-2.0 | timabbott/zulip,eeshangarg/zulip,synicalsyntax/zulip,eeshangarg/zulip,showell/zulip,timabbott/zulip,synicalsyntax/zulip,kou/zulip,zulip/zulip,hackerkid/zulip,brainwane/zulip,punchagan/zulip,timabbott/zulip,showell/zulip,brainwane/zulip,brainwane/zulip,eeshangarg/zulip,kou/zulip,timabbott/zulip,hackerkid/zulip,zulip/zul... | import argparse
from typing import List
from zulint.linters import run_pyflakes
def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:
suppress_patterns = [
("scripts/lib/pythonrc.py", "imported but unused"),
# Intentionally imported by zerver/lib/webhooks/common.py
(... | import argparse
from typing import List
from zulint.linters import run_pyflakes
def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:
suppress_patterns = [
("scripts/lib/pythonrc.py", "imported but unused"),
# Intentionally imported by zerver/lib/webhooks/common.py
(... | <commit_before>import argparse
from typing import List
from zulint.linters import run_pyflakes
def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:
suppress_patterns = [
("scripts/lib/pythonrc.py", "imported but unused"),
# Intentionally imported by zerver/lib/webhooks/comm... | import argparse
from typing import List
from zulint.linters import run_pyflakes
def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:
suppress_patterns = [
("scripts/lib/pythonrc.py", "imported but unused"),
# Intentionally imported by zerver/lib/webhooks/common.py
(... | import argparse
from typing import List
from zulint.linters import run_pyflakes
def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:
suppress_patterns = [
("scripts/lib/pythonrc.py", "imported but unused"),
# Intentionally imported by zerver/lib/webhooks/common.py
(... | <commit_before>import argparse
from typing import List
from zulint.linters import run_pyflakes
def check_pyflakes(files: List[str], options: argparse.Namespace) -> bool:
suppress_patterns = [
("scripts/lib/pythonrc.py", "imported but unused"),
# Intentionally imported by zerver/lib/webhooks/comm... |
5231efb00409ffd0b1b0e1cf111d81782468cdd3 | wye/regions/forms.py | wye/regions/forms.py | from django import forms
from django.core.exceptions import ValidationError
from wye.profiles.models import UserType
from . import models
class RegionalLeadForm(forms.ModelForm):
class Meta:
model = models.RegionalLead
exclude = ()
def clean(self):
location = self.cleaned_data['loc... | from django import forms
from django.core.exceptions import ValidationError
from wye.profiles.models import UserType
from . import models
class RegionalLeadForm(forms.ModelForm):
class Meta:
model = models.RegionalLead
exclude = ()
def clean(self):
error_message = []
if (se... | Handle empty location and leads data | Handle empty location and leads data
| Python | mit | shankig/wye,harisibrahimkv/wye,shankisg/wye,shankisg/wye,shankisg/wye,harisibrahimkv/wye,pythonindia/wye,pythonindia/wye,shankig/wye,DESHRAJ/wye,harisibrahimkv/wye,pythonindia/wye,shankig/wye,shankig/wye,shankisg/wye,DESHRAJ/wye,harisibrahimkv/wye,DESHRAJ/wye,DESHRAJ/wye,pythonindia/wye | from django import forms
from django.core.exceptions import ValidationError
from wye.profiles.models import UserType
from . import models
class RegionalLeadForm(forms.ModelForm):
class Meta:
model = models.RegionalLead
exclude = ()
def clean(self):
location = self.cleaned_data['loc... | from django import forms
from django.core.exceptions import ValidationError
from wye.profiles.models import UserType
from . import models
class RegionalLeadForm(forms.ModelForm):
class Meta:
model = models.RegionalLead
exclude = ()
def clean(self):
error_message = []
if (se... | <commit_before>from django import forms
from django.core.exceptions import ValidationError
from wye.profiles.models import UserType
from . import models
class RegionalLeadForm(forms.ModelForm):
class Meta:
model = models.RegionalLead
exclude = ()
def clean(self):
location = self.cl... | from django import forms
from django.core.exceptions import ValidationError
from wye.profiles.models import UserType
from . import models
class RegionalLeadForm(forms.ModelForm):
class Meta:
model = models.RegionalLead
exclude = ()
def clean(self):
error_message = []
if (se... | from django import forms
from django.core.exceptions import ValidationError
from wye.profiles.models import UserType
from . import models
class RegionalLeadForm(forms.ModelForm):
class Meta:
model = models.RegionalLead
exclude = ()
def clean(self):
location = self.cleaned_data['loc... | <commit_before>from django import forms
from django.core.exceptions import ValidationError
from wye.profiles.models import UserType
from . import models
class RegionalLeadForm(forms.ModelForm):
class Meta:
model = models.RegionalLead
exclude = ()
def clean(self):
location = self.cl... |
e1514fa5bcc35df74295c254df65e8e99dc289a1 | speeches/util.py | speeches/util.py | from speeches.tasks import transcribe_speech
from django.forms.widgets import SplitDateTimeWidget
"""Common utility functions/classes
Things that are needed by multiple bits of code but are specific enough to
this project not to be in a separate python package"""
def start_transcribing_speech(speech):
"""Kick off... | from speeches.tasks import transcribe_speech
"""Common utility functions/classes
Things that are needed by multiple bits of code but are specific enough to
this project not to be in a separate python package"""
def start_transcribing_speech(speech):
"""Kick off a celery task to transcribe a speech"""
# We onl... | Remove BootstrapSplitDateTimeWidget as it's no longer needed | Remove BootstrapSplitDateTimeWidget as it's no longer needed
| Python | agpl-3.0 | opencorato/sayit,opencorato/sayit,opencorato/sayit,opencorato/sayit | from speeches.tasks import transcribe_speech
from django.forms.widgets import SplitDateTimeWidget
"""Common utility functions/classes
Things that are needed by multiple bits of code but are specific enough to
this project not to be in a separate python package"""
def start_transcribing_speech(speech):
"""Kick off... | from speeches.tasks import transcribe_speech
"""Common utility functions/classes
Things that are needed by multiple bits of code but are specific enough to
this project not to be in a separate python package"""
def start_transcribing_speech(speech):
"""Kick off a celery task to transcribe a speech"""
# We onl... | <commit_before>from speeches.tasks import transcribe_speech
from django.forms.widgets import SplitDateTimeWidget
"""Common utility functions/classes
Things that are needed by multiple bits of code but are specific enough to
this project not to be in a separate python package"""
def start_transcribing_speech(speech):
... | from speeches.tasks import transcribe_speech
"""Common utility functions/classes
Things that are needed by multiple bits of code but are specific enough to
this project not to be in a separate python package"""
def start_transcribing_speech(speech):
"""Kick off a celery task to transcribe a speech"""
# We onl... | from speeches.tasks import transcribe_speech
from django.forms.widgets import SplitDateTimeWidget
"""Common utility functions/classes
Things that are needed by multiple bits of code but are specific enough to
this project not to be in a separate python package"""
def start_transcribing_speech(speech):
"""Kick off... | <commit_before>from speeches.tasks import transcribe_speech
from django.forms.widgets import SplitDateTimeWidget
"""Common utility functions/classes
Things that are needed by multiple bits of code but are specific enough to
this project not to be in a separate python package"""
def start_transcribing_speech(speech):
... |
ab0fd99e1c2c336cd5ce68e5fdb8a58384bfa794 | elasticsearch.py | elasticsearch.py | #!/usr/bin/env python
import json
import requests
ES_HOST = 'localhost'
ES_PORT = '9200'
ELASTICSEARCH = 'http://{0}:{1}'.format(ES_HOST, ES_PORT)
def find_indices():
"""Find indices created by logstash."""
url = ELASTICSEARCH + '/_search'
r = requests.get(url, params={'_q': '_index like logstash%'})
... | #!/usr/bin/env python
import json
import requests
ES_HOST = 'localhost'
ES_PORT = '9200'
ELASTICSEARCH = 'http://{0}:{1}'.format(ES_HOST, ES_PORT)
def find_indices():
"""Find indices created by logstash."""
url = ELASTICSEARCH + '/_search'
r = requests.get(url, params={'_q': '_index like logstash%'})
... | Handle the case where there are no logs | Handle the case where there are no logs
| Python | apache-2.0 | mancdaz/rpc-openstack,busterswt/rpc-openstack,npawelek/rpc-maas,git-harry/rpc-openstack,sigmavirus24/rpc-openstack,jpmontez/rpc-openstack,mattt416/rpc-openstack,xeregin/rpc-openstack,busterswt/rpc-openstack,stevelle/rpc-openstack,xeregin/rpc-openstack,miguelgrinberg/rpc-openstack,cfarquhar/rpc-openstack,xeregin/rpc-ope... | #!/usr/bin/env python
import json
import requests
ES_HOST = 'localhost'
ES_PORT = '9200'
ELASTICSEARCH = 'http://{0}:{1}'.format(ES_HOST, ES_PORT)
def find_indices():
"""Find indices created by logstash."""
url = ELASTICSEARCH + '/_search'
r = requests.get(url, params={'_q': '_index like logstash%'})
... | #!/usr/bin/env python
import json
import requests
ES_HOST = 'localhost'
ES_PORT = '9200'
ELASTICSEARCH = 'http://{0}:{1}'.format(ES_HOST, ES_PORT)
def find_indices():
"""Find indices created by logstash."""
url = ELASTICSEARCH + '/_search'
r = requests.get(url, params={'_q': '_index like logstash%'})
... | <commit_before>#!/usr/bin/env python
import json
import requests
ES_HOST = 'localhost'
ES_PORT = '9200'
ELASTICSEARCH = 'http://{0}:{1}'.format(ES_HOST, ES_PORT)
def find_indices():
"""Find indices created by logstash."""
url = ELASTICSEARCH + '/_search'
r = requests.get(url, params={'_q': '_index like l... | #!/usr/bin/env python
import json
import requests
ES_HOST = 'localhost'
ES_PORT = '9200'
ELASTICSEARCH = 'http://{0}:{1}'.format(ES_HOST, ES_PORT)
def find_indices():
"""Find indices created by logstash."""
url = ELASTICSEARCH + '/_search'
r = requests.get(url, params={'_q': '_index like logstash%'})
... | #!/usr/bin/env python
import json
import requests
ES_HOST = 'localhost'
ES_PORT = '9200'
ELASTICSEARCH = 'http://{0}:{1}'.format(ES_HOST, ES_PORT)
def find_indices():
"""Find indices created by logstash."""
url = ELASTICSEARCH + '/_search'
r = requests.get(url, params={'_q': '_index like logstash%'})
... | <commit_before>#!/usr/bin/env python
import json
import requests
ES_HOST = 'localhost'
ES_PORT = '9200'
ELASTICSEARCH = 'http://{0}:{1}'.format(ES_HOST, ES_PORT)
def find_indices():
"""Find indices created by logstash."""
url = ELASTICSEARCH + '/_search'
r = requests.get(url, params={'_q': '_index like l... |
48cc6633a6020114f5b5eeaaf53ddb08085bfae5 | models/settings.py | models/settings.py | from openedoo_project import db
from openedoo_project import config
class Setting(db.Model):
__tablename__ = 'module_employee_site_setting'
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.Text)
def serialize(self):
... | from openedoo_project import db
class Setting(db.Model):
__tablename__ = 'module_employee_site_setting'
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.Text)
def serialize(self):
return {
'id': sel... | Remove Unused config imported from openedoo_project, pylint. | Remove Unused config imported from openedoo_project, pylint.
| Python | mit | openedoo/module_employee,openedoo/module_employee,openedoo/module_employee | from openedoo_project import db
from openedoo_project import config
class Setting(db.Model):
__tablename__ = 'module_employee_site_setting'
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.Text)
def serialize(self):
... | from openedoo_project import db
class Setting(db.Model):
__tablename__ = 'module_employee_site_setting'
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.Text)
def serialize(self):
return {
'id': sel... | <commit_before>from openedoo_project import db
from openedoo_project import config
class Setting(db.Model):
__tablename__ = 'module_employee_site_setting'
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.Text)
def seri... | from openedoo_project import db
class Setting(db.Model):
__tablename__ = 'module_employee_site_setting'
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.Text)
def serialize(self):
return {
'id': sel... | from openedoo_project import db
from openedoo_project import config
class Setting(db.Model):
__tablename__ = 'module_employee_site_setting'
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.Text)
def serialize(self):
... | <commit_before>from openedoo_project import db
from openedoo_project import config
class Setting(db.Model):
__tablename__ = 'module_employee_site_setting'
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.Text)
def seri... |
cb2746f60cd63019b41eebedb148bfc5a25c1ba0 | indra/preassembler/make_wm_ontmap.py | indra/preassembler/make_wm_ontmap.py | from indra.sources import eidos
from indra.sources.hume.make_hume_tsv import make_file
from indra.java_vm import autoclass
eidos_package = 'org.clulab.wm.eidos'
if __name__ == '__main__':
bbn_path = 'hume_examaples.tsv'
make_file(bbn_path)
sofia_path = 'sofia_examples.tsv'
om = autoclass(eidos_packag... | import sys
from indra.sources import eidos
from indra.sources.hume.make_hume_tsv import make_file as mht
from indra.sources.sofia.make_sofia_tsv import make_file as mst
from indra.java_vm import autoclass
eidos_package = 'org.clulab.wm.eidos'
if __name__ == '__main__':
sofia_ont_path = sys.argv[1]
hume_path =... | Update make WM ontmap with SOFIA | Update make WM ontmap with SOFIA
| Python | bsd-2-clause | pvtodorov/indra,johnbachman/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,pvtodorov/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,bgyori/indra,johnbachman/belpy | from indra.sources import eidos
from indra.sources.hume.make_hume_tsv import make_file
from indra.java_vm import autoclass
eidos_package = 'org.clulab.wm.eidos'
if __name__ == '__main__':
bbn_path = 'hume_examaples.tsv'
make_file(bbn_path)
sofia_path = 'sofia_examples.tsv'
om = autoclass(eidos_packag... | import sys
from indra.sources import eidos
from indra.sources.hume.make_hume_tsv import make_file as mht
from indra.sources.sofia.make_sofia_tsv import make_file as mst
from indra.java_vm import autoclass
eidos_package = 'org.clulab.wm.eidos'
if __name__ == '__main__':
sofia_ont_path = sys.argv[1]
hume_path =... | <commit_before>from indra.sources import eidos
from indra.sources.hume.make_hume_tsv import make_file
from indra.java_vm import autoclass
eidos_package = 'org.clulab.wm.eidos'
if __name__ == '__main__':
bbn_path = 'hume_examaples.tsv'
make_file(bbn_path)
sofia_path = 'sofia_examples.tsv'
om = autocla... | import sys
from indra.sources import eidos
from indra.sources.hume.make_hume_tsv import make_file as mht
from indra.sources.sofia.make_sofia_tsv import make_file as mst
from indra.java_vm import autoclass
eidos_package = 'org.clulab.wm.eidos'
if __name__ == '__main__':
sofia_ont_path = sys.argv[1]
hume_path =... | from indra.sources import eidos
from indra.sources.hume.make_hume_tsv import make_file
from indra.java_vm import autoclass
eidos_package = 'org.clulab.wm.eidos'
if __name__ == '__main__':
bbn_path = 'hume_examaples.tsv'
make_file(bbn_path)
sofia_path = 'sofia_examples.tsv'
om = autoclass(eidos_packag... | <commit_before>from indra.sources import eidos
from indra.sources.hume.make_hume_tsv import make_file
from indra.java_vm import autoclass
eidos_package = 'org.clulab.wm.eidos'
if __name__ == '__main__':
bbn_path = 'hume_examaples.tsv'
make_file(bbn_path)
sofia_path = 'sofia_examples.tsv'
om = autocla... |
a3ec10088f379c25e0ab9c7b7e29abd2bf952806 | karld/iter_utils.py | karld/iter_utils.py | from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
:param iterato... | from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
:param iterato... | Use iter's sentinel arg instead of infinite loop | Use iter's sentinel arg instead of infinite loop
| Python | apache-2.0 | johnwlockwood/karl_data,johnwlockwood/stream_tap,johnwlockwood/stream_tap,johnwlockwood/iter_karld_tools | from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
:param iterato... | from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
:param iterato... | <commit_before>from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
... | from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
:param iterato... | from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
:param iterato... | <commit_before>from functools import partial
from itertools import imap
from itertools import islice
from operator import itemgetter
def yield_getter_of(getter_maker, iterator):
"""
Iteratively map iterator over the result of getter_maker.
:param getter_maker: function that returns a getter function.
... |
67cce913a6ab960b7ddc476fa9a16adb39a69862 | compose/__init__.py | compose/__init__.py | from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.25.1'
| from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.26.0dev'
| Set dev version to 1.26.0dev after releasing 1.25.1 | Set dev version to 1.26.0dev after releasing 1.25.1
Signed-off-by: Ulysses Souza <9b58b28cc7619bff4119b8572e41bbb4dd363aab@gmail.com>
| Python | apache-2.0 | vdemeester/compose,thaJeztah/compose,vdemeester/compose,thaJeztah/compose | from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.25.1'
Set dev version to 1.26.0dev after releasing 1.25.1
Signed-off-by: Ulysses Souza <9b58b28cc7619bff4119b8572e41bbb4dd363aab@gmail.com> | from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.26.0dev'
| <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.25.1'
<commit_msg>Set dev version to 1.26.0dev after releasing 1.25.1
Signed-off-by: Ulysses Souza <9b58b28cc7619bff4119b8572e41bbb4dd363aab@gmail.com><commit_after> | from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.26.0dev'
| from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.25.1'
Set dev version to 1.26.0dev after releasing 1.25.1
Signed-off-by: Ulysses Souza <9b58b28cc7619bff4119b8572e41bbb4dd363aab@gmail.com>from __future__ import absolute_import
from __future__ import unicode_literals
__v... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.25.1'
<commit_msg>Set dev version to 1.26.0dev after releasing 1.25.1
Signed-off-by: Ulysses Souza <9b58b28cc7619bff4119b8572e41bbb4dd363aab@gmail.com><commit_after>from __future__ import absolute_import
fro... |
d8a93f06cf6d78c543607d7046017cad3acc6c32 | tests/test_callback.py | tests/test_callback.py | import tests
class CallbackTests(tests.TestCase):
def test_hello_world(self):
result = []
def hello_world(loop):
result.append('Hello World')
loop.stop()
self.loop.call_soon(hello_world, self.loop)
self.loop.run_forever()
self.assertEqual(result, ['... | import tests
class CallbackTests(tests.TestCase):
def test_hello_world(self):
result = []
def hello_world(loop):
result.append('Hello World')
loop.stop()
self.loop.call_soon(hello_world, self.loop)
self.loop.run_forever()
self.assertEqual(result, ['... | Remove a test which behaves differently depending on the the version of asyncio/trollius | Remove a test which behaves differently depending on the the version of asyncio/trollius
| Python | apache-2.0 | overcastcloud/aioeventlet | import tests
class CallbackTests(tests.TestCase):
def test_hello_world(self):
result = []
def hello_world(loop):
result.append('Hello World')
loop.stop()
self.loop.call_soon(hello_world, self.loop)
self.loop.run_forever()
self.assertEqual(result, ['... | import tests
class CallbackTests(tests.TestCase):
def test_hello_world(self):
result = []
def hello_world(loop):
result.append('Hello World')
loop.stop()
self.loop.call_soon(hello_world, self.loop)
self.loop.run_forever()
self.assertEqual(result, ['... | <commit_before>import tests
class CallbackTests(tests.TestCase):
def test_hello_world(self):
result = []
def hello_world(loop):
result.append('Hello World')
loop.stop()
self.loop.call_soon(hello_world, self.loop)
self.loop.run_forever()
self.assertE... | import tests
class CallbackTests(tests.TestCase):
def test_hello_world(self):
result = []
def hello_world(loop):
result.append('Hello World')
loop.stop()
self.loop.call_soon(hello_world, self.loop)
self.loop.run_forever()
self.assertEqual(result, ['... | import tests
class CallbackTests(tests.TestCase):
def test_hello_world(self):
result = []
def hello_world(loop):
result.append('Hello World')
loop.stop()
self.loop.call_soon(hello_world, self.loop)
self.loop.run_forever()
self.assertEqual(result, ['... | <commit_before>import tests
class CallbackTests(tests.TestCase):
def test_hello_world(self):
result = []
def hello_world(loop):
result.append('Hello World')
loop.stop()
self.loop.call_soon(hello_world, self.loop)
self.loop.run_forever()
self.assertE... |
5b6ac8301908777a69dbbf74eb85af8b505fa76f | download_agents.py | download_agents.py | #!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import json
import os
from urllib.request import urlopen
import subprocess
import sys
def main():
parser = ArgumentParser()
parser.add_argument('downloads_file', metavar='downloads-file')
args = parser.parse_... | #!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import errno
import json
import os
from urllib.request import urlopen
import subprocess
import sys
def main():
parser = ArgumentParser()
parser.add_argument('downloads_file', metavar='downloads-file')
args = ... | Create parent directories as needed. | Create parent directories as needed. | Python | agpl-3.0 | mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju | #!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import json
import os
from urllib.request import urlopen
import subprocess
import sys
def main():
parser = ArgumentParser()
parser.add_argument('downloads_file', metavar='downloads-file')
args = parser.parse_... | #!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import errno
import json
import os
from urllib.request import urlopen
import subprocess
import sys
def main():
parser = ArgumentParser()
parser.add_argument('downloads_file', metavar='downloads-file')
args = ... | <commit_before>#!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import json
import os
from urllib.request import urlopen
import subprocess
import sys
def main():
parser = ArgumentParser()
parser.add_argument('downloads_file', metavar='downloads-file')
args ... | #!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import errno
import json
import os
from urllib.request import urlopen
import subprocess
import sys
def main():
parser = ArgumentParser()
parser.add_argument('downloads_file', metavar='downloads-file')
args = ... | #!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import json
import os
from urllib.request import urlopen
import subprocess
import sys
def main():
parser = ArgumentParser()
parser.add_argument('downloads_file', metavar='downloads-file')
args = parser.parse_... | <commit_before>#!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import json
import os
from urllib.request import urlopen
import subprocess
import sys
def main():
parser = ArgumentParser()
parser.add_argument('downloads_file', metavar='downloads-file')
args ... |
af0f42b86a1e3f916041eb78a4332daf0f22531a | OIPA/manage.py | OIPA/manage.py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OIPA.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| #!/usr/bin/env python
import os
import sys
from dotenv import find_dotenv, load_dotenv
load_dotenv(find_dotenv())
if __name__ == "__main__":
current_settings = os.getenv("DJANGO_SETTINGS_MODULE", None)
if not current_settings:
raise Exception(
"Please configure your .env file along-side ... | Load current settings from .env file | Load current settings from .env file
OIPA-645
| Python | agpl-3.0 | openaid-IATI/OIPA,zimmerman-zimmerman/OIPA,openaid-IATI/OIPA,openaid-IATI/OIPA,openaid-IATI/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,openaid-IATI/OIPA,zimmerman-zimmerman/OIPA | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OIPA.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
Load current settings from .env file
OIPA-645 | #!/usr/bin/env python
import os
import sys
from dotenv import find_dotenv, load_dotenv
load_dotenv(find_dotenv())
if __name__ == "__main__":
current_settings = os.getenv("DJANGO_SETTINGS_MODULE", None)
if not current_settings:
raise Exception(
"Please configure your .env file along-side ... | <commit_before>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OIPA.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<commit_msg>Load current settings from .env file
OIPA-645... | #!/usr/bin/env python
import os
import sys
from dotenv import find_dotenv, load_dotenv
load_dotenv(find_dotenv())
if __name__ == "__main__":
current_settings = os.getenv("DJANGO_SETTINGS_MODULE", None)
if not current_settings:
raise Exception(
"Please configure your .env file along-side ... | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OIPA.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
Load current settings from .env file
OIPA-645#!/usr/bin/env python
impor... | <commit_before>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OIPA.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<commit_msg>Load current settings from .env file
OIPA-645... |
c1b96a3ee94c25cfbe3d66eec76052badacfb38e | udata/tests/organization/test_notifications.py | udata/tests/organization/test_notifications.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from udata.models import MembershipRequest, Member
from udata.core.user.factories import UserFactory
from udata.core.organization.factories import OrganizationFactory
from udata.core.organization.notifications import (
membership_req... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
import pytest
from udata.models import MembershipRequest, Member
from udata.core.user.factories import UserFactory
from udata.core.organization.factories import OrganizationFactory
from udata.core.organization.notifications import (
... | Migrate org notif tests to pytest | Migrate org notif tests to pytest
| Python | agpl-3.0 | opendatateam/udata,etalab/udata,etalab/udata,opendatateam/udata,opendatateam/udata,etalab/udata | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from udata.models import MembershipRequest, Member
from udata.core.user.factories import UserFactory
from udata.core.organization.factories import OrganizationFactory
from udata.core.organization.notifications import (
membership_req... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
import pytest
from udata.models import MembershipRequest, Member
from udata.core.user.factories import UserFactory
from udata.core.organization.factories import OrganizationFactory
from udata.core.organization.notifications import (
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from udata.models import MembershipRequest, Member
from udata.core.user.factories import UserFactory
from udata.core.organization.factories import OrganizationFactory
from udata.core.organization.notifications import (
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
import pytest
from udata.models import MembershipRequest, Member
from udata.core.user.factories import UserFactory
from udata.core.organization.factories import OrganizationFactory
from udata.core.organization.notifications import (
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from udata.models import MembershipRequest, Member
from udata.core.user.factories import UserFactory
from udata.core.organization.factories import OrganizationFactory
from udata.core.organization.notifications import (
membership_req... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from udata.models import MembershipRequest, Member
from udata.core.user.factories import UserFactory
from udata.core.organization.factories import OrganizationFactory
from udata.core.organization.notifications import (
... |
5a3935caab0bf720db6707bb7974eec2400f3701 | prompt_toolkit/key_binding/bindings/auto_suggest.py | prompt_toolkit/key_binding/bindings/auto_suggest.py | """
Key bindings for auto suggestion (for fish-style auto suggestion).
"""
from __future__ import unicode_literals
from prompt_toolkit.application.current import get_app
from prompt_toolkit.key_binding.key_bindings import KeyBindings
from prompt_toolkit.filters import Condition
__all__ = [
'load_auto_suggest_bindi... | """
Key bindings for auto suggestion (for fish-style auto suggestion).
"""
from __future__ import unicode_literals
import re
from prompt_toolkit.application.current import get_app
from prompt_toolkit.key_binding.key_bindings import KeyBindings
from prompt_toolkit.filters import Condition, emacs_mode
__all__ = [
'l... | Add alt-f binding for auto-suggestion. | Add alt-f binding for auto-suggestion.
| Python | bsd-3-clause | jonathanslenders/python-prompt-toolkit | """
Key bindings for auto suggestion (for fish-style auto suggestion).
"""
from __future__ import unicode_literals
from prompt_toolkit.application.current import get_app
from prompt_toolkit.key_binding.key_bindings import KeyBindings
from prompt_toolkit.filters import Condition
__all__ = [
'load_auto_suggest_bindi... | """
Key bindings for auto suggestion (for fish-style auto suggestion).
"""
from __future__ import unicode_literals
import re
from prompt_toolkit.application.current import get_app
from prompt_toolkit.key_binding.key_bindings import KeyBindings
from prompt_toolkit.filters import Condition, emacs_mode
__all__ = [
'l... | <commit_before>"""
Key bindings for auto suggestion (for fish-style auto suggestion).
"""
from __future__ import unicode_literals
from prompt_toolkit.application.current import get_app
from prompt_toolkit.key_binding.key_bindings import KeyBindings
from prompt_toolkit.filters import Condition
__all__ = [
'load_aut... | """
Key bindings for auto suggestion (for fish-style auto suggestion).
"""
from __future__ import unicode_literals
import re
from prompt_toolkit.application.current import get_app
from prompt_toolkit.key_binding.key_bindings import KeyBindings
from prompt_toolkit.filters import Condition, emacs_mode
__all__ = [
'l... | """
Key bindings for auto suggestion (for fish-style auto suggestion).
"""
from __future__ import unicode_literals
from prompt_toolkit.application.current import get_app
from prompt_toolkit.key_binding.key_bindings import KeyBindings
from prompt_toolkit.filters import Condition
__all__ = [
'load_auto_suggest_bindi... | <commit_before>"""
Key bindings for auto suggestion (for fish-style auto suggestion).
"""
from __future__ import unicode_literals
from prompt_toolkit.application.current import get_app
from prompt_toolkit.key_binding.key_bindings import KeyBindings
from prompt_toolkit.filters import Condition
__all__ = [
'load_aut... |
ea3deb560aaddab4d66a84e840e10854cfad581d | nass/__init__.py | nass/__init__.py | # -*- coding: utf-8 -*-
"""
USDA National Agricultural Statistics Service API wrapper
This Python wrapper implements the public API for the USDA National
Agricultural Statistics Service. It is a very thin layer over the Requests
package.
This product uses the NASS API but is not endorsed or certified by NASS.
:copyr... | # -*- coding: utf-8 -*-
"""
USDA National Agricultural Statistics Service API wrapper
This Python wrapper implements the public API for the USDA National
Agricultural Statistics Service. It is a very thin layer over the Requests
package.
This product uses the NASS API but is not endorsed or certified by NASS.
:copyr... | Make package-level import at the top (pep8) | Make package-level import at the top (pep8)
| Python | mit | nickfrostatx/nass | # -*- coding: utf-8 -*-
"""
USDA National Agricultural Statistics Service API wrapper
This Python wrapper implements the public API for the USDA National
Agricultural Statistics Service. It is a very thin layer over the Requests
package.
This product uses the NASS API but is not endorsed or certified by NASS.
:copyr... | # -*- coding: utf-8 -*-
"""
USDA National Agricultural Statistics Service API wrapper
This Python wrapper implements the public API for the USDA National
Agricultural Statistics Service. It is a very thin layer over the Requests
package.
This product uses the NASS API but is not endorsed or certified by NASS.
:copyr... | <commit_before># -*- coding: utf-8 -*-
"""
USDA National Agricultural Statistics Service API wrapper
This Python wrapper implements the public API for the USDA National
Agricultural Statistics Service. It is a very thin layer over the Requests
package.
This product uses the NASS API but is not endorsed or certified b... | # -*- coding: utf-8 -*-
"""
USDA National Agricultural Statistics Service API wrapper
This Python wrapper implements the public API for the USDA National
Agricultural Statistics Service. It is a very thin layer over the Requests
package.
This product uses the NASS API but is not endorsed or certified by NASS.
:copyr... | # -*- coding: utf-8 -*-
"""
USDA National Agricultural Statistics Service API wrapper
This Python wrapper implements the public API for the USDA National
Agricultural Statistics Service. It is a very thin layer over the Requests
package.
This product uses the NASS API but is not endorsed or certified by NASS.
:copyr... | <commit_before># -*- coding: utf-8 -*-
"""
USDA National Agricultural Statistics Service API wrapper
This Python wrapper implements the public API for the USDA National
Agricultural Statistics Service. It is a very thin layer over the Requests
package.
This product uses the NASS API but is not endorsed or certified b... |
fd302e3f9cbc5bcf06d47600adc3e0f0df33c114 | f8a_jobs/auth.py | f8a_jobs/auth.py | from flask import session
from flask_oauthlib.client import OAuth
import f8a_jobs.defaults as configuration
oauth = OAuth()
github = oauth.remote_app(
'github',
consumer_key=configuration.GITHUB_CONSUMER_KEY,
consumer_secret=configuration.GITHUB_CONSUMER_SECRET,
request_token_params={'scope': 'user:ema... | from flask import session
from flask_oauthlib.client import OAuth
import f8a_jobs.defaults as configuration
oauth = OAuth()
github = oauth.remote_app(
'github',
consumer_key=configuration.GITHUB_CONSUMER_KEY,
consumer_secret=configuration.GITHUB_CONSUMER_SECRET,
request_token_params={'scope': 'user:ema... | Add read organization scope for OAuth | Add read organization scope for OAuth
This will enable to access jobs service even for not public organization
members.
| Python | apache-2.0 | fabric8-analytics/fabric8-analytics-jobs,fabric8-analytics/fabric8-analytics-jobs | from flask import session
from flask_oauthlib.client import OAuth
import f8a_jobs.defaults as configuration
oauth = OAuth()
github = oauth.remote_app(
'github',
consumer_key=configuration.GITHUB_CONSUMER_KEY,
consumer_secret=configuration.GITHUB_CONSUMER_SECRET,
request_token_params={'scope': 'user:ema... | from flask import session
from flask_oauthlib.client import OAuth
import f8a_jobs.defaults as configuration
oauth = OAuth()
github = oauth.remote_app(
'github',
consumer_key=configuration.GITHUB_CONSUMER_KEY,
consumer_secret=configuration.GITHUB_CONSUMER_SECRET,
request_token_params={'scope': 'user:ema... | <commit_before>from flask import session
from flask_oauthlib.client import OAuth
import f8a_jobs.defaults as configuration
oauth = OAuth()
github = oauth.remote_app(
'github',
consumer_key=configuration.GITHUB_CONSUMER_KEY,
consumer_secret=configuration.GITHUB_CONSUMER_SECRET,
request_token_params={'sc... | from flask import session
from flask_oauthlib.client import OAuth
import f8a_jobs.defaults as configuration
oauth = OAuth()
github = oauth.remote_app(
'github',
consumer_key=configuration.GITHUB_CONSUMER_KEY,
consumer_secret=configuration.GITHUB_CONSUMER_SECRET,
request_token_params={'scope': 'user:ema... | from flask import session
from flask_oauthlib.client import OAuth
import f8a_jobs.defaults as configuration
oauth = OAuth()
github = oauth.remote_app(
'github',
consumer_key=configuration.GITHUB_CONSUMER_KEY,
consumer_secret=configuration.GITHUB_CONSUMER_SECRET,
request_token_params={'scope': 'user:ema... | <commit_before>from flask import session
from flask_oauthlib.client import OAuth
import f8a_jobs.defaults as configuration
oauth = OAuth()
github = oauth.remote_app(
'github',
consumer_key=configuration.GITHUB_CONSUMER_KEY,
consumer_secret=configuration.GITHUB_CONSUMER_SECRET,
request_token_params={'sc... |
6a2782b11bcec2c1493258957ce7e8652d6990e8 | core/build/views.py | core/build/views.py | from core.build.subnet import build_subnet
from core.network.models import Network
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse
import pdb
def build_network(request, network_pk):
network = get_object_or_404(Network, pk=network_pk)
if request.GET.pop(... | from core.build.subnet import build_subnet
from core.network.models import Network
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse
import pdb
def build_network(request, network_pk):
network = get_object_or_404(Network, pk=network_pk)
if request.GET.get(... | Revert "use pop instead of get because it doens't cause uncaught exceptions." | Revert "use pop instead of get because it doens't cause uncaught exceptions."
This reverts commit 7aa3e4128b9df890a2683faee0ebe2ee8e64ce33.
| Python | bsd-3-clause | zeeman/cyder,murrown/cyder,akeym/cyder,OSU-Net/cyder,murrown/cyder,drkitty/cyder,murrown/cyder,drkitty/cyder,akeym/cyder,akeym/cyder,zeeman/cyder,drkitty/cyder,zeeman/cyder,OSU-Net/cyder,akeym/cyder,zeeman/cyder,drkitty/cyder,OSU-Net/cyder,murrown/cyder,OSU-Net/cyder | from core.build.subnet import build_subnet
from core.network.models import Network
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse
import pdb
def build_network(request, network_pk):
network = get_object_or_404(Network, pk=network_pk)
if request.GET.pop(... | from core.build.subnet import build_subnet
from core.network.models import Network
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse
import pdb
def build_network(request, network_pk):
network = get_object_or_404(Network, pk=network_pk)
if request.GET.get(... | <commit_before>from core.build.subnet import build_subnet
from core.network.models import Network
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse
import pdb
def build_network(request, network_pk):
network = get_object_or_404(Network, pk=network_pk)
if r... | from core.build.subnet import build_subnet
from core.network.models import Network
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse
import pdb
def build_network(request, network_pk):
network = get_object_or_404(Network, pk=network_pk)
if request.GET.get(... | from core.build.subnet import build_subnet
from core.network.models import Network
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse
import pdb
def build_network(request, network_pk):
network = get_object_or_404(Network, pk=network_pk)
if request.GET.pop(... | <commit_before>from core.build.subnet import build_subnet
from core.network.models import Network
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse
import pdb
def build_network(request, network_pk):
network = get_object_or_404(Network, pk=network_pk)
if r... |
5b0d308d1859920cc59e7241626472edb42c7856 | djangosanetesting/testrunner.py | djangosanetesting/testrunner.py | from django.test.utils import setup_test_environment, teardown_test_environment
from django.db.backends.creation import create_test_db, destroy_test_db
import nose
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
""" Run tests with nose instead of defualt test runner """
setup_test_en... | import sys
from django.conf import settings
from django.test.utils import setup_test_environment, teardown_test_environment
import nose
from nose.config import Config, all_config_files
from nose.plugins.manager import DefaultPluginManager
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
... | Use database connection instead of old-style functions | Use database connection instead of old-style functions
| Python | bsd-3-clause | Almad/django-sane-testing | from django.test.utils import setup_test_environment, teardown_test_environment
from django.db.backends.creation import create_test_db, destroy_test_db
import nose
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
""" Run tests with nose instead of defualt test runner """
setup_test_en... | import sys
from django.conf import settings
from django.test.utils import setup_test_environment, teardown_test_environment
import nose
from nose.config import Config, all_config_files
from nose.plugins.manager import DefaultPluginManager
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
... | <commit_before>from django.test.utils import setup_test_environment, teardown_test_environment
from django.db.backends.creation import create_test_db, destroy_test_db
import nose
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
""" Run tests with nose instead of defualt test runner """
... | import sys
from django.conf import settings
from django.test.utils import setup_test_environment, teardown_test_environment
import nose
from nose.config import Config, all_config_files
from nose.plugins.manager import DefaultPluginManager
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
... | from django.test.utils import setup_test_environment, teardown_test_environment
from django.db.backends.creation import create_test_db, destroy_test_db
import nose
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
""" Run tests with nose instead of defualt test runner """
setup_test_en... | <commit_before>from django.test.utils import setup_test_environment, teardown_test_environment
from django.db.backends.creation import create_test_db, destroy_test_db
import nose
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
""" Run tests with nose instead of defualt test runner """
... |
e40797a40e1e8f76a48ffeaec2dcdb179b702062 | microdrop/tests/test_dmf_device.py | microdrop/tests/test_dmf_device.py | from path import path
from nose.tools import raises
from dmf_device import DmfDevice
from utility import Version
def test_load_dmf_device():
"""
test loading DMF device files
"""
# version 0.2.0 files
for i in [0,1]:
yield load_device, (path(__file__).parent /
... | from path import path
from nose.tools import raises
from dmf_device import DmfDevice
from utility import Version
def test_load_dmf_device():
"""
test loading DMF device files
"""
# version 0.2.0 files
for i in [0, 1]:
yield load_device, (path(__file__).parent /
... | Add test for device 0 v0.3.0 | Add test for device 0 v0.3.0
| Python | bsd-3-clause | wheeler-microfluidics/microdrop | from path import path
from nose.tools import raises
from dmf_device import DmfDevice
from utility import Version
def test_load_dmf_device():
"""
test loading DMF device files
"""
# version 0.2.0 files
for i in [0,1]:
yield load_device, (path(__file__).parent /
... | from path import path
from nose.tools import raises
from dmf_device import DmfDevice
from utility import Version
def test_load_dmf_device():
"""
test loading DMF device files
"""
# version 0.2.0 files
for i in [0, 1]:
yield load_device, (path(__file__).parent /
... | <commit_before>from path import path
from nose.tools import raises
from dmf_device import DmfDevice
from utility import Version
def test_load_dmf_device():
"""
test loading DMF device files
"""
# version 0.2.0 files
for i in [0,1]:
yield load_device, (path(__file__).parent /
... | from path import path
from nose.tools import raises
from dmf_device import DmfDevice
from utility import Version
def test_load_dmf_device():
"""
test loading DMF device files
"""
# version 0.2.0 files
for i in [0, 1]:
yield load_device, (path(__file__).parent /
... | from path import path
from nose.tools import raises
from dmf_device import DmfDevice
from utility import Version
def test_load_dmf_device():
"""
test loading DMF device files
"""
# version 0.2.0 files
for i in [0,1]:
yield load_device, (path(__file__).parent /
... | <commit_before>from path import path
from nose.tools import raises
from dmf_device import DmfDevice
from utility import Version
def test_load_dmf_device():
"""
test loading DMF device files
"""
# version 0.2.0 files
for i in [0,1]:
yield load_device, (path(__file__).parent /
... |
b92fb486107ef6feb4def07f601e7390d80db565 | plugins/androidapp.py | plugins/androidapp.py | """
paragoo plugin for retrieving card on an Android app
"""
import os
import requests
from bs4 import BeautifulSoup
class AppNotFoundException(Exception):
pass
def render(site_path, params):
"""
Look up the Android app details from its Play Store listing
Format of params: <app_key>
app_key look... | """
paragoo plugin for retrieving card on an Android app
"""
import os
import requests
from bs4 import BeautifulSoup
class AppNotFoundException(Exception):
pass
def get_app_details(app_key):
url_full = 'https://play.google.com/store/apps/details?id=' + app_key
url = 'https://play.google.com/store/apps/d... | Split out the app detail lookup into function | Split out the app detail lookup into function
| Python | apache-2.0 | aquatix/paragoo,aquatix/paragoo | """
paragoo plugin for retrieving card on an Android app
"""
import os
import requests
from bs4 import BeautifulSoup
class AppNotFoundException(Exception):
pass
def render(site_path, params):
"""
Look up the Android app details from its Play Store listing
Format of params: <app_key>
app_key look... | """
paragoo plugin for retrieving card on an Android app
"""
import os
import requests
from bs4 import BeautifulSoup
class AppNotFoundException(Exception):
pass
def get_app_details(app_key):
url_full = 'https://play.google.com/store/apps/details?id=' + app_key
url = 'https://play.google.com/store/apps/d... | <commit_before>"""
paragoo plugin for retrieving card on an Android app
"""
import os
import requests
from bs4 import BeautifulSoup
class AppNotFoundException(Exception):
pass
def render(site_path, params):
"""
Look up the Android app details from its Play Store listing
Format of params: <app_key>
... | """
paragoo plugin for retrieving card on an Android app
"""
import os
import requests
from bs4 import BeautifulSoup
class AppNotFoundException(Exception):
pass
def get_app_details(app_key):
url_full = 'https://play.google.com/store/apps/details?id=' + app_key
url = 'https://play.google.com/store/apps/d... | """
paragoo plugin for retrieving card on an Android app
"""
import os
import requests
from bs4 import BeautifulSoup
class AppNotFoundException(Exception):
pass
def render(site_path, params):
"""
Look up the Android app details from its Play Store listing
Format of params: <app_key>
app_key look... | <commit_before>"""
paragoo plugin for retrieving card on an Android app
"""
import os
import requests
from bs4 import BeautifulSoup
class AppNotFoundException(Exception):
pass
def render(site_path, params):
"""
Look up the Android app details from its Play Store listing
Format of params: <app_key>
... |
5344c97e7486229f9fae40bef2b73488d5aa2ffd | uchicagohvz/users/tasks.py | uchicagohvz/users/tasks.py | from celery import task
from django.conf import settings
from django.core import mail
import smtplib
@task(rate_limit=0.2)
def do_sympa_update(user, listname, subscribe):
if subscribe:
body = "QUIET ADD %s %s %s" % (listname, user.email, user.get_full_name())
else:
body = "QUIET DELETE %s %s" % (listname, user... | from celery import task
from django.conf import settings
from django.core import mail
import smtplib
@task
def do_sympa_update(user, listname, subscribe):
if subscribe:
body = "QUIET ADD %s %s %s" % (listname, user.email, user.get_full_name())
else:
body = "QUIET DELETE %s %s" % (listname, user.email)
email =... | Remove rate limit from do_sympa_update | Remove rate limit from do_sympa_update | Python | mit | kz26/uchicago-hvz,kz26/uchicago-hvz,kz26/uchicago-hvz | from celery import task
from django.conf import settings
from django.core import mail
import smtplib
@task(rate_limit=0.2)
def do_sympa_update(user, listname, subscribe):
if subscribe:
body = "QUIET ADD %s %s %s" % (listname, user.email, user.get_full_name())
else:
body = "QUIET DELETE %s %s" % (listname, user... | from celery import task
from django.conf import settings
from django.core import mail
import smtplib
@task
def do_sympa_update(user, listname, subscribe):
if subscribe:
body = "QUIET ADD %s %s %s" % (listname, user.email, user.get_full_name())
else:
body = "QUIET DELETE %s %s" % (listname, user.email)
email =... | <commit_before>from celery import task
from django.conf import settings
from django.core import mail
import smtplib
@task(rate_limit=0.2)
def do_sympa_update(user, listname, subscribe):
if subscribe:
body = "QUIET ADD %s %s %s" % (listname, user.email, user.get_full_name())
else:
body = "QUIET DELETE %s %s" % ... | from celery import task
from django.conf import settings
from django.core import mail
import smtplib
@task
def do_sympa_update(user, listname, subscribe):
if subscribe:
body = "QUIET ADD %s %s %s" % (listname, user.email, user.get_full_name())
else:
body = "QUIET DELETE %s %s" % (listname, user.email)
email =... | from celery import task
from django.conf import settings
from django.core import mail
import smtplib
@task(rate_limit=0.2)
def do_sympa_update(user, listname, subscribe):
if subscribe:
body = "QUIET ADD %s %s %s" % (listname, user.email, user.get_full_name())
else:
body = "QUIET DELETE %s %s" % (listname, user... | <commit_before>from celery import task
from django.conf import settings
from django.core import mail
import smtplib
@task(rate_limit=0.2)
def do_sympa_update(user, listname, subscribe):
if subscribe:
body = "QUIET ADD %s %s %s" % (listname, user.email, user.get_full_name())
else:
body = "QUIET DELETE %s %s" % ... |
5c9bc019ea1461a82b9dbdd4b3df5c55be2a8274 | unihan_db/__about__.py | unihan_db/__about__.py | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__copyright__ = 'Copyright 2017 Tony Narlock'
| __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__pypi__ = 'https://pypi.org/project/unihan-db/'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__cop... | Update to cihai software foundation, add github and pypi | Metadata: Update to cihai software foundation, add github and pypi
| Python | mit | cihai/unihan-db | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__copyright__ = 'Copyright 2017 Tony Narlock'
Metadata: Update to cihai software foundation, add github ... | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__pypi__ = 'https://pypi.org/project/unihan-db/'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__cop... | <commit_before>__title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__copyright__ = 'Copyright 2017 Tony Narlock'
<commit_msg>Metadata: Update to cihai softw... | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__pypi__ = 'https://pypi.org/project/unihan-db/'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__cop... | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__copyright__ = 'Copyright 2017 Tony Narlock'
Metadata: Update to cihai software foundation, add github ... | <commit_before>__title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__copyright__ = 'Copyright 2017 Tony Narlock'
<commit_msg>Metadata: Update to cihai softw... |
131129b96995c0055ea0a7e27d7491a833e46566 | wwwhisper_auth/assets.py | wwwhisper_auth/assets.py | # wwwhisper - web access control.
# Copyright (C) 2013 Jan Wrobel <jan@mixedbit.org>
import os
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_control
from django.views.decorators.cache import cache_page
from django.views.generic import View
from wwwhisper_auth imp... | # wwwhisper - web access control.
# Copyright (C) 2013-2022 Jan Wrobel <jan@mixedbit.org>
import os
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_control
from django.views.decorators.cache import cache_page
from django.views.generic import View
from wwwhisper_aut... | Use 'open' instead of 'file' (no longer available in Python 3). | Use 'open' instead of 'file' (no longer available in Python 3).
| Python | mit | wrr/wwwhisper,wrr/wwwhisper,wrr/wwwhisper,wrr/wwwhisper | # wwwhisper - web access control.
# Copyright (C) 2013 Jan Wrobel <jan@mixedbit.org>
import os
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_control
from django.views.decorators.cache import cache_page
from django.views.generic import View
from wwwhisper_auth imp... | # wwwhisper - web access control.
# Copyright (C) 2013-2022 Jan Wrobel <jan@mixedbit.org>
import os
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_control
from django.views.decorators.cache import cache_page
from django.views.generic import View
from wwwhisper_aut... | <commit_before># wwwhisper - web access control.
# Copyright (C) 2013 Jan Wrobel <jan@mixedbit.org>
import os
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_control
from django.views.decorators.cache import cache_page
from django.views.generic import View
from www... | # wwwhisper - web access control.
# Copyright (C) 2013-2022 Jan Wrobel <jan@mixedbit.org>
import os
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_control
from django.views.decorators.cache import cache_page
from django.views.generic import View
from wwwhisper_aut... | # wwwhisper - web access control.
# Copyright (C) 2013 Jan Wrobel <jan@mixedbit.org>
import os
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_control
from django.views.decorators.cache import cache_page
from django.views.generic import View
from wwwhisper_auth imp... | <commit_before># wwwhisper - web access control.
# Copyright (C) 2013 Jan Wrobel <jan@mixedbit.org>
import os
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_control
from django.views.decorators.cache import cache_page
from django.views.generic import View
from www... |
68fe680266f705bea2b33e614d7aac2ae13b46a2 | url_shortener/forms.py | url_shortener/forms.py | # -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import StringField, validators
from .validation import not_spam
class ShortenedUrlForm(Form):
url = StringField(
'Url to be shortened',
[
validators.DataRequired(),
validators.URL(message="A valid url is requi... | # -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import StringField, validators
from .validation import not_blacklisted_nor_spam
class ShortenedUrlForm(Form):
url = StringField(
'Url to be shortened',
[
validators.DataRequired(),
validators.URL(message="A va... | Replace not_spam validator with not_blacklisted_nor_spam in form class | Replace not_spam validator with not_blacklisted_nor_spam in form class
| Python | mit | piotr-rusin/url-shortener,piotr-rusin/url-shortener | # -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import StringField, validators
from .validation import not_spam
class ShortenedUrlForm(Form):
url = StringField(
'Url to be shortened',
[
validators.DataRequired(),
validators.URL(message="A valid url is requi... | # -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import StringField, validators
from .validation import not_blacklisted_nor_spam
class ShortenedUrlForm(Form):
url = StringField(
'Url to be shortened',
[
validators.DataRequired(),
validators.URL(message="A va... | <commit_before># -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import StringField, validators
from .validation import not_spam
class ShortenedUrlForm(Form):
url = StringField(
'Url to be shortened',
[
validators.DataRequired(),
validators.URL(message="A val... | # -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import StringField, validators
from .validation import not_blacklisted_nor_spam
class ShortenedUrlForm(Form):
url = StringField(
'Url to be shortened',
[
validators.DataRequired(),
validators.URL(message="A va... | # -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import StringField, validators
from .validation import not_spam
class ShortenedUrlForm(Form):
url = StringField(
'Url to be shortened',
[
validators.DataRequired(),
validators.URL(message="A valid url is requi... | <commit_before># -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import StringField, validators
from .validation import not_spam
class ShortenedUrlForm(Form):
url = StringField(
'Url to be shortened',
[
validators.DataRequired(),
validators.URL(message="A val... |
1cf354d834fbb81260c88718c57533a546fc9dfa | src/robots/actions/attitudes.py | src/robots/actions/attitudes.py | import logging; logger = logging.getLogger("robot." + __name__)
from robots.exception import RobotError
from robots.actions.look_at import sweep
from robots.action import *
###############################################################################
@action
def sorry(robot, speed = 0.5):
return sweep(robot,... | import logging; logger = logging.getLogger("robot." + __name__)
import random
from robots.exception import RobotError
from robots.lowlevel import *
from robots.actions.look_at import sweep
from robots.action import *
###############################################################################
@action
@workswit... | Update the knowledge base according to the emotion | [actions/attitude] Update the knowledge base according to the emotion
| Python | isc | chili-epfl/pyrobots,chili-epfl/pyrobots-nao | import logging; logger = logging.getLogger("robot." + __name__)
from robots.exception import RobotError
from robots.actions.look_at import sweep
from robots.action import *
###############################################################################
@action
def sorry(robot, speed = 0.5):
return sweep(robot,... | import logging; logger = logging.getLogger("robot." + __name__)
import random
from robots.exception import RobotError
from robots.lowlevel import *
from robots.actions.look_at import sweep
from robots.action import *
###############################################################################
@action
@workswit... | <commit_before>import logging; logger = logging.getLogger("robot." + __name__)
from robots.exception import RobotError
from robots.actions.look_at import sweep
from robots.action import *
###############################################################################
@action
def sorry(robot, speed = 0.5):
retu... | import logging; logger = logging.getLogger("robot." + __name__)
import random
from robots.exception import RobotError
from robots.lowlevel import *
from robots.actions.look_at import sweep
from robots.action import *
###############################################################################
@action
@workswit... | import logging; logger = logging.getLogger("robot." + __name__)
from robots.exception import RobotError
from robots.actions.look_at import sweep
from robots.action import *
###############################################################################
@action
def sorry(robot, speed = 0.5):
return sweep(robot,... | <commit_before>import logging; logger = logging.getLogger("robot." + __name__)
from robots.exception import RobotError
from robots.actions.look_at import sweep
from robots.action import *
###############################################################################
@action
def sorry(robot, speed = 0.5):
retu... |
4a0f4bb837151a28b8c9f495db4f9bd33eb45a77 | src/python/expedient_geni/backends.py | src/python/expedient_geni/backends.py | '''
Created on Aug 12, 2010
@author: jnaous
'''
import logging
import re
from django.contrib.auth.backends import RemoteUserBackend
from django.conf import settings
from expedient.common.permissions.shortcuts import give_permission_to
from django.contrib.auth.models import User
logger = logging.getLogger("expedient_g... | '''
Created on Aug 12, 2010
@author: jnaous
'''
import logging
import traceback
from django.contrib.auth.backends import RemoteUserBackend
from sfa.trust.gid import GID
from expedient_geni.utils import get_user_urn, urn_to_username
from geni.util.urn_util import URN
logger = logging.getLogger("expedient_geni.backends... | Use urn from certificate to create username | Use urn from certificate to create username
| Python | bsd-3-clause | avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf | '''
Created on Aug 12, 2010
@author: jnaous
'''
import logging
import re
from django.contrib.auth.backends import RemoteUserBackend
from django.conf import settings
from expedient.common.permissions.shortcuts import give_permission_to
from django.contrib.auth.models import User
logger = logging.getLogger("expedient_g... | '''
Created on Aug 12, 2010
@author: jnaous
'''
import logging
import traceback
from django.contrib.auth.backends import RemoteUserBackend
from sfa.trust.gid import GID
from expedient_geni.utils import get_user_urn, urn_to_username
from geni.util.urn_util import URN
logger = logging.getLogger("expedient_geni.backends... | <commit_before>'''
Created on Aug 12, 2010
@author: jnaous
'''
import logging
import re
from django.contrib.auth.backends import RemoteUserBackend
from django.conf import settings
from expedient.common.permissions.shortcuts import give_permission_to
from django.contrib.auth.models import User
logger = logging.getLogg... | '''
Created on Aug 12, 2010
@author: jnaous
'''
import logging
import traceback
from django.contrib.auth.backends import RemoteUserBackend
from sfa.trust.gid import GID
from expedient_geni.utils import get_user_urn, urn_to_username
from geni.util.urn_util import URN
logger = logging.getLogger("expedient_geni.backends... | '''
Created on Aug 12, 2010
@author: jnaous
'''
import logging
import re
from django.contrib.auth.backends import RemoteUserBackend
from django.conf import settings
from expedient.common.permissions.shortcuts import give_permission_to
from django.contrib.auth.models import User
logger = logging.getLogger("expedient_g... | <commit_before>'''
Created on Aug 12, 2010
@author: jnaous
'''
import logging
import re
from django.contrib.auth.backends import RemoteUserBackend
from django.conf import settings
from expedient.common.permissions.shortcuts import give_permission_to
from django.contrib.auth.models import User
logger = logging.getLogg... |
8c51722bff4460b33a33d0380b75047649119175 | pyhpeimc/__init__.py | pyhpeimc/__init__.py | #!/usr/bin/env python
# -*- coding: <encoding-name> -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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/... | #!/usr/bin/env python
# -*- coding: ascii -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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.... | Fix in groups.py for get_custom_views function. | Fix in groups.py for get_custom_views function.
| Python | apache-2.0 | HPNetworking/HP-Intelligent-Management-Center,HPENetworking/PYHPEIMC,netmanchris/PYHPEIMC | #!/usr/bin/env python
# -*- coding: <encoding-name> -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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/... | #!/usr/bin/env python
# -*- coding: ascii -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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.... | <commit_before>#!/usr/bin/env python
# -*- coding: <encoding-name> -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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.apach... | #!/usr/bin/env python
# -*- coding: ascii -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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.... | #!/usr/bin/env python
# -*- coding: <encoding-name> -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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/... | <commit_before>#!/usr/bin/env python
# -*- coding: <encoding-name> -*-
'''
Copyright 2015 Hewlett Packard Enterprise Development LP
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.apach... |
cf03026a27f8f7d35430807d2295bf062c4e0ca9 | master/skia_master_scripts/android_factory.py | master/skia_master_scripts/android_factory.py | # Copyright (c) 2011 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.
"""Utility class to build the Skia master BuildFactory's for Android buildbots.
Overrides SkiaFactory with any Android-specific steps."""
from skia_mas... | # Copyright (c) 2011 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.
"""Utility class to build the Skia master BuildFactory's for Android buildbots.
Overrides SkiaFactory with any Android-specific steps."""
from skia_mas... | Add RunTests step for Android buildbots | Add RunTests step for Android buildbots
Requires https://codereview.appspot.com/5966078 ('Add AddRunCommandList(), a cleaner way of running multiple shell commands as a single buildbot step') to work.
Review URL: https://codereview.appspot.com/5975072
git-svn-id: 32fc27f4dcfb6c0385cd9719852b95fe6680452d@3594 2bbb7eff... | Python | bsd-3-clause | google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Ti... | # Copyright (c) 2011 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.
"""Utility class to build the Skia master BuildFactory's for Android buildbots.
Overrides SkiaFactory with any Android-specific steps."""
from skia_mas... | # Copyright (c) 2011 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.
"""Utility class to build the Skia master BuildFactory's for Android buildbots.
Overrides SkiaFactory with any Android-specific steps."""
from skia_mas... | <commit_before># Copyright (c) 2011 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.
"""Utility class to build the Skia master BuildFactory's for Android buildbots.
Overrides SkiaFactory with any Android-specific steps."""... | # Copyright (c) 2011 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.
"""Utility class to build the Skia master BuildFactory's for Android buildbots.
Overrides SkiaFactory with any Android-specific steps."""
from skia_mas... | # Copyright (c) 2011 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.
"""Utility class to build the Skia master BuildFactory's for Android buildbots.
Overrides SkiaFactory with any Android-specific steps."""
from skia_mas... | <commit_before># Copyright (c) 2011 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.
"""Utility class to build the Skia master BuildFactory's for Android buildbots.
Overrides SkiaFactory with any Android-specific steps."""... |
b3a9027940f854f84cbf8f05af79c1f98a56d349 | pretix/settings.py | pretix/settings.py | from pretix.settings import * # noqa
SECRET_KEY = "{{secret_key}}"
LOGGING["handlers"]["mail_admins"]["include_html"] = True # noqa
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage" # noqa
)
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",... | from pretix.settings import * # noqa
SECRET_KEY = "{{secret_key}}"
LOGGING["handlers"]["mail_admins"]["include_html"] = True # noqa
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage" # noqa
)
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",... | Allow all languages on pretix | Allow all languages on pretix
| Python | mit | patrick91/pycon,patrick91/pycon | from pretix.settings import * # noqa
SECRET_KEY = "{{secret_key}}"
LOGGING["handlers"]["mail_admins"]["include_html"] = True # noqa
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage" # noqa
)
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",... | from pretix.settings import * # noqa
SECRET_KEY = "{{secret_key}}"
LOGGING["handlers"]["mail_admins"]["include_html"] = True # noqa
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage" # noqa
)
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",... | <commit_before>from pretix.settings import * # noqa
SECRET_KEY = "{{secret_key}}"
LOGGING["handlers"]["mail_admins"]["include_html"] = True # noqa
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage" # noqa
)
DATABASES = {
"default": {
"ENGINE": "django.db.backen... | from pretix.settings import * # noqa
SECRET_KEY = "{{secret_key}}"
LOGGING["handlers"]["mail_admins"]["include_html"] = True # noqa
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage" # noqa
)
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",... | from pretix.settings import * # noqa
SECRET_KEY = "{{secret_key}}"
LOGGING["handlers"]["mail_admins"]["include_html"] = True # noqa
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage" # noqa
)
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",... | <commit_before>from pretix.settings import * # noqa
SECRET_KEY = "{{secret_key}}"
LOGGING["handlers"]["mail_admins"]["include_html"] = True # noqa
STATICFILES_STORAGE = (
"django.contrib.staticfiles.storage.ManifestStaticFilesStorage" # noqa
)
DATABASES = {
"default": {
"ENGINE": "django.db.backen... |
d343ba2abc476e1c6a26e273b9262aa5974b8ab5 | fireplace/rules.py | fireplace/rules.py | """
Base game rules (events, etc)
"""
from .actions import Attack, Damage, Destroy, Hit
from .dsl.selector import FRIENDLY_HERO, MINION, SELF
POISONOUS = Damage(MINION, None, SELF).on(Destroy(Damage.TARGETS))
class WeaponRules:
base_events = [
Attack(FRIENDLY_HERO).on(Hit(SELF, 1))
]
| """
Base game rules (events, etc)
"""
from .actions import Attack, Damage, Destroy, Hit
from .dsl.selector import FRIENDLY_HERO, MINION, SELF
POISONOUS = Damage(MINION, None, SELF).on(Destroy(Damage.TARGETS))
class WeaponRules:
base_events = [
Attack(FRIENDLY_HERO).after(Hit(SELF, 1))
]
| Move Weapon durability hits to Attack.after() | Move Weapon durability hits to Attack.after()
| Python | agpl-3.0 | smallnamespace/fireplace,smallnamespace/fireplace,jleclanche/fireplace,amw2104/fireplace,NightKev/fireplace,beheh/fireplace,Ragowit/fireplace,Ragowit/fireplace,amw2104/fireplace | """
Base game rules (events, etc)
"""
from .actions import Attack, Damage, Destroy, Hit
from .dsl.selector import FRIENDLY_HERO, MINION, SELF
POISONOUS = Damage(MINION, None, SELF).on(Destroy(Damage.TARGETS))
class WeaponRules:
base_events = [
Attack(FRIENDLY_HERO).on(Hit(SELF, 1))
]
Move Weapon durability hits... | """
Base game rules (events, etc)
"""
from .actions import Attack, Damage, Destroy, Hit
from .dsl.selector import FRIENDLY_HERO, MINION, SELF
POISONOUS = Damage(MINION, None, SELF).on(Destroy(Damage.TARGETS))
class WeaponRules:
base_events = [
Attack(FRIENDLY_HERO).after(Hit(SELF, 1))
]
| <commit_before>"""
Base game rules (events, etc)
"""
from .actions import Attack, Damage, Destroy, Hit
from .dsl.selector import FRIENDLY_HERO, MINION, SELF
POISONOUS = Damage(MINION, None, SELF).on(Destroy(Damage.TARGETS))
class WeaponRules:
base_events = [
Attack(FRIENDLY_HERO).on(Hit(SELF, 1))
]
<commit_msg>... | """
Base game rules (events, etc)
"""
from .actions import Attack, Damage, Destroy, Hit
from .dsl.selector import FRIENDLY_HERO, MINION, SELF
POISONOUS = Damage(MINION, None, SELF).on(Destroy(Damage.TARGETS))
class WeaponRules:
base_events = [
Attack(FRIENDLY_HERO).after(Hit(SELF, 1))
]
| """
Base game rules (events, etc)
"""
from .actions import Attack, Damage, Destroy, Hit
from .dsl.selector import FRIENDLY_HERO, MINION, SELF
POISONOUS = Damage(MINION, None, SELF).on(Destroy(Damage.TARGETS))
class WeaponRules:
base_events = [
Attack(FRIENDLY_HERO).on(Hit(SELF, 1))
]
Move Weapon durability hits... | <commit_before>"""
Base game rules (events, etc)
"""
from .actions import Attack, Damage, Destroy, Hit
from .dsl.selector import FRIENDLY_HERO, MINION, SELF
POISONOUS = Damage(MINION, None, SELF).on(Destroy(Damage.TARGETS))
class WeaponRules:
base_events = [
Attack(FRIENDLY_HERO).on(Hit(SELF, 1))
]
<commit_msg>... |
639824dfa86b2aa98b1ae2ca3d4a5cec6ca329ea | nbgrader/preprocessors/__init__.py | nbgrader/preprocessors/__init__.py | from .headerfooter import IncludeHeaderFooter
from .lockcells import LockCells
from .clearsolutions import ClearSolutions
from .findstudentid import FindStudentID
from .saveautogrades import SaveAutoGrades
from .displayautogrades import DisplayAutoGrades
from .computechecksums import ComputeChecksums
from .savecells im... | from .headerfooter import IncludeHeaderFooter
from .lockcells import LockCells
from .clearsolutions import ClearSolutions
from .saveautogrades import SaveAutoGrades
from .displayautogrades import DisplayAutoGrades
from .computechecksums import ComputeChecksums
from .savecells import SaveCells
from .overwritecells impor... | Remove FindStudentID from preprocessors init | Remove FindStudentID from preprocessors init
| Python | bsd-3-clause | EdwardJKim/nbgrader,EdwardJKim/nbgrader,jhamrick/nbgrader,ellisonbg/nbgrader,alope107/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,dementrock/nbgrader,ellisonbg/nbgrader,EdwardJKim/nbgrader,jhamrick/nbgrader,jdfreder/nbgrader,jdfreder/nbgrader,ellisonbg/nbgrader,alope107/nbgrader,jupyter/nbgrader,module... | from .headerfooter import IncludeHeaderFooter
from .lockcells import LockCells
from .clearsolutions import ClearSolutions
from .findstudentid import FindStudentID
from .saveautogrades import SaveAutoGrades
from .displayautogrades import DisplayAutoGrades
from .computechecksums import ComputeChecksums
from .savecells im... | from .headerfooter import IncludeHeaderFooter
from .lockcells import LockCells
from .clearsolutions import ClearSolutions
from .saveautogrades import SaveAutoGrades
from .displayautogrades import DisplayAutoGrades
from .computechecksums import ComputeChecksums
from .savecells import SaveCells
from .overwritecells impor... | <commit_before>from .headerfooter import IncludeHeaderFooter
from .lockcells import LockCells
from .clearsolutions import ClearSolutions
from .findstudentid import FindStudentID
from .saveautogrades import SaveAutoGrades
from .displayautogrades import DisplayAutoGrades
from .computechecksums import ComputeChecksums
fro... | from .headerfooter import IncludeHeaderFooter
from .lockcells import LockCells
from .clearsolutions import ClearSolutions
from .saveautogrades import SaveAutoGrades
from .displayautogrades import DisplayAutoGrades
from .computechecksums import ComputeChecksums
from .savecells import SaveCells
from .overwritecells impor... | from .headerfooter import IncludeHeaderFooter
from .lockcells import LockCells
from .clearsolutions import ClearSolutions
from .findstudentid import FindStudentID
from .saveautogrades import SaveAutoGrades
from .displayautogrades import DisplayAutoGrades
from .computechecksums import ComputeChecksums
from .savecells im... | <commit_before>from .headerfooter import IncludeHeaderFooter
from .lockcells import LockCells
from .clearsolutions import ClearSolutions
from .findstudentid import FindStudentID
from .saveautogrades import SaveAutoGrades
from .displayautogrades import DisplayAutoGrades
from .computechecksums import ComputeChecksums
fro... |
83080df101aca13b9b044996a013794c94ab82ed | pronto/parsers/obo.py | pronto/parsers/obo.py | import os
import fastobo
from .base import BaseParser
from ._fastobo import FastoboParser
class OboParser(FastoboParser, BaseParser):
@classmethod
def can_parse(cls, path, buffer):
return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef"))
def parse_from(self, handle):
... | import os
import fastobo
from .base import BaseParser
from ._fastobo import FastoboParser
class OboParser(FastoboParser, BaseParser):
@classmethod
def can_parse(cls, path, buffer):
return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef"))
def parse_from(self, handle):
... | Make sure to parse OBO documents in order | Make sure to parse OBO documents in order
| Python | mit | althonos/pronto | import os
import fastobo
from .base import BaseParser
from ._fastobo import FastoboParser
class OboParser(FastoboParser, BaseParser):
@classmethod
def can_parse(cls, path, buffer):
return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef"))
def parse_from(self, handle):
... | import os
import fastobo
from .base import BaseParser
from ._fastobo import FastoboParser
class OboParser(FastoboParser, BaseParser):
@classmethod
def can_parse(cls, path, buffer):
return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef"))
def parse_from(self, handle):
... | <commit_before>import os
import fastobo
from .base import BaseParser
from ._fastobo import FastoboParser
class OboParser(FastoboParser, BaseParser):
@classmethod
def can_parse(cls, path, buffer):
return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef"))
def parse_from(self,... | import os
import fastobo
from .base import BaseParser
from ._fastobo import FastoboParser
class OboParser(FastoboParser, BaseParser):
@classmethod
def can_parse(cls, path, buffer):
return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef"))
def parse_from(self, handle):
... | import os
import fastobo
from .base import BaseParser
from ._fastobo import FastoboParser
class OboParser(FastoboParser, BaseParser):
@classmethod
def can_parse(cls, path, buffer):
return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef"))
def parse_from(self, handle):
... | <commit_before>import os
import fastobo
from .base import BaseParser
from ._fastobo import FastoboParser
class OboParser(FastoboParser, BaseParser):
@classmethod
def can_parse(cls, path, buffer):
return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef"))
def parse_from(self,... |
44e062dd5f302c5eed66e2d54858e1b8f78b745b | src/data.py | src/data.py | import csv
import datetime
class Row(dict):
def __init__(self, *args, **kwargs):
super(Row, self).__init__(*args, **kwargs)
self._start_date = None
self._end_date = None
def _cast_date(self, s):
if not s:
return None
return datetime.datetime.strptime(s, '%... | import csv
import datetime
class Row(dict):
def __init__(self, *args, **kwargs):
super(Row, self).__init__(*args, **kwargs)
self._start_date = None
self._end_date = None
def _cast_date(self, s):
if not s:
return None
return datetime.datetime.strptime(s, '%... | Add site number and application type to properties. For better filtering of new and old biz. | Add site number and application type to properties. For better filtering of new and old biz.
| Python | unlicense | datascopeanalytics/chicago-new-business,datascopeanalytics/chicago-new-business | import csv
import datetime
class Row(dict):
def __init__(self, *args, **kwargs):
super(Row, self).__init__(*args, **kwargs)
self._start_date = None
self._end_date = None
def _cast_date(self, s):
if not s:
return None
return datetime.datetime.strptime(s, '%... | import csv
import datetime
class Row(dict):
def __init__(self, *args, **kwargs):
super(Row, self).__init__(*args, **kwargs)
self._start_date = None
self._end_date = None
def _cast_date(self, s):
if not s:
return None
return datetime.datetime.strptime(s, '%... | <commit_before>import csv
import datetime
class Row(dict):
def __init__(self, *args, **kwargs):
super(Row, self).__init__(*args, **kwargs)
self._start_date = None
self._end_date = None
def _cast_date(self, s):
if not s:
return None
return datetime.datetime... | import csv
import datetime
class Row(dict):
def __init__(self, *args, **kwargs):
super(Row, self).__init__(*args, **kwargs)
self._start_date = None
self._end_date = None
def _cast_date(self, s):
if not s:
return None
return datetime.datetime.strptime(s, '%... | import csv
import datetime
class Row(dict):
def __init__(self, *args, **kwargs):
super(Row, self).__init__(*args, **kwargs)
self._start_date = None
self._end_date = None
def _cast_date(self, s):
if not s:
return None
return datetime.datetime.strptime(s, '%... | <commit_before>import csv
import datetime
class Row(dict):
def __init__(self, *args, **kwargs):
super(Row, self).__init__(*args, **kwargs)
self._start_date = None
self._end_date = None
def _cast_date(self, s):
if not s:
return None
return datetime.datetime... |
fec974d5eceed68fdfc2b30e4c4a0f78dfbb8808 | messagebird/base.py | messagebird/base.py | from datetime import datetime
class Base(object):
def load(self, data):
for name, value in data.items():
if hasattr(self, name):
setattr(self, name, value)
return self
def value_to_time(self, value):
if value != None:
return datetime.strptime(value, '%Y-%m-%dT%H:%M:%S+00:00')
| from datetime import datetime
class Base(object):
def load(self, data):
for name, value in list(data.items()):
if hasattr(self, name):
setattr(self, name, value)
return self
def value_to_time(self, value):
if value != None:
return datetime.strptime(value, '%Y-%m-%dT%H:%M:%S+00:00'... | Update dict.items() for Python 3 compatibility | Update dict.items() for Python 3 compatibility
In Python 3 `items()` return iterators, and a list is never fully
build. The `items()` method in Python 3 works like `viewitems()` in
Python 2.7.
For more information see:
https://docs.python.org/3/whatsnew/3.0.html#views-and-iterators-instead-of-lists
| Python | bsd-2-clause | messagebird/python-rest-api | from datetime import datetime
class Base(object):
def load(self, data):
for name, value in data.items():
if hasattr(self, name):
setattr(self, name, value)
return self
def value_to_time(self, value):
if value != None:
return datetime.strptime(value, '%Y-%m-%dT%H:%M:%S+00:00')
Upda... | from datetime import datetime
class Base(object):
def load(self, data):
for name, value in list(data.items()):
if hasattr(self, name):
setattr(self, name, value)
return self
def value_to_time(self, value):
if value != None:
return datetime.strptime(value, '%Y-%m-%dT%H:%M:%S+00:00'... | <commit_before>from datetime import datetime
class Base(object):
def load(self, data):
for name, value in data.items():
if hasattr(self, name):
setattr(self, name, value)
return self
def value_to_time(self, value):
if value != None:
return datetime.strptime(value, '%Y-%m-%dT%H:%M:... | from datetime import datetime
class Base(object):
def load(self, data):
for name, value in list(data.items()):
if hasattr(self, name):
setattr(self, name, value)
return self
def value_to_time(self, value):
if value != None:
return datetime.strptime(value, '%Y-%m-%dT%H:%M:%S+00:00'... | from datetime import datetime
class Base(object):
def load(self, data):
for name, value in data.items():
if hasattr(self, name):
setattr(self, name, value)
return self
def value_to_time(self, value):
if value != None:
return datetime.strptime(value, '%Y-%m-%dT%H:%M:%S+00:00')
Upda... | <commit_before>from datetime import datetime
class Base(object):
def load(self, data):
for name, value in data.items():
if hasattr(self, name):
setattr(self, name, value)
return self
def value_to_time(self, value):
if value != None:
return datetime.strptime(value, '%Y-%m-%dT%H:%M:... |
e7a09ad3e3d57291aa509cd45b8d3ae7a4cadaf8 | scripts/delete_couchdb_collection.py | scripts/delete_couchdb_collection.py | import sys
import argparse
import os
from harvester.couchdb_init import get_couchdb
import couchdb
from harvester.couchdb_sync_db_by_collection import delete_collection
def confirm_deletion(cid):
prompt = "Are you sure you want to delete all couchdb " + \
"documents for %s? yes to confirm\n" % cid
... | #! /bin/env python
import sys
import argparse
import os
from harvester.couchdb_init import get_couchdb
import couchdb
from harvester.couchdb_sync_db_by_collection import delete_collection
def confirm_deletion(cid):
prompt = "Are you sure you want to delete all couchdb " + \
"documents for %s? yes to c... | Make it runnable directly from cli, no python in front | Make it runnable directly from cli, no python in front
| Python | bsd-3-clause | mredar/harvester,mredar/harvester,ucldc/harvester,barbarahui/harvester,ucldc/harvester,barbarahui/harvester | import sys
import argparse
import os
from harvester.couchdb_init import get_couchdb
import couchdb
from harvester.couchdb_sync_db_by_collection import delete_collection
def confirm_deletion(cid):
prompt = "Are you sure you want to delete all couchdb " + \
"documents for %s? yes to confirm\n" % cid
... | #! /bin/env python
import sys
import argparse
import os
from harvester.couchdb_init import get_couchdb
import couchdb
from harvester.couchdb_sync_db_by_collection import delete_collection
def confirm_deletion(cid):
prompt = "Are you sure you want to delete all couchdb " + \
"documents for %s? yes to c... | <commit_before>import sys
import argparse
import os
from harvester.couchdb_init import get_couchdb
import couchdb
from harvester.couchdb_sync_db_by_collection import delete_collection
def confirm_deletion(cid):
prompt = "Are you sure you want to delete all couchdb " + \
"documents for %s? yes to confi... | #! /bin/env python
import sys
import argparse
import os
from harvester.couchdb_init import get_couchdb
import couchdb
from harvester.couchdb_sync_db_by_collection import delete_collection
def confirm_deletion(cid):
prompt = "Are you sure you want to delete all couchdb " + \
"documents for %s? yes to c... | import sys
import argparse
import os
from harvester.couchdb_init import get_couchdb
import couchdb
from harvester.couchdb_sync_db_by_collection import delete_collection
def confirm_deletion(cid):
prompt = "Are you sure you want to delete all couchdb " + \
"documents for %s? yes to confirm\n" % cid
... | <commit_before>import sys
import argparse
import os
from harvester.couchdb_init import get_couchdb
import couchdb
from harvester.couchdb_sync_db_by_collection import delete_collection
def confirm_deletion(cid):
prompt = "Are you sure you want to delete all couchdb " + \
"documents for %s? yes to confi... |
733d48510c4d6d8f4b9f07b6e33075cc20d1720a | gewebehaken/app.py | gewebehaken/app.py | # -*- coding: utf-8 -*-
"""
Gewebehaken
~~~~~~~~~~~
The WSGI application
:Copyright: 2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_
:License: MIT, see LICENSE for details.
"""
import logging
from logging import FileHandler, Formatter
from flask import Flask
from .hooks.twitter import blueprint as twitt... | # -*- coding: utf-8 -*-
"""
Gewebehaken
~~~~~~~~~~~
The WSGI application
:Copyright: 2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_
:License: MIT, see LICENSE for details.
"""
import logging
from logging import FileHandler, Formatter
from flask import Flask
from .hooks.twitter import blueprint as twitt... | Remove default route for serving static files from URL map. | Remove default route for serving static files from URL map.
| Python | mit | homeworkprod/gewebehaken | # -*- coding: utf-8 -*-
"""
Gewebehaken
~~~~~~~~~~~
The WSGI application
:Copyright: 2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_
:License: MIT, see LICENSE for details.
"""
import logging
from logging import FileHandler, Formatter
from flask import Flask
from .hooks.twitter import blueprint as twitt... | # -*- coding: utf-8 -*-
"""
Gewebehaken
~~~~~~~~~~~
The WSGI application
:Copyright: 2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_
:License: MIT, see LICENSE for details.
"""
import logging
from logging import FileHandler, Formatter
from flask import Flask
from .hooks.twitter import blueprint as twitt... | <commit_before># -*- coding: utf-8 -*-
"""
Gewebehaken
~~~~~~~~~~~
The WSGI application
:Copyright: 2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_
:License: MIT, see LICENSE for details.
"""
import logging
from logging import FileHandler, Formatter
from flask import Flask
from .hooks.twitter import blu... | # -*- coding: utf-8 -*-
"""
Gewebehaken
~~~~~~~~~~~
The WSGI application
:Copyright: 2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_
:License: MIT, see LICENSE for details.
"""
import logging
from logging import FileHandler, Formatter
from flask import Flask
from .hooks.twitter import blueprint as twitt... | # -*- coding: utf-8 -*-
"""
Gewebehaken
~~~~~~~~~~~
The WSGI application
:Copyright: 2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_
:License: MIT, see LICENSE for details.
"""
import logging
from logging import FileHandler, Formatter
from flask import Flask
from .hooks.twitter import blueprint as twitt... | <commit_before># -*- coding: utf-8 -*-
"""
Gewebehaken
~~~~~~~~~~~
The WSGI application
:Copyright: 2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_
:License: MIT, see LICENSE for details.
"""
import logging
from logging import FileHandler, Formatter
from flask import Flask
from .hooks.twitter import blu... |
75db5105d609a2b28f19ee675de866425e2c5c3e | salt/modules/cp.py | salt/modules/cp.py | '''
Minion side functions for salt-cp
'''
import os
def recv(files, dest):
'''
Used with salt-cp, pass the files dict, and the destination
'''
ret = {}
for path, data in files.items():
final = ''
if os.path.basename(path) == os.path.basename(dest)\
and not os.path.is... | '''
Minion side functions for salt-cp
'''
# Import python libs
import os
# Import salt libs
import salt.simpleauth
def recv(files, dest):
'''
Used with salt-cp, pass the files dict, and the destination.
This function recieves small fast copy files from the master via salt-cp
'''
ret = {}
for ... | Add in the minion module function to download files from the master | Add in the minion module function to download files from the master
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | '''
Minion side functions for salt-cp
'''
import os
def recv(files, dest):
'''
Used with salt-cp, pass the files dict, and the destination
'''
ret = {}
for path, data in files.items():
final = ''
if os.path.basename(path) == os.path.basename(dest)\
and not os.path.is... | '''
Minion side functions for salt-cp
'''
# Import python libs
import os
# Import salt libs
import salt.simpleauth
def recv(files, dest):
'''
Used with salt-cp, pass the files dict, and the destination.
This function recieves small fast copy files from the master via salt-cp
'''
ret = {}
for ... | <commit_before>'''
Minion side functions for salt-cp
'''
import os
def recv(files, dest):
'''
Used with salt-cp, pass the files dict, and the destination
'''
ret = {}
for path, data in files.items():
final = ''
if os.path.basename(path) == os.path.basename(dest)\
and... | '''
Minion side functions for salt-cp
'''
# Import python libs
import os
# Import salt libs
import salt.simpleauth
def recv(files, dest):
'''
Used with salt-cp, pass the files dict, and the destination.
This function recieves small fast copy files from the master via salt-cp
'''
ret = {}
for ... | '''
Minion side functions for salt-cp
'''
import os
def recv(files, dest):
'''
Used with salt-cp, pass the files dict, and the destination
'''
ret = {}
for path, data in files.items():
final = ''
if os.path.basename(path) == os.path.basename(dest)\
and not os.path.is... | <commit_before>'''
Minion side functions for salt-cp
'''
import os
def recv(files, dest):
'''
Used with salt-cp, pass the files dict, and the destination
'''
ret = {}
for path, data in files.items():
final = ''
if os.path.basename(path) == os.path.basename(dest)\
and... |
1f3eb1c526171b0ee8d2cab05e182c067bfb6c2e | tests/unit/modules/defaults_test.py | tests/unit/modules/defaults_test.py | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
imp... | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
imp... | Remove useless mocked unit test | Remove useless mocked unit test
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
imp... | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
imp... | <commit_before># -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOC... | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
imp... | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
imp... | <commit_before># -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOC... |
794a233a70ac8cdd4fc0812bd651757b35e605f2 | tests/unit/utils/test_sanitizers.py | tests/unit/utils/test_sanitizers.py | # -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
from salt.ext.six import text_type as text
# Import Salt Libs
from salt.utils.sanitizers import clean
# Import Salt Testing Libs
from tests.support.unit import TestCase, skipIf
from tests.support.moc... | # -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
from salt.ext.six import text_type as text
# Import Salt Libs
from salt.utils.sanitizers import clean, mask_args_value
# Import Salt Testing Libs
from tests.support.unit import TestCase, skipIf
from ... | Add unit test for masking key:value of YAML | Add unit test for masking key:value of YAML
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
from salt.ext.six import text_type as text
# Import Salt Libs
from salt.utils.sanitizers import clean
# Import Salt Testing Libs
from tests.support.unit import TestCase, skipIf
from tests.support.moc... | # -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
from salt.ext.six import text_type as text
# Import Salt Libs
from salt.utils.sanitizers import clean, mask_args_value
# Import Salt Testing Libs
from tests.support.unit import TestCase, skipIf
from ... | <commit_before># -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
from salt.ext.six import text_type as text
# Import Salt Libs
from salt.utils.sanitizers import clean
# Import Salt Testing Libs
from tests.support.unit import TestCase, skipIf
from te... | # -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
from salt.ext.six import text_type as text
# Import Salt Libs
from salt.utils.sanitizers import clean, mask_args_value
# Import Salt Testing Libs
from tests.support.unit import TestCase, skipIf
from ... | # -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
from salt.ext.six import text_type as text
# Import Salt Libs
from salt.utils.sanitizers import clean
# Import Salt Testing Libs
from tests.support.unit import TestCase, skipIf
from tests.support.moc... | <commit_before># -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
from salt.ext.six import text_type as text
# Import Salt Libs
from salt.utils.sanitizers import clean
# Import Salt Testing Libs
from tests.support.unit import TestCase, skipIf
from te... |
b222fbbbcca019a1849e70cc46b1527fa5fe2082 | database.py | database.py | from redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz')
| from redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz')
def get_question(self, quizid, questionid):
return self.hget("{0}:question".format(quizid), questionid)
| Add function to get a question | Add function to get a question
| Python | bsd-2-clause | estreeper/quizalicious,estreeper/quizalicious,estreeper/quizalicious | from redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz')
Add function to get a question | from redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz')
def get_question(self, quizid, questionid):
return self.hget("{0}:question".format(quizid), questionid)
| <commit_before>from redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz')
<commit_msg>Add function to get a question<commit_after> | from redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz')
def get_question(self, quizid, questionid):
return self.hget("{0}:question".format(quizid), questionid)
| from redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz')
Add function to get a questionfrom redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz')
def get_question(self, quizid, qu... | <commit_before>from redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz')
<commit_msg>Add function to get a question<commit_after>from redis import StrictRedis
class QuizDB(StrictRedis):
def get_all_quizzes(self):
return self.smembers('quiz... |
bf9addce584961e30456c74b767afe05ca5dbb71 | tests/test_it.py | tests/test_it.py | import requests
def test_notifications_admin_index():
# response = requests.request("GET", "http://localhost:6012")
response = requests.request("GET", "http://notifications-admin.herokuapp.com/")
assert response.status_code == 200
assert 'GOV.UK Notify' in response.content
| import requests
def test_notifications_admin_index():
# response = requests.request("GET", "http://localhost:6012")
response = requests.request("GET", "http://notifications-admin.herokuapp.com/")
assert response.status_code == 200
assert 'GOV.UK Notify' in str(response.content)
| Convert bytes to str for assertion | Convert bytes to str for assertion
| Python | mit | alphagov/notifications-functional-tests,alphagov/notifications-functional-tests | import requests
def test_notifications_admin_index():
# response = requests.request("GET", "http://localhost:6012")
response = requests.request("GET", "http://notifications-admin.herokuapp.com/")
assert response.status_code == 200
assert 'GOV.UK Notify' in response.content
Convert bytes to str for ass... | import requests
def test_notifications_admin_index():
# response = requests.request("GET", "http://localhost:6012")
response = requests.request("GET", "http://notifications-admin.herokuapp.com/")
assert response.status_code == 200
assert 'GOV.UK Notify' in str(response.content)
| <commit_before>import requests
def test_notifications_admin_index():
# response = requests.request("GET", "http://localhost:6012")
response = requests.request("GET", "http://notifications-admin.herokuapp.com/")
assert response.status_code == 200
assert 'GOV.UK Notify' in response.content
<commit_msg>C... | import requests
def test_notifications_admin_index():
# response = requests.request("GET", "http://localhost:6012")
response = requests.request("GET", "http://notifications-admin.herokuapp.com/")
assert response.status_code == 200
assert 'GOV.UK Notify' in str(response.content)
| import requests
def test_notifications_admin_index():
# response = requests.request("GET", "http://localhost:6012")
response = requests.request("GET", "http://notifications-admin.herokuapp.com/")
assert response.status_code == 200
assert 'GOV.UK Notify' in response.content
Convert bytes to str for ass... | <commit_before>import requests
def test_notifications_admin_index():
# response = requests.request("GET", "http://localhost:6012")
response = requests.request("GET", "http://notifications-admin.herokuapp.com/")
assert response.status_code == 200
assert 'GOV.UK Notify' in response.content
<commit_msg>C... |
26d7b8a1e0fef6b32b5705634fe40504a6aa258d | tests/test_elsewhere_twitter.py | tests/test_elsewhere_twitter.py | from __future__ import print_function, unicode_literals
from gittip.elsewhere import twitter
from gittip.testing import Harness
class TestElsewhereTwitter(Harness):
def test_get_user_info_gets_user_info(self):
twitter.TwitterAccount(self.db, "1", {'screen_name': 'alice'}).opt_in('alice')
expecte... | from __future__ import print_function, unicode_literals
from gittip.elsewhere import twitter
from gittip.testing import Harness
class TestElsewhereTwitter(Harness):
def test_get_user_info_gets_user_info(self):
twitter.TwitterAccount(self.db, "1", {'screen_name': 'alice'}).opt_in('alice')
expecte... | Add a test for Twitter accounts with long identifier. | Add a test for Twitter accounts with long identifier.
| Python | mit | gratipay/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,mccolgst/www.gittip.com,studio666/gratipay.com,gratipay/... | from __future__ import print_function, unicode_literals
from gittip.elsewhere import twitter
from gittip.testing import Harness
class TestElsewhereTwitter(Harness):
def test_get_user_info_gets_user_info(self):
twitter.TwitterAccount(self.db, "1", {'screen_name': 'alice'}).opt_in('alice')
expecte... | from __future__ import print_function, unicode_literals
from gittip.elsewhere import twitter
from gittip.testing import Harness
class TestElsewhereTwitter(Harness):
def test_get_user_info_gets_user_info(self):
twitter.TwitterAccount(self.db, "1", {'screen_name': 'alice'}).opt_in('alice')
expecte... | <commit_before>from __future__ import print_function, unicode_literals
from gittip.elsewhere import twitter
from gittip.testing import Harness
class TestElsewhereTwitter(Harness):
def test_get_user_info_gets_user_info(self):
twitter.TwitterAccount(self.db, "1", {'screen_name': 'alice'}).opt_in('alice')
... | from __future__ import print_function, unicode_literals
from gittip.elsewhere import twitter
from gittip.testing import Harness
class TestElsewhereTwitter(Harness):
def test_get_user_info_gets_user_info(self):
twitter.TwitterAccount(self.db, "1", {'screen_name': 'alice'}).opt_in('alice')
expecte... | from __future__ import print_function, unicode_literals
from gittip.elsewhere import twitter
from gittip.testing import Harness
class TestElsewhereTwitter(Harness):
def test_get_user_info_gets_user_info(self):
twitter.TwitterAccount(self.db, "1", {'screen_name': 'alice'}).opt_in('alice')
expecte... | <commit_before>from __future__ import print_function, unicode_literals
from gittip.elsewhere import twitter
from gittip.testing import Harness
class TestElsewhereTwitter(Harness):
def test_get_user_info_gets_user_info(self):
twitter.TwitterAccount(self.db, "1", {'screen_name': 'alice'}).opt_in('alice')
... |
a6bed0c1de2fc437d3ad84f0b22d27d4706eb5ab | presentations/urls.py | presentations/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'presentations.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
| from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'presentations.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^', incl... | Add URL routing to app | Add URL routing to app
| Python | mit | masonsbro/presentations | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'presentations.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
Add URL routing ... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'presentations.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^', incl... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'presentations.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
<... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'presentations.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^', incl... | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'presentations.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
Add URL routing ... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'presentations.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
<... |
dd2d5e96672fc7870434f030ca63f6d7111642f9 | resources/launchers/alfanousDesktop.py | resources/launchers/alfanousDesktop.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The paths should be generated by setup script
sys.argv.extend(
'-i', '/usr/share/alfanous-indexes/',
'-l', '/usr/locale/',
'-c', '/usr/share/alfanous-config/')
from alfanousDesktop.Gui import *
main()
| Add resource paths to python launcher script (proxy) | Add resource paths to python launcher script (proxy)
Former-commit-id: 7d20874c43637f1236442333f60a88ec653f53f2 | Python | agpl-3.0 | muslih/alfanous,muslih/alfanous,muslih/alfanous,muslih/alfanous,muslih/alfanous,muslih/alfanous,muslih/alfanous | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
Add resource paths to python launcher script (proxy)
Former-commit-id: 7d20874c43637f1236442333f60a88ec653f53f2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The paths should be generated by setup script
sys.argv.extend(
'-i', '/usr/share/alfanous-indexes/',
'-l', '/usr/locale/',
'-c', '/usr/share/alfanous-config/')
from alfanousDesktop.Gui import *
main()
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
<commit_msg>Add resource paths to python launcher script (proxy)
Former-commit-id: 7d20874c43637f1236442333f60a88ec653f53f2<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The paths should be generated by setup script
sys.argv.extend(
'-i', '/usr/share/alfanous-indexes/',
'-l', '/usr/locale/',
'-c', '/usr/share/alfanous-config/')
from alfanousDesktop.Gui import *
main()
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
Add resource paths to python launcher script (proxy)
Former-commit-id: 7d20874c43637f1236442333f60a88ec653f53f2#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The paths should be generated by setup scrip... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import alfanousDesktop.Gui
alfanousDesktop.Gui.main()
<commit_msg>Add resource paths to python launcher script (proxy)
Former-commit-id: 7d20874c43637f1236442333f60a88ec653f53f2<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# The... |
ed8139a505a93c3a99fbb147817cc5695aa0ffc7 | service/settings/local.py | service/settings/local.py | import os
from service.settings.production import *
DEBUG = { 0: False, 1: True }[int(os.getenv('DEBUG'))]
if DEBUG:
MIDDLEWARE += [
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
INSTALLED_APPS += [
'debug_toolbar',
]
INTERNAL_IPS = (
'127.0.0.1',
# Docker ... | import os
from service.settings.production import *
DEBUG = { 0: False, 1: True }[int(os.getenv('DEBUG'))]
# SSL/HTTPS Security
## Set SECURE_SSL_REDIRECT to True, so that requests over HTTP are redirected to HTTPS.
SECURE_PROXY_SSL_HEADER = None
SECURE_SSL_REDIRECT = False
## Use ‘secure’ cookies.
SESSION_COOKIE_... | Disable SSL/HTTPS (reverts to default values) | Disable SSL/HTTPS (reverts to default values)
Needing to explicitly set something to it’s default value perhaps isn’t ideal. | Python | unlicense | Mystopia/fantastic-doodle | import os
from service.settings.production import *
DEBUG = { 0: False, 1: True }[int(os.getenv('DEBUG'))]
if DEBUG:
MIDDLEWARE += [
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
INSTALLED_APPS += [
'debug_toolbar',
]
INTERNAL_IPS = (
'127.0.0.1',
# Docker ... | import os
from service.settings.production import *
DEBUG = { 0: False, 1: True }[int(os.getenv('DEBUG'))]
# SSL/HTTPS Security
## Set SECURE_SSL_REDIRECT to True, so that requests over HTTP are redirected to HTTPS.
SECURE_PROXY_SSL_HEADER = None
SECURE_SSL_REDIRECT = False
## Use ‘secure’ cookies.
SESSION_COOKIE_... | <commit_before>import os
from service.settings.production import *
DEBUG = { 0: False, 1: True }[int(os.getenv('DEBUG'))]
if DEBUG:
MIDDLEWARE += [
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
INSTALLED_APPS += [
'debug_toolbar',
]
INTERNAL_IPS = (
'127.0.0.1',
... | import os
from service.settings.production import *
DEBUG = { 0: False, 1: True }[int(os.getenv('DEBUG'))]
# SSL/HTTPS Security
## Set SECURE_SSL_REDIRECT to True, so that requests over HTTP are redirected to HTTPS.
SECURE_PROXY_SSL_HEADER = None
SECURE_SSL_REDIRECT = False
## Use ‘secure’ cookies.
SESSION_COOKIE_... | import os
from service.settings.production import *
DEBUG = { 0: False, 1: True }[int(os.getenv('DEBUG'))]
if DEBUG:
MIDDLEWARE += [
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
INSTALLED_APPS += [
'debug_toolbar',
]
INTERNAL_IPS = (
'127.0.0.1',
# Docker ... | <commit_before>import os
from service.settings.production import *
DEBUG = { 0: False, 1: True }[int(os.getenv('DEBUG'))]
if DEBUG:
MIDDLEWARE += [
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
INSTALLED_APPS += [
'debug_toolbar',
]
INTERNAL_IPS = (
'127.0.0.1',
... |
7cf3741070cba4d4e0016a7175158ec5993fd7f2 | klein/__init__.py | klein/__init__.py | from functools import wraps
from twisted.internet import reactor
from twisted.web.server import Site
from klein.decorators import expose
from klein.resource import KleinResource
routes = {}
def route(r):
def deco(f):
# Swallow self.
# XXX hilariously, staticmethod would be *great* here.
... | Add a couple things for Bottle-like behavior. | Add a couple things for Bottle-like behavior.
| Python | mit | macmania/klein,brighid/klein,hawkowl/klein,macmania/klein,joac/klein,alex/klein,joac/klein,brighid/klein | Add a couple things for Bottle-like behavior. | from functools import wraps
from twisted.internet import reactor
from twisted.web.server import Site
from klein.decorators import expose
from klein.resource import KleinResource
routes = {}
def route(r):
def deco(f):
# Swallow self.
# XXX hilariously, staticmethod would be *great* here.
... | <commit_before><commit_msg>Add a couple things for Bottle-like behavior.<commit_after> | from functools import wraps
from twisted.internet import reactor
from twisted.web.server import Site
from klein.decorators import expose
from klein.resource import KleinResource
routes = {}
def route(r):
def deco(f):
# Swallow self.
# XXX hilariously, staticmethod would be *great* here.
... | Add a couple things for Bottle-like behavior.from functools import wraps
from twisted.internet import reactor
from twisted.web.server import Site
from klein.decorators import expose
from klein.resource import KleinResource
routes = {}
def route(r):
def deco(f):
# Swallow self.
# XXX hilariously,... | <commit_before><commit_msg>Add a couple things for Bottle-like behavior.<commit_after>from functools import wraps
from twisted.internet import reactor
from twisted.web.server import Site
from klein.decorators import expose
from klein.resource import KleinResource
routes = {}
def route(r):
def deco(f):
#... | |
7669e6c65d46615c8e52e53dba5a1b4812e34a02 | soccerstats/api.py | soccerstats/api.py | """
Blueprint implementing the API wrapper.
:author: 2013, Pascal Hartig <phartig@weluse.de>
:license: BSD
"""
import json
from flask import Blueprint, request, abort
from .utils import JSONError
from .calc import calculate_scores
api = Blueprint('api', __name__, url_prefix='/v1')
class ScoresResponse(object):
... | """
Blueprint implementing the API wrapper.
:author: 2013, Pascal Hartig <phartig@weluse.de>
:license: BSD
"""
import json
from flask import Blueprint, request, abort
from .utils import JSONError
from .calc import calculate_scores
api = Blueprint('api', __name__, url_prefix='/v1')
class ScoresResponse(object):
... | Return sorted values for scores | Return sorted values for scores
| Python | bsd-3-clause | passy/soccer-stats-backend | """
Blueprint implementing the API wrapper.
:author: 2013, Pascal Hartig <phartig@weluse.de>
:license: BSD
"""
import json
from flask import Blueprint, request, abort
from .utils import JSONError
from .calc import calculate_scores
api = Blueprint('api', __name__, url_prefix='/v1')
class ScoresResponse(object):
... | """
Blueprint implementing the API wrapper.
:author: 2013, Pascal Hartig <phartig@weluse.de>
:license: BSD
"""
import json
from flask import Blueprint, request, abort
from .utils import JSONError
from .calc import calculate_scores
api = Blueprint('api', __name__, url_prefix='/v1')
class ScoresResponse(object):
... | <commit_before>"""
Blueprint implementing the API wrapper.
:author: 2013, Pascal Hartig <phartig@weluse.de>
:license: BSD
"""
import json
from flask import Blueprint, request, abort
from .utils import JSONError
from .calc import calculate_scores
api = Blueprint('api', __name__, url_prefix='/v1')
class ScoresRespo... | """
Blueprint implementing the API wrapper.
:author: 2013, Pascal Hartig <phartig@weluse.de>
:license: BSD
"""
import json
from flask import Blueprint, request, abort
from .utils import JSONError
from .calc import calculate_scores
api = Blueprint('api', __name__, url_prefix='/v1')
class ScoresResponse(object):
... | """
Blueprint implementing the API wrapper.
:author: 2013, Pascal Hartig <phartig@weluse.de>
:license: BSD
"""
import json
from flask import Blueprint, request, abort
from .utils import JSONError
from .calc import calculate_scores
api = Blueprint('api', __name__, url_prefix='/v1')
class ScoresResponse(object):
... | <commit_before>"""
Blueprint implementing the API wrapper.
:author: 2013, Pascal Hartig <phartig@weluse.de>
:license: BSD
"""
import json
from flask import Blueprint, request, abort
from .utils import JSONError
from .calc import calculate_scores
api = Blueprint('api', __name__, url_prefix='/v1')
class ScoresRespo... |
3eaf0ea514b0f78906af7e614079f3a90624bcc7 | estimate.py | estimate.py | #!/usr/bin/python3
from sys import stdin
def estimateConf(conf):
"""Estimate configuration from a string."""
confElements = [int(x) for x in conf.split(sep=" ")]
disk = confElements[0]
print(disk)
procRates = confElements[1:]
print(procRates)
def estimateConfsFromInput():
"""Parse and es... | #!/usr/bin/python3
from sys import stdin
def calcExhaustion(disk, procRates):
"""Calculate how many seconds before the disk is filled.
procRates lists the rates at which each process fills 1 byte of disk
space."""
print(disk)
print(procRates)
def estimateConf(conf):
"""Estimate ... | Create fn for calculating exhaustion | Create fn for calculating exhaustion
| Python | mit | MattHeard/EstimateDiskExhaustion | #!/usr/bin/python3
from sys import stdin
def estimateConf(conf):
"""Estimate configuration from a string."""
confElements = [int(x) for x in conf.split(sep=" ")]
disk = confElements[0]
print(disk)
procRates = confElements[1:]
print(procRates)
def estimateConfsFromInput():
"""Parse and es... | #!/usr/bin/python3
from sys import stdin
def calcExhaustion(disk, procRates):
"""Calculate how many seconds before the disk is filled.
procRates lists the rates at which each process fills 1 byte of disk
space."""
print(disk)
print(procRates)
def estimateConf(conf):
"""Estimate ... | <commit_before>#!/usr/bin/python3
from sys import stdin
def estimateConf(conf):
"""Estimate configuration from a string."""
confElements = [int(x) for x in conf.split(sep=" ")]
disk = confElements[0]
print(disk)
procRates = confElements[1:]
print(procRates)
def estimateConfsFromInput():
... | #!/usr/bin/python3
from sys import stdin
def calcExhaustion(disk, procRates):
"""Calculate how many seconds before the disk is filled.
procRates lists the rates at which each process fills 1 byte of disk
space."""
print(disk)
print(procRates)
def estimateConf(conf):
"""Estimate ... | #!/usr/bin/python3
from sys import stdin
def estimateConf(conf):
"""Estimate configuration from a string."""
confElements = [int(x) for x in conf.split(sep=" ")]
disk = confElements[0]
print(disk)
procRates = confElements[1:]
print(procRates)
def estimateConfsFromInput():
"""Parse and es... | <commit_before>#!/usr/bin/python3
from sys import stdin
def estimateConf(conf):
"""Estimate configuration from a string."""
confElements = [int(x) for x in conf.split(sep=" ")]
disk = confElements[0]
print(disk)
procRates = confElements[1:]
print(procRates)
def estimateConfsFromInput():
... |
93ac186e90790c17014d905fd2f85e7e7dde1271 | osbrain/__init__.py | osbrain/__init__.py | import os
import Pyro4
Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
Pyro4.config.SERIALIZERS_ACCEPTED.add('dill')
Pyro4.config.SERIALIZER = 'dill'
Pyro4.config.THREADPOOL_SIZE = 16
Pyro4.config.SERVERTYPE = 'thread'
Pyro4.config.REQUIRE_EXPOSE = False
Pyro4.config.COMMTIMEOUT = 0.
Pyro4.config.DETAILED_TRACEBACK = T... | import os
import Pyro4
Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
Pyro4.config.SERIALIZERS_ACCEPTED.add('dill')
Pyro4.config.SERIALIZER = 'dill'
Pyro4.config.THREADPOOL_SIZE = 16
Pyro4.config.SERVERTYPE = 'thread'
Pyro4.config.REQUIRE_EXPOSE = False
Pyro4.config.COMMTIMEOUT = 0.
Pyro4.config.DETAILED_TRACEBACK = T... | Set default linger to 1 second | Set default linger to 1 second
| Python | apache-2.0 | opensistemas-hub/osbrain | import os
import Pyro4
Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
Pyro4.config.SERIALIZERS_ACCEPTED.add('dill')
Pyro4.config.SERIALIZER = 'dill'
Pyro4.config.THREADPOOL_SIZE = 16
Pyro4.config.SERVERTYPE = 'thread'
Pyro4.config.REQUIRE_EXPOSE = False
Pyro4.config.COMMTIMEOUT = 0.
Pyro4.config.DETAILED_TRACEBACK = T... | import os
import Pyro4
Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
Pyro4.config.SERIALIZERS_ACCEPTED.add('dill')
Pyro4.config.SERIALIZER = 'dill'
Pyro4.config.THREADPOOL_SIZE = 16
Pyro4.config.SERVERTYPE = 'thread'
Pyro4.config.REQUIRE_EXPOSE = False
Pyro4.config.COMMTIMEOUT = 0.
Pyro4.config.DETAILED_TRACEBACK = T... | <commit_before>import os
import Pyro4
Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
Pyro4.config.SERIALIZERS_ACCEPTED.add('dill')
Pyro4.config.SERIALIZER = 'dill'
Pyro4.config.THREADPOOL_SIZE = 16
Pyro4.config.SERVERTYPE = 'thread'
Pyro4.config.REQUIRE_EXPOSE = False
Pyro4.config.COMMTIMEOUT = 0.
Pyro4.config.DETAILE... | import os
import Pyro4
Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
Pyro4.config.SERIALIZERS_ACCEPTED.add('dill')
Pyro4.config.SERIALIZER = 'dill'
Pyro4.config.THREADPOOL_SIZE = 16
Pyro4.config.SERVERTYPE = 'thread'
Pyro4.config.REQUIRE_EXPOSE = False
Pyro4.config.COMMTIMEOUT = 0.
Pyro4.config.DETAILED_TRACEBACK = T... | import os
import Pyro4
Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
Pyro4.config.SERIALIZERS_ACCEPTED.add('dill')
Pyro4.config.SERIALIZER = 'dill'
Pyro4.config.THREADPOOL_SIZE = 16
Pyro4.config.SERVERTYPE = 'thread'
Pyro4.config.REQUIRE_EXPOSE = False
Pyro4.config.COMMTIMEOUT = 0.
Pyro4.config.DETAILED_TRACEBACK = T... | <commit_before>import os
import Pyro4
Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
Pyro4.config.SERIALIZERS_ACCEPTED.add('dill')
Pyro4.config.SERIALIZER = 'dill'
Pyro4.config.THREADPOOL_SIZE = 16
Pyro4.config.SERVERTYPE = 'thread'
Pyro4.config.REQUIRE_EXPOSE = False
Pyro4.config.COMMTIMEOUT = 0.
Pyro4.config.DETAILE... |
8e2596db204d2f6779280309aaa06d90872e9fb2 | tests/test_bot_support.py | tests/test_bot_support.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from .test_bot import TestBot
class TestBotSupport(TestBot):
@pytest.mark.parametrize('url,result', [
('https://google.com', ['https://google.com']),
('google.com', ['google.com']),
('google.com/search?q=insta... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import pytest
from .test_bot import TestBot
class TestBotSupport(TestBot):
@pytest.mark.parametrize('url,result', [
('https://google.com', ['https://google.com']),
('google.com', ['google.com']),
('google.com/sea... | Add test on check file if exist | Add test on check file if exist
| Python | apache-2.0 | instagrambot/instabot,ohld/instabot,instagrambot/instabot | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from .test_bot import TestBot
class TestBotSupport(TestBot):
@pytest.mark.parametrize('url,result', [
('https://google.com', ['https://google.com']),
('google.com', ['google.com']),
('google.com/search?q=insta... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import pytest
from .test_bot import TestBot
class TestBotSupport(TestBot):
@pytest.mark.parametrize('url,result', [
('https://google.com', ['https://google.com']),
('google.com', ['google.com']),
('google.com/sea... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from .test_bot import TestBot
class TestBotSupport(TestBot):
@pytest.mark.parametrize('url,result', [
('https://google.com', ['https://google.com']),
('google.com', ['google.com']),
('google.com... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import pytest
from .test_bot import TestBot
class TestBotSupport(TestBot):
@pytest.mark.parametrize('url,result', [
('https://google.com', ['https://google.com']),
('google.com', ['google.com']),
('google.com/sea... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from .test_bot import TestBot
class TestBotSupport(TestBot):
@pytest.mark.parametrize('url,result', [
('https://google.com', ['https://google.com']),
('google.com', ['google.com']),
('google.com/search?q=insta... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from .test_bot import TestBot
class TestBotSupport(TestBot):
@pytest.mark.parametrize('url,result', [
('https://google.com', ['https://google.com']),
('google.com', ['google.com']),
('google.com... |
3c00c5de9d0bd6ecf860d09b786db9625e212102 | tools/perf_expectations/PRESUBMIT.py | tools/perf_expectations/PRESUBMIT.py | #!/usr/bin/python
# Copyright (c) 2009 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.
"""Presubmit script for perf_expectations.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on ... | #!/usr/bin/python
# Copyright (c) 2009 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.
"""Presubmit script for perf_expectations.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on ... | Use full pathname to perf_expectations in test. | Use full pathname to perf_expectations in test.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/266055
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@28770 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | adobe/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,... | #!/usr/bin/python
# Copyright (c) 2009 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.
"""Presubmit script for perf_expectations.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on ... | #!/usr/bin/python
# Copyright (c) 2009 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.
"""Presubmit script for perf_expectations.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on ... | <commit_before>#!/usr/bin/python
# Copyright (c) 2009 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.
"""Presubmit script for perf_expectations.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts ... | #!/usr/bin/python
# Copyright (c) 2009 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.
"""Presubmit script for perf_expectations.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on ... | #!/usr/bin/python
# Copyright (c) 2009 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.
"""Presubmit script for perf_expectations.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on ... | <commit_before>#!/usr/bin/python
# Copyright (c) 2009 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.
"""Presubmit script for perf_expectations.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts ... |
490ce27b6e9213cd9200b6fb42e7676af58abd58 | zou/app/models/custom_action.py | zou/app/models/custom_action.py | from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class CustomAction(db.Model, BaseMixin, SerializerMixin):
name = db.Column(db.String(80), nullable=False)
url = db.Column(db.String(400))
| from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class CustomAction(db.Model, BaseMixin, SerializerMixin):
name = db.Column(db.String(80), nullable=False)
url = db.Column(db.String(400))
entity_type = db.Column(db.String(40), default="a... | Add entity type column to actions | Add entity type column to actions
| Python | agpl-3.0 | cgwire/zou | from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class CustomAction(db.Model, BaseMixin, SerializerMixin):
name = db.Column(db.String(80), nullable=False)
url = db.Column(db.String(400))
Add entity type column to actions | from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class CustomAction(db.Model, BaseMixin, SerializerMixin):
name = db.Column(db.String(80), nullable=False)
url = db.Column(db.String(400))
entity_type = db.Column(db.String(40), default="a... | <commit_before>from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class CustomAction(db.Model, BaseMixin, SerializerMixin):
name = db.Column(db.String(80), nullable=False)
url = db.Column(db.String(400))
<commit_msg>Add entity type column to ... | from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class CustomAction(db.Model, BaseMixin, SerializerMixin):
name = db.Column(db.String(80), nullable=False)
url = db.Column(db.String(400))
entity_type = db.Column(db.String(40), default="a... | from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class CustomAction(db.Model, BaseMixin, SerializerMixin):
name = db.Column(db.String(80), nullable=False)
url = db.Column(db.String(400))
Add entity type column to actionsfrom zou.app import ... | <commit_before>from zou.app import db
from zou.app.models.serializer import SerializerMixin
from zou.app.models.base import BaseMixin
class CustomAction(db.Model, BaseMixin, SerializerMixin):
name = db.Column(db.String(80), nullable=False)
url = db.Column(db.String(400))
<commit_msg>Add entity type column to ... |
76d9ff900204678423208967b4578764013984ad | tests/test-recipes/metadata/always_include_files_glob/run_test.py | tests/test-recipes/metadata/always_include_files_glob/run_test.py | import os
import sys
import json
def main():
prefix = os.environ['PREFIX']
info_file = os.path.join(prefix, 'conda-meta',
'always_include_files_regex-0.1-0.json')
with open(info_file, 'r') as fh:
info = json.load(fh)
if sys.platform == 'darwin':
assert sor... | import os
import sys
import json
def main():
prefix = os.environ['PREFIX']
info_file = os.path.join(prefix, 'conda-meta',
'always_include_files_regex-0.1-0.json')
with open(info_file, 'r') as fh:
info = json.load(fh)
if sys.platform == 'darwin':
assert set... | Test sets instead of lists | Test sets instead of lists
| Python | bsd-3-clause | dan-blanchard/conda-build,mwcraig/conda-build,dan-blanchard/conda-build,sandhujasmine/conda-build,dan-blanchard/conda-build,ilastik/conda-build,frol/conda-build,mwcraig/conda-build,rmcgibbo/conda-build,shastings517/conda-build,shastings517/conda-build,shastings517/conda-build,sandhujasmine/conda-build,frol/conda-build,... | import os
import sys
import json
def main():
prefix = os.environ['PREFIX']
info_file = os.path.join(prefix, 'conda-meta',
'always_include_files_regex-0.1-0.json')
with open(info_file, 'r') as fh:
info = json.load(fh)
if sys.platform == 'darwin':
assert sor... | import os
import sys
import json
def main():
prefix = os.environ['PREFIX']
info_file = os.path.join(prefix, 'conda-meta',
'always_include_files_regex-0.1-0.json')
with open(info_file, 'r') as fh:
info = json.load(fh)
if sys.platform == 'darwin':
assert set... | <commit_before>import os
import sys
import json
def main():
prefix = os.environ['PREFIX']
info_file = os.path.join(prefix, 'conda-meta',
'always_include_files_regex-0.1-0.json')
with open(info_file, 'r') as fh:
info = json.load(fh)
if sys.platform == 'darwin':
... | import os
import sys
import json
def main():
prefix = os.environ['PREFIX']
info_file = os.path.join(prefix, 'conda-meta',
'always_include_files_regex-0.1-0.json')
with open(info_file, 'r') as fh:
info = json.load(fh)
if sys.platform == 'darwin':
assert set... | import os
import sys
import json
def main():
prefix = os.environ['PREFIX']
info_file = os.path.join(prefix, 'conda-meta',
'always_include_files_regex-0.1-0.json')
with open(info_file, 'r') as fh:
info = json.load(fh)
if sys.platform == 'darwin':
assert sor... | <commit_before>import os
import sys
import json
def main():
prefix = os.environ['PREFIX']
info_file = os.path.join(prefix, 'conda-meta',
'always_include_files_regex-0.1-0.json')
with open(info_file, 'r') as fh:
info = json.load(fh)
if sys.platform == 'darwin':
... |
025c3f6b73c97fdb58b1a492efcb6efe44cfdab0 | twisted/plugins/caldav.py | twisted/plugins/caldav.py | from zope.interface import implements
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.python import reflect
def serviceMakerProperty(propname):
def getProperty(self):
return getattr(reflect.namedClass(self.serviceMakerClass), propname)
return prop... | from zope.interface import implements
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.python import reflect
from twisted.internet.protocol import Factory
Factory.noisy = False
def serviceMakerProperty(propname):
def getProperty(self):
return getattr(... | Set Factory.noisy to False by default | Set Factory.noisy to False by default
git-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@3933 e27351fd-9f3e-4f54-a53b-843176b1656c
| Python | apache-2.0 | trevor/calendarserver,trevor/calendarserver,trevor/calendarserver | from zope.interface import implements
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.python import reflect
def serviceMakerProperty(propname):
def getProperty(self):
return getattr(reflect.namedClass(self.serviceMakerClass), propname)
return prop... | from zope.interface import implements
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.python import reflect
from twisted.internet.protocol import Factory
Factory.noisy = False
def serviceMakerProperty(propname):
def getProperty(self):
return getattr(... | <commit_before>from zope.interface import implements
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.python import reflect
def serviceMakerProperty(propname):
def getProperty(self):
return getattr(reflect.namedClass(self.serviceMakerClass), propname)
... | from zope.interface import implements
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.python import reflect
from twisted.internet.protocol import Factory
Factory.noisy = False
def serviceMakerProperty(propname):
def getProperty(self):
return getattr(... | from zope.interface import implements
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.python import reflect
def serviceMakerProperty(propname):
def getProperty(self):
return getattr(reflect.namedClass(self.serviceMakerClass), propname)
return prop... | <commit_before>from zope.interface import implements
from twisted.plugin import IPlugin
from twisted.application.service import IServiceMaker
from twisted.python import reflect
def serviceMakerProperty(propname):
def getProperty(self):
return getattr(reflect.namedClass(self.serviceMakerClass), propname)
... |
1a16d598c902218a8112841219f89044724155da | smatic/templatetags/smatic_tags.py | smatic/templatetags/smatic_tags.py | import os
from commands import getstatusoutput
from django import template
from django.conf import settings
from django.utils._os import safe_join
register = template.Library()
def scss(file_path):
"""
Converts an scss file into css and returns the output
"""
input_path = safe_join(settings.SMATIC... | import os
from commands import getstatusoutput
from django import template
from django.conf import settings
from django.utils._os import safe_join
register = template.Library()
@register.simple_tag
def scss(file_path):
"""
Convert an scss file into css and returns the output.
"""
input_path = safe_jo... | Tidy up the code, and don't make settings.SASS_BIN a requirement (default to 'sass') | Tidy up the code, and don't make settings.SASS_BIN a requirement (default to 'sass')
| Python | bsd-3-clause | lincolnloop/django-smatic | import os
from commands import getstatusoutput
from django import template
from django.conf import settings
from django.utils._os import safe_join
register = template.Library()
def scss(file_path):
"""
Converts an scss file into css and returns the output
"""
input_path = safe_join(settings.SMATIC... | import os
from commands import getstatusoutput
from django import template
from django.conf import settings
from django.utils._os import safe_join
register = template.Library()
@register.simple_tag
def scss(file_path):
"""
Convert an scss file into css and returns the output.
"""
input_path = safe_jo... | <commit_before>import os
from commands import getstatusoutput
from django import template
from django.conf import settings
from django.utils._os import safe_join
register = template.Library()
def scss(file_path):
"""
Converts an scss file into css and returns the output
"""
input_path = safe_join(... | import os
from commands import getstatusoutput
from django import template
from django.conf import settings
from django.utils._os import safe_join
register = template.Library()
@register.simple_tag
def scss(file_path):
"""
Convert an scss file into css and returns the output.
"""
input_path = safe_jo... | import os
from commands import getstatusoutput
from django import template
from django.conf import settings
from django.utils._os import safe_join
register = template.Library()
def scss(file_path):
"""
Converts an scss file into css and returns the output
"""
input_path = safe_join(settings.SMATIC... | <commit_before>import os
from commands import getstatusoutput
from django import template
from django.conf import settings
from django.utils._os import safe_join
register = template.Library()
def scss(file_path):
"""
Converts an scss file into css and returns the output
"""
input_path = safe_join(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.