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
18ec52a1c34e263e4d909fc1ee19500f9adac26b
examples/django_example/example/app/models.py
examples/django_example/example/app/models.py
from django.db import models # Create your models here.
# Define a custom User class to work with django-social-auth from django.contrib.auth.models import AbstractUser, UserManager class CustomUser(AbstractUser): objects = UserManager()
Define a custom user model
Define a custom user model
Python
bsd-3-clause
S01780/python-social-auth,tobias47n9e/social-core,falcon1kr/python-social-auth,ByteInternet/python-social-auth,muhammad-ammar/python-social-auth,contracode/python-social-auth,S01780/python-social-auth,clef/python-social-auth,lawrence34/python-social-auth,python-social-auth/social-storage-sqlalchemy,fearlessspider/pytho...
from django.db import models # Create your models here. Define a custom user model
# Define a custom User class to work with django-social-auth from django.contrib.auth.models import AbstractUser, UserManager class CustomUser(AbstractUser): objects = UserManager()
<commit_before>from django.db import models # Create your models here. <commit_msg>Define a custom user model<commit_after>
# Define a custom User class to work with django-social-auth from django.contrib.auth.models import AbstractUser, UserManager class CustomUser(AbstractUser): objects = UserManager()
from django.db import models # Create your models here. Define a custom user model# Define a custom User class to work with django-social-auth from django.contrib.auth.models import AbstractUser, UserManager class CustomUser(AbstractUser): objects = UserManager()
<commit_before>from django.db import models # Create your models here. <commit_msg>Define a custom user model<commit_after># Define a custom User class to work with django-social-auth from django.contrib.auth.models import AbstractUser, UserManager class CustomUser(AbstractUser): objects = UserManager()
c476cb5cf1bead63f19871fa1db9769e236fbe09
siren_files.py
siren_files.py
#!/usr/bin/python # source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4', 'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters', 'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax', 'makegrid', 'makeweatherfile...
#!/usr/bin/python # source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4', 'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters', 'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax', 'makegrid', 'makeweatherfile...
Remove makeweatherfiles, add template for Windows version file
Remove makeweatherfiles, add template for Windows version file
Python
agpl-3.0
ozsolarwind/siren,ozsolarwind/siren
#!/usr/bin/python # source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4', 'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters', 'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax', 'makegrid', 'makeweatherfile...
#!/usr/bin/python # source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4', 'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters', 'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax', 'makegrid', 'makeweatherfile...
<commit_before>#!/usr/bin/python # source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4', 'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters', 'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax', 'makegrid', '...
#!/usr/bin/python # source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4', 'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters', 'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax', 'makegrid', 'makeweatherfile...
#!/usr/bin/python # source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4', 'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters', 'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax', 'makegrid', 'makeweatherfile...
<commit_before>#!/usr/bin/python # source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4', 'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters', 'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax', 'makegrid', '...
ecfa18b1c6d8dfd565ab625b3bb600d2d792310f
src/bitmessageqt/widgets.py
src/bitmessageqt/widgets.py
from PyQt4 import uic import os.path import sys def resource_path(path): try: return os.path.join(sys._MEIPASS, path) except: return os.path.join(os.path.dirname(__file__), path) def load(path, widget): uic.loadUi(resource_path(path), widget)
from PyQt4 import uic import os.path import sys from shared import codePath def resource_path(resFile): baseDir = codePath() for subDir in ["ui", "bitmessageqt"]: if os.path.isdir(os.path.join(baseDir, subDir)) and os.path.isfile(os.path.join(baseDir, subDir, resFile)): return os.path.join(...
Change UI loading for frozen
Change UI loading for frozen
Python
mit
debguy0x/PyBitmessage,bmng-dev/PyBitmessage,hb9kns/PyBitmessage,hb9kns/PyBitmessage,timothyparez/PyBitmessage,torifier/PyBitmessage,hb9kns/PyBitmessage,debguy0x/PyBitmessage,debguy0x/PyBitmessage,torifier/PyBitmessage,timothyparez/PyBitmessage,torifier/PyBitmessage,timothyparez/PyBitmessage,bmng-dev/PyBitmessage,torifi...
from PyQt4 import uic import os.path import sys def resource_path(path): try: return os.path.join(sys._MEIPASS, path) except: return os.path.join(os.path.dirname(__file__), path) def load(path, widget): uic.loadUi(resource_path(path), widget) Change UI loading for frozen
from PyQt4 import uic import os.path import sys from shared import codePath def resource_path(resFile): baseDir = codePath() for subDir in ["ui", "bitmessageqt"]: if os.path.isdir(os.path.join(baseDir, subDir)) and os.path.isfile(os.path.join(baseDir, subDir, resFile)): return os.path.join(...
<commit_before>from PyQt4 import uic import os.path import sys def resource_path(path): try: return os.path.join(sys._MEIPASS, path) except: return os.path.join(os.path.dirname(__file__), path) def load(path, widget): uic.loadUi(resource_path(path), widget) <commit_msg>Change UI loading ...
from PyQt4 import uic import os.path import sys from shared import codePath def resource_path(resFile): baseDir = codePath() for subDir in ["ui", "bitmessageqt"]: if os.path.isdir(os.path.join(baseDir, subDir)) and os.path.isfile(os.path.join(baseDir, subDir, resFile)): return os.path.join(...
from PyQt4 import uic import os.path import sys def resource_path(path): try: return os.path.join(sys._MEIPASS, path) except: return os.path.join(os.path.dirname(__file__), path) def load(path, widget): uic.loadUi(resource_path(path), widget) Change UI loading for frozenfrom PyQt4 import...
<commit_before>from PyQt4 import uic import os.path import sys def resource_path(path): try: return os.path.join(sys._MEIPASS, path) except: return os.path.join(os.path.dirname(__file__), path) def load(path, widget): uic.loadUi(resource_path(path), widget) <commit_msg>Change UI loading ...
b94edbbb717313cc831fa97d3ccf9ab715ff3ade
testing/test_cffitsio.py
testing/test_cffitsio.py
from cffitsio import FitsFile import os def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = FitsFile.create(filename) assert os.path.isfile(filename)
import pytest import cffitsio import os @pytest.fixture def test_dir(): return os.path.join( os.path.dirname(__file__), 'data') def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = cffitsio.FitsFile.create(filename) assert os.path.isfile(filename) def test_open...
Add test for opening file
Add test for opening file
Python
mit
mindriot101/fitsio-cffi
from cffitsio import FitsFile import os def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = FitsFile.create(filename) assert os.path.isfile(filename) Add test for opening file
import pytest import cffitsio import os @pytest.fixture def test_dir(): return os.path.join( os.path.dirname(__file__), 'data') def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = cffitsio.FitsFile.create(filename) assert os.path.isfile(filename) def test_open...
<commit_before>from cffitsio import FitsFile import os def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = FitsFile.create(filename) assert os.path.isfile(filename) <commit_msg>Add test for opening file<commit_after>
import pytest import cffitsio import os @pytest.fixture def test_dir(): return os.path.join( os.path.dirname(__file__), 'data') def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = cffitsio.FitsFile.create(filename) assert os.path.isfile(filename) def test_open...
from cffitsio import FitsFile import os def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = FitsFile.create(filename) assert os.path.isfile(filename) Add test for opening fileimport pytest import cffitsio import os @pytest.fixture def test_dir(): return os.path.join( os...
<commit_before>from cffitsio import FitsFile import os def test_create_file(tmpdir): filename = str(tmpdir.join('test.fits')) f = FitsFile.create(filename) assert os.path.isfile(filename) <commit_msg>Add test for opening file<commit_after>import pytest import cffitsio import os @pytest.fixture def test_d...
1f10a9c4cf5e00a8290adfe6ee34542e35ffab9b
OpenPNM/Algorithms/__init__.py
OpenPNM/Algorithms/__init__.py
r""" ############################################################################### :mod:`OpenPNM.Algorithms` -- Algorithms on Networks ############################################################################### Contents -------- This submodule contains algorithms for performing simulations on pore networks Clas...
r""" ############################################################################### :mod:`OpenPNM.Algorithms` -- Algorithms on Networks ############################################################################### Contents -------- This submodule contains algorithms for performing simulations on pore networks Clas...
Add new percolation alg to init - to be renamed later
Add new percolation alg to init - to be renamed later
Python
mit
TomTranter/OpenPNM,PMEAL/OpenPNM
r""" ############################################################################### :mod:`OpenPNM.Algorithms` -- Algorithms on Networks ############################################################################### Contents -------- This submodule contains algorithms for performing simulations on pore networks Clas...
r""" ############################################################################### :mod:`OpenPNM.Algorithms` -- Algorithms on Networks ############################################################################### Contents -------- This submodule contains algorithms for performing simulations on pore networks Clas...
<commit_before>r""" ############################################################################### :mod:`OpenPNM.Algorithms` -- Algorithms on Networks ############################################################################### Contents -------- This submodule contains algorithms for performing simulations on pore...
r""" ############################################################################### :mod:`OpenPNM.Algorithms` -- Algorithms on Networks ############################################################################### Contents -------- This submodule contains algorithms for performing simulations on pore networks Clas...
r""" ############################################################################### :mod:`OpenPNM.Algorithms` -- Algorithms on Networks ############################################################################### Contents -------- This submodule contains algorithms for performing simulations on pore networks Clas...
<commit_before>r""" ############################################################################### :mod:`OpenPNM.Algorithms` -- Algorithms on Networks ############################################################################### Contents -------- This submodule contains algorithms for performing simulations on pore...
7ab7154c1393491bd2874484e02c6af6eb3bb7e7
tests/test_functional.py
tests/test_functional.py
"""Functional tests Test will produce the following tuple of all path permutations paths = ['path/to/font_a', 'path/to/font_b'] [ (path/to/font_a, path/to/font_b), (path/to/font_b, path/to/font_a), ] and run them through our main diff_fonts functions. This test is slow and should be run on challenging font...
"""Functional tests Test will produce the following tuple of all path permutations paths = ['path/to/font_a', 'path/to/font_b'] [ (path/to/font_a, path/to/font_b), (path/to/font_b, path/to/font_a), ] and run them through our main diff_fonts functions. This test is slow and should be run on challenging font...
Call diff_fonts with correct params
Call diff_fonts with correct params
Python
apache-2.0
googlefonts/fontdiffenator,googlefonts/fontdiffenator
"""Functional tests Test will produce the following tuple of all path permutations paths = ['path/to/font_a', 'path/to/font_b'] [ (path/to/font_a, path/to/font_b), (path/to/font_b, path/to/font_a), ] and run them through our main diff_fonts functions. This test is slow and should be run on challenging font...
"""Functional tests Test will produce the following tuple of all path permutations paths = ['path/to/font_a', 'path/to/font_b'] [ (path/to/font_a, path/to/font_b), (path/to/font_b, path/to/font_a), ] and run them through our main diff_fonts functions. This test is slow and should be run on challenging font...
<commit_before>"""Functional tests Test will produce the following tuple of all path permutations paths = ['path/to/font_a', 'path/to/font_b'] [ (path/to/font_a, path/to/font_b), (path/to/font_b, path/to/font_a), ] and run them through our main diff_fonts functions. This test is slow and should be run on c...
"""Functional tests Test will produce the following tuple of all path permutations paths = ['path/to/font_a', 'path/to/font_b'] [ (path/to/font_a, path/to/font_b), (path/to/font_b, path/to/font_a), ] and run them through our main diff_fonts functions. This test is slow and should be run on challenging font...
"""Functional tests Test will produce the following tuple of all path permutations paths = ['path/to/font_a', 'path/to/font_b'] [ (path/to/font_a, path/to/font_b), (path/to/font_b, path/to/font_a), ] and run them through our main diff_fonts functions. This test is slow and should be run on challenging font...
<commit_before>"""Functional tests Test will produce the following tuple of all path permutations paths = ['path/to/font_a', 'path/to/font_b'] [ (path/to/font_a, path/to/font_b), (path/to/font_b, path/to/font_a), ] and run them through our main diff_fonts functions. This test is slow and should be run on c...
4e4112b548cc263da2a455c2db9a2c82a3f84e45
ecommerce/theming/models.py
ecommerce/theming/models.py
import logging from django.conf import settings from django.contrib.sites.models import Site from django.db import models logger = logging.getLogger(__name__) class SiteTheme(models.Model): """ This is where the information about the site's theme gets stored to the db. Fields: site (ForeignKey)...
from django.conf import settings from django.contrib.sites.models import Site from django.db import models class SiteTheme(models.Model): """ This is where the information about the site's theme gets stored to the db. Fields: site (ForeignKey): Foreign Key field pointing to django Site model ...
Revert "Added logging to SiteTheme.get_theme"
Revert "Added logging to SiteTheme.get_theme" This reverts commit f1436a255bb22ecd7b9ddca803240262bf484981.
Python
agpl-3.0
edx/ecommerce,eduNEXT/edunext-ecommerce,eduNEXT/edunext-ecommerce,edx/ecommerce,edx/ecommerce,edx/ecommerce,eduNEXT/edunext-ecommerce,eduNEXT/edunext-ecommerce
import logging from django.conf import settings from django.contrib.sites.models import Site from django.db import models logger = logging.getLogger(__name__) class SiteTheme(models.Model): """ This is where the information about the site's theme gets stored to the db. Fields: site (ForeignKey)...
from django.conf import settings from django.contrib.sites.models import Site from django.db import models class SiteTheme(models.Model): """ This is where the information about the site's theme gets stored to the db. Fields: site (ForeignKey): Foreign Key field pointing to django Site model ...
<commit_before>import logging from django.conf import settings from django.contrib.sites.models import Site from django.db import models logger = logging.getLogger(__name__) class SiteTheme(models.Model): """ This is where the information about the site's theme gets stored to the db. Fields: si...
from django.conf import settings from django.contrib.sites.models import Site from django.db import models class SiteTheme(models.Model): """ This is where the information about the site's theme gets stored to the db. Fields: site (ForeignKey): Foreign Key field pointing to django Site model ...
import logging from django.conf import settings from django.contrib.sites.models import Site from django.db import models logger = logging.getLogger(__name__) class SiteTheme(models.Model): """ This is where the information about the site's theme gets stored to the db. Fields: site (ForeignKey)...
<commit_before>import logging from django.conf import settings from django.contrib.sites.models import Site from django.db import models logger = logging.getLogger(__name__) class SiteTheme(models.Model): """ This is where the information about the site's theme gets stored to the db. Fields: si...
d7df867b2a5e7c8f5255d9e7627999c3e2132e9c
example/tests/test_utils.py
example/tests/test_utils.py
""" Test rest_framework_json_api's utils functions. """ from rest_framework_json_api import utils from ..serializers import EntrySerializer from ..tests import TestBase class GetRelatedResourceTests(TestBase): """ Ensure the `get_related_resource_type` function returns correct types. """ def test_re...
""" Test rest_framework_json_api's utils functions. """ from rest_framework_json_api import utils from ..serializers import EntrySerializer from ..tests import TestBase class GetRelatedResourceTests(TestBase): """ Ensure the `get_related_resource_type` function returns correct types. """ def test_re...
Add failing test for m2m too.
Add failing test for m2m too.
Python
bsd-2-clause
abdulhaq-e/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api,leo-naeka/django-rest-framework-json-api,Instawork/django-rest-framework-json-api,django-json-api/rest_framework_ember,django-json-api/django-rest-framework-json-api
""" Test rest_framework_json_api's utils functions. """ from rest_framework_json_api import utils from ..serializers import EntrySerializer from ..tests import TestBase class GetRelatedResourceTests(TestBase): """ Ensure the `get_related_resource_type` function returns correct types. """ def test_re...
""" Test rest_framework_json_api's utils functions. """ from rest_framework_json_api import utils from ..serializers import EntrySerializer from ..tests import TestBase class GetRelatedResourceTests(TestBase): """ Ensure the `get_related_resource_type` function returns correct types. """ def test_re...
<commit_before>""" Test rest_framework_json_api's utils functions. """ from rest_framework_json_api import utils from ..serializers import EntrySerializer from ..tests import TestBase class GetRelatedResourceTests(TestBase): """ Ensure the `get_related_resource_type` function returns correct types. """ ...
""" Test rest_framework_json_api's utils functions. """ from rest_framework_json_api import utils from ..serializers import EntrySerializer from ..tests import TestBase class GetRelatedResourceTests(TestBase): """ Ensure the `get_related_resource_type` function returns correct types. """ def test_re...
""" Test rest_framework_json_api's utils functions. """ from rest_framework_json_api import utils from ..serializers import EntrySerializer from ..tests import TestBase class GetRelatedResourceTests(TestBase): """ Ensure the `get_related_resource_type` function returns correct types. """ def test_re...
<commit_before>""" Test rest_framework_json_api's utils functions. """ from rest_framework_json_api import utils from ..serializers import EntrySerializer from ..tests import TestBase class GetRelatedResourceTests(TestBase): """ Ensure the `get_related_resource_type` function returns correct types. """ ...
e790e47e6b87bc2e49e8b74d491eb023c4468254
src/sentry/web/frontend/csrf_failure.py
src/sentry/web/frontend/csrf_failure.py
from __future__ import absolute_import from django.middleware.csrf import REASON_NO_REFERER from sentry.web.frontend.base import BaseView class CsrfFailureView(BaseView): auth_required = False sudo_required = False def handle(self, request, reason=""): context = { 'no_referer': reas...
from __future__ import absolute_import from django.middleware.csrf import REASON_NO_REFERER from django.views.decorators.csrf import csrf_exempt from django.views.generic import View from django.utils.decorators import method_decorator from sentry.web.helpers import render_to_response class CsrfFailureView(View): ...
Kill possible recursion on csrf decorator
Kill possible recursion on csrf decorator
Python
bsd-3-clause
boneyao/sentry,jean/sentry,boneyao/sentry,mvaled/sentry,felixbuenemann/sentry,kevinlondon/sentry,TedaLIEz/sentry,JamesMura/sentry,kevinastone/sentry,korealerts1/sentry,JackDanger/sentry,songyi199111/sentry,songyi199111/sentry,fuziontech/sentry,JamesMura/sentry,BuildingLink/sentry,camilonova/sentry,wujuguang/sentry,argo...
from __future__ import absolute_import from django.middleware.csrf import REASON_NO_REFERER from sentry.web.frontend.base import BaseView class CsrfFailureView(BaseView): auth_required = False sudo_required = False def handle(self, request, reason=""): context = { 'no_referer': reas...
from __future__ import absolute_import from django.middleware.csrf import REASON_NO_REFERER from django.views.decorators.csrf import csrf_exempt from django.views.generic import View from django.utils.decorators import method_decorator from sentry.web.helpers import render_to_response class CsrfFailureView(View): ...
<commit_before>from __future__ import absolute_import from django.middleware.csrf import REASON_NO_REFERER from sentry.web.frontend.base import BaseView class CsrfFailureView(BaseView): auth_required = False sudo_required = False def handle(self, request, reason=""): context = { 'no...
from __future__ import absolute_import from django.middleware.csrf import REASON_NO_REFERER from django.views.decorators.csrf import csrf_exempt from django.views.generic import View from django.utils.decorators import method_decorator from sentry.web.helpers import render_to_response class CsrfFailureView(View): ...
from __future__ import absolute_import from django.middleware.csrf import REASON_NO_REFERER from sentry.web.frontend.base import BaseView class CsrfFailureView(BaseView): auth_required = False sudo_required = False def handle(self, request, reason=""): context = { 'no_referer': reas...
<commit_before>from __future__ import absolute_import from django.middleware.csrf import REASON_NO_REFERER from sentry.web.frontend.base import BaseView class CsrfFailureView(BaseView): auth_required = False sudo_required = False def handle(self, request, reason=""): context = { 'no...
156d62f15963bc95f52db7eb1493fad6890e2fc7
dadi/__init__.py
dadi/__init__.py
import numpy # This gives a nicer printout for masked arrays. numpy.ma.default_real_fill_value = numpy.nan import IO import Integration import PhiManip import SFS import ms try: import os __DIRECTORY__ = os.path.dirname(IO.__file__) __svn_file__ = os.path.join(__DIRECTORY__, 'svnversion') __SVNVERSION...
import numpy # This gives a nicer printout for masked arrays. numpy.ma.default_real_fill_value = numpy.nan import IO import Integration import PhiManip import SFS import ms import Plotting try: import os __DIRECTORY__ = os.path.dirname(IO.__file__) __svn_file__ = os.path.join(__DIRECTORY__, 'svnversion') ...
Add Plotting to default imports.
Add Plotting to default imports. git-svn-id: 4c7b13231a96299fde701bb5dec4bd2aaf383fc6@43 979d6bd5-6d4d-0410-bece-f567c23bd345
Python
bsd-3-clause
beni55/dadi,beni55/dadi,ChenHsiang/dadi,RyanGutenkunst/dadi,paulirish/dadi,yangjl/dadi,ChenHsiang/dadi,cheese1213/dadi,yangjl/dadi,cheese1213/dadi,paulirish/dadi,niuhuifei/dadi,niuhuifei/dadi,RyanGutenkunst/dadi
import numpy # This gives a nicer printout for masked arrays. numpy.ma.default_real_fill_value = numpy.nan import IO import Integration import PhiManip import SFS import ms try: import os __DIRECTORY__ = os.path.dirname(IO.__file__) __svn_file__ = os.path.join(__DIRECTORY__, 'svnversion') __SVNVERSION...
import numpy # This gives a nicer printout for masked arrays. numpy.ma.default_real_fill_value = numpy.nan import IO import Integration import PhiManip import SFS import ms import Plotting try: import os __DIRECTORY__ = os.path.dirname(IO.__file__) __svn_file__ = os.path.join(__DIRECTORY__, 'svnversion') ...
<commit_before>import numpy # This gives a nicer printout for masked arrays. numpy.ma.default_real_fill_value = numpy.nan import IO import Integration import PhiManip import SFS import ms try: import os __DIRECTORY__ = os.path.dirname(IO.__file__) __svn_file__ = os.path.join(__DIRECTORY__, 'svnversion') ...
import numpy # This gives a nicer printout for masked arrays. numpy.ma.default_real_fill_value = numpy.nan import IO import Integration import PhiManip import SFS import ms import Plotting try: import os __DIRECTORY__ = os.path.dirname(IO.__file__) __svn_file__ = os.path.join(__DIRECTORY__, 'svnversion') ...
import numpy # This gives a nicer printout for masked arrays. numpy.ma.default_real_fill_value = numpy.nan import IO import Integration import PhiManip import SFS import ms try: import os __DIRECTORY__ = os.path.dirname(IO.__file__) __svn_file__ = os.path.join(__DIRECTORY__, 'svnversion') __SVNVERSION...
<commit_before>import numpy # This gives a nicer printout for masked arrays. numpy.ma.default_real_fill_value = numpy.nan import IO import Integration import PhiManip import SFS import ms try: import os __DIRECTORY__ = os.path.dirname(IO.__file__) __svn_file__ = os.path.join(__DIRECTORY__, 'svnversion') ...
cb72e1107096df9b80915fad4ee0fd1d930c7b59
examples/redis/src/bolts.py
examples/redis/src/bolts.py
from collections import Counter from redis import StrictRedis from streamparse import Bolt class WordCountBolt(Bolt): outputs = ['word', 'count'] def initialize(self, conf, ctx): self.counter = Counter() self.total = 0 def _increment(self, word, inc_by): self.counter[word] += i...
from collections import Counter from redis import StrictRedis from streamparse import Bolt class WordCountBolt(Bolt): outputs = ['word', 'count'] def initialize(self, conf, ctx): self.counter = Counter() self.total = 0 def _increment(self, word, inc_by): self.counter[word] += i...
Add missing outputs to wordcount_mem topology
Add missing outputs to wordcount_mem topology
Python
apache-2.0
Parsely/streamparse,Parsely/streamparse
from collections import Counter from redis import StrictRedis from streamparse import Bolt class WordCountBolt(Bolt): outputs = ['word', 'count'] def initialize(self, conf, ctx): self.counter = Counter() self.total = 0 def _increment(self, word, inc_by): self.counter[word] += i...
from collections import Counter from redis import StrictRedis from streamparse import Bolt class WordCountBolt(Bolt): outputs = ['word', 'count'] def initialize(self, conf, ctx): self.counter = Counter() self.total = 0 def _increment(self, word, inc_by): self.counter[word] += i...
<commit_before>from collections import Counter from redis import StrictRedis from streamparse import Bolt class WordCountBolt(Bolt): outputs = ['word', 'count'] def initialize(self, conf, ctx): self.counter = Counter() self.total = 0 def _increment(self, word, inc_by): self.cou...
from collections import Counter from redis import StrictRedis from streamparse import Bolt class WordCountBolt(Bolt): outputs = ['word', 'count'] def initialize(self, conf, ctx): self.counter = Counter() self.total = 0 def _increment(self, word, inc_by): self.counter[word] += i...
from collections import Counter from redis import StrictRedis from streamparse import Bolt class WordCountBolt(Bolt): outputs = ['word', 'count'] def initialize(self, conf, ctx): self.counter = Counter() self.total = 0 def _increment(self, word, inc_by): self.counter[word] += i...
<commit_before>from collections import Counter from redis import StrictRedis from streamparse import Bolt class WordCountBolt(Bolt): outputs = ['word', 'count'] def initialize(self, conf, ctx): self.counter = Counter() self.total = 0 def _increment(self, word, inc_by): self.cou...
9ad0ecfd45fa82421a6a4faf961724d97180e904
setup.py
setup.py
from setuptools import setup import os version = 0.1 setup( version=version, description="A script allowing to setup Amazon EC2 instances through configuration files.", long_description=open("README.txt").read() + "\n\n" + open(os.path.join("docs", "HISTORY.txt")).read(), name="mr...
from setuptools import setup import os version = 0.1 setup( version=version, description="A script allowing to setup Amazon EC2 instances through configuration files.", long_description=open("README.txt").read() + "\n\n" + open(os.path.join("docs", "HISTORY.txt")).read(), name="mr...
Add a url to github.
Add a url to github.
Python
bsd-3-clause
fschulze/ploy,ployground/ploy_ec2,ployground/ploy_fabric,ployground/ploy
from setuptools import setup import os version = 0.1 setup( version=version, description="A script allowing to setup Amazon EC2 instances through configuration files.", long_description=open("README.txt").read() + "\n\n" + open(os.path.join("docs", "HISTORY.txt")).read(), name="mr...
from setuptools import setup import os version = 0.1 setup( version=version, description="A script allowing to setup Amazon EC2 instances through configuration files.", long_description=open("README.txt").read() + "\n\n" + open(os.path.join("docs", "HISTORY.txt")).read(), name="mr...
<commit_before>from setuptools import setup import os version = 0.1 setup( version=version, description="A script allowing to setup Amazon EC2 instances through configuration files.", long_description=open("README.txt").read() + "\n\n" + open(os.path.join("docs", "HISTORY.txt")).read(...
from setuptools import setup import os version = 0.1 setup( version=version, description="A script allowing to setup Amazon EC2 instances through configuration files.", long_description=open("README.txt").read() + "\n\n" + open(os.path.join("docs", "HISTORY.txt")).read(), name="mr...
from setuptools import setup import os version = 0.1 setup( version=version, description="A script allowing to setup Amazon EC2 instances through configuration files.", long_description=open("README.txt").read() + "\n\n" + open(os.path.join("docs", "HISTORY.txt")).read(), name="mr...
<commit_before>from setuptools import setup import os version = 0.1 setup( version=version, description="A script allowing to setup Amazon EC2 instances through configuration files.", long_description=open("README.txt").read() + "\n\n" + open(os.path.join("docs", "HISTORY.txt")).read(...
2340b8047584a29ca75d3b674f67bdc96e9f94e3
setup.py
setup.py
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-utils', version='0.11', ...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-utils', version='0.11', ...
Remove <1.9 version limit on Django version
Remove <1.9 version limit on Django version
Python
mit
ministryofjustice/django-utils,ministryofjustice/django-utils
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-utils', version='0.11', ...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-utils', version='0.11', ...
<commit_before>import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-utils', vers...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-utils', version='0.11', ...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-utils', version='0.11', ...
<commit_before>import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-utils', vers...
933fcfff7a9c63b03e13b0bb7756f0530603c556
series.py
series.py
"""Read and print an integer series.""" import sys def read_series(filename): f = open(filename, mode='rt', encoding='utf-8') series = [] for line in f: a = int(line.strip()) series.append(a) f.close() return series def main(filename): print(read_series(filename)) if __nam...
"""Read and print an integer series.""" import sys def read_series(filename): try: f = open(filename, mode='rt', encoding='utf-8') return [int(line.strip()) for line in f] finally: f.close() def main(filename): print(read_series(filename)) if __name__ == '__main__': main(s...
Refactor to ensure closing and also use list comprehension
Refactor to ensure closing and also use list comprehension
Python
mit
kentoj/python-fundamentals
"""Read and print an integer series.""" import sys def read_series(filename): f = open(filename, mode='rt', encoding='utf-8') series = [] for line in f: a = int(line.strip()) series.append(a) f.close() return series def main(filename): print(read_series(filename)) if __nam...
"""Read and print an integer series.""" import sys def read_series(filename): try: f = open(filename, mode='rt', encoding='utf-8') return [int(line.strip()) for line in f] finally: f.close() def main(filename): print(read_series(filename)) if __name__ == '__main__': main(s...
<commit_before>"""Read and print an integer series.""" import sys def read_series(filename): f = open(filename, mode='rt', encoding='utf-8') series = [] for line in f: a = int(line.strip()) series.append(a) f.close() return series def main(filename): print(read_series(filena...
"""Read and print an integer series.""" import sys def read_series(filename): try: f = open(filename, mode='rt', encoding='utf-8') return [int(line.strip()) for line in f] finally: f.close() def main(filename): print(read_series(filename)) if __name__ == '__main__': main(s...
"""Read and print an integer series.""" import sys def read_series(filename): f = open(filename, mode='rt', encoding='utf-8') series = [] for line in f: a = int(line.strip()) series.append(a) f.close() return series def main(filename): print(read_series(filename)) if __nam...
<commit_before>"""Read and print an integer series.""" import sys def read_series(filename): f = open(filename, mode='rt', encoding='utf-8') series = [] for line in f: a = int(line.strip()) series.append(a) f.close() return series def main(filename): print(read_series(filena...
fcd1dd23be83d45307564428150924d266fa48f4
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='Flask-RESTful', version='0.2.5', url='https://www.github.com/twilio/flask-restful/', author='Kyle Conroy', author_email='[email protected]', description='Simple framework for creating REST APIs', packages=find_pac...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='Flask-RESTful', version='0.2.5', url='https://www.github.com/twilio/flask-restful/', author='Kyle Conroy', author_email='[email protected]', description='Simple framework for creating REST APIs', packages=find_pac...
Fix flask version after vulnerability
Fix flask version after vulnerability No ambiguity left to ensure version is above vulnerable one
Python
bsd-3-clause
CanalTP/flask-restful
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='Flask-RESTful', version='0.2.5', url='https://www.github.com/twilio/flask-restful/', author='Kyle Conroy', author_email='[email protected]', description='Simple framework for creating REST APIs', packages=find_pac...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='Flask-RESTful', version='0.2.5', url='https://www.github.com/twilio/flask-restful/', author='Kyle Conroy', author_email='[email protected]', description='Simple framework for creating REST APIs', packages=find_pac...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages setup( name='Flask-RESTful', version='0.2.5', url='https://www.github.com/twilio/flask-restful/', author='Kyle Conroy', author_email='[email protected]', description='Simple framework for creating REST APIs', pa...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='Flask-RESTful', version='0.2.5', url='https://www.github.com/twilio/flask-restful/', author='Kyle Conroy', author_email='[email protected]', description='Simple framework for creating REST APIs', packages=find_pac...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='Flask-RESTful', version='0.2.5', url='https://www.github.com/twilio/flask-restful/', author='Kyle Conroy', author_email='[email protected]', description='Simple framework for creating REST APIs', packages=find_pac...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages setup( name='Flask-RESTful', version='0.2.5', url='https://www.github.com/twilio/flask-restful/', author='Kyle Conroy', author_email='[email protected]', description='Simple framework for creating REST APIs', pa...
35c44f0f585d11dea632e509b9eec20d4697dc9d
functions/eitu/timeedit_to_csv.py
functions/eitu/timeedit_to_csv.py
import requests import csv import ics_parser URL_STUDY_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6Q7Z6QQw0Z5gQ9f50on7Xx5YY00ZQ1ZYQycZw.ics' URL_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6g7058yYQZXxQ5oQgZZ0vZ56Y1Q0f5c0nZQwYQ.ics' def fetch_and_parse(url): return ics_parser.parse(...
import requests import csv from datetime import datetime import ics_parser URL_STUDY_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6Q7Z6QQw0Z5gQ9f50on7Xx5YY00ZQ1ZYQycZw.ics' URL_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6g7058yYQZXxQ5oQgZZ0vZ56Y1Q0f5c0nZQwYQ.ics' def fetch_and_parse(url)...
Sort events by start and iso format datetimes
Sort events by start and iso format datetimes
Python
mit
christianknu/eitu,christianknu/eitu,eitu/eitu,christianknu/eitu,eitu/eitu
import requests import csv import ics_parser URL_STUDY_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6Q7Z6QQw0Z5gQ9f50on7Xx5YY00ZQ1ZYQycZw.ics' URL_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6g7058yYQZXxQ5oQgZZ0vZ56Y1Q0f5c0nZQwYQ.ics' def fetch_and_parse(url): return ics_parser.parse(...
import requests import csv from datetime import datetime import ics_parser URL_STUDY_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6Q7Z6QQw0Z5gQ9f50on7Xx5YY00ZQ1ZYQycZw.ics' URL_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6g7058yYQZXxQ5oQgZZ0vZ56Y1Q0f5c0nZQwYQ.ics' def fetch_and_parse(url)...
<commit_before>import requests import csv import ics_parser URL_STUDY_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6Q7Z6QQw0Z5gQ9f50on7Xx5YY00ZQ1ZYQycZw.ics' URL_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6g7058yYQZXxQ5oQgZZ0vZ56Y1Q0f5c0nZQwYQ.ics' def fetch_and_parse(url): return ic...
import requests import csv from datetime import datetime import ics_parser URL_STUDY_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6Q7Z6QQw0Z5gQ9f50on7Xx5YY00ZQ1ZYQycZw.ics' URL_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6g7058yYQZXxQ5oQgZZ0vZ56Y1Q0f5c0nZQwYQ.ics' def fetch_and_parse(url)...
import requests import csv import ics_parser URL_STUDY_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6Q7Z6QQw0Z5gQ9f50on7Xx5YY00ZQ1ZYQycZw.ics' URL_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6g7058yYQZXxQ5oQgZZ0vZ56Y1Q0f5c0nZQwYQ.ics' def fetch_and_parse(url): return ics_parser.parse(...
<commit_before>import requests import csv import ics_parser URL_STUDY_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6Q7Z6QQw0Z5gQ9f50on7Xx5YY00ZQ1ZYQycZw.ics' URL_ACTIVITIES = 'https://dk.timeedit.net/web/itu/db1/public/ri6g7058yYQZXxQ5oQgZZ0vZ56Y1Q0f5c0nZQwYQ.ics' def fetch_and_parse(url): return ic...
0261bb2bd82a9ff543f813eab90eb61e173f27cd
setup.py
setup.py
from setuptools import setup classifiers = ['Development Status :: 5 - Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programmi...
from setuptools import setup classifiers = ['Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', ...
Fix the trove classifer for dev status
Fix the trove classifer for dev status
Python
bsd-3-clause
aweber/avroconsumer
from setuptools import setup classifiers = ['Development Status :: 5 - Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programmi...
from setuptools import setup classifiers = ['Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', ...
<commit_before>from setuptools import setup classifiers = ['Development Status :: 5 - Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', ...
from setuptools import setup classifiers = ['Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', ...
from setuptools import setup classifiers = ['Development Status :: 5 - Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programmi...
<commit_before>from setuptools import setup classifiers = ['Development Status :: 5 - Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', ...
d1b680153b9ae56c701bc05d6f7f421f5715439f
setup.py
setup.py
#!/bin/env python # -*- coding: utf8 -*- from setuptools import setup setup( name='fedimg', version='0.0.1', description='Service to automatically upload built Fedora images \ to internal and external cloud providers.', classifiers=[ "Programming Language :: Python :: 2", ...
#!/bin/env python # -*- coding: utf8 -*- from setuptools import setup setup( name='fedimg', version='0.0.1', description='Service to automatically upload built Fedora images \ to internal and external cloud providers.', classifiers=[ "Programming Language :: Python :: 2", ...
Add a quick little newline.
Add a quick little newline.
Python
agpl-3.0
fedora-infra/fedimg,fedora-infra/fedimg
#!/bin/env python # -*- coding: utf8 -*- from setuptools import setup setup( name='fedimg', version='0.0.1', description='Service to automatically upload built Fedora images \ to internal and external cloud providers.', classifiers=[ "Programming Language :: Python :: 2", ...
#!/bin/env python # -*- coding: utf8 -*- from setuptools import setup setup( name='fedimg', version='0.0.1', description='Service to automatically upload built Fedora images \ to internal and external cloud providers.', classifiers=[ "Programming Language :: Python :: 2", ...
<commit_before>#!/bin/env python # -*- coding: utf8 -*- from setuptools import setup setup( name='fedimg', version='0.0.1', description='Service to automatically upload built Fedora images \ to internal and external cloud providers.', classifiers=[ "Programming Language :: P...
#!/bin/env python # -*- coding: utf8 -*- from setuptools import setup setup( name='fedimg', version='0.0.1', description='Service to automatically upload built Fedora images \ to internal and external cloud providers.', classifiers=[ "Programming Language :: Python :: 2", ...
#!/bin/env python # -*- coding: utf8 -*- from setuptools import setup setup( name='fedimg', version='0.0.1', description='Service to automatically upload built Fedora images \ to internal and external cloud providers.', classifiers=[ "Programming Language :: Python :: 2", ...
<commit_before>#!/bin/env python # -*- coding: utf8 -*- from setuptools import setup setup( name='fedimg', version='0.0.1', description='Service to automatically upload built Fedora images \ to internal and external cloud providers.', classifiers=[ "Programming Language :: P...
194e01f54c710c7eebc0105942c10337dedb90d9
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup import os from deflect import __version__ as version def read_file(filename): """ Utility function to read a provided filename. """ return open(os.path.join(os.path.dirname(__file__), filename)).read() packages = [ 'deflect', ] package_da...
#!/usr/bin/env python from distutils.core import setup import os from deflect import __version__ as version def read_file(filename): """ Utility function to read a provided filename. """ return open(os.path.join(os.path.dirname(__file__), filename)).read() packages = [ 'deflect', 'deflect....
Add tests module to packaging list
Add tests module to packaging list
Python
bsd-3-clause
jbittel/django-deflect
#!/usr/bin/env python from distutils.core import setup import os from deflect import __version__ as version def read_file(filename): """ Utility function to read a provided filename. """ return open(os.path.join(os.path.dirname(__file__), filename)).read() packages = [ 'deflect', ] package_da...
#!/usr/bin/env python from distutils.core import setup import os from deflect import __version__ as version def read_file(filename): """ Utility function to read a provided filename. """ return open(os.path.join(os.path.dirname(__file__), filename)).read() packages = [ 'deflect', 'deflect....
<commit_before>#!/usr/bin/env python from distutils.core import setup import os from deflect import __version__ as version def read_file(filename): """ Utility function to read a provided filename. """ return open(os.path.join(os.path.dirname(__file__), filename)).read() packages = [ 'deflect'...
#!/usr/bin/env python from distutils.core import setup import os from deflect import __version__ as version def read_file(filename): """ Utility function to read a provided filename. """ return open(os.path.join(os.path.dirname(__file__), filename)).read() packages = [ 'deflect', 'deflect....
#!/usr/bin/env python from distutils.core import setup import os from deflect import __version__ as version def read_file(filename): """ Utility function to read a provided filename. """ return open(os.path.join(os.path.dirname(__file__), filename)).read() packages = [ 'deflect', ] package_da...
<commit_before>#!/usr/bin/env python from distutils.core import setup import os from deflect import __version__ as version def read_file(filename): """ Utility function to read a provided filename. """ return open(os.path.join(os.path.dirname(__file__), filename)).read() packages = [ 'deflect'...
cfb4d6fb92f7eaed5bfea18ae0b3b772ce868097
tasks.py
tasks.py
from invoke import task, run @task def clean_docs(): run("rm -rf docs/_build") @task('clean_docs') def docs(): run("sphinx-build docs docs/_build") run("open docs/_build/index.html") @task def flake8(): run("flake8 binaryornot tests") @task def autopep8(): run("autopep8 --in-place --aggressive -...
from invoke import task, run @task def clean_docs(): run("rm -rf docs/_build") run("rm -rf docs/binaryornot.rst") run("rm -rf docs/modules.rst") @task('clean_docs') def docs(): run("sphinx-apidoc -o docs/ binaryornot/") run("sphinx-build docs docs/_build") run("open docs/_build/index.html") @...
Use sphinx-apidoc to generate API docs from docstrings.
Use sphinx-apidoc to generate API docs from docstrings.
Python
bsd-3-clause
hackebrot/binaryornot,hackebrot/binaryornot,audreyr/binaryornot,0k/binaryornot,audreyr/binaryornot,pombredanne/binaryornot,0k/binaryornot,pombredanne/binaryornot,hackebrot/binaryornot,audreyr/binaryornot,pombredanne/binaryornot
from invoke import task, run @task def clean_docs(): run("rm -rf docs/_build") @task('clean_docs') def docs(): run("sphinx-build docs docs/_build") run("open docs/_build/index.html") @task def flake8(): run("flake8 binaryornot tests") @task def autopep8(): run("autopep8 --in-place --aggressive -...
from invoke import task, run @task def clean_docs(): run("rm -rf docs/_build") run("rm -rf docs/binaryornot.rst") run("rm -rf docs/modules.rst") @task('clean_docs') def docs(): run("sphinx-apidoc -o docs/ binaryornot/") run("sphinx-build docs docs/_build") run("open docs/_build/index.html") @...
<commit_before>from invoke import task, run @task def clean_docs(): run("rm -rf docs/_build") @task('clean_docs') def docs(): run("sphinx-build docs docs/_build") run("open docs/_build/index.html") @task def flake8(): run("flake8 binaryornot tests") @task def autopep8(): run("autopep8 --in-place...
from invoke import task, run @task def clean_docs(): run("rm -rf docs/_build") run("rm -rf docs/binaryornot.rst") run("rm -rf docs/modules.rst") @task('clean_docs') def docs(): run("sphinx-apidoc -o docs/ binaryornot/") run("sphinx-build docs docs/_build") run("open docs/_build/index.html") @...
from invoke import task, run @task def clean_docs(): run("rm -rf docs/_build") @task('clean_docs') def docs(): run("sphinx-build docs docs/_build") run("open docs/_build/index.html") @task def flake8(): run("flake8 binaryornot tests") @task def autopep8(): run("autopep8 --in-place --aggressive -...
<commit_before>from invoke import task, run @task def clean_docs(): run("rm -rf docs/_build") @task('clean_docs') def docs(): run("sphinx-build docs docs/_build") run("open docs/_build/index.html") @task def flake8(): run("flake8 binaryornot tests") @task def autopep8(): run("autopep8 --in-place...
7979bac3580852c051d739b0ee95967c8b2572dd
cloudkittyclient/__init__.py
cloudkittyclient/__init__.py
# -*- coding: utf-8 -*- # Copyright 2015 Objectif Libre # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# -*- coding: utf-8 -*- # Copyright 2015 Objectif Libre # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
Fix the wrong input package of pbr of cloudkittyclient
Fix the wrong input package of pbr of cloudkittyclient The cloudkittyclient cannot work because wrong package name was inputed to pbr.version.VersionInfo() method. Change-Id: Iff65bf5b2efd50b0dd29070b89ac5a607d0ecfcb Closes-Bug: #1448406
Python
apache-2.0
muraliselva10/python-cloudkittyclient,openstack/python-cloudkittyclient,stackforge/python-cloudkittyclient,FNST-OpenStack/python-cloudkittyclient
# -*- coding: utf-8 -*- # Copyright 2015 Objectif Libre # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# -*- coding: utf-8 -*- # Copyright 2015 Objectif Libre # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
<commit_before># -*- coding: utf-8 -*- # Copyright 2015 Objectif Libre # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# -*- coding: utf-8 -*- # Copyright 2015 Objectif Libre # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# -*- coding: utf-8 -*- # Copyright 2015 Objectif Libre # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
<commit_before># -*- coding: utf-8 -*- # Copyright 2015 Objectif Libre # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
00ab7f48fff7f824e7db41bd8fedf1623f904a42
awsume/awsumepy/lib/saml.py
awsume/awsumepy/lib/saml.py
import base64 import xmltodict import json import colorama from . safe_print import safe_print from . exceptions import SAMLAssertionParseError def parse_assertion(assertion: str) -> list: roles = [] response = xmltodict.parse(base64.b64decode(assertion)) attributes = response.get('saml2p:Response', {}).g...
import base64 import xmltodict import json import colorama from . safe_print import safe_print from . exceptions import SAMLAssertionParseError def parse_assertion(assertion: str) -> list: roles = [] response = xmltodict.parse(base64.b64decode(assertion)) if response.get('saml2p:Response') is not None: ...
Handle SAML 1 in addition to SAML 2.
Handle SAML 1 in addition to SAML 2.
Python
mit
trek10inc/awsume,trek10inc/awsume
import base64 import xmltodict import json import colorama from . safe_print import safe_print from . exceptions import SAMLAssertionParseError def parse_assertion(assertion: str) -> list: roles = [] response = xmltodict.parse(base64.b64decode(assertion)) attributes = response.get('saml2p:Response', {}).g...
import base64 import xmltodict import json import colorama from . safe_print import safe_print from . exceptions import SAMLAssertionParseError def parse_assertion(assertion: str) -> list: roles = [] response = xmltodict.parse(base64.b64decode(assertion)) if response.get('saml2p:Response') is not None: ...
<commit_before>import base64 import xmltodict import json import colorama from . safe_print import safe_print from . exceptions import SAMLAssertionParseError def parse_assertion(assertion: str) -> list: roles = [] response = xmltodict.parse(base64.b64decode(assertion)) attributes = response.get('saml2p:R...
import base64 import xmltodict import json import colorama from . safe_print import safe_print from . exceptions import SAMLAssertionParseError def parse_assertion(assertion: str) -> list: roles = [] response = xmltodict.parse(base64.b64decode(assertion)) if response.get('saml2p:Response') is not None: ...
import base64 import xmltodict import json import colorama from . safe_print import safe_print from . exceptions import SAMLAssertionParseError def parse_assertion(assertion: str) -> list: roles = [] response = xmltodict.parse(base64.b64decode(assertion)) attributes = response.get('saml2p:Response', {}).g...
<commit_before>import base64 import xmltodict import json import colorama from . safe_print import safe_print from . exceptions import SAMLAssertionParseError def parse_assertion(assertion: str) -> list: roles = [] response = xmltodict.parse(base64.b64decode(assertion)) attributes = response.get('saml2p:R...
28062a6a978b52c3eb3ce6b6c4b8c14832b8673f
billing/integrations/amazon_fps_integration.py
billing/integrations/amazon_fps_integration.py
from billing.integration import Integration from django.conf import settings from boto.connection import FPSConnection FPS_PROD_API_ENDPOINT = "fps.amazonaws.com" FPS_SANDBOX_API_ENDPOINT = "fps.sandbox.amazonaws.com" class AmazonFpsIntegration(Integration): # TODO: Document the fields for each flow fields = ...
from billing.integration import Integration from django.conf import settings from boto.fps.connection import FPSConnection FPS_PROD_API_ENDPOINT = "fps.amazonaws.com" FPS_SANDBOX_API_ENDPOINT = "fps.sandbox.amazonaws.com" class AmazonFpsIntegration(Integration): # TODO: Document the fields for each flow field...
Use the correct module path for the AmazonFPS app.
Fix: Use the correct module path for the AmazonFPS app.
Python
bsd-3-clause
biddyweb/merchant,SimpleTax/merchant,biddyweb/merchant,spookylukey/merchant,agiliq/merchant,agiliq/merchant,digideskio/merchant,mjrulesamrat/merchant,spookylukey/merchant,SimpleTax/merchant,mjrulesamrat/merchant,digideskio/merchant
from billing.integration import Integration from django.conf import settings from boto.connection import FPSConnection FPS_PROD_API_ENDPOINT = "fps.amazonaws.com" FPS_SANDBOX_API_ENDPOINT = "fps.sandbox.amazonaws.com" class AmazonFpsIntegration(Integration): # TODO: Document the fields for each flow fields = ...
from billing.integration import Integration from django.conf import settings from boto.fps.connection import FPSConnection FPS_PROD_API_ENDPOINT = "fps.amazonaws.com" FPS_SANDBOX_API_ENDPOINT = "fps.sandbox.amazonaws.com" class AmazonFpsIntegration(Integration): # TODO: Document the fields for each flow field...
<commit_before>from billing.integration import Integration from django.conf import settings from boto.connection import FPSConnection FPS_PROD_API_ENDPOINT = "fps.amazonaws.com" FPS_SANDBOX_API_ENDPOINT = "fps.sandbox.amazonaws.com" class AmazonFpsIntegration(Integration): # TODO: Document the fields for each flo...
from billing.integration import Integration from django.conf import settings from boto.fps.connection import FPSConnection FPS_PROD_API_ENDPOINT = "fps.amazonaws.com" FPS_SANDBOX_API_ENDPOINT = "fps.sandbox.amazonaws.com" class AmazonFpsIntegration(Integration): # TODO: Document the fields for each flow field...
from billing.integration import Integration from django.conf import settings from boto.connection import FPSConnection FPS_PROD_API_ENDPOINT = "fps.amazonaws.com" FPS_SANDBOX_API_ENDPOINT = "fps.sandbox.amazonaws.com" class AmazonFpsIntegration(Integration): # TODO: Document the fields for each flow fields = ...
<commit_before>from billing.integration import Integration from django.conf import settings from boto.connection import FPSConnection FPS_PROD_API_ENDPOINT = "fps.amazonaws.com" FPS_SANDBOX_API_ENDPOINT = "fps.sandbox.amazonaws.com" class AmazonFpsIntegration(Integration): # TODO: Document the fields for each flo...
ae15b27fd2370c423858aa0710f0d3eddb26738d
crispy_forms/tests/base.py
crispy_forms/tests/base.py
# -*- coding: utf-8 -*- import os import django from django.conf import settings from django.template import loader from django.test import TestCase try: from django.test import override_settings except ImportError: from django.test.utils import override_settings class CrispyTestCase(TestCase): def setUp...
# -*- coding: utf-8 -*- import os import django from django.conf import settings from django.template import loader from django.test import TestCase try: from django.test import override_settings except ImportError: from django.test.utils import override_settings class CrispyTestCase(TestCase): def setUp...
Use tuple for version check
Use tuple for version check
Python
mit
RamezIssac/django-crispy-forms,Stranger6667/django-crispy-forms,scuml/django-crispy-forms,impulse-cloud/django-crispy-forms,dzhuang/django-crispy-forms,alanwj/django-crispy-forms,avsd/django-crispy-forms,tarunlnmiit/django-crispy-forms,saydulk/django-crispy-forms,schrd/django-crispy-forms,dzhuang/django-crispy-forms,ng...
# -*- coding: utf-8 -*- import os import django from django.conf import settings from django.template import loader from django.test import TestCase try: from django.test import override_settings except ImportError: from django.test.utils import override_settings class CrispyTestCase(TestCase): def setUp...
# -*- coding: utf-8 -*- import os import django from django.conf import settings from django.template import loader from django.test import TestCase try: from django.test import override_settings except ImportError: from django.test.utils import override_settings class CrispyTestCase(TestCase): def setUp...
<commit_before># -*- coding: utf-8 -*- import os import django from django.conf import settings from django.template import loader from django.test import TestCase try: from django.test import override_settings except ImportError: from django.test.utils import override_settings class CrispyTestCase(TestCase)...
# -*- coding: utf-8 -*- import os import django from django.conf import settings from django.template import loader from django.test import TestCase try: from django.test import override_settings except ImportError: from django.test.utils import override_settings class CrispyTestCase(TestCase): def setUp...
# -*- coding: utf-8 -*- import os import django from django.conf import settings from django.template import loader from django.test import TestCase try: from django.test import override_settings except ImportError: from django.test.utils import override_settings class CrispyTestCase(TestCase): def setUp...
<commit_before># -*- coding: utf-8 -*- import os import django from django.conf import settings from django.template import loader from django.test import TestCase try: from django.test import override_settings except ImportError: from django.test.utils import override_settings class CrispyTestCase(TestCase)...
e5939631835ce04d808246fdc391c95354f3b044
slug/posix.py
slug/posix.py
""" Versions of the base functionality optimized for by-the-spec POSIX. Linux/Mac/BSD-specific code should live elsewhere. """ import signal from . import base __all__ = ('Process',) class Process(base.Process): def pause(self): """ Pause the process, able to be continued later """ ...
""" Versions of the base functionality optimized for by-the-spec POSIX. Linux/Mac/BSD-specific code should live elsewhere. """ import signal import selectors from . import base __all__ = ('Process', 'Valve') class Process(base.Process): def pause(self): """ Pause the process, able to be continue...
Correct Valve behavior on Posix
Correct Valve behavior on Posix
Python
bsd-3-clause
xonsh/slug
""" Versions of the base functionality optimized for by-the-spec POSIX. Linux/Mac/BSD-specific code should live elsewhere. """ import signal from . import base __all__ = ('Process',) class Process(base.Process): def pause(self): """ Pause the process, able to be continued later """ ...
""" Versions of the base functionality optimized for by-the-spec POSIX. Linux/Mac/BSD-specific code should live elsewhere. """ import signal import selectors from . import base __all__ = ('Process', 'Valve') class Process(base.Process): def pause(self): """ Pause the process, able to be continue...
<commit_before>""" Versions of the base functionality optimized for by-the-spec POSIX. Linux/Mac/BSD-specific code should live elsewhere. """ import signal from . import base __all__ = ('Process',) class Process(base.Process): def pause(self): """ Pause the process, able to be continued later ...
""" Versions of the base functionality optimized for by-the-spec POSIX. Linux/Mac/BSD-specific code should live elsewhere. """ import signal import selectors from . import base __all__ = ('Process', 'Valve') class Process(base.Process): def pause(self): """ Pause the process, able to be continue...
""" Versions of the base functionality optimized for by-the-spec POSIX. Linux/Mac/BSD-specific code should live elsewhere. """ import signal from . import base __all__ = ('Process',) class Process(base.Process): def pause(self): """ Pause the process, able to be continued later """ ...
<commit_before>""" Versions of the base functionality optimized for by-the-spec POSIX. Linux/Mac/BSD-specific code should live elsewhere. """ import signal from . import base __all__ = ('Process',) class Process(base.Process): def pause(self): """ Pause the process, able to be continued later ...
99947acb784d975319bd99240abed066a4f0a51f
pytablewriter/_converter.py
pytablewriter/_converter.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import import re def lower_bool_converter(bool_value): return str(bool_value).lower() def strip_quote(text, value): re_replace = re.compile( '["\']%s["\']' % (value), re.MULTILINE) ...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import import re def lower_bool_converter(bool_value): return str(bool_value).lower() def str_datetime_converter(value): return value.strftime("%Y-%m-%dT%H:%M:%S%z") def strip_quote(text, va...
Add a converter which convert datetime to string
Add a converter which convert datetime to string
Python
mit
thombashi/pytablewriter
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import import re def lower_bool_converter(bool_value): return str(bool_value).lower() def strip_quote(text, value): re_replace = re.compile( '["\']%s["\']' % (value), re.MULTILINE) ...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import import re def lower_bool_converter(bool_value): return str(bool_value).lower() def str_datetime_converter(value): return value.strftime("%Y-%m-%dT%H:%M:%S%z") def strip_quote(text, va...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import import re def lower_bool_converter(bool_value): return str(bool_value).lower() def strip_quote(text, value): re_replace = re.compile( '["\']%s["\']' % (value), re...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import import re def lower_bool_converter(bool_value): return str(bool_value).lower() def str_datetime_converter(value): return value.strftime("%Y-%m-%dT%H:%M:%S%z") def strip_quote(text, va...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import import re def lower_bool_converter(bool_value): return str(bool_value).lower() def strip_quote(text, value): re_replace = re.compile( '["\']%s["\']' % (value), re.MULTILINE) ...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import absolute_import import re def lower_bool_converter(bool_value): return str(bool_value).lower() def strip_quote(text, value): re_replace = re.compile( '["\']%s["\']' % (value), re...
14610d40b4d13f16af73685eea1e67fd76e27a65
python/helpers/pydev/_pydevd_frame_eval/pydevd_frame_eval_main.py
python/helpers/pydev/_pydevd_frame_eval/pydevd_frame_eval_main.py
import os import sys IS_PY36_OR_OLDER = False if (sys.version_info[0] == 3 and sys.version_info[1] >= 6) or sys.version_info[0] > 3: IS_PY36_OR_OLDER = True set_frame_eval = None stop_frame_eval = None if IS_PY36_OR_OLDER: try: from _pydevd_frame_eval.pydevd_frame_evaluator import frame_eval_func, s...
import os import sys IS_PY36_OR_OLDER = False if (sys.version_info[0] == 3 and sys.version_info[1] >= 6) or sys.version_info[0] > 3: IS_PY36_OR_OLDER = True set_frame_eval = None stop_frame_eval = None use_frame_eval = os.environ.get('PYDEVD_USE_FRAME_EVAL', None) if use_frame_eval == 'NO': frame_eval_func,...
Add ability to disable frame evaluation
Add ability to disable frame evaluation
Python
apache-2.0
apixandru/intellij-community,mglukhikh/intellij-community,signed/intellij-community,ThiagoGarciaAlves/intellij-community,signed/intellij-community,vvv1559/intellij-community,da1z/intellij-community,FHannes/intellij-community,FHannes/intellij-community,ThiagoGarciaAlves/intellij-community,allotria/intellij-community,sig...
import os import sys IS_PY36_OR_OLDER = False if (sys.version_info[0] == 3 and sys.version_info[1] >= 6) or sys.version_info[0] > 3: IS_PY36_OR_OLDER = True set_frame_eval = None stop_frame_eval = None if IS_PY36_OR_OLDER: try: from _pydevd_frame_eval.pydevd_frame_evaluator import frame_eval_func, s...
import os import sys IS_PY36_OR_OLDER = False if (sys.version_info[0] == 3 and sys.version_info[1] >= 6) or sys.version_info[0] > 3: IS_PY36_OR_OLDER = True set_frame_eval = None stop_frame_eval = None use_frame_eval = os.environ.get('PYDEVD_USE_FRAME_EVAL', None) if use_frame_eval == 'NO': frame_eval_func,...
<commit_before>import os import sys IS_PY36_OR_OLDER = False if (sys.version_info[0] == 3 and sys.version_info[1] >= 6) or sys.version_info[0] > 3: IS_PY36_OR_OLDER = True set_frame_eval = None stop_frame_eval = None if IS_PY36_OR_OLDER: try: from _pydevd_frame_eval.pydevd_frame_evaluator import fra...
import os import sys IS_PY36_OR_OLDER = False if (sys.version_info[0] == 3 and sys.version_info[1] >= 6) or sys.version_info[0] > 3: IS_PY36_OR_OLDER = True set_frame_eval = None stop_frame_eval = None use_frame_eval = os.environ.get('PYDEVD_USE_FRAME_EVAL', None) if use_frame_eval == 'NO': frame_eval_func,...
import os import sys IS_PY36_OR_OLDER = False if (sys.version_info[0] == 3 and sys.version_info[1] >= 6) or sys.version_info[0] > 3: IS_PY36_OR_OLDER = True set_frame_eval = None stop_frame_eval = None if IS_PY36_OR_OLDER: try: from _pydevd_frame_eval.pydevd_frame_evaluator import frame_eval_func, s...
<commit_before>import os import sys IS_PY36_OR_OLDER = False if (sys.version_info[0] == 3 and sys.version_info[1] >= 6) or sys.version_info[0] > 3: IS_PY36_OR_OLDER = True set_frame_eval = None stop_frame_eval = None if IS_PY36_OR_OLDER: try: from _pydevd_frame_eval.pydevd_frame_evaluator import fra...
0cf6d8d4b3af400c7e8893f50406f33674522512
purchase_order_line_deep_sort/__manifest__.py
purchase_order_line_deep_sort/__manifest__.py
# Copyright 2018 Tecnativa - Vicent Cubells <[email protected]> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 { "name": "Purchase Order Line Deep Sort", "version": "13.0.1.0.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Purch...
# Copyright 2018 Tecnativa - Vicent Cubells <[email protected]> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 { "name": "Purchase Order Line Deep Sort", "version": "13.0.1.0.0", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Purchas...
Delete empty " " spaces in same string line
[FIX] Delete empty " " spaces in same string line
Python
agpl-3.0
OCA/purchase-workflow,OCA/purchase-workflow
# Copyright 2018 Tecnativa - Vicent Cubells <[email protected]> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 { "name": "Purchase Order Line Deep Sort", "version": "13.0.1.0.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Purch...
# Copyright 2018 Tecnativa - Vicent Cubells <[email protected]> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 { "name": "Purchase Order Line Deep Sort", "version": "13.0.1.0.0", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Purchas...
<commit_before># Copyright 2018 Tecnativa - Vicent Cubells <[email protected]> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 { "name": "Purchase Order Line Deep Sort", "version": "13.0.1.0.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "license": "AGPL-3", "ca...
# Copyright 2018 Tecnativa - Vicent Cubells <[email protected]> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 { "name": "Purchase Order Line Deep Sort", "version": "13.0.1.0.0", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Purchas...
# Copyright 2018 Tecnativa - Vicent Cubells <[email protected]> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 { "name": "Purchase Order Line Deep Sort", "version": "13.0.1.0.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Purch...
<commit_before># Copyright 2018 Tecnativa - Vicent Cubells <[email protected]> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3 { "name": "Purchase Order Line Deep Sort", "version": "13.0.1.0.0", "author": "Tecnativa," "Odoo Community Association (OCA)", "license": "AGPL-3", "ca...
24ff6aa99c7ee78d58200aad03c50722563cb1a0
purchase_product_usage/models/account_move.py
purchase_product_usage/models/account_move.py
# Copyright 2019 Aleph Objects, Inc. # Copyright 2019 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0). from odoo import api, models class AccountMoveLine(models.Model): _inherit = "account.move.line" @api.onchange( "amount_currency", "currency_id", ...
# Copyright 2019 Aleph Objects, Inc. # Copyright 2019 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0). from odoo import api, models class AccountMoveLine(models.Model): _inherit = "account.move.line" @api.onchange( "amount_currency", "currency_id", ...
Change only account if usage is defined in POL
[13.0][FIX] purchase_product_usage: Change only account if usage is defined in POL
Python
agpl-3.0
OCA/purchase-workflow,OCA/purchase-workflow
# Copyright 2019 Aleph Objects, Inc. # Copyright 2019 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0). from odoo import api, models class AccountMoveLine(models.Model): _inherit = "account.move.line" @api.onchange( "amount_currency", "currency_id", ...
# Copyright 2019 Aleph Objects, Inc. # Copyright 2019 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0). from odoo import api, models class AccountMoveLine(models.Model): _inherit = "account.move.line" @api.onchange( "amount_currency", "currency_id", ...
<commit_before># Copyright 2019 Aleph Objects, Inc. # Copyright 2019 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0). from odoo import api, models class AccountMoveLine(models.Model): _inherit = "account.move.line" @api.onchange( "amount_currency", "currenc...
# Copyright 2019 Aleph Objects, Inc. # Copyright 2019 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0). from odoo import api, models class AccountMoveLine(models.Model): _inherit = "account.move.line" @api.onchange( "amount_currency", "currency_id", ...
# Copyright 2019 Aleph Objects, Inc. # Copyright 2019 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0). from odoo import api, models class AccountMoveLine(models.Model): _inherit = "account.move.line" @api.onchange( "amount_currency", "currency_id", ...
<commit_before># Copyright 2019 Aleph Objects, Inc. # Copyright 2019 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0). from odoo import api, models class AccountMoveLine(models.Model): _inherit = "account.move.line" @api.onchange( "amount_currency", "currenc...
cc6c40b64f8dfde533977883124e22e0fbc80e5c
soco/__init__.py
soco/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ SoCo (Sonos Controller) is a simple library to control Sonos speakers """ # Will be parsed by setup.py to determine package metadata __author__ = 'Rahim Sonawalla <[email protected]>' __version__ = '0.7' __website__ = 'https://github.com/SoCo/SoCo...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ SoCo (Sonos Controller) is a simple library to control Sonos speakers """ # Will be parsed by setup.py to determine package metadata __author__ = 'The SoCo-Team <[email protected]>' __version__ = '0.7' __website__ = 'https://github.com/SoC...
Update author info to "The SoCo-Team"
Update author info to "The SoCo-Team"
Python
mit
TrondKjeldas/SoCo,flavio/SoCo,dundeemt/SoCo,xxdede/SoCo,KennethNielsen/SoCo,petteraas/SoCo,bwhaley/SoCo,xxdede/SoCo,oyvindmal/SocoWebService,TrondKjeldas/SoCo,TrondKjeldas/SoCo,petteraas/SoCo,dajobe/SoCo,intfrr/SoCo,intfrr/SoCo,xxdede/SoCo,fgend31/SoCo,jlmcgehee21/SoCo,DPH/SoCo,dsully/SoCo,meska/SoCo,bwhaley/SoCo,dajob...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ SoCo (Sonos Controller) is a simple library to control Sonos speakers """ # Will be parsed by setup.py to determine package metadata __author__ = 'Rahim Sonawalla <[email protected]>' __version__ = '0.7' __website__ = 'https://github.com/SoCo/SoCo...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ SoCo (Sonos Controller) is a simple library to control Sonos speakers """ # Will be parsed by setup.py to determine package metadata __author__ = 'The SoCo-Team <[email protected]>' __version__ = '0.7' __website__ = 'https://github.com/SoC...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals """ SoCo (Sonos Controller) is a simple library to control Sonos speakers """ # Will be parsed by setup.py to determine package metadata __author__ = 'Rahim Sonawalla <[email protected]>' __version__ = '0.7' __website__ = 'https://githu...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ SoCo (Sonos Controller) is a simple library to control Sonos speakers """ # Will be parsed by setup.py to determine package metadata __author__ = 'The SoCo-Team <[email protected]>' __version__ = '0.7' __website__ = 'https://github.com/SoC...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ SoCo (Sonos Controller) is a simple library to control Sonos speakers """ # Will be parsed by setup.py to determine package metadata __author__ = 'Rahim Sonawalla <[email protected]>' __version__ = '0.7' __website__ = 'https://github.com/SoCo/SoCo...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals """ SoCo (Sonos Controller) is a simple library to control Sonos speakers """ # Will be parsed by setup.py to determine package metadata __author__ = 'Rahim Sonawalla <[email protected]>' __version__ = '0.7' __website__ = 'https://githu...
2b047e4acd3508382a263533e66254aed7af14a8
ggplot/components/labels.py
ggplot/components/labels.py
from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy from ..utils.exceptions import GgplotError class labs(object): """ General class for all label adding classes """ labels = {} def __init__(self, *args, **kwargs)...
from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy from ..utils.exceptions import GgplotError class labs(object): """ General class for all label adding classes """ labels = {} def __init__(self, *args, **kwargs)...
Fix plot title not showing up
Fix plot title not showing up
Python
mit
has2k1/plotnine,has2k1/plotnine
from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy from ..utils.exceptions import GgplotError class labs(object): """ General class for all label adding classes """ labels = {} def __init__(self, *args, **kwargs)...
from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy from ..utils.exceptions import GgplotError class labs(object): """ General class for all label adding classes """ labels = {} def __init__(self, *args, **kwargs)...
<commit_before>from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy from ..utils.exceptions import GgplotError class labs(object): """ General class for all label adding classes """ labels = {} def __init__(self, *...
from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy from ..utils.exceptions import GgplotError class labs(object): """ General class for all label adding classes """ labels = {} def __init__(self, *args, **kwargs)...
from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy from ..utils.exceptions import GgplotError class labs(object): """ General class for all label adding classes """ labels = {} def __init__(self, *args, **kwargs)...
<commit_before>from __future__ import (absolute_import, division, print_function, unicode_literals) from copy import deepcopy from ..utils.exceptions import GgplotError class labs(object): """ General class for all label adding classes """ labels = {} def __init__(self, *...
910fd1b323f05b695cccf6d3250b340c46cc2db5
venvctrl/cli/relocate.py
venvctrl/cli/relocate.py
"""Relocate a virtual environment.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse from .. import api def relocate(source, destination, move=False): """Adjust the virtual environment settings...
"""Relocate a virtual environment.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse from .. import api def relocate(source, destination, move=False): """Adjust the virtual environment settings...
Fix cli module for new lint detection
Fix cli module for new lint detection Since the last commit (2015), some of the test dependencies have updated. This commit specifically addresses updates in PyLint which result in more lint being detected in the project that previous test runs.
Python
mit
kevinconway/venvctrl
"""Relocate a virtual environment.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse from .. import api def relocate(source, destination, move=False): """Adjust the virtual environment settings...
"""Relocate a virtual environment.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse from .. import api def relocate(source, destination, move=False): """Adjust the virtual environment settings...
<commit_before>"""Relocate a virtual environment.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse from .. import api def relocate(source, destination, move=False): """Adjust the virtual envir...
"""Relocate a virtual environment.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse from .. import api def relocate(source, destination, move=False): """Adjust the virtual environment settings...
"""Relocate a virtual environment.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse from .. import api def relocate(source, destination, move=False): """Adjust the virtual environment settings...
<commit_before>"""Relocate a virtual environment.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import argparse from .. import api def relocate(source, destination, move=False): """Adjust the virtual envir...
742569a4781132d11de6d41811ee11ad55560294
django_slack/exceptions.py
django_slack/exceptions.py
import six class SlackException(ValueError): def __init__(self, message, message_data): super(SlackException, self).__init__(message) self.message_data = message_data @six.python_2_unicode_compatible class ChannelNotFound(SlackException): def __str__(self): # Override base __str__ to...
import six class SlackException(ValueError): def __init__(self, message, message_data): super(SlackException, self).__init__(message) self.message_data = message_data @six.python_2_unicode_compatible class ChannelNotFound(SlackException): def __str__(self): # Override base __str__ to...
Add another specific error class
Add another specific error class
Python
bsd-3-clause
lamby/django-slack
import six class SlackException(ValueError): def __init__(self, message, message_data): super(SlackException, self).__init__(message) self.message_data = message_data @six.python_2_unicode_compatible class ChannelNotFound(SlackException): def __str__(self): # Override base __str__ to...
import six class SlackException(ValueError): def __init__(self, message, message_data): super(SlackException, self).__init__(message) self.message_data = message_data @six.python_2_unicode_compatible class ChannelNotFound(SlackException): def __str__(self): # Override base __str__ to...
<commit_before>import six class SlackException(ValueError): def __init__(self, message, message_data): super(SlackException, self).__init__(message) self.message_data = message_data @six.python_2_unicode_compatible class ChannelNotFound(SlackException): def __str__(self): # Override ...
import six class SlackException(ValueError): def __init__(self, message, message_data): super(SlackException, self).__init__(message) self.message_data = message_data @six.python_2_unicode_compatible class ChannelNotFound(SlackException): def __str__(self): # Override base __str__ to...
import six class SlackException(ValueError): def __init__(self, message, message_data): super(SlackException, self).__init__(message) self.message_data = message_data @six.python_2_unicode_compatible class ChannelNotFound(SlackException): def __str__(self): # Override base __str__ to...
<commit_before>import six class SlackException(ValueError): def __init__(self, message, message_data): super(SlackException, self).__init__(message) self.message_data = message_data @six.python_2_unicode_compatible class ChannelNotFound(SlackException): def __str__(self): # Override ...
220e0008924878f774f570cc0122c563f2c17465
recipes/migrations/0010_auto_20150919_1228.py
recipes/migrations/0010_auto_20150919_1228.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def change_to_usage(apps, schema_editor): Recipe = apps.get_model("recipes", "Recipe") Ingredient = apps.get_model("recipes", "Ingredient") IngredientUsage = apps.get_model("recipes", "IngredientUsage"...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def change_to_usage(apps, schema_editor): Recipe = apps.get_model("recipes", "Recipe") Ingredient = apps.get_model("recipes", "Ingredient") IngredientUsage = apps.get_model("recipes", "IngredientUsage"...
Make the data migration actually work
Make the data migration actually work
Python
agpl-3.0
XeryusTC/rotd,XeryusTC/rotd,XeryusTC/rotd
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def change_to_usage(apps, schema_editor): Recipe = apps.get_model("recipes", "Recipe") Ingredient = apps.get_model("recipes", "Ingredient") IngredientUsage = apps.get_model("recipes", "IngredientUsage"...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def change_to_usage(apps, schema_editor): Recipe = apps.get_model("recipes", "Recipe") Ingredient = apps.get_model("recipes", "Ingredient") IngredientUsage = apps.get_model("recipes", "IngredientUsage"...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def change_to_usage(apps, schema_editor): Recipe = apps.get_model("recipes", "Recipe") Ingredient = apps.get_model("recipes", "Ingredient") IngredientUsage = apps.get_model("recipes", "I...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def change_to_usage(apps, schema_editor): Recipe = apps.get_model("recipes", "Recipe") Ingredient = apps.get_model("recipes", "Ingredient") IngredientUsage = apps.get_model("recipes", "IngredientUsage"...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def change_to_usage(apps, schema_editor): Recipe = apps.get_model("recipes", "Recipe") Ingredient = apps.get_model("recipes", "Ingredient") IngredientUsage = apps.get_model("recipes", "IngredientUsage"...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def change_to_usage(apps, schema_editor): Recipe = apps.get_model("recipes", "Recipe") Ingredient = apps.get_model("recipes", "Ingredient") IngredientUsage = apps.get_model("recipes", "I...
afddecff42b7d8b78048f122488e70eb48660327
test-mm.py
test-mm.py
from psautohint import autohint from psautohint import psautohint d = "tests/data/source-code-pro" mm = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold") gg = [] ii = None for m in mm: f = autohint.openOpenTypeFile("%s/%s/font.otf" % (d, m), "font.otf", None) g = f.convertToBez("A", Fa...
from psautohint import autohint from psautohint import psautohint baseDir = "tests/data/source-code-pro" masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold") glyphList = None fonts = [] for master in masters: print("Hinting %s" % master) path = "%s/%s/font.otf" % (baseDir, mas...
Rewrite the test script to hint all glyphs
Rewrite the test script to hint all glyphs Which reveals that no MM-compatible hinting is really done :(
Python
apache-2.0
khaledhosny/psautohint,khaledhosny/psautohint
from psautohint import autohint from psautohint import psautohint d = "tests/data/source-code-pro" mm = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold") gg = [] ii = None for m in mm: f = autohint.openOpenTypeFile("%s/%s/font.otf" % (d, m), "font.otf", None) g = f.convertToBez("A", Fa...
from psautohint import autohint from psautohint import psautohint baseDir = "tests/data/source-code-pro" masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold") glyphList = None fonts = [] for master in masters: print("Hinting %s" % master) path = "%s/%s/font.otf" % (baseDir, mas...
<commit_before>from psautohint import autohint from psautohint import psautohint d = "tests/data/source-code-pro" mm = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold") gg = [] ii = None for m in mm: f = autohint.openOpenTypeFile("%s/%s/font.otf" % (d, m), "font.otf", None) g = f.conve...
from psautohint import autohint from psautohint import psautohint baseDir = "tests/data/source-code-pro" masters = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold") glyphList = None fonts = [] for master in masters: print("Hinting %s" % master) path = "%s/%s/font.otf" % (baseDir, mas...
from psautohint import autohint from psautohint import psautohint d = "tests/data/source-code-pro" mm = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold") gg = [] ii = None for m in mm: f = autohint.openOpenTypeFile("%s/%s/font.otf" % (d, m), "font.otf", None) g = f.convertToBez("A", Fa...
<commit_before>from psautohint import autohint from psautohint import psautohint d = "tests/data/source-code-pro" mm = ("Black", "Bold", "ExtraLight", "Light", "Medium", "Regular", "Semibold") gg = [] ii = None for m in mm: f = autohint.openOpenTypeFile("%s/%s/font.otf" % (d, m), "font.otf", None) g = f.conve...
cc48f8c744c3e8afebdb0c832412b673fef4c727
test/functions/dsmm_test.py
test/functions/dsmm_test.py
import torch import gpytorch from torch.autograd import Variable def test_forward(): i = torch.LongTensor([[0, 1, 1], [2, 0, 2]]) v = torch.FloatTensor([3, 4, 5]) sparse = torch.sparse.FloatTensor(i, v, torch.Size([2, 3])) dense = Variable(torch.randn(3, 3)) res = gpytor...
import torch import gpytorch from torch.autograd import Variable def test_forward(): i = torch.LongTensor([[0, 1, 1], [2, 0, 2]]) v = torch.FloatTensor([3, 4, 5]) sparse = torch.sparse.FloatTensor(i, v, torch.Size([2, 3])) dense = Variable(torch.randn(3, 3)) res = gpytor...
Increase DSMM test tolerance to 1e-5 to improve consistency.
Increase DSMM test tolerance to 1e-5 to improve consistency.
Python
mit
jrg365/gpytorch,jrg365/gpytorch,jrg365/gpytorch
import torch import gpytorch from torch.autograd import Variable def test_forward(): i = torch.LongTensor([[0, 1, 1], [2, 0, 2]]) v = torch.FloatTensor([3, 4, 5]) sparse = torch.sparse.FloatTensor(i, v, torch.Size([2, 3])) dense = Variable(torch.randn(3, 3)) res = gpytor...
import torch import gpytorch from torch.autograd import Variable def test_forward(): i = torch.LongTensor([[0, 1, 1], [2, 0, 2]]) v = torch.FloatTensor([3, 4, 5]) sparse = torch.sparse.FloatTensor(i, v, torch.Size([2, 3])) dense = Variable(torch.randn(3, 3)) res = gpytor...
<commit_before>import torch import gpytorch from torch.autograd import Variable def test_forward(): i = torch.LongTensor([[0, 1, 1], [2, 0, 2]]) v = torch.FloatTensor([3, 4, 5]) sparse = torch.sparse.FloatTensor(i, v, torch.Size([2, 3])) dense = Variable(torch.randn(3, 3)) ...
import torch import gpytorch from torch.autograd import Variable def test_forward(): i = torch.LongTensor([[0, 1, 1], [2, 0, 2]]) v = torch.FloatTensor([3, 4, 5]) sparse = torch.sparse.FloatTensor(i, v, torch.Size([2, 3])) dense = Variable(torch.randn(3, 3)) res = gpytor...
import torch import gpytorch from torch.autograd import Variable def test_forward(): i = torch.LongTensor([[0, 1, 1], [2, 0, 2]]) v = torch.FloatTensor([3, 4, 5]) sparse = torch.sparse.FloatTensor(i, v, torch.Size([2, 3])) dense = Variable(torch.randn(3, 3)) res = gpytor...
<commit_before>import torch import gpytorch from torch.autograd import Variable def test_forward(): i = torch.LongTensor([[0, 1, 1], [2, 0, 2]]) v = torch.FloatTensor([3, 4, 5]) sparse = torch.sparse.FloatTensor(i, v, torch.Size([2, 3])) dense = Variable(torch.randn(3, 3)) ...
93623d3bc8336073b65f586e2d1573831c492084
iatidataquality/__init__.py
iatidataquality/__init__.py
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
Add survey controller to routes
Add survey controller to routes
Python
agpl-3.0
pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
<commit_before> # IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Pu...
b90f01bb8e10751ccfa51872dc32054b5be31d1b
vishwin_http/__init__.py
vishwin_http/__init__.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from flask import Flask from werkzeug.contrib.cache import FileSystemCache import pkg_resources app=Flask(__name__) #ap...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from flask import Flask from werkzeug.contrib.cache import MemcachedCache import pkg_resources app=Flask(__name__) app....
Switch to memcached cache backend
Switch to memcached cache backend - Reinstate config file - Read server locations and key prefix from config
Python
mpl-2.0
vishwin/vishwin.info-http,vishwin/vishwin.info-http,vishwin/vishwin.info-http
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from flask import Flask from werkzeug.contrib.cache import FileSystemCache import pkg_resources app=Flask(__name__) #ap...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from flask import Flask from werkzeug.contrib.cache import MemcachedCache import pkg_resources app=Flask(__name__) app....
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from flask import Flask from werkzeug.contrib.cache import FileSystemCache import pkg_resources app=Flas...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from flask import Flask from werkzeug.contrib.cache import MemcachedCache import pkg_resources app=Flask(__name__) app....
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from flask import Flask from werkzeug.contrib.cache import FileSystemCache import pkg_resources app=Flask(__name__) #ap...
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from flask import Flask from werkzeug.contrib.cache import FileSystemCache import pkg_resources app=Flas...
3eb37589ab7a2e58922a69f42bbc1ec443df44ed
addons/purchase/models/stock_config_settings.py
addons/purchase/models/stock_config_settings.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockConfigSettings(models.TransientModel): _inherit = 'stock.config.settings' po_lead = fields.Float(related='company_id.po_lead', default=lambda self: self.env.user...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockConfigSettings(models.TransientModel): _inherit = 'stock.config.settings' po_lead = fields.Float(related='company_id.po_lead') use_po_lead = fields.Boolean( ...
Remove useless default value for po_lead
[IMP] purchase: Remove useless default value for po_lead
Python
agpl-3.0
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockConfigSettings(models.TransientModel): _inherit = 'stock.config.settings' po_lead = fields.Float(related='company_id.po_lead', default=lambda self: self.env.user...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockConfigSettings(models.TransientModel): _inherit = 'stock.config.settings' po_lead = fields.Float(related='company_id.po_lead') use_po_lead = fields.Boolean( ...
<commit_before># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockConfigSettings(models.TransientModel): _inherit = 'stock.config.settings' po_lead = fields.Float(related='company_id.po_lead', default=lambda self...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockConfigSettings(models.TransientModel): _inherit = 'stock.config.settings' po_lead = fields.Float(related='company_id.po_lead') use_po_lead = fields.Boolean( ...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockConfigSettings(models.TransientModel): _inherit = 'stock.config.settings' po_lead = fields.Float(related='company_id.po_lead', default=lambda self: self.env.user...
<commit_before># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class StockConfigSettings(models.TransientModel): _inherit = 'stock.config.settings' po_lead = fields.Float(related='company_id.po_lead', default=lambda self...
a2ffa3d02ef4b7cd345602b475f86ac172bd7c6c
support/jenkins/buildAllModuleCombination.py
support/jenkins/buildAllModuleCombination.py
import os from subprocess import call from itertools import product, repeat # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): settings.ap...
import os from subprocess import call from itertools import product, repeat import shutil # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): ...
Use python internal functions for generating, removing and changing directories
Use python internal functions for generating, removing and changing directories
Python
mit
OpenSpace/OpenSpace,OpenSpace/OpenSpace,OpenSpace/OpenSpace,OpenSpace/OpenSpace
import os from subprocess import call from itertools import product, repeat # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): settings.ap...
import os from subprocess import call from itertools import product, repeat import shutil # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): ...
<commit_before>import os from subprocess import call from itertools import product, repeat # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): ...
import os from subprocess import call from itertools import product, repeat import shutil # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): ...
import os from subprocess import call from itertools import product, repeat # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): settings.ap...
<commit_before>import os from subprocess import call from itertools import product, repeat # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): ...
d8d6647c1710cd0d66119da4e5a604578efb4bc7
scikits/talkbox/__init__.py
scikits/talkbox/__init__.py
__all__ = [] from tools import * import tools __all__ += tools.__all__ import linpred from linpred import * __all__ += linpred.__all__ from numpy.testing import Tester test = Tester().test bench = Tester().bench
__all__ = [] from tools import * import tools __all__ += tools.__all__ import linpred from linpred import * __all__ += linpred.__all__ import version from numpy.testing import Tester test = Tester().test bench = Tester().bench
Make version module available in main namespace.
Make version module available in main namespace.
Python
mit
cournape/talkbox,cournape/talkbox
__all__ = [] from tools import * import tools __all__ += tools.__all__ import linpred from linpred import * __all__ += linpred.__all__ from numpy.testing import Tester test = Tester().test bench = Tester().bench Make version module available in main namespace.
__all__ = [] from tools import * import tools __all__ += tools.__all__ import linpred from linpred import * __all__ += linpred.__all__ import version from numpy.testing import Tester test = Tester().test bench = Tester().bench
<commit_before>__all__ = [] from tools import * import tools __all__ += tools.__all__ import linpred from linpred import * __all__ += linpred.__all__ from numpy.testing import Tester test = Tester().test bench = Tester().bench <commit_msg>Make version module available in main namespace.<commit_after>
__all__ = [] from tools import * import tools __all__ += tools.__all__ import linpred from linpred import * __all__ += linpred.__all__ import version from numpy.testing import Tester test = Tester().test bench = Tester().bench
__all__ = [] from tools import * import tools __all__ += tools.__all__ import linpred from linpred import * __all__ += linpred.__all__ from numpy.testing import Tester test = Tester().test bench = Tester().bench Make version module available in main namespace.__all__ = [] from tools import * import tools __all__ +...
<commit_before>__all__ = [] from tools import * import tools __all__ += tools.__all__ import linpred from linpred import * __all__ += linpred.__all__ from numpy.testing import Tester test = Tester().test bench = Tester().bench <commit_msg>Make version module available in main namespace.<commit_after>__all__ = [] f...
31ee84042a12fc65be539de896daf755b342d9a0
junction/proposals/permissions.py
junction/proposals/permissions.py
# -*- coding: utf-8 -*- from django.core.exceptions import PermissionDenied from junction.conferences.models import ConferenceProposalReviewer from .models import ProposalSectionReviewer def is_proposal_author(user, proposal): return user.is_authenticated() and proposal.author == user def is_proposal_reviewer...
# -*- coding: utf-8 -*- from django.core.exceptions import PermissionDenied from junction.conferences.models import ConferenceProposalReviewer from .models import ProposalSectionReviewer def is_proposal_author(user, proposal): return user.is_authenticated() and proposal.author == user def is_proposal_reviewer...
Move check for authentication to top
Move check for authentication to top
Python
mit
ChillarAnand/junction,pythonindia/junction,ChillarAnand/junction,ChillarAnand/junction,pythonindia/junction,ChillarAnand/junction,pythonindia/junction,pythonindia/junction
# -*- coding: utf-8 -*- from django.core.exceptions import PermissionDenied from junction.conferences.models import ConferenceProposalReviewer from .models import ProposalSectionReviewer def is_proposal_author(user, proposal): return user.is_authenticated() and proposal.author == user def is_proposal_reviewer...
# -*- coding: utf-8 -*- from django.core.exceptions import PermissionDenied from junction.conferences.models import ConferenceProposalReviewer from .models import ProposalSectionReviewer def is_proposal_author(user, proposal): return user.is_authenticated() and proposal.author == user def is_proposal_reviewer...
<commit_before># -*- coding: utf-8 -*- from django.core.exceptions import PermissionDenied from junction.conferences.models import ConferenceProposalReviewer from .models import ProposalSectionReviewer def is_proposal_author(user, proposal): return user.is_authenticated() and proposal.author == user def is_pr...
# -*- coding: utf-8 -*- from django.core.exceptions import PermissionDenied from junction.conferences.models import ConferenceProposalReviewer from .models import ProposalSectionReviewer def is_proposal_author(user, proposal): return user.is_authenticated() and proposal.author == user def is_proposal_reviewer...
# -*- coding: utf-8 -*- from django.core.exceptions import PermissionDenied from junction.conferences.models import ConferenceProposalReviewer from .models import ProposalSectionReviewer def is_proposal_author(user, proposal): return user.is_authenticated() and proposal.author == user def is_proposal_reviewer...
<commit_before># -*- coding: utf-8 -*- from django.core.exceptions import PermissionDenied from junction.conferences.models import ConferenceProposalReviewer from .models import ProposalSectionReviewer def is_proposal_author(user, proposal): return user.is_authenticated() and proposal.author == user def is_pr...
c67a468d9b02e396c184305dc7b1bbb97982cf7b
python/testData/debug/test_multithread.py
python/testData/debug/test_multithread.py
try: import thread except : import _thread as thread import threading def bar(y): z = 100 + y print("Z=%d"%z) t = None def foo(x): global t y = x + 1 print("Y=%d"%y) t = threading.Thread(target=bar, args=(y,)) t.start() id = thread.start_new_thread(foo, (1,)) while True: p...
try: import thread except : import _thread as thread import threading from time import sleep def bar(y): z = 100 + y print("Z=%d"%z) t = None def foo(x): global t y = x + 1 print("Y=%d"%y) t = threading.Thread(target=bar, args=(y,)) t.start() id = thread.start_new_thread(foo, (...
Fix tests: add sleep to the main thread in order to stop in the child threads on the slow IronPython.
Fix tests: add sleep to the main thread in order to stop in the child threads on the slow IronPython.
Python
apache-2.0
FHannes/intellij-community,signed/intellij-community,xfournet/intellij-community,semonte/intellij-community,mglukhikh/intellij-community,ibinti/intellij-community,youdonghai/intellij-community,xfournet/intellij-community,hurricup/intellij-community,salguarnieri/intellij-community,da1z/intellij-community,hurricup/intell...
try: import thread except : import _thread as thread import threading def bar(y): z = 100 + y print("Z=%d"%z) t = None def foo(x): global t y = x + 1 print("Y=%d"%y) t = threading.Thread(target=bar, args=(y,)) t.start() id = thread.start_new_thread(foo, (1,)) while True: p...
try: import thread except : import _thread as thread import threading from time import sleep def bar(y): z = 100 + y print("Z=%d"%z) t = None def foo(x): global t y = x + 1 print("Y=%d"%y) t = threading.Thread(target=bar, args=(y,)) t.start() id = thread.start_new_thread(foo, (...
<commit_before>try: import thread except : import _thread as thread import threading def bar(y): z = 100 + y print("Z=%d"%z) t = None def foo(x): global t y = x + 1 print("Y=%d"%y) t = threading.Thread(target=bar, args=(y,)) t.start() id = thread.start_new_thread(foo, (1,)) wh...
try: import thread except : import _thread as thread import threading from time import sleep def bar(y): z = 100 + y print("Z=%d"%z) t = None def foo(x): global t y = x + 1 print("Y=%d"%y) t = threading.Thread(target=bar, args=(y,)) t.start() id = thread.start_new_thread(foo, (...
try: import thread except : import _thread as thread import threading def bar(y): z = 100 + y print("Z=%d"%z) t = None def foo(x): global t y = x + 1 print("Y=%d"%y) t = threading.Thread(target=bar, args=(y,)) t.start() id = thread.start_new_thread(foo, (1,)) while True: p...
<commit_before>try: import thread except : import _thread as thread import threading def bar(y): z = 100 + y print("Z=%d"%z) t = None def foo(x): global t y = x + 1 print("Y=%d"%y) t = threading.Thread(target=bar, args=(y,)) t.start() id = thread.start_new_thread(foo, (1,)) wh...
7aedf3e0b4e6d3f75f00e55e7b6deb02cbacffc0
mff_rams_plugin/automated_emails.py
mff_rams_plugin/automated_emails.py
from uber.config import c from uber.automated_emails import MarketplaceEmailFixture from uber.utils import days_before MarketplaceEmailFixture( 'Your {EVENT_NAME} ({EVENT_DATE}) Dealer registration is due in one week', 'dealers/payment_reminder.txt', lambda g: g.status == c.APPROVED and days_before(7, g.d...
from uber.config import c from uber.automated_emails import MarketplaceEmailFixture from uber.utils import days_before MarketplaceEmailFixture( 'Your {EVENT_NAME} ({EVENT_DATE}) Dealer registration is due in one week', 'dealers/payment_reminder.txt', lambda g: g.status == c.APPROVED and days_before(7, g.d...
Fix 'last chance' reminder email Both payment reminder emails were accidentally configured to go out at the same time.
Fix 'last chance' reminder email Both payment reminder emails were accidentally configured to go out at the same time.
Python
agpl-3.0
MidwestFurryFandom/mff-rams-plugin,MidwestFurryFandom/mff-rams-plugin
from uber.config import c from uber.automated_emails import MarketplaceEmailFixture from uber.utils import days_before MarketplaceEmailFixture( 'Your {EVENT_NAME} ({EVENT_DATE}) Dealer registration is due in one week', 'dealers/payment_reminder.txt', lambda g: g.status == c.APPROVED and days_before(7, g.d...
from uber.config import c from uber.automated_emails import MarketplaceEmailFixture from uber.utils import days_before MarketplaceEmailFixture( 'Your {EVENT_NAME} ({EVENT_DATE}) Dealer registration is due in one week', 'dealers/payment_reminder.txt', lambda g: g.status == c.APPROVED and days_before(7, g.d...
<commit_before>from uber.config import c from uber.automated_emails import MarketplaceEmailFixture from uber.utils import days_before MarketplaceEmailFixture( 'Your {EVENT_NAME} ({EVENT_DATE}) Dealer registration is due in one week', 'dealers/payment_reminder.txt', lambda g: g.status == c.APPROVED and day...
from uber.config import c from uber.automated_emails import MarketplaceEmailFixture from uber.utils import days_before MarketplaceEmailFixture( 'Your {EVENT_NAME} ({EVENT_DATE}) Dealer registration is due in one week', 'dealers/payment_reminder.txt', lambda g: g.status == c.APPROVED and days_before(7, g.d...
from uber.config import c from uber.automated_emails import MarketplaceEmailFixture from uber.utils import days_before MarketplaceEmailFixture( 'Your {EVENT_NAME} ({EVENT_DATE}) Dealer registration is due in one week', 'dealers/payment_reminder.txt', lambda g: g.status == c.APPROVED and days_before(7, g.d...
<commit_before>from uber.config import c from uber.automated_emails import MarketplaceEmailFixture from uber.utils import days_before MarketplaceEmailFixture( 'Your {EVENT_NAME} ({EVENT_DATE}) Dealer registration is due in one week', 'dealers/payment_reminder.txt', lambda g: g.status == c.APPROVED and day...
7bbd2effa7d1b07e3c924b23ed082bf3dcd2920e
hungarian-nltk/src/snowball_stemmer_sentence.py
hungarian-nltk/src/snowball_stemmer_sentence.py
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer class SnowballStemmerSentence: def __init__(self, tokenize_sentence, stemmer = HungarianStemmer()): self.sentence = tokenize_sentence self.stemmer = stemmer def p...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer class SnowballStemmerSentence: def __init__(self, tokenize_sentence, stemmer = HungarianStemmer()): self.sentence = tokenize_sentence self.stemmer = stemmer def p...
Delete testcases from src file
Delete testcases from src file
Python
apache-2.0
davidpgero/hungarian-nltk
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer class SnowballStemmerSentence: def __init__(self, tokenize_sentence, stemmer = HungarianStemmer()): self.sentence = tokenize_sentence self.stemmer = stemmer def p...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer class SnowballStemmerSentence: def __init__(self, tokenize_sentence, stemmer = HungarianStemmer()): self.sentence = tokenize_sentence self.stemmer = stemmer def p...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer class SnowballStemmerSentence: def __init__(self, tokenize_sentence, stemmer = HungarianStemmer()): self.sentence = tokenize_sentence self.stemmer = ste...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer class SnowballStemmerSentence: def __init__(self, tokenize_sentence, stemmer = HungarianStemmer()): self.sentence = tokenize_sentence self.stemmer = stemmer def p...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer class SnowballStemmerSentence: def __init__(self, tokenize_sentence, stemmer = HungarianStemmer()): self.sentence = tokenize_sentence self.stemmer = stemmer def p...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from nltk.stem.snowball import HungarianStemmer class SnowballStemmerSentence: def __init__(self, tokenize_sentence, stemmer = HungarianStemmer()): self.sentence = tokenize_sentence self.stemmer = ste...
763073bc71e59953b7010840fc7923fc15881265
tests/scoring_engine/models/test_settings.py
tests/scoring_engine/models/test_settings.py
from scoring_engine.models.setting import Setting from tests.scoring_engine.unit_test import UnitTest class TestSetting(UnitTest): def test_init_setting(self): setting = Setting(name='test_setting', value='test value example') assert setting.id is None assert setting.name == 'test_settin...
from scoring_engine.models.setting import Setting from tests.scoring_engine.unit_test import UnitTest class TestSetting(UnitTest): def test_init_setting(self): setting = Setting(name='test_setting', value='test value example') assert setting.id is None assert setting.name == 'test_settin...
Remove leftover parameter in settings tests
Remove leftover parameter in settings tests
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
from scoring_engine.models.setting import Setting from tests.scoring_engine.unit_test import UnitTest class TestSetting(UnitTest): def test_init_setting(self): setting = Setting(name='test_setting', value='test value example') assert setting.id is None assert setting.name == 'test_settin...
from scoring_engine.models.setting import Setting from tests.scoring_engine.unit_test import UnitTest class TestSetting(UnitTest): def test_init_setting(self): setting = Setting(name='test_setting', value='test value example') assert setting.id is None assert setting.name == 'test_settin...
<commit_before>from scoring_engine.models.setting import Setting from tests.scoring_engine.unit_test import UnitTest class TestSetting(UnitTest): def test_init_setting(self): setting = Setting(name='test_setting', value='test value example') assert setting.id is None assert setting.name ...
from scoring_engine.models.setting import Setting from tests.scoring_engine.unit_test import UnitTest class TestSetting(UnitTest): def test_init_setting(self): setting = Setting(name='test_setting', value='test value example') assert setting.id is None assert setting.name == 'test_settin...
from scoring_engine.models.setting import Setting from tests.scoring_engine.unit_test import UnitTest class TestSetting(UnitTest): def test_init_setting(self): setting = Setting(name='test_setting', value='test value example') assert setting.id is None assert setting.name == 'test_settin...
<commit_before>from scoring_engine.models.setting import Setting from tests.scoring_engine.unit_test import UnitTest class TestSetting(UnitTest): def test_init_setting(self): setting = Setting(name='test_setting', value='test value example') assert setting.id is None assert setting.name ...
b025558ecf354894132fcfc9bda33bd8a627a27e
lib/python/mod_python/__init__.py
lib/python/mod_python/__init__.py
# # Copyright 2004 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
# # Copyright 2004 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
Fix for MODPYTHON-55 : added a version attribute to the mod_python package.
Fix for MODPYTHON-55 : added a version attribute to the mod_python package.
Python
apache-2.0
grisha/mod_python,carlmcdade/mod_python,dacaiguoguo/mod_python,dacaiguoguo/mod_python,dacaiguoguo/mod_python,grisha/mod_python,runt18/mod_python,runt18/mod_python,carlmcdade/mod_python,grisha/mod_python,runt18/mod_python,carlmcdade/mod_python
# # Copyright 2004 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
# # Copyright 2004 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
<commit_before> # # Copyright 2004 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# # Copyright 2004 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
# # Copyright 2004 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
<commit_before> # # Copyright 2004 Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
087a58c80d0c0764881fdf45d4bdf997a99de29f
srv/budget.py
srv/budget.py
""" Main budget web app (backend) Written by Fela Maslen, 2016 """ from flask import Flask, request, render_template from srv.config import PIE_TOLERANCE from srv.misc import get_serial from srv.rest_api import WebAPI APP = Flask('budget') @APP.route('/api', methods=['GET', 'POST']) def api(): """ api entry poi...
""" Main budget web app (backend) Written by Fela Maslen, 2016 """ from flask import Flask, request, render_template from srv.config import PIE_TOLERANCE from srv.misc import get_serial from srv.rest_api import WebAPI APP = Flask('budget') @APP.route('/api', methods=['GET', 'POST']) def api(): """ api entry poi...
Add index.html alias on api
Add index.html alias on api
Python
mit
felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget
""" Main budget web app (backend) Written by Fela Maslen, 2016 """ from flask import Flask, request, render_template from srv.config import PIE_TOLERANCE from srv.misc import get_serial from srv.rest_api import WebAPI APP = Flask('budget') @APP.route('/api', methods=['GET', 'POST']) def api(): """ api entry poi...
""" Main budget web app (backend) Written by Fela Maslen, 2016 """ from flask import Flask, request, render_template from srv.config import PIE_TOLERANCE from srv.misc import get_serial from srv.rest_api import WebAPI APP = Flask('budget') @APP.route('/api', methods=['GET', 'POST']) def api(): """ api entry poi...
<commit_before>""" Main budget web app (backend) Written by Fela Maslen, 2016 """ from flask import Flask, request, render_template from srv.config import PIE_TOLERANCE from srv.misc import get_serial from srv.rest_api import WebAPI APP = Flask('budget') @APP.route('/api', methods=['GET', 'POST']) def api(): ""...
""" Main budget web app (backend) Written by Fela Maslen, 2016 """ from flask import Flask, request, render_template from srv.config import PIE_TOLERANCE from srv.misc import get_serial from srv.rest_api import WebAPI APP = Flask('budget') @APP.route('/api', methods=['GET', 'POST']) def api(): """ api entry poi...
""" Main budget web app (backend) Written by Fela Maslen, 2016 """ from flask import Flask, request, render_template from srv.config import PIE_TOLERANCE from srv.misc import get_serial from srv.rest_api import WebAPI APP = Flask('budget') @APP.route('/api', methods=['GET', 'POST']) def api(): """ api entry poi...
<commit_before>""" Main budget web app (backend) Written by Fela Maslen, 2016 """ from flask import Flask, request, render_template from srv.config import PIE_TOLERANCE from srv.misc import get_serial from srv.rest_api import WebAPI APP = Flask('budget') @APP.route('/api', methods=['GET', 'POST']) def api(): ""...
c02bf0729872450110de981cfb016ea0e864f93b
ato_children/api/filters.py
ato_children/api/filters.py
import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region']
import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region', 'status']
Enable status filter in API
Enable status filter in API
Python
mit
webknjaz/webchallenge-ato-children,webknjaz/webchallenge-ato-children,webknjaz/webchallenge-ato-children,webknjaz/webchallenge-ato-children
import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region'] Enable status filter in API
import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region', 'status']
<commit_before>import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region'] <commit_msg>Enable status filter in API<commit_after>
import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region', 'status']
import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region'] Enable status filter in APIimport django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): ...
<commit_before>import django_filters from ..models import Gift class GiftFilter(django_filters.FilterSet): """docstring for GiftFilter""" class Meta: model = Gift fields = ['region'] <commit_msg>Enable status filter in API<commit_after>import django_filters from ..models import Gift class ...
64c937439911760c7fdc0c70af323381ad13b86d
fellowms/forms.py
fellowms/forms.py
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow exclude = [ "home_lon", "home_lat", "inauguration_year", "mentor", ] ...
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow exclude = [ "home_lon", "home_lat", "inauguration_year", "funding_notes", ...
Update form to handle notes about funding
Update form to handle notes about funding
Python
bsd-3-clause
softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow exclude = [ "home_lon", "home_lat", "inauguration_year", "mentor", ] ...
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow exclude = [ "home_lon", "home_lat", "inauguration_year", "funding_notes", ...
<commit_before>from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow exclude = [ "home_lon", "home_lat", "inauguration_year", "mentor", ...
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow exclude = [ "home_lon", "home_lat", "inauguration_year", "funding_notes", ...
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow exclude = [ "home_lon", "home_lat", "inauguration_year", "mentor", ] ...
<commit_before>from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow exclude = [ "home_lon", "home_lat", "inauguration_year", "mentor", ...
7ea233b7f955f7dbb291d0662fe321cddfceba80
mopidy/frontends/lastfm/__init__.py
mopidy/frontends/lastfm/__init__.py
from __future__ import unicode_literals import mopidy from mopidy import ext from mopidy.exceptions import ExtensionError __doc__ = """ Frontend which scrobbles the music you play to your `Last.fm <http://www.last.fm>`_ profile. .. note:: This frontend requires a free user account at Last.fm. **Dependencies:*...
from __future__ import unicode_literals import mopidy from mopidy import exceptions, ext from mopidy.utils import config, formatting default_config = """ [ext.lastfm] # If the Last.fm extension should be enabled or not enabled = true # Your Last.fm username username = # Your Last.fm password password = """ __doc...
Add default config and config schema
lastfm: Add default config and config schema
Python
apache-2.0
diandiankan/mopidy,jmarsik/mopidy,ZenithDK/mopidy,diandiankan/mopidy,bacontext/mopidy,ali/mopidy,jcass77/mopidy,quartz55/mopidy,rawdlite/mopidy,priestd09/mopidy,kingosticks/mopidy,mopidy/mopidy,bencevans/mopidy,swak/mopidy,mokieyue/mopidy,hkariti/mopidy,quartz55/mopidy,kingosticks/mopidy,vrs01/mopidy,glogiotatidis/mopi...
from __future__ import unicode_literals import mopidy from mopidy import ext from mopidy.exceptions import ExtensionError __doc__ = """ Frontend which scrobbles the music you play to your `Last.fm <http://www.last.fm>`_ profile. .. note:: This frontend requires a free user account at Last.fm. **Dependencies:*...
from __future__ import unicode_literals import mopidy from mopidy import exceptions, ext from mopidy.utils import config, formatting default_config = """ [ext.lastfm] # If the Last.fm extension should be enabled or not enabled = true # Your Last.fm username username = # Your Last.fm password password = """ __doc...
<commit_before>from __future__ import unicode_literals import mopidy from mopidy import ext from mopidy.exceptions import ExtensionError __doc__ = """ Frontend which scrobbles the music you play to your `Last.fm <http://www.last.fm>`_ profile. .. note:: This frontend requires a free user account at Last.fm. *...
from __future__ import unicode_literals import mopidy from mopidy import exceptions, ext from mopidy.utils import config, formatting default_config = """ [ext.lastfm] # If the Last.fm extension should be enabled or not enabled = true # Your Last.fm username username = # Your Last.fm password password = """ __doc...
from __future__ import unicode_literals import mopidy from mopidy import ext from mopidy.exceptions import ExtensionError __doc__ = """ Frontend which scrobbles the music you play to your `Last.fm <http://www.last.fm>`_ profile. .. note:: This frontend requires a free user account at Last.fm. **Dependencies:*...
<commit_before>from __future__ import unicode_literals import mopidy from mopidy import ext from mopidy.exceptions import ExtensionError __doc__ = """ Frontend which scrobbles the music you play to your `Last.fm <http://www.last.fm>`_ profile. .. note:: This frontend requires a free user account at Last.fm. *...
79cb3d5b8fdca5eba436f0c879633d1994f857a5
detect_tone.py
detect_tone.py
from gz_dsp import * from cfg import * # By FFT, I mean Goertzel transform def detect_tone(signal): ideal_samples_per_fft = SAMPLE_FREQ/float(FFT_FREQ) samples_per_cycle = SAMPLE_FREQ/MORSE_FREQ aspf = actual_samples_per_fft = int(samples_per_cycle*max(round(ideal_samples_per_fft/samples_per_cycle), 1)) coeff...
from gz_dsp import * from cfg import * def detect_tone(signal): ideal_samples_per_transform = SAMPLE_FREQ/float(transform_FREQ) samples_per_cycle = SAMPLE_FREQ/MORSE_FREQ aspt = actual_samples_per_transform = int(samples_per_cycle*max(round(ideal_samples_per_transform/samples_per_cycle), 1)) coeffs = [] for ...
Change variable names to reflect that it doesn't use FFT's anymore
Change variable names to reflect that it doesn't use FFT's anymore
Python
mit
nickodell/morse-code
from gz_dsp import * from cfg import * # By FFT, I mean Goertzel transform def detect_tone(signal): ideal_samples_per_fft = SAMPLE_FREQ/float(FFT_FREQ) samples_per_cycle = SAMPLE_FREQ/MORSE_FREQ aspf = actual_samples_per_fft = int(samples_per_cycle*max(round(ideal_samples_per_fft/samples_per_cycle), 1)) coeff...
from gz_dsp import * from cfg import * def detect_tone(signal): ideal_samples_per_transform = SAMPLE_FREQ/float(transform_FREQ) samples_per_cycle = SAMPLE_FREQ/MORSE_FREQ aspt = actual_samples_per_transform = int(samples_per_cycle*max(round(ideal_samples_per_transform/samples_per_cycle), 1)) coeffs = [] for ...
<commit_before>from gz_dsp import * from cfg import * # By FFT, I mean Goertzel transform def detect_tone(signal): ideal_samples_per_fft = SAMPLE_FREQ/float(FFT_FREQ) samples_per_cycle = SAMPLE_FREQ/MORSE_FREQ aspf = actual_samples_per_fft = int(samples_per_cycle*max(round(ideal_samples_per_fft/samples_per_cycle),...
from gz_dsp import * from cfg import * def detect_tone(signal): ideal_samples_per_transform = SAMPLE_FREQ/float(transform_FREQ) samples_per_cycle = SAMPLE_FREQ/MORSE_FREQ aspt = actual_samples_per_transform = int(samples_per_cycle*max(round(ideal_samples_per_transform/samples_per_cycle), 1)) coeffs = [] for ...
from gz_dsp import * from cfg import * # By FFT, I mean Goertzel transform def detect_tone(signal): ideal_samples_per_fft = SAMPLE_FREQ/float(FFT_FREQ) samples_per_cycle = SAMPLE_FREQ/MORSE_FREQ aspf = actual_samples_per_fft = int(samples_per_cycle*max(round(ideal_samples_per_fft/samples_per_cycle), 1)) coeff...
<commit_before>from gz_dsp import * from cfg import * # By FFT, I mean Goertzel transform def detect_tone(signal): ideal_samples_per_fft = SAMPLE_FREQ/float(FFT_FREQ) samples_per_cycle = SAMPLE_FREQ/MORSE_FREQ aspf = actual_samples_per_fft = int(samples_per_cycle*max(round(ideal_samples_per_fft/samples_per_cycle),...
135e579f8d087bff88e0d67addc455210a0866da
django/applications/catmaid/control/__init__.py
django/applications/catmaid/control/__init__.py
from common import * from connector import * from label import * from link import * from neurohdf import * from neuron import * from node import * from object import * from project import * from search import * from skeletongroup import * from skeletonexport import * from skeleton import * from stack import * from stat...
from common import * from connector import * from label import * from link import * from neurohdf import * from neuron import * from node import * from object import * from project import * from search import * from skeletongroup import * from skeletonexport import * from skeleton import * from stack import * from stat...
Remove superfluous importer namespace import in catmaid.control
Remove superfluous importer namespace import in catmaid.control I double checked that no importer methods are used directly through the catmaid.control module. This relates to issue #570.
Python
agpl-3.0
fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID
from common import * from connector import * from label import * from link import * from neurohdf import * from neuron import * from node import * from object import * from project import * from search import * from skeletongroup import * from skeletonexport import * from skeleton import * from stack import * from stat...
from common import * from connector import * from label import * from link import * from neurohdf import * from neuron import * from node import * from object import * from project import * from search import * from skeletongroup import * from skeletonexport import * from skeleton import * from stack import * from stat...
<commit_before>from common import * from connector import * from label import * from link import * from neurohdf import * from neuron import * from node import * from object import * from project import * from search import * from skeletongroup import * from skeletonexport import * from skeleton import * from stack imp...
from common import * from connector import * from label import * from link import * from neurohdf import * from neuron import * from node import * from object import * from project import * from search import * from skeletongroup import * from skeletonexport import * from skeleton import * from stack import * from stat...
from common import * from connector import * from label import * from link import * from neurohdf import * from neuron import * from node import * from object import * from project import * from search import * from skeletongroup import * from skeletonexport import * from skeleton import * from stack import * from stat...
<commit_before>from common import * from connector import * from label import * from link import * from neurohdf import * from neuron import * from node import * from object import * from project import * from search import * from skeletongroup import * from skeletonexport import * from skeleton import * from stack imp...
c5a1eab4cc08e26d852cc9e1f73478c65174af3c
students/psbriant/final_project/test_clean_data.py
students/psbriant/final_project/test_clean_data.py
""" Name: Paul Briant Date: 12/11/16 Class: Introduction to Python Assignment: Final Project Description: Tests for Final Project """ import clean_data as cd import matplotlib.pyplot as plt import pandas import pytest def get_data(): """ Retrieve data from csv file to test. """ data = pandas.read_cs...
""" Name: Paul Briant Date: 12/11/16 Class: Introduction to Python Assignment: Final Project Description: Tests for Final Project """ import clean_data as cd import matplotlib.pyplot as plt import pandas import pytest def get_data(): """ Retrieve data from csv file to test. """ data = pandas.read_cs...
Add empty test function for user interface.
Add empty test function for user interface.
Python
unlicense
UWPCE-PythonCert/IntroPython2016,weidnem/IntroPython2016,weidnem/IntroPython2016,UWPCE-PythonCert/IntroPython2016,weidnem/IntroPython2016,UWPCE-PythonCert/IntroPython2016
""" Name: Paul Briant Date: 12/11/16 Class: Introduction to Python Assignment: Final Project Description: Tests for Final Project """ import clean_data as cd import matplotlib.pyplot as plt import pandas import pytest def get_data(): """ Retrieve data from csv file to test. """ data = pandas.read_cs...
""" Name: Paul Briant Date: 12/11/16 Class: Introduction to Python Assignment: Final Project Description: Tests for Final Project """ import clean_data as cd import matplotlib.pyplot as plt import pandas import pytest def get_data(): """ Retrieve data from csv file to test. """ data = pandas.read_cs...
<commit_before>""" Name: Paul Briant Date: 12/11/16 Class: Introduction to Python Assignment: Final Project Description: Tests for Final Project """ import clean_data as cd import matplotlib.pyplot as plt import pandas import pytest def get_data(): """ Retrieve data from csv file to test. """ data =...
""" Name: Paul Briant Date: 12/11/16 Class: Introduction to Python Assignment: Final Project Description: Tests for Final Project """ import clean_data as cd import matplotlib.pyplot as plt import pandas import pytest def get_data(): """ Retrieve data from csv file to test. """ data = pandas.read_cs...
""" Name: Paul Briant Date: 12/11/16 Class: Introduction to Python Assignment: Final Project Description: Tests for Final Project """ import clean_data as cd import matplotlib.pyplot as plt import pandas import pytest def get_data(): """ Retrieve data from csv file to test. """ data = pandas.read_cs...
<commit_before>""" Name: Paul Briant Date: 12/11/16 Class: Introduction to Python Assignment: Final Project Description: Tests for Final Project """ import clean_data as cd import matplotlib.pyplot as plt import pandas import pytest def get_data(): """ Retrieve data from csv file to test. """ data =...
cd1b68aaaefffc15ce10789445d7749c99deb3d4
shingen/generators/hosts.py
shingen/generators/hosts.py
from ..shinkenconfig import ConfigObject def generate_host_config(config, project_name, instance): co = ConfigObject('host') co.properties['use'] = 'generic-host' co.properties['host_name'] = instance['name'] co.properties['address'] = instance['ip'][0] projects = [project_name, config.get('default...
from ..shinkenconfig import ConfigObject def generate_host_config(config, project_name, instance): co = ConfigObject('host') co.properties['use'] = 'generic-host' co.properties['host_name'] = instance['name'] co.properties['address'] = instance['ip'][0] projects = [project_name, config.get('default...
Put project name in 'notes' field of host
Put project name in 'notes' field of host Labs' graphite metrics architecture means we need both the project name and the hostname to find a full path to our host. Abusing this field for that purpose. Change-Id: If097526f413f36407acdff852cc81216f9c84556
Python
apache-2.0
wikimedia/operations-software-shinkengen
from ..shinkenconfig import ConfigObject def generate_host_config(config, project_name, instance): co = ConfigObject('host') co.properties['use'] = 'generic-host' co.properties['host_name'] = instance['name'] co.properties['address'] = instance['ip'][0] projects = [project_name, config.get('default...
from ..shinkenconfig import ConfigObject def generate_host_config(config, project_name, instance): co = ConfigObject('host') co.properties['use'] = 'generic-host' co.properties['host_name'] = instance['name'] co.properties['address'] = instance['ip'][0] projects = [project_name, config.get('default...
<commit_before>from ..shinkenconfig import ConfigObject def generate_host_config(config, project_name, instance): co = ConfigObject('host') co.properties['use'] = 'generic-host' co.properties['host_name'] = instance['name'] co.properties['address'] = instance['ip'][0] projects = [project_name, conf...
from ..shinkenconfig import ConfigObject def generate_host_config(config, project_name, instance): co = ConfigObject('host') co.properties['use'] = 'generic-host' co.properties['host_name'] = instance['name'] co.properties['address'] = instance['ip'][0] projects = [project_name, config.get('default...
from ..shinkenconfig import ConfigObject def generate_host_config(config, project_name, instance): co = ConfigObject('host') co.properties['use'] = 'generic-host' co.properties['host_name'] = instance['name'] co.properties['address'] = instance['ip'][0] projects = [project_name, config.get('default...
<commit_before>from ..shinkenconfig import ConfigObject def generate_host_config(config, project_name, instance): co = ConfigObject('host') co.properties['use'] = 'generic-host' co.properties['host_name'] = instance['name'] co.properties['address'] = instance['ip'][0] projects = [project_name, conf...
dfaf3d1461a25ca26ed7562831373603010d2f29
xml_json_import/__init__.py
xml_json_import/__init__.py
from django.conf import settings class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter')
from django.conf import settings from os import path class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_FILES_DIR): raise XmlJsonImp...
Throw exception for not existing XSLT_FILES_DIR path
Throw exception for not existing XSLT_FILES_DIR path
Python
mit
lev-veshnyakov/django-import-data,lev-veshnyakov/django-import-data
from django.conf import settings class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') Throw exception for not existing XSLT_FILES_DIR path
from django.conf import settings from os import path class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_FILES_DIR): raise XmlJsonImp...
<commit_before>from django.conf import settings class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') <commit_msg>Throw exception for not existing XSLT_FILES_DIR path<commit_af...
from django.conf import settings from os import path class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') if not path.exists(settings.XSLT_FILES_DIR): raise XmlJsonImp...
from django.conf import settings class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') Throw exception for not existing XSLT_FILES_DIR pathfrom django.conf import settings fro...
<commit_before>from django.conf import settings class XmlJsonImportModuleException(Exception): pass if not hasattr(settings, 'XSLT_FILES_DIR'): raise XmlJsonImportModuleException('Settings must contain XSLT_FILES_DIR parameter') <commit_msg>Throw exception for not existing XSLT_FILES_DIR path<commit_af...
4063752757a97c444b8913947a0890f2c2387bca
numpy/array_api/_set_functions.py
numpy/array_api/_set_functions.py
from __future__ import annotations from ._array_object import Array from typing import Tuple, Union import numpy as np def unique(x: Array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = False) -> Union[Array, Tuple[Array, ...]]: """ Array API compatible wrapper for :p...
from __future__ import annotations from ._array_object import Array from typing import Tuple, Union import numpy as np def unique(x: Array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = False) -> Union[Array, Tuple[Array, ...]]: """ Array API compatible wrapper for :p...
Fix the array API unique() function
Fix the array API unique() function
Python
bsd-3-clause
simongibbons/numpy,rgommers/numpy,numpy/numpy,numpy/numpy,charris/numpy,numpy/numpy,endolith/numpy,mattip/numpy,simongibbons/numpy,endolith/numpy,jakirkham/numpy,anntzer/numpy,seberg/numpy,anntzer/numpy,rgommers/numpy,mattip/numpy,pdebuyl/numpy,pdebuyl/numpy,mhvk/numpy,seberg/numpy,charris/numpy,seberg/numpy,endolith/n...
from __future__ import annotations from ._array_object import Array from typing import Tuple, Union import numpy as np def unique(x: Array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = False) -> Union[Array, Tuple[Array, ...]]: """ Array API compatible wrapper for :p...
from __future__ import annotations from ._array_object import Array from typing import Tuple, Union import numpy as np def unique(x: Array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = False) -> Union[Array, Tuple[Array, ...]]: """ Array API compatible wrapper for :p...
<commit_before>from __future__ import annotations from ._array_object import Array from typing import Tuple, Union import numpy as np def unique(x: Array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = False) -> Union[Array, Tuple[Array, ...]]: """ Array API compatible...
from __future__ import annotations from ._array_object import Array from typing import Tuple, Union import numpy as np def unique(x: Array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = False) -> Union[Array, Tuple[Array, ...]]: """ Array API compatible wrapper for :p...
from __future__ import annotations from ._array_object import Array from typing import Tuple, Union import numpy as np def unique(x: Array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = False) -> Union[Array, Tuple[Array, ...]]: """ Array API compatible wrapper for :p...
<commit_before>from __future__ import annotations from ._array_object import Array from typing import Tuple, Union import numpy as np def unique(x: Array, /, *, return_counts: bool = False, return_index: bool = False, return_inverse: bool = False) -> Union[Array, Tuple[Array, ...]]: """ Array API compatible...
5c2ffba0f4200a4ba501de08adfbb88504f6252a
alg_selection_sort.py
alg_selection_sort.py
def selection_sort(a_list): """Selection Sort algortihm. Concept: - Find out the max item's original slot first, - then swap it and the item at the max slot. - Iterate the procedure for the next max, etc. """ for max_slot in reversed(range(len(a_list))): select_slot = 0 ...
def selection_sort(a_list): """Selection Sort algortihm. Concept: - Find out the max item's original slot first, - then swap it and the item at the max slot. - Iterate the procedure for the next max, etc. Selection sort is more efficient than bubble sort since the former does not s...
Add comment about more efficient than bubble sort
Add comment about more efficient than bubble sort
Python
bsd-2-clause
bowen0701/algorithms_data_structures
def selection_sort(a_list): """Selection Sort algortihm. Concept: - Find out the max item's original slot first, - then swap it and the item at the max slot. - Iterate the procedure for the next max, etc. """ for max_slot in reversed(range(len(a_list))): select_slot = 0 ...
def selection_sort(a_list): """Selection Sort algortihm. Concept: - Find out the max item's original slot first, - then swap it and the item at the max slot. - Iterate the procedure for the next max, etc. Selection sort is more efficient than bubble sort since the former does not s...
<commit_before>def selection_sort(a_list): """Selection Sort algortihm. Concept: - Find out the max item's original slot first, - then swap it and the item at the max slot. - Iterate the procedure for the next max, etc. """ for max_slot in reversed(range(len(a_list))): sele...
def selection_sort(a_list): """Selection Sort algortihm. Concept: - Find out the max item's original slot first, - then swap it and the item at the max slot. - Iterate the procedure for the next max, etc. Selection sort is more efficient than bubble sort since the former does not s...
def selection_sort(a_list): """Selection Sort algortihm. Concept: - Find out the max item's original slot first, - then swap it and the item at the max slot. - Iterate the procedure for the next max, etc. """ for max_slot in reversed(range(len(a_list))): select_slot = 0 ...
<commit_before>def selection_sort(a_list): """Selection Sort algortihm. Concept: - Find out the max item's original slot first, - then swap it and the item at the max slot. - Iterate the procedure for the next max, etc. """ for max_slot in reversed(range(len(a_list))): sele...
b4932c9e95b34a875c8d5234a1aa025aa5d5dad0
migrations/versions/07ebe99161d5_add_banner_image_url_to_sessio.py
migrations/versions/07ebe99161d5_add_banner_image_url_to_sessio.py
"""add banner_image_url field to session Revision ID: 07ebe99161d5 Revises: d6b1904bea0e Create Date: 2018-11-21 19:06:35.140390 """ # revision identifiers, used by Alembic. revision = '07ebe99161d5' down_revision = 'd6b1904bea0e' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('s...
"""add banner_image_url field to session Revision ID: 07ebe99161d5 Revises: 60a132ae73f1 Create Date: 2018-11-21 19:06:35.140390 """ # revision identifiers, used by Alembic. revision = '07ebe99161d5' down_revision = '60a132ae73f1' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('s...
Update down_revision in migration file.
Update down_revision in migration file.
Python
agpl-3.0
hasgeek/funnel,hasgeek/funnel,hasgeek/funnel,hasgeek/funnel,hasgeek/funnel
"""add banner_image_url field to session Revision ID: 07ebe99161d5 Revises: d6b1904bea0e Create Date: 2018-11-21 19:06:35.140390 """ # revision identifiers, used by Alembic. revision = '07ebe99161d5' down_revision = 'd6b1904bea0e' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('s...
"""add banner_image_url field to session Revision ID: 07ebe99161d5 Revises: 60a132ae73f1 Create Date: 2018-11-21 19:06:35.140390 """ # revision identifiers, used by Alembic. revision = '07ebe99161d5' down_revision = '60a132ae73f1' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('s...
<commit_before>"""add banner_image_url field to session Revision ID: 07ebe99161d5 Revises: d6b1904bea0e Create Date: 2018-11-21 19:06:35.140390 """ # revision identifiers, used by Alembic. revision = '07ebe99161d5' down_revision = 'd6b1904bea0e' from alembic import op import sqlalchemy as sa def upgrade(): o...
"""add banner_image_url field to session Revision ID: 07ebe99161d5 Revises: 60a132ae73f1 Create Date: 2018-11-21 19:06:35.140390 """ # revision identifiers, used by Alembic. revision = '07ebe99161d5' down_revision = '60a132ae73f1' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('s...
"""add banner_image_url field to session Revision ID: 07ebe99161d5 Revises: d6b1904bea0e Create Date: 2018-11-21 19:06:35.140390 """ # revision identifiers, used by Alembic. revision = '07ebe99161d5' down_revision = 'd6b1904bea0e' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('s...
<commit_before>"""add banner_image_url field to session Revision ID: 07ebe99161d5 Revises: d6b1904bea0e Create Date: 2018-11-21 19:06:35.140390 """ # revision identifiers, used by Alembic. revision = '07ebe99161d5' down_revision = 'd6b1904bea0e' from alembic import op import sqlalchemy as sa def upgrade(): o...
906803349e6a4c37311b73a25c1787716b69c17a
glaciertests/__init__.py
glaciertests/__init__.py
from glaciertests.util import GlacierTestsConfig def purge_prefix_vaults(): conn = GlacierTestsConfig().connection() all_vaults = conn.list_vaults() for vault in all_vaults['VaultList']: if vault['VaultName'].startswith(GlacierTestsConfig().prefix()): conn.delete_vault(vault['VaultName'...
from glaciertests.util import GlacierTestsConfig def purge_prefix_vaults(): conn = GlacierTestsConfig().connection() all_vaults = conn.list_vaults() jobs = {} for vault in all_vaults['VaultList']: if vault['VaultName'].startswith(GlacierTestsConfig().prefix()): # Try to delete and ...
Remove vaults with data before and after tests.
Remove vaults with data before and after tests.
Python
mit
bouncestorage/glacier-tests,timuralp/glacier-tests,bouncestorage/glacier-tests,timuralp/glacier-tests
from glaciertests.util import GlacierTestsConfig def purge_prefix_vaults(): conn = GlacierTestsConfig().connection() all_vaults = conn.list_vaults() for vault in all_vaults['VaultList']: if vault['VaultName'].startswith(GlacierTestsConfig().prefix()): conn.delete_vault(vault['VaultName'...
from glaciertests.util import GlacierTestsConfig def purge_prefix_vaults(): conn = GlacierTestsConfig().connection() all_vaults = conn.list_vaults() jobs = {} for vault in all_vaults['VaultList']: if vault['VaultName'].startswith(GlacierTestsConfig().prefix()): # Try to delete and ...
<commit_before>from glaciertests.util import GlacierTestsConfig def purge_prefix_vaults(): conn = GlacierTestsConfig().connection() all_vaults = conn.list_vaults() for vault in all_vaults['VaultList']: if vault['VaultName'].startswith(GlacierTestsConfig().prefix()): conn.delete_vault(va...
from glaciertests.util import GlacierTestsConfig def purge_prefix_vaults(): conn = GlacierTestsConfig().connection() all_vaults = conn.list_vaults() jobs = {} for vault in all_vaults['VaultList']: if vault['VaultName'].startswith(GlacierTestsConfig().prefix()): # Try to delete and ...
from glaciertests.util import GlacierTestsConfig def purge_prefix_vaults(): conn = GlacierTestsConfig().connection() all_vaults = conn.list_vaults() for vault in all_vaults['VaultList']: if vault['VaultName'].startswith(GlacierTestsConfig().prefix()): conn.delete_vault(vault['VaultName'...
<commit_before>from glaciertests.util import GlacierTestsConfig def purge_prefix_vaults(): conn = GlacierTestsConfig().connection() all_vaults = conn.list_vaults() for vault in all_vaults['VaultList']: if vault['VaultName'].startswith(GlacierTestsConfig().prefix()): conn.delete_vault(va...
140dc4f38e3302a8478a721cbeb9176029689b38
Functions/template-python/lambda_function.py
Functions/template-python/lambda_function.py
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads def lambda_handler(event, context): print('LOG RequestId: {}\tResponse:\n\n{}'.format( context.aws_request_id, None )) return None # Comment or remove everything below before deploying...
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = True verbose = True class CWLogs(object): def __init__(self, context): self.context = context def event(self, message, ev...
Rewrite custom log format to a class, add verbosity, and vars for options.
Rewrite custom log format to a class, add verbosity, and vars for options.
Python
apache-2.0
andrewdefilippis/aws-lambda
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads def lambda_handler(event, context): print('LOG RequestId: {}\tResponse:\n\n{}'.format( context.aws_request_id, None )) return None # Comment or remove everything below before deploying...
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = True verbose = True class CWLogs(object): def __init__(self, context): self.context = context def event(self, message, ev...
<commit_before>"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads def lambda_handler(event, context): print('LOG RequestId: {}\tResponse:\n\n{}'.format( context.aws_request_id, None )) return None # Comment or remove everything below b...
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = True verbose = True class CWLogs(object): def __init__(self, context): self.context = context def event(self, message, ev...
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads def lambda_handler(event, context): print('LOG RequestId: {}\tResponse:\n\n{}'.format( context.aws_request_id, None )) return None # Comment or remove everything below before deploying...
<commit_before>"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads def lambda_handler(event, context): print('LOG RequestId: {}\tResponse:\n\n{}'.format( context.aws_request_id, None )) return None # Comment or remove everything below b...
1f5f821ac464e9986025988f6c306c742dd842fa
Instanssi/ext_blog/templatetags/blog_tags.py
Instanssi/ext_blog/templatetags/blog_tags.py
# -*- coding: utf-8 -*- from django import template from Instanssi.ext_blog.models import BlogEntry register = template.Library() @register.inclusion_tag('ext_blog/blog_messages.html') def render_blog(event_id): entries = BlogEntry.objects.filter(event_id=int(event_id), public=True) return {'entries': entrie...
# -*- coding: utf-8 -*- from django import template from Instanssi.ext_blog.models import BlogEntry register = template.Library() @register.inclusion_tag('ext_blog/blog_messages.html') def render_blog(event_id): entries = BlogEntry.objects.filter(event_id=int(event_id), public=True) return {'entries': entrie...
Tag for getting a valid RSS feed url for event.
ext_blog: Tag for getting a valid RSS feed url for event.
Python
mit
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
# -*- coding: utf-8 -*- from django import template from Instanssi.ext_blog.models import BlogEntry register = template.Library() @register.inclusion_tag('ext_blog/blog_messages.html') def render_blog(event_id): entries = BlogEntry.objects.filter(event_id=int(event_id), public=True) return {'entries': entrie...
# -*- coding: utf-8 -*- from django import template from Instanssi.ext_blog.models import BlogEntry register = template.Library() @register.inclusion_tag('ext_blog/blog_messages.html') def render_blog(event_id): entries = BlogEntry.objects.filter(event_id=int(event_id), public=True) return {'entries': entrie...
<commit_before># -*- coding: utf-8 -*- from django import template from Instanssi.ext_blog.models import BlogEntry register = template.Library() @register.inclusion_tag('ext_blog/blog_messages.html') def render_blog(event_id): entries = BlogEntry.objects.filter(event_id=int(event_id), public=True) return {'e...
# -*- coding: utf-8 -*- from django import template from Instanssi.ext_blog.models import BlogEntry register = template.Library() @register.inclusion_tag('ext_blog/blog_messages.html') def render_blog(event_id): entries = BlogEntry.objects.filter(event_id=int(event_id), public=True) return {'entries': entrie...
# -*- coding: utf-8 -*- from django import template from Instanssi.ext_blog.models import BlogEntry register = template.Library() @register.inclusion_tag('ext_blog/blog_messages.html') def render_blog(event_id): entries = BlogEntry.objects.filter(event_id=int(event_id), public=True) return {'entries': entrie...
<commit_before># -*- coding: utf-8 -*- from django import template from Instanssi.ext_blog.models import BlogEntry register = template.Library() @register.inclusion_tag('ext_blog/blog_messages.html') def render_blog(event_id): entries = BlogEntry.objects.filter(event_id=int(event_id), public=True) return {'e...
5cfcf2615e46fc3ef550159e38dc51c7362543af
readux/books/management/commands/web_export.py
readux/books/management/commands/web_export.py
from eulfedora.server import Repository from django.core.management.base import BaseCommand import shutil from readux.books import annotate, export from readux.books.models import Volume class Command(BaseCommand): help = 'Construct web export of an annotated volume' def add_arguments(self, parser): ...
from eulfedora.server import Repository from eulxml.xmlmap import load_xmlobject_from_file from django.core.management.base import BaseCommand import shutil from readux.books import annotate, export from readux.books.models import Volume from readux.books.tei import Facsimile class Command(BaseCommand): help = '...
Add an option to pass in generated TEI, for speed & troubleshooting
Add an option to pass in generated TEI, for speed & troubleshooting
Python
apache-2.0
emory-libraries/readux,emory-libraries/readux,emory-libraries/readux
from eulfedora.server import Repository from django.core.management.base import BaseCommand import shutil from readux.books import annotate, export from readux.books.models import Volume class Command(BaseCommand): help = 'Construct web export of an annotated volume' def add_arguments(self, parser): ...
from eulfedora.server import Repository from eulxml.xmlmap import load_xmlobject_from_file from django.core.management.base import BaseCommand import shutil from readux.books import annotate, export from readux.books.models import Volume from readux.books.tei import Facsimile class Command(BaseCommand): help = '...
<commit_before>from eulfedora.server import Repository from django.core.management.base import BaseCommand import shutil from readux.books import annotate, export from readux.books.models import Volume class Command(BaseCommand): help = 'Construct web export of an annotated volume' def add_arguments(self, ...
from eulfedora.server import Repository from eulxml.xmlmap import load_xmlobject_from_file from django.core.management.base import BaseCommand import shutil from readux.books import annotate, export from readux.books.models import Volume from readux.books.tei import Facsimile class Command(BaseCommand): help = '...
from eulfedora.server import Repository from django.core.management.base import BaseCommand import shutil from readux.books import annotate, export from readux.books.models import Volume class Command(BaseCommand): help = 'Construct web export of an annotated volume' def add_arguments(self, parser): ...
<commit_before>from eulfedora.server import Repository from django.core.management.base import BaseCommand import shutil from readux.books import annotate, export from readux.books.models import Volume class Command(BaseCommand): help = 'Construct web export of an annotated volume' def add_arguments(self, ...
b009c40b8cdefaa39c39851b873caa49873527bd
learning_journal/models.py
learning_journal/models.py
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ...
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ...
Remove references to User class
Remove references to User class
Python
mit
DZwell/learning_journal,DZwell/learning_journal,DZwell/learning_journal
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ...
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ...
<commit_before>import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, ses...
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ...
import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, sessionmaker, ...
<commit_before>import datetime import psycopg2 from sqlalchemy import ( Column, DateTime, Integer, Unicode, UnicodeText, ForeignKey, ) from pyramid.security import Allow, Everyone from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ( scoped_session, ses...
1ec8f02236c50f2d150daa9211701d2c91c7dfe1
paper_to_git/utilities/general.py
paper_to_git/utilities/general.py
""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: $title date: $date --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the type specified....
""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: "$title" date: "$date" --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the type specif...
Fix the metadata for posts.
Fix the metadata for posts.
Python
apache-2.0
maxking/paper-to-git,maxking/paper-to-git
""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: $title date: $date --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the type specified....
""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: "$title" date: "$date" --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the type specif...
<commit_before>""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: $title date: $date --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the ...
""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: "$title" date: "$date" --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the type specif...
""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: $title date: $date --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the type specified....
<commit_before>""" """ from string import Template from paper_to_git.config import config __all__ = [ 'generate_metadata', ] METADATA_TEMPLATE = Template("""\ --- title: $title date: $date --- """) def generate_metadata(doc, metadata_type=None): """ Generate the appropriate metadata based on the ...
536bdc4e3ca9c68621d518cdaea8b119301f2dc3
plugins/linux/lxde_set_wallpaper.py
plugins/linux/lxde_set_wallpaper.py
import os import sys from .. import SetWallpaper class LXDESetWallpaper(SetWallpaper): def __init__(self, config): super(LXDESetWallpaper, self).__init__(config) def platform_check(self): return sys.platform == 'linux2' and self.config['linux.desktop-environment'] == 'lxde' def set(self)...
import sys from .. import SetWallpaper class LXDESetWallpaper(SetWallpaper): def __init__(self, config): super(LXDESetWallpaper, self).__init__(config) self.cycle = 0 def platform_check(self): return sys.platform == 'linux2' and self.config['linux.desktop-environment'] == 'lxde' ...
Revert "Conforming LXDESetWallpaper plugin to conform with keep option (DarwinSetWallpaper), also FastForward merge"
Revert "Conforming LXDESetWallpaper plugin to conform with keep option (DarwinSetWallpaper), also FastForward merge" This reverts commit 7212d223fe95d3042348bb29d9bd353308be2347. I really should learn to test before I push to github.
Python
mit
loktacar/wallpapermaker
import os import sys from .. import SetWallpaper class LXDESetWallpaper(SetWallpaper): def __init__(self, config): super(LXDESetWallpaper, self).__init__(config) def platform_check(self): return sys.platform == 'linux2' and self.config['linux.desktop-environment'] == 'lxde' def set(self)...
import sys from .. import SetWallpaper class LXDESetWallpaper(SetWallpaper): def __init__(self, config): super(LXDESetWallpaper, self).__init__(config) self.cycle = 0 def platform_check(self): return sys.platform == 'linux2' and self.config['linux.desktop-environment'] == 'lxde' ...
<commit_before>import os import sys from .. import SetWallpaper class LXDESetWallpaper(SetWallpaper): def __init__(self, config): super(LXDESetWallpaper, self).__init__(config) def platform_check(self): return sys.platform == 'linux2' and self.config['linux.desktop-environment'] == 'lxde' ...
import sys from .. import SetWallpaper class LXDESetWallpaper(SetWallpaper): def __init__(self, config): super(LXDESetWallpaper, self).__init__(config) self.cycle = 0 def platform_check(self): return sys.platform == 'linux2' and self.config['linux.desktop-environment'] == 'lxde' ...
import os import sys from .. import SetWallpaper class LXDESetWallpaper(SetWallpaper): def __init__(self, config): super(LXDESetWallpaper, self).__init__(config) def platform_check(self): return sys.platform == 'linux2' and self.config['linux.desktop-environment'] == 'lxde' def set(self)...
<commit_before>import os import sys from .. import SetWallpaper class LXDESetWallpaper(SetWallpaper): def __init__(self, config): super(LXDESetWallpaper, self).__init__(config) def platform_check(self): return sys.platform == 'linux2' and self.config['linux.desktop-environment'] == 'lxde' ...
1f793395eab5a8e5b90a16e8db18d9c2869eae2f
tests/main.py
tests/main.py
pytest_plugins = 'pytester' # TODO: we don't actually _need_ new-style outer classes, do we...no Spec # any longer! # TODO: trailing underscore stripping class FileCollection: def only_loads_dot_py_files(self, testdir): testdir.makepyfile(somefile=""" def hello_how_are_you(): p...
pytest_plugins = 'pytester' # TODO: we don't actually _need_ new-style outer classes, do we...no Spec # any longer! # TODO: trailing underscore stripping class FileCollection: def only_loads_dot_py_files(self, testdir): testdir.makepyfile(somefile=""" def hello_how_are_you(): p...
Implement basic file selection tests
Implement basic file selection tests
Python
bsd-2-clause
bitprophet/pytest-relaxed
pytest_plugins = 'pytester' # TODO: we don't actually _need_ new-style outer classes, do we...no Spec # any longer! # TODO: trailing underscore stripping class FileCollection: def only_loads_dot_py_files(self, testdir): testdir.makepyfile(somefile=""" def hello_how_are_you(): p...
pytest_plugins = 'pytester' # TODO: we don't actually _need_ new-style outer classes, do we...no Spec # any longer! # TODO: trailing underscore stripping class FileCollection: def only_loads_dot_py_files(self, testdir): testdir.makepyfile(somefile=""" def hello_how_are_you(): p...
<commit_before>pytest_plugins = 'pytester' # TODO: we don't actually _need_ new-style outer classes, do we...no Spec # any longer! # TODO: trailing underscore stripping class FileCollection: def only_loads_dot_py_files(self, testdir): testdir.makepyfile(somefile=""" def hello_how_are_you(): ...
pytest_plugins = 'pytester' # TODO: we don't actually _need_ new-style outer classes, do we...no Spec # any longer! # TODO: trailing underscore stripping class FileCollection: def only_loads_dot_py_files(self, testdir): testdir.makepyfile(somefile=""" def hello_how_are_you(): p...
pytest_plugins = 'pytester' # TODO: we don't actually _need_ new-style outer classes, do we...no Spec # any longer! # TODO: trailing underscore stripping class FileCollection: def only_loads_dot_py_files(self, testdir): testdir.makepyfile(somefile=""" def hello_how_are_you(): p...
<commit_before>pytest_plugins = 'pytester' # TODO: we don't actually _need_ new-style outer classes, do we...no Spec # any longer! # TODO: trailing underscore stripping class FileCollection: def only_loads_dot_py_files(self, testdir): testdir.makepyfile(somefile=""" def hello_how_are_you(): ...
728dac0dc05395f89cfe57995b85a39022981fff
chrome/test/mini_installer/uninstall_chrome.py
chrome/test/mini_installer/uninstall_chrome.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import subprocess # TODO(sukolsak): This should read the uninstall command from the registry and # run that instead. subprocess.call('mini_installer.exe --u...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Uninstall Chrome. This script reads the uninstall command from registry, calls it, and verifies the output status code. """ import _winreg import argpar...
Automate uninstallation of Chrome by running the uninstall command from the registry.
Automate uninstallation of Chrome by running the uninstall command from the registry. NOTRY=True BUG=264859 TEST= 1) Uninstall Chrome. 2) Put mini_installer.exe in the same folder as test_installer.py. 3) Run "python test_installer.py config\config.config". 4) The script will install Chrome and then uninstall Chrome. ...
Python
bsd-3-clause
jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,mogoweb/chromium-crosswalk,Just-D/chromium-1,M4sse/chromium.src,krieger-od/nwjs_chromium.src,ded...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import subprocess # TODO(sukolsak): This should read the uninstall command from the registry and # run that instead. subprocess.call('mini_installer.exe --u...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Uninstall Chrome. This script reads the uninstall command from registry, calls it, and verifies the output status code. """ import _winreg import argpar...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import subprocess # TODO(sukolsak): This should read the uninstall command from the registry and # run that instead. subprocess.call('mini_in...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Uninstall Chrome. This script reads the uninstall command from registry, calls it, and verifies the output status code. """ import _winreg import argpar...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import subprocess # TODO(sukolsak): This should read the uninstall command from the registry and # run that instead. subprocess.call('mini_installer.exe --u...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import subprocess # TODO(sukolsak): This should read the uninstall command from the registry and # run that instead. subprocess.call('mini_in...
48426b63bd4123ed6f63a38f3e4e2b401cd5c188
planetstack/core/models/__init__.py
planetstack/core/models/__init__.py
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
Add credentials module to core list
Add credentials module to core list
Python
apache-2.0
xmaruto/mcord,jermowery/xos,cboling/xos,jermowery/xos,xmaruto/mcord,cboling/xos,cboling/xos,cboling/xos,jermowery/xos,xmaruto/mcord,cboling/xos,jermowery/xos,xmaruto/mcord
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
<commit_before>from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole,...
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole, DeploymentPriv...
<commit_before>from .plcorebase import PlCoreBase from .planetstack import PlanetStack from .project import Project from .singletonmodel import SingletonModel from .service import Service from .service import ServiceAttribute from .tag import Tag from .role import Role from .site import Site,Deployment, DeploymentRole,...
24d3f19984e4bfa1ad38faf700ae53f5f4ac10bd
jay/urls.py
jay/urls.py
"""jay URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
"""jay URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
Add votes URL scheme to main URL scheme
Add votes URL scheme to main URL scheme
Python
mit
OpenJUB/jay,kuboschek/jay,OpenJUB/jay,OpenJUB/jay,kuboschek/jay,kuboschek/jay
"""jay URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
"""jay URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
<commit_before>"""jay URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home'...
"""jay URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
"""jay URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based v...
<commit_before>"""jay URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home'...
707ded0f673f44b31d0762d8210a6b94074200e8
troposphere/certificatemanager.py
troposphere/certificatemanager.py
from . import AWSObject, AWSProperty, Tags class DomainValidationOption(AWSProperty): props = { 'DomainName': (basestring, True), 'ValidationDomain': (basestring, True), } class Certificate(AWSObject): resource_type = "AWS::CertificateManager::Certificate" props = { 'DomainN...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 15.1.0 from . import AWSObject from . import AWSProperty from troposphere import Tags class DomainValidationOpti...
Update AWS::CertificateManager::Certificate per 2020-06-11 changes
Update AWS::CertificateManager::Certificate per 2020-06-11 changes
Python
bsd-2-clause
cloudtools/troposphere,cloudtools/troposphere
from . import AWSObject, AWSProperty, Tags class DomainValidationOption(AWSProperty): props = { 'DomainName': (basestring, True), 'ValidationDomain': (basestring, True), } class Certificate(AWSObject): resource_type = "AWS::CertificateManager::Certificate" props = { 'DomainN...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 15.1.0 from . import AWSObject from . import AWSProperty from troposphere import Tags class DomainValidationOpti...
<commit_before>from . import AWSObject, AWSProperty, Tags class DomainValidationOption(AWSProperty): props = { 'DomainName': (basestring, True), 'ValidationDomain': (basestring, True), } class Certificate(AWSObject): resource_type = "AWS::CertificateManager::Certificate" props = { ...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 15.1.0 from . import AWSObject from . import AWSProperty from troposphere import Tags class DomainValidationOpti...
from . import AWSObject, AWSProperty, Tags class DomainValidationOption(AWSProperty): props = { 'DomainName': (basestring, True), 'ValidationDomain': (basestring, True), } class Certificate(AWSObject): resource_type = "AWS::CertificateManager::Certificate" props = { 'DomainN...
<commit_before>from . import AWSObject, AWSProperty, Tags class DomainValidationOption(AWSProperty): props = { 'DomainName': (basestring, True), 'ValidationDomain': (basestring, True), } class Certificate(AWSObject): resource_type = "AWS::CertificateManager::Certificate" props = { ...
bf19eb9083888d33dabec2228ffaa200ce282ef8
superlists/functional_tests/test_list_item_validation.py
superlists/functional_tests/test_list_item_validation.py
from unittest import skip from .base import FunctionalTest class ItemValidationTest(FunctionalTest): def test_cannot_add_empty_list_items(self): self.fail("write me!")
from unittest import skip from .base import FunctionalTest class ItemValidationTest(FunctionalTest): def test_cannot_add_empty_list_items(self): # Edith goes to the home page and accidentally tries to submit and empty # list item. She hits Enter on the empty input box self.browser.get(self...
Create test to detect submission of empty list items
Create test to detect submission of empty list items
Python
apache-2.0
rocity/the-testing-goat,rocity/the-testing-goat
from unittest import skip from .base import FunctionalTest class ItemValidationTest(FunctionalTest): def test_cannot_add_empty_list_items(self): self.fail("write me!")Create test to detect submission of empty list items
from unittest import skip from .base import FunctionalTest class ItemValidationTest(FunctionalTest): def test_cannot_add_empty_list_items(self): # Edith goes to the home page and accidentally tries to submit and empty # list item. She hits Enter on the empty input box self.browser.get(self...
<commit_before>from unittest import skip from .base import FunctionalTest class ItemValidationTest(FunctionalTest): def test_cannot_add_empty_list_items(self): self.fail("write me!")<commit_msg>Create test to detect submission of empty list items<commit_after>
from unittest import skip from .base import FunctionalTest class ItemValidationTest(FunctionalTest): def test_cannot_add_empty_list_items(self): # Edith goes to the home page and accidentally tries to submit and empty # list item. She hits Enter on the empty input box self.browser.get(self...
from unittest import skip from .base import FunctionalTest class ItemValidationTest(FunctionalTest): def test_cannot_add_empty_list_items(self): self.fail("write me!")Create test to detect submission of empty list itemsfrom unittest import skip from .base import FunctionalTest class ItemValidationTest(Fu...
<commit_before>from unittest import skip from .base import FunctionalTest class ItemValidationTest(FunctionalTest): def test_cannot_add_empty_list_items(self): self.fail("write me!")<commit_msg>Create test to detect submission of empty list items<commit_after>from unittest import skip from .base import Fu...
2af6a3fcafc7447f15352a32507f5034b42984a6
contrail_api_cli/context.py
contrail_api_cli/context.py
class SchemaNotInitialized(Exception): pass class Context(object): _instance = None _schema = None def __new__(class_, *args, **kwargs): if not isinstance(class_._instance, class_): class_._instance = object.__new__(class_, *args, **kwargs) return class_._instance @p...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from six import add_metaclass from .utils import Singleton class SchemaNotInitialized(Exception): pass @add_metaclass(Singleton) class Context(object): _schema = None @property def schema(self): if self._schema is None: ...
Use Singleton metaclass on Context
Use Singleton metaclass on Context
Python
mit
eonpatapon/contrail-api-cli
class SchemaNotInitialized(Exception): pass class Context(object): _instance = None _schema = None def __new__(class_, *args, **kwargs): if not isinstance(class_._instance, class_): class_._instance = object.__new__(class_, *args, **kwargs) return class_._instance @p...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from six import add_metaclass from .utils import Singleton class SchemaNotInitialized(Exception): pass @add_metaclass(Singleton) class Context(object): _schema = None @property def schema(self): if self._schema is None: ...
<commit_before>class SchemaNotInitialized(Exception): pass class Context(object): _instance = None _schema = None def __new__(class_, *args, **kwargs): if not isinstance(class_._instance, class_): class_._instance = object.__new__(class_, *args, **kwargs) return class_._i...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from six import add_metaclass from .utils import Singleton class SchemaNotInitialized(Exception): pass @add_metaclass(Singleton) class Context(object): _schema = None @property def schema(self): if self._schema is None: ...
class SchemaNotInitialized(Exception): pass class Context(object): _instance = None _schema = None def __new__(class_, *args, **kwargs): if not isinstance(class_._instance, class_): class_._instance = object.__new__(class_, *args, **kwargs) return class_._instance @p...
<commit_before>class SchemaNotInitialized(Exception): pass class Context(object): _instance = None _schema = None def __new__(class_, *args, **kwargs): if not isinstance(class_._instance, class_): class_._instance = object.__new__(class_, *args, **kwargs) return class_._i...
50451a822e653de12f2f96342b830b194d786d50
ocradmin/ocrplugins/urls.py
ocradmin/ocrplugins/urls.py
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^/?$', 'ocradmin.ocrplugins.views.list'), (r'^query/?$', 'ocradmin.ocrplugins.views.query'), (r'^query/(?P<args>.+)/?$', 'ocradmin.ocrplugins.views.query'), (r'^parse/?$', 'ocradmin.ocrplugins.views.parse'), (r'^(?P<name>[^/]+)/?$',...
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^/?$', 'ocradmin.ocrplugins.views.index'), (r'^query/?$', 'ocradmin.ocrplugins.views.query'), (r'^query/(?P<args>.+)/?$', 'ocradmin.ocrplugins.views.query'), (r'^parse/?$', 'ocradmin.ocrplugins.views.parse'), (r'^(?P<name>[^/]+)/?$'...
Correct name of index view function
Correct name of index view function
Python
apache-2.0
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^/?$', 'ocradmin.ocrplugins.views.list'), (r'^query/?$', 'ocradmin.ocrplugins.views.query'), (r'^query/(?P<args>.+)/?$', 'ocradmin.ocrplugins.views.query'), (r'^parse/?$', 'ocradmin.ocrplugins.views.parse'), (r'^(?P<name>[^/]+)/?$',...
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^/?$', 'ocradmin.ocrplugins.views.index'), (r'^query/?$', 'ocradmin.ocrplugins.views.query'), (r'^query/(?P<args>.+)/?$', 'ocradmin.ocrplugins.views.query'), (r'^parse/?$', 'ocradmin.ocrplugins.views.parse'), (r'^(?P<name>[^/]+)/?$'...
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^/?$', 'ocradmin.ocrplugins.views.list'), (r'^query/?$', 'ocradmin.ocrplugins.views.query'), (r'^query/(?P<args>.+)/?$', 'ocradmin.ocrplugins.views.query'), (r'^parse/?$', 'ocradmin.ocrplugins.views.parse'), (r'^(?P<n...
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^/?$', 'ocradmin.ocrplugins.views.index'), (r'^query/?$', 'ocradmin.ocrplugins.views.query'), (r'^query/(?P<args>.+)/?$', 'ocradmin.ocrplugins.views.query'), (r'^parse/?$', 'ocradmin.ocrplugins.views.parse'), (r'^(?P<name>[^/]+)/?$'...
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^/?$', 'ocradmin.ocrplugins.views.list'), (r'^query/?$', 'ocradmin.ocrplugins.views.query'), (r'^query/(?P<args>.+)/?$', 'ocradmin.ocrplugins.views.query'), (r'^parse/?$', 'ocradmin.ocrplugins.views.parse'), (r'^(?P<name>[^/]+)/?$',...
<commit_before>from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^/?$', 'ocradmin.ocrplugins.views.list'), (r'^query/?$', 'ocradmin.ocrplugins.views.query'), (r'^query/(?P<args>.+)/?$', 'ocradmin.ocrplugins.views.query'), (r'^parse/?$', 'ocradmin.ocrplugins.views.parse'), (r'^(?P<n...
ec2a18c8da029aadb7bc853c73dc6e1484ddac3b
into/backends/tests/test_spark.py
into/backends/tests/test_spark.py
import pytest from into import into from pyspark import RDD data = [['Alice', 100.0, 1], ['Bob', 200.0, 2], ['Alice', 50.0, 3]] @pytest.fixture def rdd(sc): return sc.parallelize(data) def test_spark_into(rdd): seq = [1, 2, 3] assert isinstance(into(rdd, seq), RDD) assert into([], ...
import pytest from into import into, discover from pyspark import RDD data = [['Alice', 100.0, 1], ['Bob', 200.0, 2], ['Alice', 50.0, 3]] @pytest.fixture def rdd(sc): return sc.parallelize(data) def test_spark_into(rdd): seq = [1, 2, 3] assert isinstance(into(rdd, seq), RDD) assert...
Test discover on a vanilla RDD
Test discover on a vanilla RDD
Python
bsd-3-clause
ContinuumIO/odo,ywang007/odo,cpcloud/odo,ywang007/odo,alexmojaki/odo,cpcloud/odo,Dannnno/odo,ContinuumIO/odo,cowlicks/odo,Dannnno/odo,quantopian/odo,blaze/odo,quantopian/odo,blaze/odo,alexmojaki/odo,cowlicks/odo
import pytest from into import into from pyspark import RDD data = [['Alice', 100.0, 1], ['Bob', 200.0, 2], ['Alice', 50.0, 3]] @pytest.fixture def rdd(sc): return sc.parallelize(data) def test_spark_into(rdd): seq = [1, 2, 3] assert isinstance(into(rdd, seq), RDD) assert into([], ...
import pytest from into import into, discover from pyspark import RDD data = [['Alice', 100.0, 1], ['Bob', 200.0, 2], ['Alice', 50.0, 3]] @pytest.fixture def rdd(sc): return sc.parallelize(data) def test_spark_into(rdd): seq = [1, 2, 3] assert isinstance(into(rdd, seq), RDD) assert...
<commit_before>import pytest from into import into from pyspark import RDD data = [['Alice', 100.0, 1], ['Bob', 200.0, 2], ['Alice', 50.0, 3]] @pytest.fixture def rdd(sc): return sc.parallelize(data) def test_spark_into(rdd): seq = [1, 2, 3] assert isinstance(into(rdd, seq), RDD) a...
import pytest from into import into, discover from pyspark import RDD data = [['Alice', 100.0, 1], ['Bob', 200.0, 2], ['Alice', 50.0, 3]] @pytest.fixture def rdd(sc): return sc.parallelize(data) def test_spark_into(rdd): seq = [1, 2, 3] assert isinstance(into(rdd, seq), RDD) assert...
import pytest from into import into from pyspark import RDD data = [['Alice', 100.0, 1], ['Bob', 200.0, 2], ['Alice', 50.0, 3]] @pytest.fixture def rdd(sc): return sc.parallelize(data) def test_spark_into(rdd): seq = [1, 2, 3] assert isinstance(into(rdd, seq), RDD) assert into([], ...
<commit_before>import pytest from into import into from pyspark import RDD data = [['Alice', 100.0, 1], ['Bob', 200.0, 2], ['Alice', 50.0, 3]] @pytest.fixture def rdd(sc): return sc.parallelize(data) def test_spark_into(rdd): seq = [1, 2, 3] assert isinstance(into(rdd, seq), RDD) a...
8feb733383a90ea6f16cd9cc696446343b4678e9
errorreporter.py
errorreporter.py
from errormarker import ErrorMarker from util import delayed class ErrorReporter(object): def __init__(self, window, error_report, settings, expand_filename): self._marker = ErrorMarker(window, error_report, settings) self._error_report = error_report self._expand_filename = expand_filen...
from errormarker import ErrorMarker from util import delayed class ErrorReporter(object): def __init__(self, window, error_report, settings, expand_filename): self._marker = ErrorMarker(window, error_report, settings) self._error_report = error_report self._expand_filename = expand_filen...
Fix a race condition in error reporting causing highlighted lines to get out of sync
Fix a race condition in error reporting causing highlighted lines to get out of sync
Python
mit
jarhart/SublimeSBT
from errormarker import ErrorMarker from util import delayed class ErrorReporter(object): def __init__(self, window, error_report, settings, expand_filename): self._marker = ErrorMarker(window, error_report, settings) self._error_report = error_report self._expand_filename = expand_filen...
from errormarker import ErrorMarker from util import delayed class ErrorReporter(object): def __init__(self, window, error_report, settings, expand_filename): self._marker = ErrorMarker(window, error_report, settings) self._error_report = error_report self._expand_filename = expand_filen...
<commit_before>from errormarker import ErrorMarker from util import delayed class ErrorReporter(object): def __init__(self, window, error_report, settings, expand_filename): self._marker = ErrorMarker(window, error_report, settings) self._error_report = error_report self._expand_filename...
from errormarker import ErrorMarker from util import delayed class ErrorReporter(object): def __init__(self, window, error_report, settings, expand_filename): self._marker = ErrorMarker(window, error_report, settings) self._error_report = error_report self._expand_filename = expand_filen...
from errormarker import ErrorMarker from util import delayed class ErrorReporter(object): def __init__(self, window, error_report, settings, expand_filename): self._marker = ErrorMarker(window, error_report, settings) self._error_report = error_report self._expand_filename = expand_filen...
<commit_before>from errormarker import ErrorMarker from util import delayed class ErrorReporter(object): def __init__(self, window, error_report, settings, expand_filename): self._marker = ErrorMarker(window, error_report, settings) self._error_report = error_report self._expand_filename...
9f5e61bf821823c14f6a0640bd334c8732d41296
ipkg/files/backends/filesystem.py
ipkg/files/backends/filesystem.py
try: from urlparse import urlparse except ImportError: # Python 3 from urllib.parse import urlparse from . import BaseFile, BackendException class LocalFileException(BackendException): """An error occurred while accessing a local file.""" class LocalFile(BaseFile): """A file on the local filesystem...
import os try: from urlparse import urlparse except ImportError: # Python 3 from urllib.parse import urlparse from . import BaseFile, BackendException class LocalFileException(BackendException): """An error occurred while accessing a local file.""" class LocalFile(BaseFile): """A file on the local...
Check if its a file
Check if its a file
Python
mit
pmuller/ipkg
try: from urlparse import urlparse except ImportError: # Python 3 from urllib.parse import urlparse from . import BaseFile, BackendException class LocalFileException(BackendException): """An error occurred while accessing a local file.""" class LocalFile(BaseFile): """A file on the local filesystem...
import os try: from urlparse import urlparse except ImportError: # Python 3 from urllib.parse import urlparse from . import BaseFile, BackendException class LocalFileException(BackendException): """An error occurred while accessing a local file.""" class LocalFile(BaseFile): """A file on the local...
<commit_before>try: from urlparse import urlparse except ImportError: # Python 3 from urllib.parse import urlparse from . import BaseFile, BackendException class LocalFileException(BackendException): """An error occurred while accessing a local file.""" class LocalFile(BaseFile): """A file on the l...
import os try: from urlparse import urlparse except ImportError: # Python 3 from urllib.parse import urlparse from . import BaseFile, BackendException class LocalFileException(BackendException): """An error occurred while accessing a local file.""" class LocalFile(BaseFile): """A file on the local...
try: from urlparse import urlparse except ImportError: # Python 3 from urllib.parse import urlparse from . import BaseFile, BackendException class LocalFileException(BackendException): """An error occurred while accessing a local file.""" class LocalFile(BaseFile): """A file on the local filesystem...
<commit_before>try: from urlparse import urlparse except ImportError: # Python 3 from urllib.parse import urlparse from . import BaseFile, BackendException class LocalFileException(BackendException): """An error occurred while accessing a local file.""" class LocalFile(BaseFile): """A file on the l...
f12f3d909af496cc2c958cf664c5bdc428eca99e
astroquery/nasa_exoplanet_archive/__init__.py
astroquery/nasa_exoplanet_archive/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ NASA Exoplanet Archive Query Tool --------------------------------- Module to query the `NASA Exoplanet Archive <https://exoplanetarchive.ipac.caltech.edu>`_ via `the API <https://exoplanetarchive.ipac.caltech.edu/docs/program_interfaces.html>`_. """ ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ NASA Exoplanet Archive Query Tool --------------------------------- Module to query the `NASA Exoplanet Archive <https://exoplanetarchive.ipac.caltech.edu>`_ via `the API <https://exoplanetarchive.ipac.caltech.edu/docs/program_interfaces.html>`_. """ ...
Add missing s in https for API base URL.
Add missing s in https for API base URL.
Python
bsd-3-clause
imbasimba/astroquery,ceb8/astroquery,imbasimba/astroquery,ceb8/astroquery
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ NASA Exoplanet Archive Query Tool --------------------------------- Module to query the `NASA Exoplanet Archive <https://exoplanetarchive.ipac.caltech.edu>`_ via `the API <https://exoplanetarchive.ipac.caltech.edu/docs/program_interfaces.html>`_. """ ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ NASA Exoplanet Archive Query Tool --------------------------------- Module to query the `NASA Exoplanet Archive <https://exoplanetarchive.ipac.caltech.edu>`_ via `the API <https://exoplanetarchive.ipac.caltech.edu/docs/program_interfaces.html>`_. """ ...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ NASA Exoplanet Archive Query Tool --------------------------------- Module to query the `NASA Exoplanet Archive <https://exoplanetarchive.ipac.caltech.edu>`_ via `the API <https://exoplanetarchive.ipac.caltech.edu/docs/program_interface...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ NASA Exoplanet Archive Query Tool --------------------------------- Module to query the `NASA Exoplanet Archive <https://exoplanetarchive.ipac.caltech.edu>`_ via `the API <https://exoplanetarchive.ipac.caltech.edu/docs/program_interfaces.html>`_. """ ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ NASA Exoplanet Archive Query Tool --------------------------------- Module to query the `NASA Exoplanet Archive <https://exoplanetarchive.ipac.caltech.edu>`_ via `the API <https://exoplanetarchive.ipac.caltech.edu/docs/program_interfaces.html>`_. """ ...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ NASA Exoplanet Archive Query Tool --------------------------------- Module to query the `NASA Exoplanet Archive <https://exoplanetarchive.ipac.caltech.edu>`_ via `the API <https://exoplanetarchive.ipac.caltech.edu/docs/program_interface...
2261b3c6cb579ae65c1119db45f291e246f536c2
examples/main.py
examples/main.py
import asyncio import sys from contextlib import suppress sys.path.append("..") from asynccmd import Cmd class Commander(Cmd): def __init__(self, intro, prompt): if sys.platform == 'win32': super().__init__(mode="Run", run_loop=False) else: super().__init__(mode="Reader", ru...
import asyncio import sys from contextlib import suppress sys.path.append("..") from asynccmd import Cmd class Commander(Cmd): def __init__(self, intro, prompt): if sys.platform == 'win32': super().__init__(mode="Run", run_loop=False) else: super().__init__(mode="Reader", ru...
FIX example for both Win and NIX
FIX example for both Win and NIX TODO: tasks wont work
Python
apache-2.0
valentinmk/asynccmd
import asyncio import sys from contextlib import suppress sys.path.append("..") from asynccmd import Cmd class Commander(Cmd): def __init__(self, intro, prompt): if sys.platform == 'win32': super().__init__(mode="Run", run_loop=False) else: super().__init__(mode="Reader", ru...
import asyncio import sys from contextlib import suppress sys.path.append("..") from asynccmd import Cmd class Commander(Cmd): def __init__(self, intro, prompt): if sys.platform == 'win32': super().__init__(mode="Run", run_loop=False) else: super().__init__(mode="Reader", ru...
<commit_before>import asyncio import sys from contextlib import suppress sys.path.append("..") from asynccmd import Cmd class Commander(Cmd): def __init__(self, intro, prompt): if sys.platform == 'win32': super().__init__(mode="Run", run_loop=False) else: super().__init__(mo...
import asyncio import sys from contextlib import suppress sys.path.append("..") from asynccmd import Cmd class Commander(Cmd): def __init__(self, intro, prompt): if sys.platform == 'win32': super().__init__(mode="Run", run_loop=False) else: super().__init__(mode="Reader", ru...
import asyncio import sys from contextlib import suppress sys.path.append("..") from asynccmd import Cmd class Commander(Cmd): def __init__(self, intro, prompt): if sys.platform == 'win32': super().__init__(mode="Run", run_loop=False) else: super().__init__(mode="Reader", ru...
<commit_before>import asyncio import sys from contextlib import suppress sys.path.append("..") from asynccmd import Cmd class Commander(Cmd): def __init__(self, intro, prompt): if sys.platform == 'win32': super().__init__(mode="Run", run_loop=False) else: super().__init__(mo...
df40edea93b530752cc21c3de04825bc791d4910
parser2.py
parser2.py
from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') for i, h in enumerate(hands): segments = "seats preflop flop turn river".split() s = h.split('\n*** ') hands[i] = {} while len(s) > 1: # We don't always have flop, turn, riv, but last element is ...
from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') class Hand: def __init__(self, se=None, p=None, f=None, t=None, r=None, su=None): self.seats = se self.preflop = p self.flop = f self.turn = t self.river = r self.summ...
Use class instead of dict, preparing for methods.
Use class instead of dict, preparing for methods.
Python
mit
zimolzak/Ignition-poker-parser
from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') for i, h in enumerate(hands): segments = "seats preflop flop turn river".split() s = h.split('\n*** ') hands[i] = {} while len(s) > 1: # We don't always have flop, turn, riv, but last element is ...
from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') class Hand: def __init__(self, se=None, p=None, f=None, t=None, r=None, su=None): self.seats = se self.preflop = p self.flop = f self.turn = t self.river = r self.summ...
<commit_before>from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') for i, h in enumerate(hands): segments = "seats preflop flop turn river".split() s = h.split('\n*** ') hands[i] = {} while len(s) > 1: # We don't always have flop, turn, riv, but l...
from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') class Hand: def __init__(self, se=None, p=None, f=None, t=None, r=None, su=None): self.seats = se self.preflop = p self.flop = f self.turn = t self.river = r self.summ...
from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') for i, h in enumerate(hands): segments = "seats preflop flop turn river".split() s = h.split('\n*** ') hands[i] = {} while len(s) > 1: # We don't always have flop, turn, riv, but last element is ...
<commit_before>from pprint import pprint input = open('example_ignition.txt').read() hands = input.split('\n\n\n') for i, h in enumerate(hands): segments = "seats preflop flop turn river".split() s = h.split('\n*** ') hands[i] = {} while len(s) > 1: # We don't always have flop, turn, riv, but l...
f94eefc0fe1d869753ec7bbe5e315c5df6cc8303
src/pubmed.py
src/pubmed.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
Return Pubmed title and abstract
Return Pubmed title and abstract
Python
mit
AndreLamurias/IBEnt,AndreLamurias/IBEnt,AndreLamurias/IBRel,AndreLamurias/IBRel
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efet...
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efetch.fcgi?db=pubm...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import httplib #import xml.dom.minidom as minidom #import urllib import time, sys import xml.etree.ElementTree as ET def get_pubmed_abs(pmid): conn = httplib.HTTPConnection("eutils.ncbi.nlm.nih.gov") conn.request("GET", '/entrez/eutils/efet...
17b6b91cd898f48f18b941dfb2250e7a00bc0506
kyokai/context.py
kyokai/context.py
""" Stores HTTPRequestContext """ from asphalt.core import Context from typeguard import check_argument_types class HTTPRequestContext(Context): """ Sub-class of context used for HTTP requests. """ cfg = {} def __init__(self, request, parent: Context): assert check_argument_types() ...
""" Stores HTTPRequestContext """ from asphalt.core import Context from typeguard import check_argument_types import kyokai class HTTPRequestContext(Context): """ Sub-class of context used for HTTP requests. """ cfg = {} def __init__(self, request, parent: Context): assert check_argumen...
Make request a property on HTTPRequestContext.
Make request a property on HTTPRequestContext.
Python
mit
SunDwarf/Kyoukai
""" Stores HTTPRequestContext """ from asphalt.core import Context from typeguard import check_argument_types class HTTPRequestContext(Context): """ Sub-class of context used for HTTP requests. """ cfg = {} def __init__(self, request, parent: Context): assert check_argument_types() ...
""" Stores HTTPRequestContext """ from asphalt.core import Context from typeguard import check_argument_types import kyokai class HTTPRequestContext(Context): """ Sub-class of context used for HTTP requests. """ cfg = {} def __init__(self, request, parent: Context): assert check_argumen...
<commit_before>""" Stores HTTPRequestContext """ from asphalt.core import Context from typeguard import check_argument_types class HTTPRequestContext(Context): """ Sub-class of context used for HTTP requests. """ cfg = {} def __init__(self, request, parent: Context): assert check_argumen...
""" Stores HTTPRequestContext """ from asphalt.core import Context from typeguard import check_argument_types import kyokai class HTTPRequestContext(Context): """ Sub-class of context used for HTTP requests. """ cfg = {} def __init__(self, request, parent: Context): assert check_argumen...
""" Stores HTTPRequestContext """ from asphalt.core import Context from typeguard import check_argument_types class HTTPRequestContext(Context): """ Sub-class of context used for HTTP requests. """ cfg = {} def __init__(self, request, parent: Context): assert check_argument_types() ...
<commit_before>""" Stores HTTPRequestContext """ from asphalt.core import Context from typeguard import check_argument_types class HTTPRequestContext(Context): """ Sub-class of context used for HTTP requests. """ cfg = {} def __init__(self, request, parent: Context): assert check_argumen...
5640a85b2095083da3617380fe315b5c4f26560f
rsfmri/examples/rsfmri_wrapper.py
rsfmri/examples/rsfmri_wrapper.py
from rsfmri import utils from rsfmri import register """ This is done in native space, add warped after (Renaud others)?? despike? split raw func realign (no slicetime (ANTS)) realign w/slicetime (spm) generate movement regressors make meanfunc files -> 4dfunc (bias correct anat and meanfunc?) register anat to meanf...
from rsfmri import utils from rsfmri import register """ This is done in native space, add warped after (Renaud others)?? despike? split raw func realign (no slicetime (ANTS)) realign w/slicetime (spm) generate movement regressors make meanfunc remove values < 100 (outside brain) files -> 4dfunc (bias correct an...
Update wrapper to show latest changes to code
Update wrapper to show latest changes to code
Python
mit
klarnemann/jagust_rsfmri,klarnemann/jagust_rsfmri,klarnemann/jagust_rsfmri
from rsfmri import utils from rsfmri import register """ This is done in native space, add warped after (Renaud others)?? despike? split raw func realign (no slicetime (ANTS)) realign w/slicetime (spm) generate movement regressors make meanfunc files -> 4dfunc (bias correct anat and meanfunc?) register anat to meanf...
from rsfmri import utils from rsfmri import register """ This is done in native space, add warped after (Renaud others)?? despike? split raw func realign (no slicetime (ANTS)) realign w/slicetime (spm) generate movement regressors make meanfunc remove values < 100 (outside brain) files -> 4dfunc (bias correct an...
<commit_before> from rsfmri import utils from rsfmri import register """ This is done in native space, add warped after (Renaud others)?? despike? split raw func realign (no slicetime (ANTS)) realign w/slicetime (spm) generate movement regressors make meanfunc files -> 4dfunc (bias correct anat and meanfunc?) registe...
from rsfmri import utils from rsfmri import register """ This is done in native space, add warped after (Renaud others)?? despike? split raw func realign (no slicetime (ANTS)) realign w/slicetime (spm) generate movement regressors make meanfunc remove values < 100 (outside brain) files -> 4dfunc (bias correct an...
from rsfmri import utils from rsfmri import register """ This is done in native space, add warped after (Renaud others)?? despike? split raw func realign (no slicetime (ANTS)) realign w/slicetime (spm) generate movement regressors make meanfunc files -> 4dfunc (bias correct anat and meanfunc?) register anat to meanf...
<commit_before> from rsfmri import utils from rsfmri import register """ This is done in native space, add warped after (Renaud others)?? despike? split raw func realign (no slicetime (ANTS)) realign w/slicetime (spm) generate movement regressors make meanfunc files -> 4dfunc (bias correct anat and meanfunc?) registe...
8df03bdd466270127b4185afa792d26e71e323f7
avalonstar/apps/api/views.py
avalonstar/apps/api/views.py
# -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.response import Response from apps.broadcasts.models import Broadcast, Host, Raid, Series from apps.games.models import Game from apps.subscribers.models import Ticket from .serializers impo...
# -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.response import Response from apps.broadcasts.models import Broadcast, Host, Raid, Series from apps.games.models import Game from apps.subscribers.models import Ticket from .serializers impo...
Order the tickets correctly in the API.
Order the tickets correctly in the API.
Python
apache-2.0
bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv
# -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.response import Response from apps.broadcasts.models import Broadcast, Host, Raid, Series from apps.games.models import Game from apps.subscribers.models import Ticket from .serializers impo...
# -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.response import Response from apps.broadcasts.models import Broadcast, Host, Raid, Series from apps.games.models import Game from apps.subscribers.models import Ticket from .serializers impo...
<commit_before># -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.response import Response from apps.broadcasts.models import Broadcast, Host, Raid, Series from apps.games.models import Game from apps.subscribers.models import Ticket from .s...
# -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.response import Response from apps.broadcasts.models import Broadcast, Host, Raid, Series from apps.games.models import Game from apps.subscribers.models import Ticket from .serializers impo...
# -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.response import Response from apps.broadcasts.models import Broadcast, Host, Raid, Series from apps.games.models import Game from apps.subscribers.models import Ticket from .serializers impo...
<commit_before># -*- coding: utf-8 -*- from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework.response import Response from apps.broadcasts.models import Broadcast, Host, Raid, Series from apps.games.models import Game from apps.subscribers.models import Ticket from .s...
1477d3e94f088399f15bb13fd399d3c33af9c55a
backend/breach/tests/base.py
backend/breach/tests/base.py
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
Add balance checking test round
Add balance checking test round
Python
mit
dimriou/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,dionyziz/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,dimriou/ruptu...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
<commit_before>from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
<commit_before>from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ...
0aa3af24533a0aa605d05bd034a0bfdcc55c2993
backend/conferences/types.py
backend/conferences/types.py
import graphene from .models import Conference from graphene_django import DjangoObjectType from tickets.types import TicketType class ConferenceType(DjangoObjectType): tickets = graphene.List(graphene.NonNull(TicketType)) def resolve_tickets(self, info): return self.tickets.all() class Meta:...
import graphene from .models import Conference from graphene_django import DjangoObjectType from tickets.types import TicketType class ConferenceType(DjangoObjectType): tickets = graphene.List(graphene.NonNull(TicketType)) def resolve_tickets(self, info): return self.tickets.all() class Meta:...
Add dates to Conference GraphQL type
Add dates to Conference GraphQL type
Python
mit
patrick91/pycon,patrick91/pycon
import graphene from .models import Conference from graphene_django import DjangoObjectType from tickets.types import TicketType class ConferenceType(DjangoObjectType): tickets = graphene.List(graphene.NonNull(TicketType)) def resolve_tickets(self, info): return self.tickets.all() class Meta:...
import graphene from .models import Conference from graphene_django import DjangoObjectType from tickets.types import TicketType class ConferenceType(DjangoObjectType): tickets = graphene.List(graphene.NonNull(TicketType)) def resolve_tickets(self, info): return self.tickets.all() class Meta:...
<commit_before>import graphene from .models import Conference from graphene_django import DjangoObjectType from tickets.types import TicketType class ConferenceType(DjangoObjectType): tickets = graphene.List(graphene.NonNull(TicketType)) def resolve_tickets(self, info): return self.tickets.all() ...
import graphene from .models import Conference from graphene_django import DjangoObjectType from tickets.types import TicketType class ConferenceType(DjangoObjectType): tickets = graphene.List(graphene.NonNull(TicketType)) def resolve_tickets(self, info): return self.tickets.all() class Meta:...
import graphene from .models import Conference from graphene_django import DjangoObjectType from tickets.types import TicketType class ConferenceType(DjangoObjectType): tickets = graphene.List(graphene.NonNull(TicketType)) def resolve_tickets(self, info): return self.tickets.all() class Meta:...
<commit_before>import graphene from .models import Conference from graphene_django import DjangoObjectType from tickets.types import TicketType class ConferenceType(DjangoObjectType): tickets = graphene.List(graphene.NonNull(TicketType)) def resolve_tickets(self, info): return self.tickets.all() ...
457f2daeb087ab06d7cb738cb69268bad29d11f4
examples/mhs_atmosphere/mhs_atmosphere_plot.py
examples/mhs_atmosphere/mhs_atmosphere_plot.py
# -*- coding: utf-8 -*- """ Created on Fri Jan 9 12:52:31 2015 @author: stuart """ import os import glob import yt model = 'spruit' datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/') files = glob.glob(datadir+'/*') files.sort() print(files) ds = yt.load(files[0]) slc = yt.SlicePlot(ds, normal='y', fie...
# -*- coding: utf-8 -*- """ Created on Fri Jan 9 12:52:31 2015 @author: stuart """ import os import glob import yt model = 'spruit' datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/') files = glob.glob(datadir+'/*') files.sort() print(files) ds = yt.load(files[0]) # uncomment for axis swapping for norm...
Add in axes swapping for normal='y'
Add in axes swapping for normal='y'
Python
bsd-2-clause
SWAT-Sheffield/pysac,Cadair/pysac
# -*- coding: utf-8 -*- """ Created on Fri Jan 9 12:52:31 2015 @author: stuart """ import os import glob import yt model = 'spruit' datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/') files = glob.glob(datadir+'/*') files.sort() print(files) ds = yt.load(files[0]) slc = yt.SlicePlot(ds, normal='y', fie...
# -*- coding: utf-8 -*- """ Created on Fri Jan 9 12:52:31 2015 @author: stuart """ import os import glob import yt model = 'spruit' datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/') files = glob.glob(datadir+'/*') files.sort() print(files) ds = yt.load(files[0]) # uncomment for axis swapping for norm...
<commit_before># -*- coding: utf-8 -*- """ Created on Fri Jan 9 12:52:31 2015 @author: stuart """ import os import glob import yt model = 'spruit' datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/') files = glob.glob(datadir+'/*') files.sort() print(files) ds = yt.load(files[0]) slc = yt.SlicePlot(ds, ...
# -*- coding: utf-8 -*- """ Created on Fri Jan 9 12:52:31 2015 @author: stuart """ import os import glob import yt model = 'spruit' datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/') files = glob.glob(datadir+'/*') files.sort() print(files) ds = yt.load(files[0]) # uncomment for axis swapping for norm...
# -*- coding: utf-8 -*- """ Created on Fri Jan 9 12:52:31 2015 @author: stuart """ import os import glob import yt model = 'spruit' datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/') files = glob.glob(datadir+'/*') files.sort() print(files) ds = yt.load(files[0]) slc = yt.SlicePlot(ds, normal='y', fie...
<commit_before># -*- coding: utf-8 -*- """ Created on Fri Jan 9 12:52:31 2015 @author: stuart """ import os import glob import yt model = 'spruit' datadir = os.path.expanduser('~/mhs_atmosphere/'+model+'/') files = glob.glob(datadir+'/*') files.sort() print(files) ds = yt.load(files[0]) slc = yt.SlicePlot(ds, ...
a3c2f22819271adb7f08d18a54af863e5ca75c51
test/test_api.py
test/test_api.py
# -*- coding: utf-8 -*- import pytest import warthog.api import warthog.exceptions @pytest.fixture def exports(): return set([item for item in dir(warthog.api) if not item.startswith('_')]) def test_public_exports(exports): declared = set(warthog.api.__all__) assert exports == declared, 'Exports and __...
# -*- coding: utf-8 -*- import pytest import warthog.api import warthog.exceptions @pytest.fixture def exports(): return set([item for item in dir(warthog.api) if not item.startswith('_')]) def test_public_exports(exports): declared = set(warthog.api.__all__) assert exports == declared, 'Exports and __...
Add potential to include warnings in warthog.exceptions
Add potential to include warnings in warthog.exceptions
Python
mit
smarter-travel-media/warthog
# -*- coding: utf-8 -*- import pytest import warthog.api import warthog.exceptions @pytest.fixture def exports(): return set([item for item in dir(warthog.api) if not item.startswith('_')]) def test_public_exports(exports): declared = set(warthog.api.__all__) assert exports == declared, 'Exports and __...
# -*- coding: utf-8 -*- import pytest import warthog.api import warthog.exceptions @pytest.fixture def exports(): return set([item for item in dir(warthog.api) if not item.startswith('_')]) def test_public_exports(exports): declared = set(warthog.api.__all__) assert exports == declared, 'Exports and __...
<commit_before># -*- coding: utf-8 -*- import pytest import warthog.api import warthog.exceptions @pytest.fixture def exports(): return set([item for item in dir(warthog.api) if not item.startswith('_')]) def test_public_exports(exports): declared = set(warthog.api.__all__) assert exports == declared, ...
# -*- coding: utf-8 -*- import pytest import warthog.api import warthog.exceptions @pytest.fixture def exports(): return set([item for item in dir(warthog.api) if not item.startswith('_')]) def test_public_exports(exports): declared = set(warthog.api.__all__) assert exports == declared, 'Exports and __...
# -*- coding: utf-8 -*- import pytest import warthog.api import warthog.exceptions @pytest.fixture def exports(): return set([item for item in dir(warthog.api) if not item.startswith('_')]) def test_public_exports(exports): declared = set(warthog.api.__all__) assert exports == declared, 'Exports and __...
<commit_before># -*- coding: utf-8 -*- import pytest import warthog.api import warthog.exceptions @pytest.fixture def exports(): return set([item for item in dir(warthog.api) if not item.startswith('_')]) def test_public_exports(exports): declared = set(warthog.api.__all__) assert exports == declared, ...
3c1a9a2db94a094446e9037a65acc7da9bb5586a
myname.py
myname.py
"""Little module to find the path of a Cosmo box simulation""" import os.path as path base=path.expanduser("~/data/Cosmo/") def get_name(sim, ff=True): """Get the directory for a simulation""" halo = "Cosmo"+str(sim)+"_V6" if ff: halo=path.join(halo,"L25n512/output") else: halo=path.j...
"""Little module to find the path of a Cosmo box simulation""" import os.path as path base=path.expanduser("~/data/Cosmo/") def get_name(sim, ff=True, box=25): """Get the directory for a simulation""" halo = "Cosmo"+str(sim)+"_V6" if ff: halo=path.join(halo,"L"+str(box)+"n512/output") else: ...
Allow loading of different box sizes
Allow loading of different box sizes
Python
mit
sbird/vw_spectra
"""Little module to find the path of a Cosmo box simulation""" import os.path as path base=path.expanduser("~/data/Cosmo/") def get_name(sim, ff=True): """Get the directory for a simulation""" halo = "Cosmo"+str(sim)+"_V6" if ff: halo=path.join(halo,"L25n512/output") else: halo=path.j...
"""Little module to find the path of a Cosmo box simulation""" import os.path as path base=path.expanduser("~/data/Cosmo/") def get_name(sim, ff=True, box=25): """Get the directory for a simulation""" halo = "Cosmo"+str(sim)+"_V6" if ff: halo=path.join(halo,"L"+str(box)+"n512/output") else: ...
<commit_before>"""Little module to find the path of a Cosmo box simulation""" import os.path as path base=path.expanduser("~/data/Cosmo/") def get_name(sim, ff=True): """Get the directory for a simulation""" halo = "Cosmo"+str(sim)+"_V6" if ff: halo=path.join(halo,"L25n512/output") else: ...
"""Little module to find the path of a Cosmo box simulation""" import os.path as path base=path.expanduser("~/data/Cosmo/") def get_name(sim, ff=True, box=25): """Get the directory for a simulation""" halo = "Cosmo"+str(sim)+"_V6" if ff: halo=path.join(halo,"L"+str(box)+"n512/output") else: ...
"""Little module to find the path of a Cosmo box simulation""" import os.path as path base=path.expanduser("~/data/Cosmo/") def get_name(sim, ff=True): """Get the directory for a simulation""" halo = "Cosmo"+str(sim)+"_V6" if ff: halo=path.join(halo,"L25n512/output") else: halo=path.j...
<commit_before>"""Little module to find the path of a Cosmo box simulation""" import os.path as path base=path.expanduser("~/data/Cosmo/") def get_name(sim, ff=True): """Get the directory for a simulation""" halo = "Cosmo"+str(sim)+"_V6" if ff: halo=path.join(halo,"L25n512/output") else: ...
9fb1e795cd2489e2889041018ff5a357afba0221
test_collectr.py
test_collectr.py
# -*- coding: utf-8 -*- """ test_collectr ------------- Some functions to test the collectr library. :copyright: (c) 2013 Cory Benfield :license: MIT License, for details see LICENSE. """ import unittest import collectr class CollectrTest(unittest.TestCase): """ Tests for the collectr library. """ d...
# -*- coding: utf-8 -*- """ test_collectr ------------- Some functions to test the collectr library. :copyright: (c) 2013 Cory Benfield :license: MIT License, for details see LICENSE. """ import unittest import collectr class CollectrTest(unittest.TestCase): """ Tests for the collectr library. """ d...
Delete any files that get moved.
Delete any files that get moved.
Python
mit
Lukasa/collectr,Lukasa/collectr
# -*- coding: utf-8 -*- """ test_collectr ------------- Some functions to test the collectr library. :copyright: (c) 2013 Cory Benfield :license: MIT License, for details see LICENSE. """ import unittest import collectr class CollectrTest(unittest.TestCase): """ Tests for the collectr library. """ d...
# -*- coding: utf-8 -*- """ test_collectr ------------- Some functions to test the collectr library. :copyright: (c) 2013 Cory Benfield :license: MIT License, for details see LICENSE. """ import unittest import collectr class CollectrTest(unittest.TestCase): """ Tests for the collectr library. """ d...
<commit_before># -*- coding: utf-8 -*- """ test_collectr ------------- Some functions to test the collectr library. :copyright: (c) 2013 Cory Benfield :license: MIT License, for details see LICENSE. """ import unittest import collectr class CollectrTest(unittest.TestCase): """ Tests for the collectr library...
# -*- coding: utf-8 -*- """ test_collectr ------------- Some functions to test the collectr library. :copyright: (c) 2013 Cory Benfield :license: MIT License, for details see LICENSE. """ import unittest import collectr class CollectrTest(unittest.TestCase): """ Tests for the collectr library. """ d...
# -*- coding: utf-8 -*- """ test_collectr ------------- Some functions to test the collectr library. :copyright: (c) 2013 Cory Benfield :license: MIT License, for details see LICENSE. """ import unittest import collectr class CollectrTest(unittest.TestCase): """ Tests for the collectr library. """ d...
<commit_before># -*- coding: utf-8 -*- """ test_collectr ------------- Some functions to test the collectr library. :copyright: (c) 2013 Cory Benfield :license: MIT License, for details see LICENSE. """ import unittest import collectr class CollectrTest(unittest.TestCase): """ Tests for the collectr library...
c3f94790e8d4d7bca68eb86d1172c9f69f1c070c
tests/support.py
tests/support.py
import os def open_file(filename): ''' Load a file from the fixtures directory. ''' path = 'fixtures/' + filename if ('tests' in os.listdir('.')): path = 'tests/' + path return open(path, mode='rb')
import os def open_file(filename, mode='rb'): ''' Load a file from the fixtures directory. ''' path = 'fixtures/' + filename if ('tests' in os.listdir('.')): path = 'tests/' + path return open(path, mode=mode)
Support opening files as text streams on tests
Support opening files as text streams on tests
Python
mit
jaraco/ofxparse,rdsteed/ofxparse,udibr/ofxparse,jseutter/ofxparse
import os def open_file(filename): ''' Load a file from the fixtures directory. ''' path = 'fixtures/' + filename if ('tests' in os.listdir('.')): path = 'tests/' + path return open(path, mode='rb') Support opening files as text streams on tests
import os def open_file(filename, mode='rb'): ''' Load a file from the fixtures directory. ''' path = 'fixtures/' + filename if ('tests' in os.listdir('.')): path = 'tests/' + path return open(path, mode=mode)
<commit_before>import os def open_file(filename): ''' Load a file from the fixtures directory. ''' path = 'fixtures/' + filename if ('tests' in os.listdir('.')): path = 'tests/' + path return open(path, mode='rb') <commit_msg>Support opening files as text streams on tests<commit_after>
import os def open_file(filename, mode='rb'): ''' Load a file from the fixtures directory. ''' path = 'fixtures/' + filename if ('tests' in os.listdir('.')): path = 'tests/' + path return open(path, mode=mode)
import os def open_file(filename): ''' Load a file from the fixtures directory. ''' path = 'fixtures/' + filename if ('tests' in os.listdir('.')): path = 'tests/' + path return open(path, mode='rb') Support opening files as text streams on testsimport os def open_file(filename, mode='rb'): ...
<commit_before>import os def open_file(filename): ''' Load a file from the fixtures directory. ''' path = 'fixtures/' + filename if ('tests' in os.listdir('.')): path = 'tests/' + path return open(path, mode='rb') <commit_msg>Support opening files as text streams on tests<commit_after>import o...
8932d0717bf57c86b81b6744353d6387821b8b15
wsgi/setup.py
wsgi/setup.py
import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) out, err = p.com...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen('gunicorn hello:app --worker-class="egg:meinheld#gunicorn_worker" -b 0.0.0.0:8080 -w ' + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subproces...
Use meinheld worker (same as other Python Frameworks)
wsgi: Use meinheld worker (same as other Python Frameworks)
Python
bsd-3-clause
jamming/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,zloster/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,saturday06...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) out, err = p.com...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen('gunicorn hello:app --worker-class="egg:meinheld#gunicorn_worker" -b 0.0.0.0:8080 -w ' + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subproces...
<commit_before> import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) o...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen('gunicorn hello:app --worker-class="egg:meinheld#gunicorn_worker" -b 0.0.0.0:8080 -w ' + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subproces...
import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) out, err = p.com...
<commit_before> import subprocess import sys import setup_util import os def start(args): subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi") return 0 def stop(): p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) o...
0e68b94d4d5f204dfe9596ddbd3444e906011183
sumy/document/_paragraph.py
sumy/document/_paragraph.py
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import unicode_compatible from ..utils import cached_property from ._sentence import Sentence @unicode_compatible class Paragraph(object): de...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import unicode_compatible from ..utils import cached_property from ._sentence import Sentence @unicode_compatible class Paragraph(object): de...
Allow using iterable of sentences in 'Paragraph'
Allow using iterable of sentences in 'Paragraph'
Python
apache-2.0
miso-belica/sumy,miso-belica/sumy
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import unicode_compatible from ..utils import cached_property from ._sentence import Sentence @unicode_compatible class Paragraph(object): de...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import unicode_compatible from ..utils import cached_property from ._sentence import Sentence @unicode_compatible class Paragraph(object): de...
<commit_before># -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import unicode_compatible from ..utils import cached_property from ._sentence import Sentence @unicode_compatible class Paragraph(...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import unicode_compatible from ..utils import cached_property from ._sentence import Sentence @unicode_compatible class Paragraph(object): de...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import unicode_compatible from ..utils import cached_property from ._sentence import Sentence @unicode_compatible class Paragraph(object): de...
<commit_before># -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from itertools import chain from .._compat import unicode_compatible from ..utils import cached_property from ._sentence import Sentence @unicode_compatible class Paragraph(...
9abe33697b13ef5a544e3ea51e3f7674eb5f31cf
update_config.py
update_config.py
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Rodrigo Ramírez Norambuena <[email protected]> # from libs.qpanel import utils import sys if __name__ == '__main__': sections = ['general', 'manager', 'rename'] file_config = sys.argv[1].strip() file_template = sys.argv[2].strip() utils.unified_c...
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Rodrigo Ramírez Norambuena <[email protected]> # from libs.qpanel import utils import sys if __name__ == '__main__': sections = ['general', 'manager', 'rename', 'users'] file_config = sys.argv[1].strip() file_template = sys.argv[2].strip() utils....
Add missing section into script to migrate configs
Add missing section into script to migrate configs
Python
mit
skazancev/qpanel,roramirez/qpanel,skazancev/qpanel,skazancev/qpanel,skazancev/qpanel,roramirez/qpanel,roramirez/qpanel,roramirez/qpanel
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Rodrigo Ramírez Norambuena <[email protected]> # from libs.qpanel import utils import sys if __name__ == '__main__': sections = ['general', 'manager', 'rename'] file_config = sys.argv[1].strip() file_template = sys.argv[2].strip() utils.unified_c...
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Rodrigo Ramírez Norambuena <[email protected]> # from libs.qpanel import utils import sys if __name__ == '__main__': sections = ['general', 'manager', 'rename', 'users'] file_config = sys.argv[1].strip() file_template = sys.argv[2].strip() utils....
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Rodrigo Ramírez Norambuena <[email protected]> # from libs.qpanel import utils import sys if __name__ == '__main__': sections = ['general', 'manager', 'rename'] file_config = sys.argv[1].strip() file_template = sys.argv[2].strip() ...
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Rodrigo Ramírez Norambuena <[email protected]> # from libs.qpanel import utils import sys if __name__ == '__main__': sections = ['general', 'manager', 'rename', 'users'] file_config = sys.argv[1].strip() file_template = sys.argv[2].strip() utils....
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Rodrigo Ramírez Norambuena <[email protected]> # from libs.qpanel import utils import sys if __name__ == '__main__': sections = ['general', 'manager', 'rename'] file_config = sys.argv[1].strip() file_template = sys.argv[2].strip() utils.unified_c...
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Rodrigo Ramírez Norambuena <[email protected]> # from libs.qpanel import utils import sys if __name__ == '__main__': sections = ['general', 'manager', 'rename'] file_config = sys.argv[1].strip() file_template = sys.argv[2].strip() ...
63edb57a89be453db63da003877a54d9d4974161
jprops2bash.py
jprops2bash.py
#!/usr/bin/env python import collections import sys import jprops def do_replacements(s, mappings): for old, new in mappings.items(): s = s.replace(old, new) return s def key_transform(key): key = do_replacements(key, {'.': '_', ':': '_', ...
#!/usr/bin/env python import collections import sys import jprops def do_replacements(s, mappings): for old, new in mappings.items(): s = s.replace(old, new) return s def key_transform(key): key = do_replacements(key, {'.': '_', ':': '_', ...
Add `export` to emitted lines
Add `export` to emitted lines
Python
mit
msabramo/jprops2bash
#!/usr/bin/env python import collections import sys import jprops def do_replacements(s, mappings): for old, new in mappings.items(): s = s.replace(old, new) return s def key_transform(key): key = do_replacements(key, {'.': '_', ':': '_', ...
#!/usr/bin/env python import collections import sys import jprops def do_replacements(s, mappings): for old, new in mappings.items(): s = s.replace(old, new) return s def key_transform(key): key = do_replacements(key, {'.': '_', ':': '_', ...
<commit_before>#!/usr/bin/env python import collections import sys import jprops def do_replacements(s, mappings): for old, new in mappings.items(): s = s.replace(old, new) return s def key_transform(key): key = do_replacements(key, {'.': '_', ':': '_', ...
#!/usr/bin/env python import collections import sys import jprops def do_replacements(s, mappings): for old, new in mappings.items(): s = s.replace(old, new) return s def key_transform(key): key = do_replacements(key, {'.': '_', ':': '_', ...
#!/usr/bin/env python import collections import sys import jprops def do_replacements(s, mappings): for old, new in mappings.items(): s = s.replace(old, new) return s def key_transform(key): key = do_replacements(key, {'.': '_', ':': '_', ...
<commit_before>#!/usr/bin/env python import collections import sys import jprops def do_replacements(s, mappings): for old, new in mappings.items(): s = s.replace(old, new) return s def key_transform(key): key = do_replacements(key, {'.': '_', ':': '_', ...
01198751bcdf7ded4e5a3144d08cccd9db7856fc
helusers/urls.py
helusers/urls.py
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if not settings.LOGOUT_REDIRECT_URL: raise ImproperlyConfigured( "You must configure LOGOUT_REDIRECT_URL to u...
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if ( "social_django" in settings.INSTALLED_APPS and "helusers.tunnistamo_oidc.TunnistamoOIDCAuth" in settings...
Include social_auth specific URLs only if social_auth is in use
Include social_auth specific URLs only if social_auth is in use
Python
bsd-2-clause
City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if not settings.LOGOUT_REDIRECT_URL: raise ImproperlyConfigured( "You must configure LOGOUT_REDIRECT_URL to u...
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if ( "social_django" in settings.INSTALLED_APPS and "helusers.tunnistamo_oidc.TunnistamoOIDCAuth" in settings...
<commit_before>"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if not settings.LOGOUT_REDIRECT_URL: raise ImproperlyConfigured( "You must configure LOGOUT_RE...
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if ( "social_django" in settings.INSTALLED_APPS and "helusers.tunnistamo_oidc.TunnistamoOIDCAuth" in settings...
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if not settings.LOGOUT_REDIRECT_URL: raise ImproperlyConfigured( "You must configure LOGOUT_REDIRECT_URL to u...
<commit_before>"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if not settings.LOGOUT_REDIRECT_URL: raise ImproperlyConfigured( "You must configure LOGOUT_RE...
256409e253939e70652891a94ffd3d30b365ba13
docs/extensions/settings.py
docs/extensions/settings.py
"""Settings for Zinnia documentation""" from zinnia.xmlrpc import ZINNIA_XMLRPC_METHODS DATABASES = {'default': {'NAME': ':memory:', 'ENGINE': 'django.db.backends.sqlite3'}} SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'secret-key' AKISMET_SECRET_API_KEY = 'AKISMET_API_KEY' TYPEPAD_SECR...
"""Settings for Zinnia documentation""" from zinnia.xmlrpc import ZINNIA_XMLRPC_METHODS DATABASES = {'default': {'NAME': ':memory:', 'ENGINE': 'django.db.backends.sqlite3'}} SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'secret-key' AKISMET_SECRET_API_KEY = 'AKISMET_API_KEY' TYPEPAD_SECR...
Configure the extension to use django_comments
Configure the extension to use django_comments
Python
bsd-3-clause
Fantomas42/django-blog-zinnia,ghachey/django-blog-zinnia,dapeng0802/django-blog-zinnia,Fantomas42/django-blog-zinnia,1844144/django-blog-zinnia,marctc/django-blog-zinnia,1844144/django-blog-zinnia,ghachey/django-blog-zinnia,marctc/django-blog-zinnia,marctc/django-blog-zinnia,ZuluPro/django-blog-zinnia,extertioner/djang...
"""Settings for Zinnia documentation""" from zinnia.xmlrpc import ZINNIA_XMLRPC_METHODS DATABASES = {'default': {'NAME': ':memory:', 'ENGINE': 'django.db.backends.sqlite3'}} SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'secret-key' AKISMET_SECRET_API_KEY = 'AKISMET_API_KEY' TYPEPAD_SECR...
"""Settings for Zinnia documentation""" from zinnia.xmlrpc import ZINNIA_XMLRPC_METHODS DATABASES = {'default': {'NAME': ':memory:', 'ENGINE': 'django.db.backends.sqlite3'}} SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'secret-key' AKISMET_SECRET_API_KEY = 'AKISMET_API_KEY' TYPEPAD_SECR...
<commit_before>"""Settings for Zinnia documentation""" from zinnia.xmlrpc import ZINNIA_XMLRPC_METHODS DATABASES = {'default': {'NAME': ':memory:', 'ENGINE': 'django.db.backends.sqlite3'}} SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'secret-key' AKISMET_SECRET_API_KEY = 'AKISMET_API_KE...
"""Settings for Zinnia documentation""" from zinnia.xmlrpc import ZINNIA_XMLRPC_METHODS DATABASES = {'default': {'NAME': ':memory:', 'ENGINE': 'django.db.backends.sqlite3'}} SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'secret-key' AKISMET_SECRET_API_KEY = 'AKISMET_API_KEY' TYPEPAD_SECR...
"""Settings for Zinnia documentation""" from zinnia.xmlrpc import ZINNIA_XMLRPC_METHODS DATABASES = {'default': {'NAME': ':memory:', 'ENGINE': 'django.db.backends.sqlite3'}} SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'secret-key' AKISMET_SECRET_API_KEY = 'AKISMET_API_KEY' TYPEPAD_SECR...
<commit_before>"""Settings for Zinnia documentation""" from zinnia.xmlrpc import ZINNIA_XMLRPC_METHODS DATABASES = {'default': {'NAME': ':memory:', 'ENGINE': 'django.db.backends.sqlite3'}} SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'secret-key' AKISMET_SECRET_API_KEY = 'AKISMET_API_KE...
9beae1debc5a4402cc67362e905f8aa4eef2bfff
midonet/utils.py
midonet/utils.py
# Copyright (C) 2011 Midokura Japan KK """ Internal Utility Functions """ import logging import os.path logging.basicConfig(level=logging.DEBUG) LOG = logging.getLogger('midonet.client') def debug_print(msg, resp, body): LOG.debug('-' * 10) LOG.debug("%s :", msg) LOG.debug("Resp: %s" % resp) LOG.d...
# Copyright (C) 2011 Midokura Japan KK """ Internal Utility Functions """ import logging import os.path logging.basicConfig(level=logging.DEBUG) LOG = logging.getLogger('nova...midonet.client') def debug_print(msg, resp, body): LOG.debug('-' * 10) LOG.debug("%s :", msg) LOG.debug("Resp: %s" % resp) ...
Change name for nova integration
Change name for nova integration With Nova's logger setting, logger name starting with 'nova' only gets logged.
Python
apache-2.0
midonet/python-midonetclient,midokura/python-midonetclient,midonet/python-midonetclient,midokura/python-midonetclient
# Copyright (C) 2011 Midokura Japan KK """ Internal Utility Functions """ import logging import os.path logging.basicConfig(level=logging.DEBUG) LOG = logging.getLogger('midonet.client') def debug_print(msg, resp, body): LOG.debug('-' * 10) LOG.debug("%s :", msg) LOG.debug("Resp: %s" % resp) LOG.d...
# Copyright (C) 2011 Midokura Japan KK """ Internal Utility Functions """ import logging import os.path logging.basicConfig(level=logging.DEBUG) LOG = logging.getLogger('nova...midonet.client') def debug_print(msg, resp, body): LOG.debug('-' * 10) LOG.debug("%s :", msg) LOG.debug("Resp: %s" % resp) ...
<commit_before># Copyright (C) 2011 Midokura Japan KK """ Internal Utility Functions """ import logging import os.path logging.basicConfig(level=logging.DEBUG) LOG = logging.getLogger('midonet.client') def debug_print(msg, resp, body): LOG.debug('-' * 10) LOG.debug("%s :", msg) LOG.debug("Resp: %s" % ...
# Copyright (C) 2011 Midokura Japan KK """ Internal Utility Functions """ import logging import os.path logging.basicConfig(level=logging.DEBUG) LOG = logging.getLogger('nova...midonet.client') def debug_print(msg, resp, body): LOG.debug('-' * 10) LOG.debug("%s :", msg) LOG.debug("Resp: %s" % resp) ...
# Copyright (C) 2011 Midokura Japan KK """ Internal Utility Functions """ import logging import os.path logging.basicConfig(level=logging.DEBUG) LOG = logging.getLogger('midonet.client') def debug_print(msg, resp, body): LOG.debug('-' * 10) LOG.debug("%s :", msg) LOG.debug("Resp: %s" % resp) LOG.d...
<commit_before># Copyright (C) 2011 Midokura Japan KK """ Internal Utility Functions """ import logging import os.path logging.basicConfig(level=logging.DEBUG) LOG = logging.getLogger('midonet.client') def debug_print(msg, resp, body): LOG.debug('-' * 10) LOG.debug("%s :", msg) LOG.debug("Resp: %s" % ...
5d13c06d6d213c4dc35f79b14efb945b93da977b
neupy/__init__.py
neupy/__init__.py
""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.dev1'
""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.b1'
Set up v0.3.0 beta 1.
Set up v0.3.0 beta 1.
Python
mit
itdxer/neupy,itdxer/neupy,itdxer/neupy,itdxer/neupy
""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.dev1' Set up v0.3.0 beta 1.
""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.b1'
<commit_before>""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.dev1' <commit_msg>Set up v0.3.0 beta 1.<commit_after>
""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.b1'
""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.dev1' Set up v0.3.0 beta 1.""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.b1'
<commit_before>""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.dev1' <commit_msg>Set up v0.3.0 beta 1.<commit_after>""" NeuPy is the Artificial Neural Network library implemented in Python. """ __version__ = '0.3.0.b1'
3701ab7e372d73c2076988954dabff82f0f16557
build/adama-app/adama-package/adama/store.py
build/adama-app/adama-package/adama/store.py
import collections import pickle import redis from .serf import node class Store(collections.MutableMapping): def __init__(self, db=0): host, port = node(role='redis', port=6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): obj = self._db.ge...
import collections import pickle import redis from .tools import location class Store(collections.MutableMapping): def __init__(self, db=0): host, port = location('redis', 6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): obj = self._db.get...
Store is using serfnode service discovery
Store is using serfnode service discovery
Python
mit
waltermoreira/adama-app,waltermoreira/adama-app,waltermoreira/adama-app
import collections import pickle import redis from .serf import node class Store(collections.MutableMapping): def __init__(self, db=0): host, port = node(role='redis', port=6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): obj = self._db.ge...
import collections import pickle import redis from .tools import location class Store(collections.MutableMapping): def __init__(self, db=0): host, port = location('redis', 6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): obj = self._db.get...
<commit_before>import collections import pickle import redis from .serf import node class Store(collections.MutableMapping): def __init__(self, db=0): host, port = node(role='redis', port=6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): ob...
import collections import pickle import redis from .tools import location class Store(collections.MutableMapping): def __init__(self, db=0): host, port = location('redis', 6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): obj = self._db.get...
import collections import pickle import redis from .serf import node class Store(collections.MutableMapping): def __init__(self, db=0): host, port = node(role='redis', port=6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): obj = self._db.ge...
<commit_before>import collections import pickle import redis from .serf import node class Store(collections.MutableMapping): def __init__(self, db=0): host, port = node(role='redis', port=6379) self._db = redis.StrictRedis(host=host, port=port, db=db) def __getitem__(self, key): ob...