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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f498eba42dd3d35e9ff0b5240f44fe8df25332ed | law/contrib/cms/tasks.py | law/contrib/cms/tasks.py | # -*- coding: utf-8 -*-
"""
CMS-related tasks.
https://home.cern/about/experiments/cms
"""
__all__ = ["BundleCMSSW"]
import os
import luigi
from law import Task, LocalFileTarget, NO_STR
from law.decorator import log
from law.util import rel_path, interruptable_popen
class BundleCMSSW(Task):
task_namespac... | # -*- coding: utf-8 -*-
"""
CMS-related tasks.
https://home.cern/about/experiments/cms
"""
__all__ = ["BundleCMSSW"]
import os
import luigi
from law import Task, LocalFileTarget, NO_STR
from law.decorator import log
from law.util import rel_path, interruptable_popen
class BundleCMSSW(Task):
task_namespac... | Rename path parameter in contrib.cms.BundleCMSSW. | Rename path parameter in contrib.cms.BundleCMSSW.
| Python | bsd-3-clause | riga/law,riga/law | # -*- coding: utf-8 -*-
"""
CMS-related tasks.
https://home.cern/about/experiments/cms
"""
__all__ = ["BundleCMSSW"]
import os
import luigi
from law import Task, LocalFileTarget, NO_STR
from law.decorator import log
from law.util import rel_path, interruptable_popen
class BundleCMSSW(Task):
task_namespac... | # -*- coding: utf-8 -*-
"""
CMS-related tasks.
https://home.cern/about/experiments/cms
"""
__all__ = ["BundleCMSSW"]
import os
import luigi
from law import Task, LocalFileTarget, NO_STR
from law.decorator import log
from law.util import rel_path, interruptable_popen
class BundleCMSSW(Task):
task_namespac... | <commit_before># -*- coding: utf-8 -*-
"""
CMS-related tasks.
https://home.cern/about/experiments/cms
"""
__all__ = ["BundleCMSSW"]
import os
import luigi
from law import Task, LocalFileTarget, NO_STR
from law.decorator import log
from law.util import rel_path, interruptable_popen
class BundleCMSSW(Task):
... | # -*- coding: utf-8 -*-
"""
CMS-related tasks.
https://home.cern/about/experiments/cms
"""
__all__ = ["BundleCMSSW"]
import os
import luigi
from law import Task, LocalFileTarget, NO_STR
from law.decorator import log
from law.util import rel_path, interruptable_popen
class BundleCMSSW(Task):
task_namespac... | # -*- coding: utf-8 -*-
"""
CMS-related tasks.
https://home.cern/about/experiments/cms
"""
__all__ = ["BundleCMSSW"]
import os
import luigi
from law import Task, LocalFileTarget, NO_STR
from law.decorator import log
from law.util import rel_path, interruptable_popen
class BundleCMSSW(Task):
task_namespac... | <commit_before># -*- coding: utf-8 -*-
"""
CMS-related tasks.
https://home.cern/about/experiments/cms
"""
__all__ = ["BundleCMSSW"]
import os
import luigi
from law import Task, LocalFileTarget, NO_STR
from law.decorator import log
from law.util import rel_path, interruptable_popen
class BundleCMSSW(Task):
... |
65d6a7ef78b013b261a9a1ad0cfe4756d5cfd675 | redditanalyser/__init__.py | redditanalyser/__init__.py | # -*- coding: utf-8 -*-
import logging
import praw
from settings import Config
from .database import create_db_session
logging.basicConfig(level="INFO")
logger = logging.getLogger(__name__)
# Project configuration settings
cfg = Config()
if not cfg.USERNAME:
logger.error("Username in settings must be set. Exit... | # -*- coding: utf-8 -*-
import logging
import praw
from settings import Config
from .database import create_db_session
logging.basicConfig(level="WARNING")
logger = logging.getLogger(__name__)
# Project configuration settings
cfg = Config()
if not cfg.USERNAME:
logger.error("Username in settings must be set. E... | Revert log level setup to WARN | Revert log level setup to WARN
| Python | mit | PsyBorgs/redditanalyser,PsyBorgs/redditanalyser | # -*- coding: utf-8 -*-
import logging
import praw
from settings import Config
from .database import create_db_session
logging.basicConfig(level="INFO")
logger = logging.getLogger(__name__)
# Project configuration settings
cfg = Config()
if not cfg.USERNAME:
logger.error("Username in settings must be set. Exit... | # -*- coding: utf-8 -*-
import logging
import praw
from settings import Config
from .database import create_db_session
logging.basicConfig(level="WARNING")
logger = logging.getLogger(__name__)
# Project configuration settings
cfg = Config()
if not cfg.USERNAME:
logger.error("Username in settings must be set. E... | <commit_before># -*- coding: utf-8 -*-
import logging
import praw
from settings import Config
from .database import create_db_session
logging.basicConfig(level="INFO")
logger = logging.getLogger(__name__)
# Project configuration settings
cfg = Config()
if not cfg.USERNAME:
logger.error("Username in settings mu... | # -*- coding: utf-8 -*-
import logging
import praw
from settings import Config
from .database import create_db_session
logging.basicConfig(level="WARNING")
logger = logging.getLogger(__name__)
# Project configuration settings
cfg = Config()
if not cfg.USERNAME:
logger.error("Username in settings must be set. E... | # -*- coding: utf-8 -*-
import logging
import praw
from settings import Config
from .database import create_db_session
logging.basicConfig(level="INFO")
logger = logging.getLogger(__name__)
# Project configuration settings
cfg = Config()
if not cfg.USERNAME:
logger.error("Username in settings must be set. Exit... | <commit_before># -*- coding: utf-8 -*-
import logging
import praw
from settings import Config
from .database import create_db_session
logging.basicConfig(level="INFO")
logger = logging.getLogger(__name__)
# Project configuration settings
cfg = Config()
if not cfg.USERNAME:
logger.error("Username in settings mu... |
ff02f0e8a7b62d5afdc88730129a5e0811fb5a82 | monitor/monitor_test.py | monitor/monitor_test.py | #!/usr/bin/python
import unittest
import monitor
class TestMonitor(unittest.TestCase):
def test_attr(self):
mon = monitor.Monitor()
assert mon.pvprefix == "MON-CONTROL:"
assert mon.monitorname == "PI1"
def test_testimage(self):
mon = monitor.Monitor()
image = mon.testimage()
assert len(image) != 0
# ... | #!/usr/bin/python
import unittest
from mock import patch, MagicMock, PropertyMock
from monitor import Monitor
class MonitorUpdateTest(unittest.TestCase):
def setUp(self):
with patch('monitor.pv.PV'):
mock_plotter = MagicMock()
self.monitor = Monitor("MYNAME", mock_plotter)
... | Rewrite monitortests. Add tests for update_image | Rewrite monitortests. Add tests for update_image
| Python | apache-2.0 | nickbattam/picamon,nickbattam/picamon,nickbattam/picamon,nickbattam/picamon | #!/usr/bin/python
import unittest
import monitor
class TestMonitor(unittest.TestCase):
def test_attr(self):
mon = monitor.Monitor()
assert mon.pvprefix == "MON-CONTROL:"
assert mon.monitorname == "PI1"
def test_testimage(self):
mon = monitor.Monitor()
image = mon.testimage()
assert len(image) != 0
# ... | #!/usr/bin/python
import unittest
from mock import patch, MagicMock, PropertyMock
from monitor import Monitor
class MonitorUpdateTest(unittest.TestCase):
def setUp(self):
with patch('monitor.pv.PV'):
mock_plotter = MagicMock()
self.monitor = Monitor("MYNAME", mock_plotter)
... | <commit_before>#!/usr/bin/python
import unittest
import monitor
class TestMonitor(unittest.TestCase):
def test_attr(self):
mon = monitor.Monitor()
assert mon.pvprefix == "MON-CONTROL:"
assert mon.monitorname == "PI1"
def test_testimage(self):
mon = monitor.Monitor()
image = mon.testimage()
assert len(... | #!/usr/bin/python
import unittest
from mock import patch, MagicMock, PropertyMock
from monitor import Monitor
class MonitorUpdateTest(unittest.TestCase):
def setUp(self):
with patch('monitor.pv.PV'):
mock_plotter = MagicMock()
self.monitor = Monitor("MYNAME", mock_plotter)
... | #!/usr/bin/python
import unittest
import monitor
class TestMonitor(unittest.TestCase):
def test_attr(self):
mon = monitor.Monitor()
assert mon.pvprefix == "MON-CONTROL:"
assert mon.monitorname == "PI1"
def test_testimage(self):
mon = monitor.Monitor()
image = mon.testimage()
assert len(image) != 0
# ... | <commit_before>#!/usr/bin/python
import unittest
import monitor
class TestMonitor(unittest.TestCase):
def test_attr(self):
mon = monitor.Monitor()
assert mon.pvprefix == "MON-CONTROL:"
assert mon.monitorname == "PI1"
def test_testimage(self):
mon = monitor.Monitor()
image = mon.testimage()
assert len(... |
14f5842a6ae598253f30a711983985ce60c17e04 | localore/search/views.py | localore/search/views.py | from django.shortcuts import render
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from wagtail.wagtailcore.models import Page
from wagtail.wagtailsearch.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('page', 1)
# S... | from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import JsonResponse
from django.shortcuts import render
from wagtail.wagtailcore.models import Page
from wagtail.wagtailsearch.models import Query
def search(request):
json = request.GET.get('json', False)
search_query ... | Add support for returning search results as JSON. | Add support for returning search results as JSON.
| Python | mpl-2.0 | ghostwords/localore,ghostwords/localore,ghostwords/localore | from django.shortcuts import render
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from wagtail.wagtailcore.models import Page
from wagtail.wagtailsearch.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('page', 1)
# S... | from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import JsonResponse
from django.shortcuts import render
from wagtail.wagtailcore.models import Page
from wagtail.wagtailsearch.models import Query
def search(request):
json = request.GET.get('json', False)
search_query ... | <commit_before>from django.shortcuts import render
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from wagtail.wagtailcore.models import Page
from wagtail.wagtailsearch.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('pag... | from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import JsonResponse
from django.shortcuts import render
from wagtail.wagtailcore.models import Page
from wagtail.wagtailsearch.models import Query
def search(request):
json = request.GET.get('json', False)
search_query ... | from django.shortcuts import render
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from wagtail.wagtailcore.models import Page
from wagtail.wagtailsearch.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('page', 1)
# S... | <commit_before>from django.shortcuts import render
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from wagtail.wagtailcore.models import Page
from wagtail.wagtailsearch.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('pag... |
6741f6746fe24c91b791ed35048e750d9c52d5ce | scripts/utils.py | scripts/utils.py | # -*- coding: utf-8 -*-
import os
import logging
import datetime
from website import settings
def format_now():
return datetime.datetime.now().isoformat()
def add_file_logger(logger, script_name, suffix=None):
_, name = os.path.split(script_name)
if suffix is not None:
name = '{0}-{1}'.format(... | # -*- coding: utf-8 -*-
import os
import logging
import datetime
from website import settings
def format_now():
return datetime.datetime.now().isoformat()
def add_file_logger(logger, script_name, suffix=None):
_, name = os.path.split(script_name)
name = name.rstrip('c')
if suffix is not None:
... | Make script log file names more consistent | Make script log file names more consistent
...by stripping c's of filenames, so that we get
script_name.py-timestamp rather than script_name.pyc-timestamp
| Python | apache-2.0 | caneruguz/osf.io,kch8qx/osf.io,cwisecarver/osf.io,rdhyee/osf.io,crcresearch/osf.io,abought/osf.io,TomBaxter/osf.io,kwierman/osf.io,mluke93/osf.io,alexschiller/osf.io,laurenrevere/osf.io,DanielSBrown/osf.io,mluo613/osf.io,alexschiller/osf.io,crcresearch/osf.io,Nesiehr/osf.io,cslzchen/osf.io,leb2dg/osf.io,caseyrollins/os... | # -*- coding: utf-8 -*-
import os
import logging
import datetime
from website import settings
def format_now():
return datetime.datetime.now().isoformat()
def add_file_logger(logger, script_name, suffix=None):
_, name = os.path.split(script_name)
if suffix is not None:
name = '{0}-{1}'.format(... | # -*- coding: utf-8 -*-
import os
import logging
import datetime
from website import settings
def format_now():
return datetime.datetime.now().isoformat()
def add_file_logger(logger, script_name, suffix=None):
_, name = os.path.split(script_name)
name = name.rstrip('c')
if suffix is not None:
... | <commit_before># -*- coding: utf-8 -*-
import os
import logging
import datetime
from website import settings
def format_now():
return datetime.datetime.now().isoformat()
def add_file_logger(logger, script_name, suffix=None):
_, name = os.path.split(script_name)
if suffix is not None:
name = '{... | # -*- coding: utf-8 -*-
import os
import logging
import datetime
from website import settings
def format_now():
return datetime.datetime.now().isoformat()
def add_file_logger(logger, script_name, suffix=None):
_, name = os.path.split(script_name)
name = name.rstrip('c')
if suffix is not None:
... | # -*- coding: utf-8 -*-
import os
import logging
import datetime
from website import settings
def format_now():
return datetime.datetime.now().isoformat()
def add_file_logger(logger, script_name, suffix=None):
_, name = os.path.split(script_name)
if suffix is not None:
name = '{0}-{1}'.format(... | <commit_before># -*- coding: utf-8 -*-
import os
import logging
import datetime
from website import settings
def format_now():
return datetime.datetime.now().isoformat()
def add_file_logger(logger, script_name, suffix=None):
_, name = os.path.split(script_name)
if suffix is not None:
name = '{... |
462acba741c929ae79d5c2e6f6fc98307f556ec9 | shopping_list.py | shopping_list.py | shopping_list = []
def show_help():
print("What should we pick up at the store?")
print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.")
def add_to_list(item):
shopping_list.append(item)
print("Added! List has {} items.".format(len(shopping_list)))
| shopping_list = []
def show_help():
print("What should we pick up at the store?")
print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.")
def add_to_list(item):
shopping_list.append(item)
print("Added! List has {} items.".format(len(shopping_list)))
def show_list():
prin... | Implement method to show contents of the list. | Implement method to show contents of the list.
| Python | mit | adityatrivedi/shopping-list | shopping_list = []
def show_help():
print("What should we pick up at the store?")
print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.")
def add_to_list(item):
shopping_list.append(item)
print("Added! List has {} items.".format(len(shopping_list)))
Implement method to sh... | shopping_list = []
def show_help():
print("What should we pick up at the store?")
print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.")
def add_to_list(item):
shopping_list.append(item)
print("Added! List has {} items.".format(len(shopping_list)))
def show_list():
prin... | <commit_before>shopping_list = []
def show_help():
print("What should we pick up at the store?")
print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.")
def add_to_list(item):
shopping_list.append(item)
print("Added! List has {} items.".format(len(shopping_list)))
<commit... | shopping_list = []
def show_help():
print("What should we pick up at the store?")
print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.")
def add_to_list(item):
shopping_list.append(item)
print("Added! List has {} items.".format(len(shopping_list)))
def show_list():
prin... | shopping_list = []
def show_help():
print("What should we pick up at the store?")
print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.")
def add_to_list(item):
shopping_list.append(item)
print("Added! List has {} items.".format(len(shopping_list)))
Implement method to sh... | <commit_before>shopping_list = []
def show_help():
print("What should we pick up at the store?")
print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.")
def add_to_list(item):
shopping_list.append(item)
print("Added! List has {} items.".format(len(shopping_list)))
<commit... |
2f77a49d4a8393b1de14aac29b41204e8006876e | project/members/rest.py | project/members/rest.py | from rest_framework import viewsets, serializers
from .models import MemberType, Member, MembershipApplicationTag, MembershipApplication
class MemberTypeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = MemberType
class MemberTypeViewSet(viewsets.ModelViewSet):
serializer_class =... | from rest_framework import viewsets, serializers
from .models import MemberType, Member, MembershipApplicationTag, MembershipApplication
class MemberTypeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = MemberType
class MemberTypeViewSet(viewsets.ModelViewSet):
serializer_class =... | Add credit property to member REST API response | Add credit property to member REST API response
| Python | mit | jautero/asylum,HelsinkiHacklab/asylum,rambo/asylum,ojousima/asylum,rambo/asylum,hacklab-fi/asylum,rambo/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,ojousima/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,jautero/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,ojousima/asylum,ojousima/asylum,rambo/as... | from rest_framework import viewsets, serializers
from .models import MemberType, Member, MembershipApplicationTag, MembershipApplication
class MemberTypeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = MemberType
class MemberTypeViewSet(viewsets.ModelViewSet):
serializer_class =... | from rest_framework import viewsets, serializers
from .models import MemberType, Member, MembershipApplicationTag, MembershipApplication
class MemberTypeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = MemberType
class MemberTypeViewSet(viewsets.ModelViewSet):
serializer_class =... | <commit_before>from rest_framework import viewsets, serializers
from .models import MemberType, Member, MembershipApplicationTag, MembershipApplication
class MemberTypeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = MemberType
class MemberTypeViewSet(viewsets.ModelViewSet):
ser... | from rest_framework import viewsets, serializers
from .models import MemberType, Member, MembershipApplicationTag, MembershipApplication
class MemberTypeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = MemberType
class MemberTypeViewSet(viewsets.ModelViewSet):
serializer_class =... | from rest_framework import viewsets, serializers
from .models import MemberType, Member, MembershipApplicationTag, MembershipApplication
class MemberTypeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = MemberType
class MemberTypeViewSet(viewsets.ModelViewSet):
serializer_class =... | <commit_before>from rest_framework import viewsets, serializers
from .models import MemberType, Member, MembershipApplicationTag, MembershipApplication
class MemberTypeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = MemberType
class MemberTypeViewSet(viewsets.ModelViewSet):
ser... |
3f5bd92a11ed69592e21888838088f8baa0d6575 | makefiles_plain_python.py | makefiles_plain_python.py | #!/usr/bin/python3
def make_a_file(i):
f = "out_python/{:05d}".format(i)
try:
with open(f, "w") as fp:
fp.write("hello")
# print("wrote", f)
except:
print("failed on", f)
def make_a_lot_of_files(how_many):
for i in range(how_many):
make_a_file(i)
return... | #!/usr/bin/python3
import asyncio
@asyncio.coroutine
def make_a_file(i):
f = "out_python/{:05d}".format(i)
try:
with open(f, "w") as fp:
fp.write("hello")
# print("wrote", f)
except:
print("failed on", f)
def make_a_lot_of_files(how_many):
loop = asyncio.get_event... | Use asyncio in plain python example. | Use asyncio in plain python example.
| Python | mit | reedwade/python-golang-linking,reedwade/python-golang-linking | #!/usr/bin/python3
def make_a_file(i):
f = "out_python/{:05d}".format(i)
try:
with open(f, "w") as fp:
fp.write("hello")
# print("wrote", f)
except:
print("failed on", f)
def make_a_lot_of_files(how_many):
for i in range(how_many):
make_a_file(i)
return... | #!/usr/bin/python3
import asyncio
@asyncio.coroutine
def make_a_file(i):
f = "out_python/{:05d}".format(i)
try:
with open(f, "w") as fp:
fp.write("hello")
# print("wrote", f)
except:
print("failed on", f)
def make_a_lot_of_files(how_many):
loop = asyncio.get_event... | <commit_before>#!/usr/bin/python3
def make_a_file(i):
f = "out_python/{:05d}".format(i)
try:
with open(f, "w") as fp:
fp.write("hello")
# print("wrote", f)
except:
print("failed on", f)
def make_a_lot_of_files(how_many):
for i in range(how_many):
make_a_fil... | #!/usr/bin/python3
import asyncio
@asyncio.coroutine
def make_a_file(i):
f = "out_python/{:05d}".format(i)
try:
with open(f, "w") as fp:
fp.write("hello")
# print("wrote", f)
except:
print("failed on", f)
def make_a_lot_of_files(how_many):
loop = asyncio.get_event... | #!/usr/bin/python3
def make_a_file(i):
f = "out_python/{:05d}".format(i)
try:
with open(f, "w") as fp:
fp.write("hello")
# print("wrote", f)
except:
print("failed on", f)
def make_a_lot_of_files(how_many):
for i in range(how_many):
make_a_file(i)
return... | <commit_before>#!/usr/bin/python3
def make_a_file(i):
f = "out_python/{:05d}".format(i)
try:
with open(f, "w") as fp:
fp.write("hello")
# print("wrote", f)
except:
print("failed on", f)
def make_a_lot_of_files(how_many):
for i in range(how_many):
make_a_fil... |
ef6b10e2a01c42fa12d067eae86429dab756f534 | raiden/constants.py | raiden/constants.py | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-08-18 from commit 01554102f0a52fc5aec3f41dc46d53017108b400
ROPSTEN_REGISTRY_ADDRESS = '7205a22f083a12d1b22ee89d7e892d23b1f1438a'
ROPSTEN_DIS... | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-09-03 from commit f4f8dcbe791b7be8bc15475f79ad9cbbfe15435b
ROPSTEN_REGISTRY_ADDRESS = 'ce30a13daa47c0f35631e5ed750e39c12172f325'
ROPSTEN_DIS... | Deploy smart contracts v0.0.6 to Ropsten | Deploy smart contracts v0.0.6 to Ropsten | Python | mit | hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden,tomashaber/raiden,hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-08-18 from commit 01554102f0a52fc5aec3f41dc46d53017108b400
ROPSTEN_REGISTRY_ADDRESS = '7205a22f083a12d1b22ee89d7e892d23b1f1438a'
ROPSTEN_DIS... | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-09-03 from commit f4f8dcbe791b7be8bc15475f79ad9cbbfe15435b
ROPSTEN_REGISTRY_ADDRESS = 'ce30a13daa47c0f35631e5ed750e39c12172f325'
ROPSTEN_DIS... | <commit_before># -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-08-18 from commit 01554102f0a52fc5aec3f41dc46d53017108b400
ROPSTEN_REGISTRY_ADDRESS = '7205a22f083a12d1b22ee89d7e892d23b1f143... | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-09-03 from commit f4f8dcbe791b7be8bc15475f79ad9cbbfe15435b
ROPSTEN_REGISTRY_ADDRESS = 'ce30a13daa47c0f35631e5ed750e39c12172f325'
ROPSTEN_DIS... | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-08-18 from commit 01554102f0a52fc5aec3f41dc46d53017108b400
ROPSTEN_REGISTRY_ADDRESS = '7205a22f083a12d1b22ee89d7e892d23b1f1438a'
ROPSTEN_DIS... | <commit_before># -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-08-18 from commit 01554102f0a52fc5aec3f41dc46d53017108b400
ROPSTEN_REGISTRY_ADDRESS = '7205a22f083a12d1b22ee89d7e892d23b1f143... |
f4a2068703ea0e32c4e62c3451d2c6bce0922b1c | movies/test/test_views.py | movies/test/test_views.py | from django.test import TestCase
from rest_framework.test import APIClient
from movies.test import factories
class MovieViewSetTestCase(TestCase):
def setUp(self):
self.api = APIClient()
self.movies = factories.MoviesFactory.create()
def test_entry(self):
response = self.api.get('/... | from django.test import TestCase
from rest_framework.test import APIClient
from movies.test import factories
class MovieViewSetTestCase(TestCase):
def setUp(self):
self.api = APIClient()
self.movies = factories.MoviesFactory.create()
def test_entry(self):
response = self.api.get('/... | Test will fail, will jenkins run? | Test will fail, will jenkins run?
| Python | mit | kinoreel/kinoreel-backend,kinoreel/kinoreel-backend | from django.test import TestCase
from rest_framework.test import APIClient
from movies.test import factories
class MovieViewSetTestCase(TestCase):
def setUp(self):
self.api = APIClient()
self.movies = factories.MoviesFactory.create()
def test_entry(self):
response = self.api.get('/... | from django.test import TestCase
from rest_framework.test import APIClient
from movies.test import factories
class MovieViewSetTestCase(TestCase):
def setUp(self):
self.api = APIClient()
self.movies = factories.MoviesFactory.create()
def test_entry(self):
response = self.api.get('/... | <commit_before>from django.test import TestCase
from rest_framework.test import APIClient
from movies.test import factories
class MovieViewSetTestCase(TestCase):
def setUp(self):
self.api = APIClient()
self.movies = factories.MoviesFactory.create()
def test_entry(self):
response = ... | from django.test import TestCase
from rest_framework.test import APIClient
from movies.test import factories
class MovieViewSetTestCase(TestCase):
def setUp(self):
self.api = APIClient()
self.movies = factories.MoviesFactory.create()
def test_entry(self):
response = self.api.get('/... | from django.test import TestCase
from rest_framework.test import APIClient
from movies.test import factories
class MovieViewSetTestCase(TestCase):
def setUp(self):
self.api = APIClient()
self.movies = factories.MoviesFactory.create()
def test_entry(self):
response = self.api.get('/... | <commit_before>from django.test import TestCase
from rest_framework.test import APIClient
from movies.test import factories
class MovieViewSetTestCase(TestCase):
def setUp(self):
self.api = APIClient()
self.movies = factories.MoviesFactory.create()
def test_entry(self):
response = ... |
fc9970e97575af85384fedc58cdc1ff9800628cc | neo/test/rawiotest/test_alphaomegarawio.py | neo/test/rawiotest/test_alphaomegarawio.py | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | Use correct test data path | Use correct test data path
| Python | bsd-3-clause | samuelgarcia/python-neo,apdavison/python-neo,JuliaSprenger/python-neo,INM-6/python-neo,NeuralEnsemble/python-neo | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | <commit_before>"""
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if ... | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | """
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if the new coded I... | <commit_before>"""
Tests of neo.rawio.examplerawio
Note for dev:
if you write a new RawIO class your need to put some file
to be tested at g-node portal, Ask neuralensemble list for that.
The file need to be small.
Then you have to copy/paste/renamed the TestExampleRawIO
class and a full test will be done to test if ... |
a9330038b2dc56e34ccc5ecdfb297adfc50ec005 | nlpipe/modules/corefnl.py | nlpipe/modules/corefnl.py | """
Wrapper around antske/coref_draft.
Input should be NAF files parsed by alpino (e.g. alpinonerc)
"""
from KafNafParserPy import KafNafParser
from multisieve_coreference import process_coreference
from io import BytesIO
import logging
from nlpipe.module import Module
log = logging.getLogger(__name__)
class CorefN... | """
Wrapper around antske/coref_draft.
Input should be NAF files parsed by alpino (e.g. alpinonerc)
"""
import logging
from nlpipe.module import Module
import subprocess
import os
log = logging.getLogger(__name__)
class CorefNL(Module):
name = "corefnl"
def check_status(self):
if 'COREF_HOME' not i... | Change coref to external call | Change coref to external call
| Python | mit | vanatteveldt/nlpipe,vanatteveldt/nlpipe,vanatteveldt/nlpipe | """
Wrapper around antske/coref_draft.
Input should be NAF files parsed by alpino (e.g. alpinonerc)
"""
from KafNafParserPy import KafNafParser
from multisieve_coreference import process_coreference
from io import BytesIO
import logging
from nlpipe.module import Module
log = logging.getLogger(__name__)
class CorefN... | """
Wrapper around antske/coref_draft.
Input should be NAF files parsed by alpino (e.g. alpinonerc)
"""
import logging
from nlpipe.module import Module
import subprocess
import os
log = logging.getLogger(__name__)
class CorefNL(Module):
name = "corefnl"
def check_status(self):
if 'COREF_HOME' not i... | <commit_before>"""
Wrapper around antske/coref_draft.
Input should be NAF files parsed by alpino (e.g. alpinonerc)
"""
from KafNafParserPy import KafNafParser
from multisieve_coreference import process_coreference
from io import BytesIO
import logging
from nlpipe.module import Module
log = logging.getLogger(__name__)... | """
Wrapper around antske/coref_draft.
Input should be NAF files parsed by alpino (e.g. alpinonerc)
"""
import logging
from nlpipe.module import Module
import subprocess
import os
log = logging.getLogger(__name__)
class CorefNL(Module):
name = "corefnl"
def check_status(self):
if 'COREF_HOME' not i... | """
Wrapper around antske/coref_draft.
Input should be NAF files parsed by alpino (e.g. alpinonerc)
"""
from KafNafParserPy import KafNafParser
from multisieve_coreference import process_coreference
from io import BytesIO
import logging
from nlpipe.module import Module
log = logging.getLogger(__name__)
class CorefN... | <commit_before>"""
Wrapper around antske/coref_draft.
Input should be NAF files parsed by alpino (e.g. alpinonerc)
"""
from KafNafParserPy import KafNafParser
from multisieve_coreference import process_coreference
from io import BytesIO
import logging
from nlpipe.module import Module
log = logging.getLogger(__name__)... |
d0a907706b8f21e63818375a669c6a8fbe398a5f | project_closing/__openerp__.py | project_closing/__openerp__.py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Camtpcaomp
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Camtpcaomp
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | Add OCA as author of OCA addons | Add OCA as author of OCA addons
In order to get visibility on https://www.odoo.com/apps the OCA board has
decided to add the OCA as author of all the addons maintained as part of the
association.
| Python | agpl-3.0 | Endika/project,acsone/project-service,yelizariev/project-service,dreispt/project,OCA/project-service,Antiun/project,dreispt/project-service,ddico/project,eezee-it/project-service,incaser/project,sergiocorato/project-service,raycarnes/project,Antiun/project-service,NeovaHealth/project-service,xpansa/project-service,acso... | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Camtpcaomp
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Camtpcaomp
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Camtpcaomp
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero G... | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Camtpcaomp
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Camtpcaomp
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Camtpcaomp
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero G... |
495ea3347eec9d1a902779de8dd07ba91aa48f60 | server/validator.py | server/validator.py | from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
@access.public... | from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
super(Validator, self).__init__()
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self... | Call Resource constructor from Validator, fixing a Girder warning | Call Resource constructor from Validator, fixing a Girder warning
| Python | apache-2.0 | Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,Kitware/romanesco | from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
@access.public... | from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
super(Validator, self).__init__()
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self... | <commit_before>from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
... | from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
super(Validator, self).__init__()
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self... | from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
@access.public... | <commit_before>from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
... |
5ffdb8b395576ffaff4dd948361b6baeffa1072c | pypeerassets/networks.py | pypeerassets/networks.py | from collections import namedtuple
Network = namedtuple('Network', [
'network_name',
'network_shortname',
'pubkeyhash',
'wif_prefix',
'scripthash',
'magicbytes'
])
networks = (
# Peercoin mainnet
Network("Peercoin", "ppc", b'37', b'b7', b'75', b'e6e8e9e5'),
# Peercoin testnet
N... | from collections import namedtuple
Network = namedtuple('Network', [
'network_name',
'network_shortname',
'pubkeyhash',
'wif_prefix',
'scripthash',
'magicbytes'
])
networks = (
# Peercoin mainnet
Network("Peercoin", "ppc", b'37', b'b7', b'75', b'e6e8e9e5'),
# Peercoin testnet
N... | Add specifications for Bitcoin mainnet and testnet | Add specifications for Bitcoin mainnet and testnet | Python | bsd-3-clause | PeerAssets/pypeerassets,backpacker69/pypeerassets | from collections import namedtuple
Network = namedtuple('Network', [
'network_name',
'network_shortname',
'pubkeyhash',
'wif_prefix',
'scripthash',
'magicbytes'
])
networks = (
# Peercoin mainnet
Network("Peercoin", "ppc", b'37', b'b7', b'75', b'e6e8e9e5'),
# Peercoin testnet
N... | from collections import namedtuple
Network = namedtuple('Network', [
'network_name',
'network_shortname',
'pubkeyhash',
'wif_prefix',
'scripthash',
'magicbytes'
])
networks = (
# Peercoin mainnet
Network("Peercoin", "ppc", b'37', b'b7', b'75', b'e6e8e9e5'),
# Peercoin testnet
N... | <commit_before>from collections import namedtuple
Network = namedtuple('Network', [
'network_name',
'network_shortname',
'pubkeyhash',
'wif_prefix',
'scripthash',
'magicbytes'
])
networks = (
# Peercoin mainnet
Network("Peercoin", "ppc", b'37', b'b7', b'75', b'e6e8e9e5'),
# Peercoi... | from collections import namedtuple
Network = namedtuple('Network', [
'network_name',
'network_shortname',
'pubkeyhash',
'wif_prefix',
'scripthash',
'magicbytes'
])
networks = (
# Peercoin mainnet
Network("Peercoin", "ppc", b'37', b'b7', b'75', b'e6e8e9e5'),
# Peercoin testnet
N... | from collections import namedtuple
Network = namedtuple('Network', [
'network_name',
'network_shortname',
'pubkeyhash',
'wif_prefix',
'scripthash',
'magicbytes'
])
networks = (
# Peercoin mainnet
Network("Peercoin", "ppc", b'37', b'b7', b'75', b'e6e8e9e5'),
# Peercoin testnet
N... | <commit_before>from collections import namedtuple
Network = namedtuple('Network', [
'network_name',
'network_shortname',
'pubkeyhash',
'wif_prefix',
'scripthash',
'magicbytes'
])
networks = (
# Peercoin mainnet
Network("Peercoin", "ppc", b'37', b'b7', b'75', b'e6e8e9e5'),
# Peercoi... |
b1e2b05a3e77b869cf9d0de820134237ce5de5ba | sideloader/tasks.py | sideloader/tasks.py | from celery import task
import os
import sys
import subprocess
@task()
def build(build, giturl, branch):
# Use subprocess to execute a build, update the db with results
local = os.path.dirname(sys.argv[0])
buildpack = os.path.join(local, 'bin/build_package')
deployfile = build.project.deploy_file
... | from celery import task
import os
import sys
import subprocess
@task()
def build(build, giturl, branch):
# Use subprocess to execute a build, update the db with results
local = os.path.dirname(sys.argv[0])
buildpack = os.path.join(local, 'bin/build_package')
deployfile = build.project.deploy_file
... | Use communicate so process out does not deadlock | Use communicate so process out does not deadlock
| Python | mit | praekelt/sideloader,praekelt/sideloader,praekelt/sideloader,praekelt/sideloader | from celery import task
import os
import sys
import subprocess
@task()
def build(build, giturl, branch):
# Use subprocess to execute a build, update the db with results
local = os.path.dirname(sys.argv[0])
buildpack = os.path.join(local, 'bin/build_package')
deployfile = build.project.deploy_file
... | from celery import task
import os
import sys
import subprocess
@task()
def build(build, giturl, branch):
# Use subprocess to execute a build, update the db with results
local = os.path.dirname(sys.argv[0])
buildpack = os.path.join(local, 'bin/build_package')
deployfile = build.project.deploy_file
... | <commit_before>from celery import task
import os
import sys
import subprocess
@task()
def build(build, giturl, branch):
# Use subprocess to execute a build, update the db with results
local = os.path.dirname(sys.argv[0])
buildpack = os.path.join(local, 'bin/build_package')
deployfile = build.project.de... | from celery import task
import os
import sys
import subprocess
@task()
def build(build, giturl, branch):
# Use subprocess to execute a build, update the db with results
local = os.path.dirname(sys.argv[0])
buildpack = os.path.join(local, 'bin/build_package')
deployfile = build.project.deploy_file
... | from celery import task
import os
import sys
import subprocess
@task()
def build(build, giturl, branch):
# Use subprocess to execute a build, update the db with results
local = os.path.dirname(sys.argv[0])
buildpack = os.path.join(local, 'bin/build_package')
deployfile = build.project.deploy_file
... | <commit_before>from celery import task
import os
import sys
import subprocess
@task()
def build(build, giturl, branch):
# Use subprocess to execute a build, update the db with results
local = os.path.dirname(sys.argv[0])
buildpack = os.path.join(local, 'bin/build_package')
deployfile = build.project.de... |
73b684af1941ea116d8b4b37ef463cd3c9da0493 | django_modelviews/templatetags/modelview_tags.py | django_modelviews/templatetags/modelview_tags.py | from django import template
from django.template.loader import render_to_string
from django.utils.text import capfirst
from django_modelview import generic
register = template.Library()
@register.simple_tag
def ordering_link(request, field, title):
title = capfirst(title)
if not hasattr(request, '_ordering... | from django import template
from django.template.loader import render_to_string
from django.utils.text import capfirst
from django_modelviews import generic
register = template.Library()
@register.simple_tag
def ordering_link(request, field, title):
title = capfirst(title)
if not hasattr(request, '_orderin... | Fix typo in project name | Fix typo in project name
| Python | bsd-3-clause | matthiask/towel,matthiask/towel,matthiask/towel,matthiask/towel | from django import template
from django.template.loader import render_to_string
from django.utils.text import capfirst
from django_modelview import generic
register = template.Library()
@register.simple_tag
def ordering_link(request, field, title):
title = capfirst(title)
if not hasattr(request, '_ordering... | from django import template
from django.template.loader import render_to_string
from django.utils.text import capfirst
from django_modelviews import generic
register = template.Library()
@register.simple_tag
def ordering_link(request, field, title):
title = capfirst(title)
if not hasattr(request, '_orderin... | <commit_before>from django import template
from django.template.loader import render_to_string
from django.utils.text import capfirst
from django_modelview import generic
register = template.Library()
@register.simple_tag
def ordering_link(request, field, title):
title = capfirst(title)
if not hasattr(requ... | from django import template
from django.template.loader import render_to_string
from django.utils.text import capfirst
from django_modelviews import generic
register = template.Library()
@register.simple_tag
def ordering_link(request, field, title):
title = capfirst(title)
if not hasattr(request, '_orderin... | from django import template
from django.template.loader import render_to_string
from django.utils.text import capfirst
from django_modelview import generic
register = template.Library()
@register.simple_tag
def ordering_link(request, field, title):
title = capfirst(title)
if not hasattr(request, '_ordering... | <commit_before>from django import template
from django.template.loader import render_to_string
from django.utils.text import capfirst
from django_modelview import generic
register = template.Library()
@register.simple_tag
def ordering_link(request, field, title):
title = capfirst(title)
if not hasattr(requ... |
297660a27dc5b23beb0f616965c60389bce3c2d8 | h2o-py/tests/testdir_algos/rf/pyunit_bigcatRF.py | h2o-py/tests/testdir_algos/rf/pyunit_bigcatRF.py | import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
... | import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
... | Add usage of nbins_cats to RF pyunit. | Add usage of nbins_cats to RF pyunit.
| Python | apache-2.0 | nilbody/h2o-3,YzPaul3/h2o-3,datachand/h2o-3,michalkurka/h2o-3,brightchen/h2o-3,madmax983/h2o-3,weaver-viii/h2o-3,junwucs/h2o-3,michalkurka/h2o-3,tarasane/h2o-3,michalkurka/h2o-3,datachand/h2o-3,madmax983/h2o-3,spennihana/h2o-3,h2oai/h2o-3,junwucs/h2o-3,datachand/h2o-3,junwucs/h2o-3,YzPaul3/h2o-3,bospetersen/h2o-3,jango... | import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
... | import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
... | <commit_before>import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predi... | import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
... | import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
... | <commit_before>import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predi... |
89e49a69e700f49fa70391b02c839e3a0a4a1c7f | server/accounts/views.py | server/accounts/views.py | from django.shortcuts import render
# Create your views here.
| from django.shortcuts import render
from django.contrib.auth import login, logout
from django.contrib.auth.models import User
from rest_framework import viewsets
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from rest_framework.views import APIView
# Create your views her... | Update the models for Auth and User. | Update the models for Auth and User.
| Python | agpl-3.0 | TomDataworks/angular-inventory,TomDataworks/angular-inventory | from django.shortcuts import render
# Create your views here.
Update the models for Auth and User. | from django.shortcuts import render
from django.contrib.auth import login, logout
from django.contrib.auth.models import User
from rest_framework import viewsets
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from rest_framework.views import APIView
# Create your views her... | <commit_before>from django.shortcuts import render
# Create your views here.
<commit_msg>Update the models for Auth and User.<commit_after> | from django.shortcuts import render
from django.contrib.auth import login, logout
from django.contrib.auth.models import User
from rest_framework import viewsets
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from rest_framework.views import APIView
# Create your views her... | from django.shortcuts import render
# Create your views here.
Update the models for Auth and User.from django.shortcuts import render
from django.contrib.auth import login, logout
from django.contrib.auth.models import User
from rest_framework import viewsets
from rest_framework.permissions import AllowAny
from rest_f... | <commit_before>from django.shortcuts import render
# Create your views here.
<commit_msg>Update the models for Auth and User.<commit_after>from django.shortcuts import render
from django.contrib.auth import login, logout
from django.contrib.auth.models import User
from rest_framework import viewsets
from rest_framewor... |
0cb0fee339883adeb93f787b5cc19e5293463c06 | skimage/_shared/utils.py | skimage/_shared/utils.py | import warnings
import functools
__all__ = ['deprecated']
class deprecated(object):
'''Decorator to mark deprecated functions with warning.
Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.
Parameters
----------
alt_func : str
If given, tell user what function to use i... | import warnings
import functools
__all__ = ['deprecated']
class deprecated(object):
'''Decorator to mark deprecated functions with warning.
Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.
Parameters
----------
alt_func : str
If given, tell user what function to use i... | Remove duplicate code for alternative function | Remove duplicate code for alternative function
| Python | bsd-3-clause | michaelpacer/scikit-image,Midafi/scikit-image,jwiggins/scikit-image,Midafi/scikit-image,michaelaye/scikit-image,Hiyorimi/scikit-image,paalge/scikit-image,SamHames/scikit-image,GaZ3ll3/scikit-image,juliusbierk/scikit-image,WarrenWeckesser/scikits-image,ajaybhat/scikit-image,oew1v07/scikit-image,rjeli/scikit-image,Britef... | import warnings
import functools
__all__ = ['deprecated']
class deprecated(object):
'''Decorator to mark deprecated functions with warning.
Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.
Parameters
----------
alt_func : str
If given, tell user what function to use i... | import warnings
import functools
__all__ = ['deprecated']
class deprecated(object):
'''Decorator to mark deprecated functions with warning.
Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.
Parameters
----------
alt_func : str
If given, tell user what function to use i... | <commit_before>import warnings
import functools
__all__ = ['deprecated']
class deprecated(object):
'''Decorator to mark deprecated functions with warning.
Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.
Parameters
----------
alt_func : str
If given, tell user what fu... | import warnings
import functools
__all__ = ['deprecated']
class deprecated(object):
'''Decorator to mark deprecated functions with warning.
Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.
Parameters
----------
alt_func : str
If given, tell user what function to use i... | import warnings
import functools
__all__ = ['deprecated']
class deprecated(object):
'''Decorator to mark deprecated functions with warning.
Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.
Parameters
----------
alt_func : str
If given, tell user what function to use i... | <commit_before>import warnings
import functools
__all__ = ['deprecated']
class deprecated(object):
'''Decorator to mark deprecated functions with warning.
Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.
Parameters
----------
alt_func : str
If given, tell user what fu... |
0b28fe44514969470db926c6f38615a8a5478bf6 | smoke_signal/__init__.py | smoke_signal/__init__.py | from flask import Flask, g
from .main.views import main
from .nojs.views import nojs
from sqlalchemy import create_engine
from smoke_signal.database.models import Base
from sqlalchemy.orm import sessionmaker
app = Flask(__name__, instance_relative_config=True)
app.config.from_object("config")
app.config.from_pyfile("c... | from flask import Flask, g
from .main.views import main
from sqlalchemy import create_engine
from smoke_signal.database.models import Base
from sqlalchemy.orm import sessionmaker
app = Flask(__name__, instance_relative_config=True)
app.config.from_object("config")
app.config.from_pyfile("config.py")
app.register_bluep... | Remove the no-JS version from the app | Remove the no-JS version from the app
I haven't looked into it for a long while.
| Python | mit | flacerdk/smoke-signal,flacerdk/smoke-signal,flacerdk/smoke-signal | from flask import Flask, g
from .main.views import main
from .nojs.views import nojs
from sqlalchemy import create_engine
from smoke_signal.database.models import Base
from sqlalchemy.orm import sessionmaker
app = Flask(__name__, instance_relative_config=True)
app.config.from_object("config")
app.config.from_pyfile("c... | from flask import Flask, g
from .main.views import main
from sqlalchemy import create_engine
from smoke_signal.database.models import Base
from sqlalchemy.orm import sessionmaker
app = Flask(__name__, instance_relative_config=True)
app.config.from_object("config")
app.config.from_pyfile("config.py")
app.register_bluep... | <commit_before>from flask import Flask, g
from .main.views import main
from .nojs.views import nojs
from sqlalchemy import create_engine
from smoke_signal.database.models import Base
from sqlalchemy.orm import sessionmaker
app = Flask(__name__, instance_relative_config=True)
app.config.from_object("config")
app.config... | from flask import Flask, g
from .main.views import main
from sqlalchemy import create_engine
from smoke_signal.database.models import Base
from sqlalchemy.orm import sessionmaker
app = Flask(__name__, instance_relative_config=True)
app.config.from_object("config")
app.config.from_pyfile("config.py")
app.register_bluep... | from flask import Flask, g
from .main.views import main
from .nojs.views import nojs
from sqlalchemy import create_engine
from smoke_signal.database.models import Base
from sqlalchemy.orm import sessionmaker
app = Flask(__name__, instance_relative_config=True)
app.config.from_object("config")
app.config.from_pyfile("c... | <commit_before>from flask import Flask, g
from .main.views import main
from .nojs.views import nojs
from sqlalchemy import create_engine
from smoke_signal.database.models import Base
from sqlalchemy.orm import sessionmaker
app = Flask(__name__, instance_relative_config=True)
app.config.from_object("config")
app.config... |
cad7bdca07f5ba979f14b11e6fd4109b1f7043c9 | terminate_instances.py | terminate_instances.py | s program terminate instances if proper tag is not used
"""
import time
import boto3
start_time = time.time()
ec2 = boto3.resource('ec2')
ec2_client = boto3.client('ec2')
tag_deparment = ['Finance', 'Marketing', 'HumanResources', 'Research'] # Your departments
shutdown_instance = False
for instance in ec2.instanc... | """
this program terminate instances if proper tag is not used
"""
import time
import boto3
start_time = time.time()
ec2 = boto3.resource('ec2')
ec2_client = boto3.client('ec2')
tag_deparment = ['Finance', 'Marketing', 'HumanResources', 'Research'] # Your departments
shutdown_instance = False
for instance in ec2.... | Terminate instances is not proper tag | Terminate instances is not proper tag
| Python | mit | gabrielrojasnyc/AWS | s program terminate instances if proper tag is not used
"""
import time
import boto3
start_time = time.time()
ec2 = boto3.resource('ec2')
ec2_client = boto3.client('ec2')
tag_deparment = ['Finance', 'Marketing', 'HumanResources', 'Research'] # Your departments
shutdown_instance = False
for instance in ec2.instanc... | """
this program terminate instances if proper tag is not used
"""
import time
import boto3
start_time = time.time()
ec2 = boto3.resource('ec2')
ec2_client = boto3.client('ec2')
tag_deparment = ['Finance', 'Marketing', 'HumanResources', 'Research'] # Your departments
shutdown_instance = False
for instance in ec2.... | <commit_before>s program terminate instances if proper tag is not used
"""
import time
import boto3
start_time = time.time()
ec2 = boto3.resource('ec2')
ec2_client = boto3.client('ec2')
tag_deparment = ['Finance', 'Marketing', 'HumanResources', 'Research'] # Your departments
shutdown_instance = False
for instance... | """
this program terminate instances if proper tag is not used
"""
import time
import boto3
start_time = time.time()
ec2 = boto3.resource('ec2')
ec2_client = boto3.client('ec2')
tag_deparment = ['Finance', 'Marketing', 'HumanResources', 'Research'] # Your departments
shutdown_instance = False
for instance in ec2.... | s program terminate instances if proper tag is not used
"""
import time
import boto3
start_time = time.time()
ec2 = boto3.resource('ec2')
ec2_client = boto3.client('ec2')
tag_deparment = ['Finance', 'Marketing', 'HumanResources', 'Research'] # Your departments
shutdown_instance = False
for instance in ec2.instanc... | <commit_before>s program terminate instances if proper tag is not used
"""
import time
import boto3
start_time = time.time()
ec2 = boto3.resource('ec2')
ec2_client = boto3.client('ec2')
tag_deparment = ['Finance', 'Marketing', 'HumanResources', 'Research'] # Your departments
shutdown_instance = False
for instance... |
2dbc4e2aec98aba8a0e307f951b412464db8b078 | della/user_manager/urls.py | della/user_manager/urls.py | from django.conf.urls import url
from django.contrib.auth import views as auth_views
from .views import (SignupView, UserProfileUpdateView, DrawNamesView,
UserProfileDetailView, ActivateView)
urlpatterns = [
url(r'^login/$', auth_views.login, name='login',
kwargs={'template_name': 'use... | from django.conf.urls import url
from django.contrib.auth import views as auth_views
from .views import (SignupView, UserProfileUpdateView, DrawNamesView,
UserProfileDetailView, ActivateView)
urlpatterns = [
url(r'^login/$', auth_views.login, name='login',
kwargs={'template_name': 'use... | Add name for url config of `ActivateView` | Add name for url config of `ActivateView`
| Python | mit | avinassh/della,avinassh/della,avinassh/della | from django.conf.urls import url
from django.contrib.auth import views as auth_views
from .views import (SignupView, UserProfileUpdateView, DrawNamesView,
UserProfileDetailView, ActivateView)
urlpatterns = [
url(r'^login/$', auth_views.login, name='login',
kwargs={'template_name': 'use... | from django.conf.urls import url
from django.contrib.auth import views as auth_views
from .views import (SignupView, UserProfileUpdateView, DrawNamesView,
UserProfileDetailView, ActivateView)
urlpatterns = [
url(r'^login/$', auth_views.login, name='login',
kwargs={'template_name': 'use... | <commit_before>from django.conf.urls import url
from django.contrib.auth import views as auth_views
from .views import (SignupView, UserProfileUpdateView, DrawNamesView,
UserProfileDetailView, ActivateView)
urlpatterns = [
url(r'^login/$', auth_views.login, name='login',
kwargs={'templ... | from django.conf.urls import url
from django.contrib.auth import views as auth_views
from .views import (SignupView, UserProfileUpdateView, DrawNamesView,
UserProfileDetailView, ActivateView)
urlpatterns = [
url(r'^login/$', auth_views.login, name='login',
kwargs={'template_name': 'use... | from django.conf.urls import url
from django.contrib.auth import views as auth_views
from .views import (SignupView, UserProfileUpdateView, DrawNamesView,
UserProfileDetailView, ActivateView)
urlpatterns = [
url(r'^login/$', auth_views.login, name='login',
kwargs={'template_name': 'use... | <commit_before>from django.conf.urls import url
from django.contrib.auth import views as auth_views
from .views import (SignupView, UserProfileUpdateView, DrawNamesView,
UserProfileDetailView, ActivateView)
urlpatterns = [
url(r'^login/$', auth_views.login, name='login',
kwargs={'templ... |
9b8c1f35d057bbf6e336434bd028cb0b2673afb8 | installer/installer_config/admin.py | installer/installer_config/admin.py | from django.contrib import admin
from installer_config.models import Package, TerminalPrompt, EnvironmentProfile
class PackageAdmin(admin.ModelAdmin):
model = Package
list_display = ('display_name', 'version', 'website')
class TerminalPromptAdmin(admin.ModelAdmin):
model = TerminalPrompt
list_displa... | from django.contrib import admin
from installer_config.models import Package, TerminalPrompt, EnvironmentProfile
class PackageAdmin(admin.ModelAdmin):
model = Package
list_display = ('display_name', 'version', 'website')
class TerminalPromptAdmin(admin.ModelAdmin):
model = TerminalPrompt
list_displa... | Add Environment Profile to Admin view | Add Environment Profile to Admin view
| Python | mit | ezPy-co/ezpy,ezPy-co/ezpy,alibulota/Package_Installer,alibulota/Package_Installer | from django.contrib import admin
from installer_config.models import Package, TerminalPrompt, EnvironmentProfile
class PackageAdmin(admin.ModelAdmin):
model = Package
list_display = ('display_name', 'version', 'website')
class TerminalPromptAdmin(admin.ModelAdmin):
model = TerminalPrompt
list_displa... | from django.contrib import admin
from installer_config.models import Package, TerminalPrompt, EnvironmentProfile
class PackageAdmin(admin.ModelAdmin):
model = Package
list_display = ('display_name', 'version', 'website')
class TerminalPromptAdmin(admin.ModelAdmin):
model = TerminalPrompt
list_displa... | <commit_before>from django.contrib import admin
from installer_config.models import Package, TerminalPrompt, EnvironmentProfile
class PackageAdmin(admin.ModelAdmin):
model = Package
list_display = ('display_name', 'version', 'website')
class TerminalPromptAdmin(admin.ModelAdmin):
model = TerminalPrompt
... | from django.contrib import admin
from installer_config.models import Package, TerminalPrompt, EnvironmentProfile
class PackageAdmin(admin.ModelAdmin):
model = Package
list_display = ('display_name', 'version', 'website')
class TerminalPromptAdmin(admin.ModelAdmin):
model = TerminalPrompt
list_displa... | from django.contrib import admin
from installer_config.models import Package, TerminalPrompt, EnvironmentProfile
class PackageAdmin(admin.ModelAdmin):
model = Package
list_display = ('display_name', 'version', 'website')
class TerminalPromptAdmin(admin.ModelAdmin):
model = TerminalPrompt
list_displa... | <commit_before>from django.contrib import admin
from installer_config.models import Package, TerminalPrompt, EnvironmentProfile
class PackageAdmin(admin.ModelAdmin):
model = Package
list_display = ('display_name', 'version', 'website')
class TerminalPromptAdmin(admin.ModelAdmin):
model = TerminalPrompt
... |
d379badd16528d2f7cd3826fcef5bd87be30cccf | nightreads/user_manager/user_service.py | nightreads/user_manager/user_service.py | from django.contrib.auth.models import User
from nightreads.posts.models import Tag
from .models import (Subscription, SubscriptionActivation,
UnsubscriptionActivation)
def update_user_tags(user, tags):
tags_objs = Tag.objects.filter(name__in=tags)
if tags_objs:
user.subscription... | from django.contrib.auth.models import User
from nightreads.posts.models import Tag
from .models import (Subscription, SubscriptionActivation,
UnsubscriptionActivation)
def update_user_tags(user, tags):
tags_objs = Tag.objects.filter(name__in=tags)
if tags_objs:
user.subscription... | Rename `get_user` to `get_or_create_user` and add a new `get_user` | Rename `get_user` to `get_or_create_user` and add a new `get_user`
| Python | mit | avinassh/nightreads,avinassh/nightreads | from django.contrib.auth.models import User
from nightreads.posts.models import Tag
from .models import (Subscription, SubscriptionActivation,
UnsubscriptionActivation)
def update_user_tags(user, tags):
tags_objs = Tag.objects.filter(name__in=tags)
if tags_objs:
user.subscription... | from django.contrib.auth.models import User
from nightreads.posts.models import Tag
from .models import (Subscription, SubscriptionActivation,
UnsubscriptionActivation)
def update_user_tags(user, tags):
tags_objs = Tag.objects.filter(name__in=tags)
if tags_objs:
user.subscription... | <commit_before>from django.contrib.auth.models import User
from nightreads.posts.models import Tag
from .models import (Subscription, SubscriptionActivation,
UnsubscriptionActivation)
def update_user_tags(user, tags):
tags_objs = Tag.objects.filter(name__in=tags)
if tags_objs:
us... | from django.contrib.auth.models import User
from nightreads.posts.models import Tag
from .models import (Subscription, SubscriptionActivation,
UnsubscriptionActivation)
def update_user_tags(user, tags):
tags_objs = Tag.objects.filter(name__in=tags)
if tags_objs:
user.subscription... | from django.contrib.auth.models import User
from nightreads.posts.models import Tag
from .models import (Subscription, SubscriptionActivation,
UnsubscriptionActivation)
def update_user_tags(user, tags):
tags_objs = Tag.objects.filter(name__in=tags)
if tags_objs:
user.subscription... | <commit_before>from django.contrib.auth.models import User
from nightreads.posts.models import Tag
from .models import (Subscription, SubscriptionActivation,
UnsubscriptionActivation)
def update_user_tags(user, tags):
tags_objs = Tag.objects.filter(name__in=tags)
if tags_objs:
us... |
8f0956313b140d7a0d51510cd9b4a5eec7d54570 | plugins/holland.lib.lvm/tests/test_util.py | plugins/holland.lib.lvm/tests/test_util.py | import os
import signal
from nose.tools import *
from holland.lib.lvm.util import *
def test_format_bytes():
assert_equals(format_bytes(1024), '1.00KB')
assert_equals(format_bytes(0), '0.00Bytes')
def test_getmount():
assert_equals(getmount('/'), '/')
assert_equals(getmount('/foobarbaz'), '/')
def te... | import os
import signal
from nose.tools import *
from holland.lib.lvm.util import *
def test_format_bytes():
assert_equals(format_bytes(1024), '1.00KB')
assert_equals(format_bytes(0), '0.00Bytes')
def test_getmount():
assert_equals(getmount('/'), '/')
assert_equals(getmount('/foobarbaz'), '/')
def te... | Add test case to holland.lib.lvm for parsing snapshot-size without units | Add test case to holland.lib.lvm for parsing snapshot-size without units
| Python | bsd-3-clause | m00dawg/holland,m00dawg/holland | import os
import signal
from nose.tools import *
from holland.lib.lvm.util import *
def test_format_bytes():
assert_equals(format_bytes(1024), '1.00KB')
assert_equals(format_bytes(0), '0.00Bytes')
def test_getmount():
assert_equals(getmount('/'), '/')
assert_equals(getmount('/foobarbaz'), '/')
def te... | import os
import signal
from nose.tools import *
from holland.lib.lvm.util import *
def test_format_bytes():
assert_equals(format_bytes(1024), '1.00KB')
assert_equals(format_bytes(0), '0.00Bytes')
def test_getmount():
assert_equals(getmount('/'), '/')
assert_equals(getmount('/foobarbaz'), '/')
def te... | <commit_before>import os
import signal
from nose.tools import *
from holland.lib.lvm.util import *
def test_format_bytes():
assert_equals(format_bytes(1024), '1.00KB')
assert_equals(format_bytes(0), '0.00Bytes')
def test_getmount():
assert_equals(getmount('/'), '/')
assert_equals(getmount('/foobarbaz'... | import os
import signal
from nose.tools import *
from holland.lib.lvm.util import *
def test_format_bytes():
assert_equals(format_bytes(1024), '1.00KB')
assert_equals(format_bytes(0), '0.00Bytes')
def test_getmount():
assert_equals(getmount('/'), '/')
assert_equals(getmount('/foobarbaz'), '/')
def te... | import os
import signal
from nose.tools import *
from holland.lib.lvm.util import *
def test_format_bytes():
assert_equals(format_bytes(1024), '1.00KB')
assert_equals(format_bytes(0), '0.00Bytes')
def test_getmount():
assert_equals(getmount('/'), '/')
assert_equals(getmount('/foobarbaz'), '/')
def te... | <commit_before>import os
import signal
from nose.tools import *
from holland.lib.lvm.util import *
def test_format_bytes():
assert_equals(format_bytes(1024), '1.00KB')
assert_equals(format_bytes(0), '0.00Bytes')
def test_getmount():
assert_equals(getmount('/'), '/')
assert_equals(getmount('/foobarbaz'... |
fcfa0b96226ba8b8d2bbd62365c2cab3f6e42d99 | salt/runners/state.py | salt/runners/state.py | '''
Execute overstate functions
'''
# Import Salt libs
import salt.overstate
import salt.output
def over(env='base', os_fn=None):
'''
Execute an overstate sequence to orchestrate the executing of states
over a group of systems
'''
overstate = salt.overstate.OverState(__opts__, env, os_fn)
over... | '''
Execute overstate functions
'''
# Import Salt libs
import salt.overstate
import salt.output
def over(env='base', os_fn=None):
'''
Execute an overstate sequence to orchestrate the executing of states
over a group of systems
'''
overstate = salt.overstate.OverState(__opts__, env, os_fn)
over... | Print and return the correct data | Print and return the correct data
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | '''
Execute overstate functions
'''
# Import Salt libs
import salt.overstate
import salt.output
def over(env='base', os_fn=None):
'''
Execute an overstate sequence to orchestrate the executing of states
over a group of systems
'''
overstate = salt.overstate.OverState(__opts__, env, os_fn)
over... | '''
Execute overstate functions
'''
# Import Salt libs
import salt.overstate
import salt.output
def over(env='base', os_fn=None):
'''
Execute an overstate sequence to orchestrate the executing of states
over a group of systems
'''
overstate = salt.overstate.OverState(__opts__, env, os_fn)
over... | <commit_before>'''
Execute overstate functions
'''
# Import Salt libs
import salt.overstate
import salt.output
def over(env='base', os_fn=None):
'''
Execute an overstate sequence to orchestrate the executing of states
over a group of systems
'''
overstate = salt.overstate.OverState(__opts__, env, ... | '''
Execute overstate functions
'''
# Import Salt libs
import salt.overstate
import salt.output
def over(env='base', os_fn=None):
'''
Execute an overstate sequence to orchestrate the executing of states
over a group of systems
'''
overstate = salt.overstate.OverState(__opts__, env, os_fn)
over... | '''
Execute overstate functions
'''
# Import Salt libs
import salt.overstate
import salt.output
def over(env='base', os_fn=None):
'''
Execute an overstate sequence to orchestrate the executing of states
over a group of systems
'''
overstate = salt.overstate.OverState(__opts__, env, os_fn)
over... | <commit_before>'''
Execute overstate functions
'''
# Import Salt libs
import salt.overstate
import salt.output
def over(env='base', os_fn=None):
'''
Execute an overstate sequence to orchestrate the executing of states
over a group of systems
'''
overstate = salt.overstate.OverState(__opts__, env, ... |
f01e6fe6efb16a31a99b35cecaf000a0cb54bd4e | nodeconductor/core/authentication.py | nodeconductor/core/authentication.py | from __future__ import unicode_literals
import nodeconductor.logging.middleware
import rest_framework.authentication
def user_capturing_auth(auth):
class CapturingAuthentication(auth):
def authenticate(self, request):
result = super(CapturingAuthentication, self).authenticate(request)
... | from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
import rest_framework.authentication
from rest_framework import exceptions
import nodeconductor.logging.middleware
TOKEN_KEY = 'x-auth-token'
class TokenAuthentication(rest_framework.authentication.TokenAuthentication)... | Use get parameter in token auth (nc-544) | Use get parameter in token auth (nc-544)
| Python | mit | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | from __future__ import unicode_literals
import nodeconductor.logging.middleware
import rest_framework.authentication
def user_capturing_auth(auth):
class CapturingAuthentication(auth):
def authenticate(self, request):
result = super(CapturingAuthentication, self).authenticate(request)
... | from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
import rest_framework.authentication
from rest_framework import exceptions
import nodeconductor.logging.middleware
TOKEN_KEY = 'x-auth-token'
class TokenAuthentication(rest_framework.authentication.TokenAuthentication)... | <commit_before>from __future__ import unicode_literals
import nodeconductor.logging.middleware
import rest_framework.authentication
def user_capturing_auth(auth):
class CapturingAuthentication(auth):
def authenticate(self, request):
result = super(CapturingAuthentication, self).authenticate(... | from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
import rest_framework.authentication
from rest_framework import exceptions
import nodeconductor.logging.middleware
TOKEN_KEY = 'x-auth-token'
class TokenAuthentication(rest_framework.authentication.TokenAuthentication)... | from __future__ import unicode_literals
import nodeconductor.logging.middleware
import rest_framework.authentication
def user_capturing_auth(auth):
class CapturingAuthentication(auth):
def authenticate(self, request):
result = super(CapturingAuthentication, self).authenticate(request)
... | <commit_before>from __future__ import unicode_literals
import nodeconductor.logging.middleware
import rest_framework.authentication
def user_capturing_auth(auth):
class CapturingAuthentication(auth):
def authenticate(self, request):
result = super(CapturingAuthentication, self).authenticate(... |
7bee444eeb17ec956478e999db47338fdf201411 | querylist/tests/querylist_list_tests.py | querylist/tests/querylist_list_tests.py | import unittest2
from querylist import QueryList
class QueryListActsAsList(unittest2.TestCase):
"""QueryList should behave as lists behave"""
def setUp(self):
self.src_list = [{'foo': 1}, {'foo': 2}, {'foo': 3}]
self.query_list = QueryList(self.src_list)
def test_QueryList_items_are_equal... | import unittest2
from querylist import QueryList
class QueryListActsAsList(unittest2.TestCase):
"""QueryLists should act just like lists"""
def setUp(self):
self.src_list = [{'foo': 1}, {'foo': 2}, {'foo': 3}]
self.query_list = QueryList(self.src_list)
def test_QueryList_items_are_equal_t... | Add some more acts as list tests. | Add some more acts as list tests.
| Python | mit | thomasw/querylist,zoidbergwill/querylist | import unittest2
from querylist import QueryList
class QueryListActsAsList(unittest2.TestCase):
"""QueryList should behave as lists behave"""
def setUp(self):
self.src_list = [{'foo': 1}, {'foo': 2}, {'foo': 3}]
self.query_list = QueryList(self.src_list)
def test_QueryList_items_are_equal... | import unittest2
from querylist import QueryList
class QueryListActsAsList(unittest2.TestCase):
"""QueryLists should act just like lists"""
def setUp(self):
self.src_list = [{'foo': 1}, {'foo': 2}, {'foo': 3}]
self.query_list = QueryList(self.src_list)
def test_QueryList_items_are_equal_t... | <commit_before>import unittest2
from querylist import QueryList
class QueryListActsAsList(unittest2.TestCase):
"""QueryList should behave as lists behave"""
def setUp(self):
self.src_list = [{'foo': 1}, {'foo': 2}, {'foo': 3}]
self.query_list = QueryList(self.src_list)
def test_QueryList_... | import unittest2
from querylist import QueryList
class QueryListActsAsList(unittest2.TestCase):
"""QueryLists should act just like lists"""
def setUp(self):
self.src_list = [{'foo': 1}, {'foo': 2}, {'foo': 3}]
self.query_list = QueryList(self.src_list)
def test_QueryList_items_are_equal_t... | import unittest2
from querylist import QueryList
class QueryListActsAsList(unittest2.TestCase):
"""QueryList should behave as lists behave"""
def setUp(self):
self.src_list = [{'foo': 1}, {'foo': 2}, {'foo': 3}]
self.query_list = QueryList(self.src_list)
def test_QueryList_items_are_equal... | <commit_before>import unittest2
from querylist import QueryList
class QueryListActsAsList(unittest2.TestCase):
"""QueryList should behave as lists behave"""
def setUp(self):
self.src_list = [{'foo': 1}, {'foo': 2}, {'foo': 3}]
self.query_list = QueryList(self.src_list)
def test_QueryList_... |
d0fbb133cf2203de5f79f7fcdb647a3dff56f5a9 | copy_relative_path.py | copy_relative_path.py | import sublime, sublime_plugin
from os.path import relpath
class CopyRelativePathCommand(sublime_plugin.TextCommand):
def run(self, edit):
filename = self.view.file_name()
if len(filename) > 0:
# Copy shortest relpath for file compared to open folders
sublime.set_clipboard(
... | import sublime, sublime_plugin
from os.path import relpath
class CopyRelativePathCommand(sublime_plugin.TextCommand):
def run(self, edit):
filename = self.view.file_name()
if len(filename) > 0:
# Copy shortest relpath for file compared to open folders
sublime.set_clipboard(
... | Add bool cast to appease ST3 | Add bool cast to appease ST3
| Python | mit | bpicolo/CopyRelativePath | import sublime, sublime_plugin
from os.path import relpath
class CopyRelativePathCommand(sublime_plugin.TextCommand):
def run(self, edit):
filename = self.view.file_name()
if len(filename) > 0:
# Copy shortest relpath for file compared to open folders
sublime.set_clipboard(
... | import sublime, sublime_plugin
from os.path import relpath
class CopyRelativePathCommand(sublime_plugin.TextCommand):
def run(self, edit):
filename = self.view.file_name()
if len(filename) > 0:
# Copy shortest relpath for file compared to open folders
sublime.set_clipboard(
... | <commit_before>import sublime, sublime_plugin
from os.path import relpath
class CopyRelativePathCommand(sublime_plugin.TextCommand):
def run(self, edit):
filename = self.view.file_name()
if len(filename) > 0:
# Copy shortest relpath for file compared to open folders
sublime.... | import sublime, sublime_plugin
from os.path import relpath
class CopyRelativePathCommand(sublime_plugin.TextCommand):
def run(self, edit):
filename = self.view.file_name()
if len(filename) > 0:
# Copy shortest relpath for file compared to open folders
sublime.set_clipboard(
... | import sublime, sublime_plugin
from os.path import relpath
class CopyRelativePathCommand(sublime_plugin.TextCommand):
def run(self, edit):
filename = self.view.file_name()
if len(filename) > 0:
# Copy shortest relpath for file compared to open folders
sublime.set_clipboard(
... | <commit_before>import sublime, sublime_plugin
from os.path import relpath
class CopyRelativePathCommand(sublime_plugin.TextCommand):
def run(self, edit):
filename = self.view.file_name()
if len(filename) > 0:
# Copy shortest relpath for file compared to open folders
sublime.... |
8b519628839bc2360d2f0f48231e2cf7b9edc6b3 | scripts/analytics/run_keen_summaries.py | scripts/analytics/run_keen_summaries.py | from framework.celery_tasks import app as celery_app
from scripts.analytics.user_summary import UserSummary
from scripts.analytics.node_summary import NodeSummary
from scripts.analytics.base import DateAnalyticsHarness
class SummaryHarness(DateAnalyticsHarness):
@property
def analytics_classes(self):
... | from framework.celery_tasks import app as celery_app
from scripts.analytics.user_summary import UserSummary
from scripts.analytics.node_summary import NodeSummary
from scripts.analytics.institution_summary import InstitutionSummary
from scripts.analytics.base import DateAnalyticsHarness
class SummaryHarness(DateAnaly... | Add new InstitutionSummary to run_keen_summarries harness | Add new InstitutionSummary to run_keen_summarries harness
| Python | apache-2.0 | leb2dg/osf.io,cwisecarver/osf.io,CenterForOpenScience/osf.io,laurenrevere/osf.io,brianjgeiger/osf.io,caneruguz/osf.io,saradbowman/osf.io,chrisseto/osf.io,cwisecarver/osf.io,mluo613/osf.io,cwisecarver/osf.io,alexschiller/osf.io,acshi/osf.io,laurenrevere/osf.io,Nesiehr/osf.io,sloria/osf.io,mluo613/osf.io,pattisdr/osf.io,... | from framework.celery_tasks import app as celery_app
from scripts.analytics.user_summary import UserSummary
from scripts.analytics.node_summary import NodeSummary
from scripts.analytics.base import DateAnalyticsHarness
class SummaryHarness(DateAnalyticsHarness):
@property
def analytics_classes(self):
... | from framework.celery_tasks import app as celery_app
from scripts.analytics.user_summary import UserSummary
from scripts.analytics.node_summary import NodeSummary
from scripts.analytics.institution_summary import InstitutionSummary
from scripts.analytics.base import DateAnalyticsHarness
class SummaryHarness(DateAnaly... | <commit_before>from framework.celery_tasks import app as celery_app
from scripts.analytics.user_summary import UserSummary
from scripts.analytics.node_summary import NodeSummary
from scripts.analytics.base import DateAnalyticsHarness
class SummaryHarness(DateAnalyticsHarness):
@property
def analytics_classes... | from framework.celery_tasks import app as celery_app
from scripts.analytics.user_summary import UserSummary
from scripts.analytics.node_summary import NodeSummary
from scripts.analytics.institution_summary import InstitutionSummary
from scripts.analytics.base import DateAnalyticsHarness
class SummaryHarness(DateAnaly... | from framework.celery_tasks import app as celery_app
from scripts.analytics.user_summary import UserSummary
from scripts.analytics.node_summary import NodeSummary
from scripts.analytics.base import DateAnalyticsHarness
class SummaryHarness(DateAnalyticsHarness):
@property
def analytics_classes(self):
... | <commit_before>from framework.celery_tasks import app as celery_app
from scripts.analytics.user_summary import UserSummary
from scripts.analytics.node_summary import NodeSummary
from scripts.analytics.base import DateAnalyticsHarness
class SummaryHarness(DateAnalyticsHarness):
@property
def analytics_classes... |
51bae69bdbbc6cf19858ff8ed91efb09f4a0b845 | spam_lists/exceptions.py | spam_lists/exceptions.py | # -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError, ValueError):
'''The API k... | # -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError, ValueError):
'''The API k... | Make InvalidHostnameError a subclass of InvalidHostError | Make InvalidHostnameError a subclass of InvalidHostError
| Python | mit | piotr-rusin/spam-lists | # -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError, ValueError):
'''The API k... | # -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError, ValueError):
'''The API k... | <commit_before># -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError, ValueError):
... | # -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError, ValueError):
'''The API k... | # -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError, ValueError):
'''The API k... | <commit_before># -*- coding: utf-8 -*-
class SpamListsError(Exception):
'''There was an error during testing a url or host'''
class UnknownCodeError(SpamListsError, KeyError):
'''The classification code from the service was not recognized'''
class UnathorizedAPIKeyError(SpamListsError, ValueError):
... |
94e7fb9821d904dba19fee1ca1d129259f33204e | skimage/draw/__init__.py | skimage/draw/__init__.py | from ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, bresenham
| from ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, bresenham
__all__ = ['line',
'polygon',
'ellipse',
'ellipse_perimeter',
'circle',
'circle_perimeter',
'set_color',
'bresen... | Add __all__ to draw package | Add __all__ to draw package
| Python | bsd-3-clause | keflavich/scikit-image,michaelpacer/scikit-image,WarrenWeckesser/scikits-image,chintak/scikit-image,robintw/scikit-image,michaelaye/scikit-image,emon10005/scikit-image,chriscrosscutler/scikit-image,GaZ3ll3/scikit-image,michaelaye/scikit-image,emon10005/scikit-image,ajaybhat/scikit-image,bennlich/scikit-image,vighneshbi... | from ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, bresenham
Add __all__ to draw package | from ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, bresenham
__all__ = ['line',
'polygon',
'ellipse',
'ellipse_perimeter',
'circle',
'circle_perimeter',
'set_color',
'bresen... | <commit_before>from ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, bresenham
<commit_msg>Add __all__ to draw package<commit_after> | from ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, bresenham
__all__ = ['line',
'polygon',
'ellipse',
'ellipse_perimeter',
'circle',
'circle_perimeter',
'set_color',
'bresen... | from ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, bresenham
Add __all__ to draw packagefrom ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, bresenham
__all__ = ['line',
'p... | <commit_before>from ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, bresenham
<commit_msg>Add __all__ to draw package<commit_after>from ._draw import line, polygon, ellipse, ellipse_perimeter, \
circle, circle_perimeter, set_color, br... |
6dde06470c9cd868319b1b4615d3065b61a6bc2c | sqlcop/cli.py | sqlcop/cli.py | import sys
import sqlparse
from .checks import has_cross_join
def parse_file(filename):
import json
with open(filename, 'r') as fh:
return json.load(fh)
CHECKS = (
(has_cross_join, 'query contains cross join'),
)
def check_query(el):
"""
Run each of the defined checks on a query.
"... | import sys
import sqlparse
from .checks import has_cross_join
def parse_file(filename):
return open(filename, 'r').readlines()
CHECKS = (
(has_cross_join, 'query contains cross join'),
)
def check_query(el):
"""
Run each of the defined checks on a query.
"""
stmt = sqlparse.parse(el)
f... | Work with plain SQL files | Work with plain SQL files
| Python | bsd-3-clause | freshbooks/sqlcop | import sys
import sqlparse
from .checks import has_cross_join
def parse_file(filename):
import json
with open(filename, 'r') as fh:
return json.load(fh)
CHECKS = (
(has_cross_join, 'query contains cross join'),
)
def check_query(el):
"""
Run each of the defined checks on a query.
"... | import sys
import sqlparse
from .checks import has_cross_join
def parse_file(filename):
return open(filename, 'r').readlines()
CHECKS = (
(has_cross_join, 'query contains cross join'),
)
def check_query(el):
"""
Run each of the defined checks on a query.
"""
stmt = sqlparse.parse(el)
f... | <commit_before>import sys
import sqlparse
from .checks import has_cross_join
def parse_file(filename):
import json
with open(filename, 'r') as fh:
return json.load(fh)
CHECKS = (
(has_cross_join, 'query contains cross join'),
)
def check_query(el):
"""
Run each of the defined checks on... | import sys
import sqlparse
from .checks import has_cross_join
def parse_file(filename):
return open(filename, 'r').readlines()
CHECKS = (
(has_cross_join, 'query contains cross join'),
)
def check_query(el):
"""
Run each of the defined checks on a query.
"""
stmt = sqlparse.parse(el)
f... | import sys
import sqlparse
from .checks import has_cross_join
def parse_file(filename):
import json
with open(filename, 'r') as fh:
return json.load(fh)
CHECKS = (
(has_cross_join, 'query contains cross join'),
)
def check_query(el):
"""
Run each of the defined checks on a query.
"... | <commit_before>import sys
import sqlparse
from .checks import has_cross_join
def parse_file(filename):
import json
with open(filename, 'r') as fh:
return json.load(fh)
CHECKS = (
(has_cross_join, 'query contains cross join'),
)
def check_query(el):
"""
Run each of the defined checks on... |
7dd2f4a7d21d42fbccbd34d356ab341b99aea54e | squash/dashboard/urls.py | squash/dashboard/urls.py | from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.routers import DefaultRouter
from . import views
admin.site.site_header = 'SQUASH Admin'
api_router = DefaultRouter()
api_router.register(r'jobs', views.JobViewSet)
api_router.register(r'metrics', views.MetricViewSet)
api_r... | from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.routers import DefaultRouter
from . import views
admin.site.site_header = 'SQUASH Admin'
api_router = DefaultRouter()
api_router.register(r'jobs', views.JobViewSet)
api_router.register(r'metrics', views.MetricViewSet)
api_r... | Fix URLs returned by the API, make sure we have the traling slash | Fix URLs returned by the API, make sure we have the traling slash
| Python | mit | lsst-sqre/qa-dashboard,lsst-sqre/qa-dashboard,lsst-sqre/qa-dashboard | from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.routers import DefaultRouter
from . import views
admin.site.site_header = 'SQUASH Admin'
api_router = DefaultRouter()
api_router.register(r'jobs', views.JobViewSet)
api_router.register(r'metrics', views.MetricViewSet)
api_r... | from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.routers import DefaultRouter
from . import views
admin.site.site_header = 'SQUASH Admin'
api_router = DefaultRouter()
api_router.register(r'jobs', views.JobViewSet)
api_router.register(r'metrics', views.MetricViewSet)
api_r... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.routers import DefaultRouter
from . import views
admin.site.site_header = 'SQUASH Admin'
api_router = DefaultRouter()
api_router.register(r'jobs', views.JobViewSet)
api_router.register(r'metrics', views.Metri... | from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.routers import DefaultRouter
from . import views
admin.site.site_header = 'SQUASH Admin'
api_router = DefaultRouter()
api_router.register(r'jobs', views.JobViewSet)
api_router.register(r'metrics', views.MetricViewSet)
api_r... | from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.routers import DefaultRouter
from . import views
admin.site.site_header = 'SQUASH Admin'
api_router = DefaultRouter()
api_router.register(r'jobs', views.JobViewSet)
api_router.register(r'metrics', views.MetricViewSet)
api_r... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.routers import DefaultRouter
from . import views
admin.site.site_header = 'SQUASH Admin'
api_router = DefaultRouter()
api_router.register(r'jobs', views.JobViewSet)
api_router.register(r'metrics', views.Metri... |
e8cee8b5a85762442e72079edd621363013455d9 | src/config.py | src/config.py |
sites_to_check = [
{
"name": "Lissu Monitor",
"url": "http://lissu.tampere.fi/monitor.php?stop=0014",
"acceptable_statuses": [200],
"mandatory_strings": [
"table2"
]
},
{
"name": "Siri API",
"url": "https://siri.ij2010.tampere.fi/ws",
... |
sites_to_check = [
{
"name": "Lissu Monitor",
"url": "http://lissu.tampere.fi/monitor.php?stop=0014",
"acceptable_statuses": [200],
"mandatory_strings": [
"table2"
]
},
{
"name": "Siri API",
"url": "https://siri.ij2010.tampere.fi/ws",
... | Remove todo on lissu php ajax call. It returns and empty array in case of problems | Remove todo on lissu php ajax call. It returns and empty array in case of problems
| Python | mit | Vilsepi/nysseituu,Vilsepi/nysseituu |
sites_to_check = [
{
"name": "Lissu Monitor",
"url": "http://lissu.tampere.fi/monitor.php?stop=0014",
"acceptable_statuses": [200],
"mandatory_strings": [
"table2"
]
},
{
"name": "Siri API",
"url": "https://siri.ij2010.tampere.fi/ws",
... |
sites_to_check = [
{
"name": "Lissu Monitor",
"url": "http://lissu.tampere.fi/monitor.php?stop=0014",
"acceptable_statuses": [200],
"mandatory_strings": [
"table2"
]
},
{
"name": "Siri API",
"url": "https://siri.ij2010.tampere.fi/ws",
... | <commit_before>
sites_to_check = [
{
"name": "Lissu Monitor",
"url": "http://lissu.tampere.fi/monitor.php?stop=0014",
"acceptable_statuses": [200],
"mandatory_strings": [
"table2"
]
},
{
"name": "Siri API",
"url": "https://siri.ij2010.tampe... |
sites_to_check = [
{
"name": "Lissu Monitor",
"url": "http://lissu.tampere.fi/monitor.php?stop=0014",
"acceptable_statuses": [200],
"mandatory_strings": [
"table2"
]
},
{
"name": "Siri API",
"url": "https://siri.ij2010.tampere.fi/ws",
... |
sites_to_check = [
{
"name": "Lissu Monitor",
"url": "http://lissu.tampere.fi/monitor.php?stop=0014",
"acceptable_statuses": [200],
"mandatory_strings": [
"table2"
]
},
{
"name": "Siri API",
"url": "https://siri.ij2010.tampere.fi/ws",
... | <commit_before>
sites_to_check = [
{
"name": "Lissu Monitor",
"url": "http://lissu.tampere.fi/monitor.php?stop=0014",
"acceptable_statuses": [200],
"mandatory_strings": [
"table2"
]
},
{
"name": "Siri API",
"url": "https://siri.ij2010.tampe... |
e6d8789a1847ebe1525bb87c80b90d45db7cd29e | source/setup.py | source/setup.py | from distutils.core import setup
from Cython.Build import cythonize
ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
setup(
name='Weighted-Levenshtein',
version='',
packages=[''],
url='',
license='',
author='Team bluebird',
author_email='',
description='', req... | from setuptools import setup
from Cython.Build import cythonize
ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
setup(
name='Weighted-Levenshtein',
version='',
packages=[''],
url='',
license='',
author='Team bluebird',
author_email='',
description='', install... | Refactor rename to cost matrx | Refactor rename to cost matrx
| Python | mit | elangovana/NLP-BackTransliteration-PersianNames | from distutils.core import setup
from Cython.Build import cythonize
ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
setup(
name='Weighted-Levenshtein',
version='',
packages=[''],
url='',
license='',
author='Team bluebird',
author_email='',
description='', req... | from setuptools import setup
from Cython.Build import cythonize
ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
setup(
name='Weighted-Levenshtein',
version='',
packages=[''],
url='',
license='',
author='Team bluebird',
author_email='',
description='', install... | <commit_before>from distutils.core import setup
from Cython.Build import cythonize
ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
setup(
name='Weighted-Levenshtein',
version='',
packages=[''],
url='',
license='',
author='Team bluebird',
author_email='',
desc... | from setuptools import setup
from Cython.Build import cythonize
ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
setup(
name='Weighted-Levenshtein',
version='',
packages=[''],
url='',
license='',
author='Team bluebird',
author_email='',
description='', install... | from distutils.core import setup
from Cython.Build import cythonize
ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
setup(
name='Weighted-Levenshtein',
version='',
packages=[''],
url='',
license='',
author='Team bluebird',
author_email='',
description='', req... | <commit_before>from distutils.core import setup
from Cython.Build import cythonize
ext_options = {"compiler_directives": {"profile": True}, "annotate": True}
setup(
name='Weighted-Levenshtein',
version='',
packages=[''],
url='',
license='',
author='Team bluebird',
author_email='',
desc... |
3a17b72b82d2b23a676b92bd3292e04b77796ba7 | dock/__init__.py | dock/__init__.py | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
constants
"""
import logging
def set_logging(name="dock", level=logging.DEBUG):
# create logger
logger = logging.getLogger(name)
l... | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
constants
"""
import logging
def set_logging(name="dock", level=logging.DEBUG, handler=None):
# create logger
logger = logging.getLogg... | Allow redirecting dock's logs to a given handler only | Allow redirecting dock's logs to a given handler only
| Python | bsd-3-clause | david-martin/atomic-reactor,fr34k8/atomic-reactor,jpopelka/atomic-reactor,shaded-enmity/atomic-reactor,DBuildService/atomic-reactor,DBuildService/atomic-reactor,vrutkovs/atomic-reactor,fatherlinux/atomic-reactor,fr34k8/atomic-reactor,mmilata/atomic-reactor,jpopelka/atomic-reactor,maxamillion/atomic-reactor,mmilata/atom... | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
constants
"""
import logging
def set_logging(name="dock", level=logging.DEBUG):
# create logger
logger = logging.getLogger(name)
l... | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
constants
"""
import logging
def set_logging(name="dock", level=logging.DEBUG, handler=None):
# create logger
logger = logging.getLogg... | <commit_before>"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
constants
"""
import logging
def set_logging(name="dock", level=logging.DEBUG):
# create logger
logger = logging.getLog... | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
constants
"""
import logging
def set_logging(name="dock", level=logging.DEBUG, handler=None):
# create logger
logger = logging.getLogg... | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
constants
"""
import logging
def set_logging(name="dock", level=logging.DEBUG):
# create logger
logger = logging.getLogger(name)
l... | <commit_before>"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
constants
"""
import logging
def set_logging(name="dock", level=logging.DEBUG):
# create logger
logger = logging.getLog... |
99f21681c81ab67f0be5d6265d09af983599cc08 | esis/cli.py | esis/cli.py | # -*- coding: utf-8 -*-
"""Elastic Search Index & Search."""
import argparse
import os
def main():
"""Entry point for the esis.py script."""
args = parse_arguments()
print args
def valid_directory(path):
"""Directory validation."""
if not os.path.isdir(path):
raise argparse.ArgumentTypeE... | # -*- coding: utf-8 -*-
"""Elastic Search Index & Search."""
import argparse
import logging
import os
logger = logging.getLogger(__name__)
def main():
"""Entry point for the esis.py script."""
args = parse_arguments()
args.func(args)
def index(args):
"""Index database information into elasticsearch.... | Add handlers for the index/search subcommands | Add handlers for the index/search subcommands
| Python | mit | jcollado/esis | # -*- coding: utf-8 -*-
"""Elastic Search Index & Search."""
import argparse
import os
def main():
"""Entry point for the esis.py script."""
args = parse_arguments()
print args
def valid_directory(path):
"""Directory validation."""
if not os.path.isdir(path):
raise argparse.ArgumentTypeE... | # -*- coding: utf-8 -*-
"""Elastic Search Index & Search."""
import argparse
import logging
import os
logger = logging.getLogger(__name__)
def main():
"""Entry point for the esis.py script."""
args = parse_arguments()
args.func(args)
def index(args):
"""Index database information into elasticsearch.... | <commit_before># -*- coding: utf-8 -*-
"""Elastic Search Index & Search."""
import argparse
import os
def main():
"""Entry point for the esis.py script."""
args = parse_arguments()
print args
def valid_directory(path):
"""Directory validation."""
if not os.path.isdir(path):
raise argpars... | # -*- coding: utf-8 -*-
"""Elastic Search Index & Search."""
import argparse
import logging
import os
logger = logging.getLogger(__name__)
def main():
"""Entry point for the esis.py script."""
args = parse_arguments()
args.func(args)
def index(args):
"""Index database information into elasticsearch.... | # -*- coding: utf-8 -*-
"""Elastic Search Index & Search."""
import argparse
import os
def main():
"""Entry point for the esis.py script."""
args = parse_arguments()
print args
def valid_directory(path):
"""Directory validation."""
if not os.path.isdir(path):
raise argparse.ArgumentTypeE... | <commit_before># -*- coding: utf-8 -*-
"""Elastic Search Index & Search."""
import argparse
import os
def main():
"""Entry point for the esis.py script."""
args = parse_arguments()
print args
def valid_directory(path):
"""Directory validation."""
if not os.path.isdir(path):
raise argpars... |
752b4486c64fe0313f531b06bc0cb003804cc211 | examples/rietveld/rietveld_helper/urls.py | examples/rietveld/rietveld_helper/urls.py | from django.conf.urls.defaults import *
from django.contrib import admin
from codereview.urls import urlpatterns
admin.autodiscover()
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'static/'}),
(r'^accounts/login/$', 'django.contrib.auth... | from django.conf.urls.defaults import *
from django.contrib import admin
#from codereview.urls import urlpatterns
admin.autodiscover()
urlpatterns = patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'static/'}),
(r'^accounts/login/$', 'django.contrib.auth... | Use include() instead of appending urlpatterns. | Use include() instead of appending urlpatterns.
| Python | apache-2.0 | andialbrecht/django-gae2django,bubenkoff/bubenkoff-gae2django,andialbrecht/django-gae2django,bubenkoff/bubenkoff-gae2django | from django.conf.urls.defaults import *
from django.contrib import admin
from codereview.urls import urlpatterns
admin.autodiscover()
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'static/'}),
(r'^accounts/login/$', 'django.contrib.auth... | from django.conf.urls.defaults import *
from django.contrib import admin
#from codereview.urls import urlpatterns
admin.autodiscover()
urlpatterns = patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'static/'}),
(r'^accounts/login/$', 'django.contrib.auth... | <commit_before>from django.conf.urls.defaults import *
from django.contrib import admin
from codereview.urls import urlpatterns
admin.autodiscover()
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'static/'}),
(r'^accounts/login/$', 'djan... | from django.conf.urls.defaults import *
from django.contrib import admin
#from codereview.urls import urlpatterns
admin.autodiscover()
urlpatterns = patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'static/'}),
(r'^accounts/login/$', 'django.contrib.auth... | from django.conf.urls.defaults import *
from django.contrib import admin
from codereview.urls import urlpatterns
admin.autodiscover()
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'static/'}),
(r'^accounts/login/$', 'django.contrib.auth... | <commit_before>from django.conf.urls.defaults import *
from django.contrib import admin
from codereview.urls import urlpatterns
admin.autodiscover()
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'static/'}),
(r'^accounts/login/$', 'djan... |
9737eced8e2d667e3413a7d65946658d94f5868c | yg/emanate/__init__.py | yg/emanate/__init__.py | # -*- coding: utf-8 -*-
from .events import Event
__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__version__ = '0.3.0'
__all__ = ['Event']
| # -*- coding: utf-8 -*-
from .events import Event
__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__all__ = ['Event']
try:
import pkg_resources
dist = pkg_resources.get_distribution('yg.emanate')
__version__ = dist.version
except Exception:
__version__ = 'unknown'
| Load the version from the package metadata rather than trying to maintain it in a third place. | Load the version from the package metadata rather than trying to maintain it in a third place.
| Python | mit | yougov/emanate | # -*- coding: utf-8 -*-
from .events import Event
__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__version__ = '0.3.0'
__all__ = ['Event']
Load the version from the package metadata rather than trying to maintain it in a third place. | # -*- coding: utf-8 -*-
from .events import Event
__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__all__ = ['Event']
try:
import pkg_resources
dist = pkg_resources.get_distribution('yg.emanate')
__version__ = dist.version
except Exception:
__version__ = 'unknown'
| <commit_before># -*- coding: utf-8 -*-
from .events import Event
__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__version__ = '0.3.0'
__all__ = ['Event']
<commit_msg>Load the version from the package metadata rather than trying to maintain it in a third place.<commit_after> | # -*- coding: utf-8 -*-
from .events import Event
__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__all__ = ['Event']
try:
import pkg_resources
dist = pkg_resources.get_distribution('yg.emanate')
__version__ = dist.version
except Exception:
__version__ = 'unknown'
| # -*- coding: utf-8 -*-
from .events import Event
__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__version__ = '0.3.0'
__all__ = ['Event']
Load the version from the package metadata rather than trying to maintain it in a third place.# -*- coding: utf-8 -*-
from .events import Event
__author__ = 'YouGov, plc... | <commit_before># -*- coding: utf-8 -*-
from .events import Event
__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__version__ = '0.3.0'
__all__ = ['Event']
<commit_msg>Load the version from the package metadata rather than trying to maintain it in a third place.<commit_after># -*- coding: utf-8 -*-
from .event... |
0d1b8597a75f7e24ce3e74f99aad359e27a32be5 | fixcity/bmabr/tests/test_templatetags.py | fixcity/bmabr/tests/test_templatetags.py | import unittest
class TestRecaptchaTags(unittest.TestCase):
def test_recaptcha_html(self):
from fixcity.bmabr.templatetags import recaptcha_tags
from django.conf import settings
html = recaptcha_tags.recaptcha_html()
self.failUnless(settings.RECAPTCHA_PUBLIC_KEY in html)
... | import unittest
import mock
import django.conf
class TestRecaptchaTags(unittest.TestCase):
def test_recaptcha_html(self):
from fixcity.bmabr.templatetags import recaptcha_tags
from django.conf import settings
html = recaptcha_tags.recaptcha_html()
self.failUnless(settings.RECAP... | Fix tests to work when GOOGLE_ANALYTICS_KEY is not set. | Fix tests to work when GOOGLE_ANALYTICS_KEY is not set.
| Python | agpl-3.0 | openplans/fixcity,openplans/fixcity | import unittest
class TestRecaptchaTags(unittest.TestCase):
def test_recaptcha_html(self):
from fixcity.bmabr.templatetags import recaptcha_tags
from django.conf import settings
html = recaptcha_tags.recaptcha_html()
self.failUnless(settings.RECAPTCHA_PUBLIC_KEY in html)
... | import unittest
import mock
import django.conf
class TestRecaptchaTags(unittest.TestCase):
def test_recaptcha_html(self):
from fixcity.bmabr.templatetags import recaptcha_tags
from django.conf import settings
html = recaptcha_tags.recaptcha_html()
self.failUnless(settings.RECAP... | <commit_before>import unittest
class TestRecaptchaTags(unittest.TestCase):
def test_recaptcha_html(self):
from fixcity.bmabr.templatetags import recaptcha_tags
from django.conf import settings
html = recaptcha_tags.recaptcha_html()
self.failUnless(settings.RECAPTCHA_PUBLIC_KEY in... | import unittest
import mock
import django.conf
class TestRecaptchaTags(unittest.TestCase):
def test_recaptcha_html(self):
from fixcity.bmabr.templatetags import recaptcha_tags
from django.conf import settings
html = recaptcha_tags.recaptcha_html()
self.failUnless(settings.RECAP... | import unittest
class TestRecaptchaTags(unittest.TestCase):
def test_recaptcha_html(self):
from fixcity.bmabr.templatetags import recaptcha_tags
from django.conf import settings
html = recaptcha_tags.recaptcha_html()
self.failUnless(settings.RECAPTCHA_PUBLIC_KEY in html)
... | <commit_before>import unittest
class TestRecaptchaTags(unittest.TestCase):
def test_recaptcha_html(self):
from fixcity.bmabr.templatetags import recaptcha_tags
from django.conf import settings
html = recaptcha_tags.recaptcha_html()
self.failUnless(settings.RECAPTCHA_PUBLIC_KEY in... |
c5938719a70debb521d7592bc0919dfc3f71bd22 | gaphor/diagram/classes/generalization.py | gaphor/diagram/classes/generalization.py | """
Generalization --
"""
from gi.repository import GObject
from gaphor import UML
from gaphor.diagram.diagramline import DiagramLine
class GeneralizationItem(DiagramLine):
__uml__ = UML.Generalization
__relationship__ = "general", None, "specific", "generalization"
def __init__(self, id=None, model=N... | """
Generalization --
"""
from gi.repository import GObject
from gaphor import UML
from gaphor.UML.modelfactory import stereotypes_str
from gaphor.diagram.presentation import LinePresentation
from gaphor.diagram.shapes import Box, Text
from gaphor.diagram.support import represents
@represents(UML.Generalization)
cl... | Use new line style for Generalization item | Use new line style for Generalization item
| Python | lgpl-2.1 | amolenaar/gaphor,amolenaar/gaphor | """
Generalization --
"""
from gi.repository import GObject
from gaphor import UML
from gaphor.diagram.diagramline import DiagramLine
class GeneralizationItem(DiagramLine):
__uml__ = UML.Generalization
__relationship__ = "general", None, "specific", "generalization"
def __init__(self, id=None, model=N... | """
Generalization --
"""
from gi.repository import GObject
from gaphor import UML
from gaphor.UML.modelfactory import stereotypes_str
from gaphor.diagram.presentation import LinePresentation
from gaphor.diagram.shapes import Box, Text
from gaphor.diagram.support import represents
@represents(UML.Generalization)
cl... | <commit_before>"""
Generalization --
"""
from gi.repository import GObject
from gaphor import UML
from gaphor.diagram.diagramline import DiagramLine
class GeneralizationItem(DiagramLine):
__uml__ = UML.Generalization
__relationship__ = "general", None, "specific", "generalization"
def __init__(self, i... | """
Generalization --
"""
from gi.repository import GObject
from gaphor import UML
from gaphor.UML.modelfactory import stereotypes_str
from gaphor.diagram.presentation import LinePresentation
from gaphor.diagram.shapes import Box, Text
from gaphor.diagram.support import represents
@represents(UML.Generalization)
cl... | """
Generalization --
"""
from gi.repository import GObject
from gaphor import UML
from gaphor.diagram.diagramline import DiagramLine
class GeneralizationItem(DiagramLine):
__uml__ = UML.Generalization
__relationship__ = "general", None, "specific", "generalization"
def __init__(self, id=None, model=N... | <commit_before>"""
Generalization --
"""
from gi.repository import GObject
from gaphor import UML
from gaphor.diagram.diagramline import DiagramLine
class GeneralizationItem(DiagramLine):
__uml__ = UML.Generalization
__relationship__ = "general", None, "specific", "generalization"
def __init__(self, i... |
f9a349f902cb527314c22b384ddcf18de105cfc4 | utilities.py | utilities.py | import re
__author__ = 'tigge'
from wand.image import Image
def fix_image(filename, max_width):
with Image(filename=filename) as img:
img.auto_orient()
if img.width > max_width:
ratio = img.height / img.width
img.resize(width=max_width, height=round(max_width * ratio))
... | import re
__author__ = 'tigge'
from wand.image import Image
def fix_image(filename, max_width):
with Image(filename=filename) as img:
img.auto_orient()
if img.width > max_width:
ratio = img.height / img.width
img.resize(width=max_width, height=round(max_width * ratio))
... | Support Google Apps drive urls | Support Google Apps drive urls
| Python | mit | Tigge/trello-to-web,Tigge/trello-to-web | import re
__author__ = 'tigge'
from wand.image import Image
def fix_image(filename, max_width):
with Image(filename=filename) as img:
img.auto_orient()
if img.width > max_width:
ratio = img.height / img.width
img.resize(width=max_width, height=round(max_width * ratio))
... | import re
__author__ = 'tigge'
from wand.image import Image
def fix_image(filename, max_width):
with Image(filename=filename) as img:
img.auto_orient()
if img.width > max_width:
ratio = img.height / img.width
img.resize(width=max_width, height=round(max_width * ratio))
... | <commit_before>import re
__author__ = 'tigge'
from wand.image import Image
def fix_image(filename, max_width):
with Image(filename=filename) as img:
img.auto_orient()
if img.width > max_width:
ratio = img.height / img.width
img.resize(width=max_width, height=round(max_wid... | import re
__author__ = 'tigge'
from wand.image import Image
def fix_image(filename, max_width):
with Image(filename=filename) as img:
img.auto_orient()
if img.width > max_width:
ratio = img.height / img.width
img.resize(width=max_width, height=round(max_width * ratio))
... | import re
__author__ = 'tigge'
from wand.image import Image
def fix_image(filename, max_width):
with Image(filename=filename) as img:
img.auto_orient()
if img.width > max_width:
ratio = img.height / img.width
img.resize(width=max_width, height=round(max_width * ratio))
... | <commit_before>import re
__author__ = 'tigge'
from wand.image import Image
def fix_image(filename, max_width):
with Image(filename=filename) as img:
img.auto_orient()
if img.width > max_width:
ratio = img.height / img.width
img.resize(width=max_width, height=round(max_wid... |
593020cf6305701e712d04b5bb3e68612dcf7bb4 | fireplace/cards/wog/warrior.py | fireplace/cards/wog/warrior.py | from ..utils import *
##
# Minions
##
# Spells
class OG_276:
"Blood Warriors"
play = Give(CONTROLLER, Copy(FRIENDLY_MINIONS + DAMAGED))
class OG_314:
"Blood To Ichor"
play = Hit(TARGET,1), Dead(TARGET) | Summon(CONTROLLER, "OG_314b")
| from ..utils import *
##
# Minions
class OG_149:
"Ravaging Ghoul"
play = Hit(ALL_MINIONS - SELF, 1)
class OG_218:
"Bloodhoof Brave"
enrage = Refresh(SELF, buff="OG_218e")
OG_218e = buff(atk=3)
class OG_312:
"N'Zoth's First Mate"
play = Summon(CONTROLLER, "OG_058")
##
# Spells
class OG_276:
"Blood Warr... | Implement Ravaging Ghoul, Bloodhoof Brave, N'Zoth's First Mate | Implement Ravaging Ghoul, Bloodhoof Brave, N'Zoth's First Mate
| Python | agpl-3.0 | beheh/fireplace,NightKev/fireplace,jleclanche/fireplace | from ..utils import *
##
# Minions
##
# Spells
class OG_276:
"Blood Warriors"
play = Give(CONTROLLER, Copy(FRIENDLY_MINIONS + DAMAGED))
class OG_314:
"Blood To Ichor"
play = Hit(TARGET,1), Dead(TARGET) | Summon(CONTROLLER, "OG_314b")
Implement Ravaging Ghoul, Bloodhoof Brave, N'Zoth's First Mate | from ..utils import *
##
# Minions
class OG_149:
"Ravaging Ghoul"
play = Hit(ALL_MINIONS - SELF, 1)
class OG_218:
"Bloodhoof Brave"
enrage = Refresh(SELF, buff="OG_218e")
OG_218e = buff(atk=3)
class OG_312:
"N'Zoth's First Mate"
play = Summon(CONTROLLER, "OG_058")
##
# Spells
class OG_276:
"Blood Warr... | <commit_before>from ..utils import *
##
# Minions
##
# Spells
class OG_276:
"Blood Warriors"
play = Give(CONTROLLER, Copy(FRIENDLY_MINIONS + DAMAGED))
class OG_314:
"Blood To Ichor"
play = Hit(TARGET,1), Dead(TARGET) | Summon(CONTROLLER, "OG_314b")
<commit_msg>Implement Ravaging Ghoul, Bloodhoof Brave, N'Zot... | from ..utils import *
##
# Minions
class OG_149:
"Ravaging Ghoul"
play = Hit(ALL_MINIONS - SELF, 1)
class OG_218:
"Bloodhoof Brave"
enrage = Refresh(SELF, buff="OG_218e")
OG_218e = buff(atk=3)
class OG_312:
"N'Zoth's First Mate"
play = Summon(CONTROLLER, "OG_058")
##
# Spells
class OG_276:
"Blood Warr... | from ..utils import *
##
# Minions
##
# Spells
class OG_276:
"Blood Warriors"
play = Give(CONTROLLER, Copy(FRIENDLY_MINIONS + DAMAGED))
class OG_314:
"Blood To Ichor"
play = Hit(TARGET,1), Dead(TARGET) | Summon(CONTROLLER, "OG_314b")
Implement Ravaging Ghoul, Bloodhoof Brave, N'Zoth's First Matefrom ..utils ... | <commit_before>from ..utils import *
##
# Minions
##
# Spells
class OG_276:
"Blood Warriors"
play = Give(CONTROLLER, Copy(FRIENDLY_MINIONS + DAMAGED))
class OG_314:
"Blood To Ichor"
play = Hit(TARGET,1), Dead(TARGET) | Summon(CONTROLLER, "OG_314b")
<commit_msg>Implement Ravaging Ghoul, Bloodhoof Brave, N'Zot... |
a85d3f87860d63d1b950ec754531439dab1bd7cb | dwitter/dweet/urls.py | dwitter/dweet/urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^id/(?P<dweet_id>[0-9]*)$', views.fullscreen_dweet,
name='fullscreen_dweet'),
url(r'^blank$', views.blank_dweet, name='blank_dweet'),
]
handler404 = views.handler404
| from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^id/(?P<dweet_id>[0-9]+)$', views.fullscreen_dweet,
name='fullscreen_dweet'),
url(r'^blank$', views.blank_dweet, name='blank_dweet'),
]
handler404 = views.handler404
| Fix url regex that allowed illegal url | Fix url regex that allowed illegal url
Old url pattern allowed /id/ (without a number), which resulted in a
500 (and an email). And lately google spiders seems to do this daily.
| Python | apache-2.0 | lionleaf/dwitter,lionleaf/dwitter,lionleaf/dwitter | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^id/(?P<dweet_id>[0-9]*)$', views.fullscreen_dweet,
name='fullscreen_dweet'),
url(r'^blank$', views.blank_dweet, name='blank_dweet'),
]
handler404 = views.handler404
Fix url regex that allowed illegal url
Old url pattern allow... | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^id/(?P<dweet_id>[0-9]+)$', views.fullscreen_dweet,
name='fullscreen_dweet'),
url(r'^blank$', views.blank_dweet, name='blank_dweet'),
]
handler404 = views.handler404
| <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^id/(?P<dweet_id>[0-9]*)$', views.fullscreen_dweet,
name='fullscreen_dweet'),
url(r'^blank$', views.blank_dweet, name='blank_dweet'),
]
handler404 = views.handler404
<commit_msg>Fix url regex that allowed illegal... | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^id/(?P<dweet_id>[0-9]+)$', views.fullscreen_dweet,
name='fullscreen_dweet'),
url(r'^blank$', views.blank_dweet, name='blank_dweet'),
]
handler404 = views.handler404
| from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^id/(?P<dweet_id>[0-9]*)$', views.fullscreen_dweet,
name='fullscreen_dweet'),
url(r'^blank$', views.blank_dweet, name='blank_dweet'),
]
handler404 = views.handler404
Fix url regex that allowed illegal url
Old url pattern allow... | <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^id/(?P<dweet_id>[0-9]*)$', views.fullscreen_dweet,
name='fullscreen_dweet'),
url(r'^blank$', views.blank_dweet, name='blank_dweet'),
]
handler404 = views.handler404
<commit_msg>Fix url regex that allowed illegal... |
0549d03dfaba874b5ff56bcc3ab1b21c2ac4fec3 | src/armet/connectors/bottle/__init__.py | src/armet/connectors/bottle/__init__.py | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
def is_available(*capacities):
"""
Detects if the environment is available for use in
the (optionally) specified capacities.
"""
try:
# Attempted import
import bottle # flake8: noqa
... | Add detection support for bottle. | Add detection support for bottle.
| Python | mit | armet/python-armet | Add detection support for bottle. | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
def is_available(*capacities):
"""
Detects if the environment is available for use in
the (optionally) specified capacities.
"""
try:
# Attempted import
import bottle # flake8: noqa
... | <commit_before><commit_msg>Add detection support for bottle.<commit_after> | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
def is_available(*capacities):
"""
Detects if the environment is available for use in
the (optionally) specified capacities.
"""
try:
# Attempted import
import bottle # flake8: noqa
... | Add detection support for bottle.# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
def is_available(*capacities):
"""
Detects if the environment is available for use in
the (optionally) specified capacities.
"""
try:
# Attempted import
import... | <commit_before><commit_msg>Add detection support for bottle.<commit_after># -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals, division
def is_available(*capacities):
"""
Detects if the environment is available for use in
the (optionally) specified capacities.
"""
try:
... | |
f64cb7c25d541421359dd8b5e1709444046d3fa0 | gittools.py | gittools.py | import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = file('.git/HEAD').read().strip()
if commithash.startswith("ref: "):
commithash = file(commithash[5:]).rea... | import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = os.popen('git-rev-parse --verify HEAD').read().strip()
if os.getuid() == os.stat(".git/index").st_uid:
os... | Make resolving of git commit id use git-rev-parse. | OTHER: Make resolving of git commit id use git-rev-parse.
| Python | lgpl-2.1 | oneman/xmms2-oneman,theefer/xmms2,chrippa/xmms2,krad-radio/xmms2-krad,oneman/xmms2-oneman,six600110/xmms2,mantaraya36/xmms2-mantaraya36,oneman/xmms2-oneman,dreamerc/xmms2,oneman/xmms2-oneman-old,krad-radio/xmms2-krad,theefer/xmms2,oneman/xmms2-oneman,krad-radio/xmms2-krad,theefer/xmms2,six600110/xmms2,six600110/xmms2,x... | import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = file('.git/HEAD').read().strip()
if commithash.startswith("ref: "):
commithash = file(commithash[5:]).rea... | import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = os.popen('git-rev-parse --verify HEAD').read().strip()
if os.getuid() == os.stat(".git/index").st_uid:
os... | <commit_before>import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = file('.git/HEAD').read().strip()
if commithash.startswith("ref: "):
commithash = file(comm... | import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = os.popen('git-rev-parse --verify HEAD').read().strip()
if os.getuid() == os.stat(".git/index").st_uid:
os... | import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = file('.git/HEAD').read().strip()
if commithash.startswith("ref: "):
commithash = file(commithash[5:]).rea... | <commit_before>import os
import sha
def gitsha(path):
h = sha.sha()
data = file(path).read()
h.update("blob %d\0" % len(data))
h.update(data)
return h.hexdigest()
def git_info():
commithash = file('.git/HEAD').read().strip()
if commithash.startswith("ref: "):
commithash = file(comm... |
15cd72fd68bad8dbb2eab293c4abf8700a782219 | test/trainer_test.py | test/trainer_test.py | import theanets
import util
class TestTrainer(util.MNIST):
def setUp(self):
super(TestTrainer, self).setUp()
self.exp = theanets.Experiment(
theanets.Autoencoder,
layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE))
def assert_progress(self, algo, **kwargs):
trainer... | import theanets
import util
class TestTrainer(util.MNIST):
def setUp(self):
super(TestTrainer, self).setUp()
self.exp = theanets.Experiment(
theanets.Autoencoder,
layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE))
def assert_progress(self, algo, **kwargs):
trainer... | Update test to work with new monitors. | Update test to work with new monitors.
| Python | mit | devdoer/theanets,lmjohns3/theanets,chrinide/theanets | import theanets
import util
class TestTrainer(util.MNIST):
def setUp(self):
super(TestTrainer, self).setUp()
self.exp = theanets.Experiment(
theanets.Autoencoder,
layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE))
def assert_progress(self, algo, **kwargs):
trainer... | import theanets
import util
class TestTrainer(util.MNIST):
def setUp(self):
super(TestTrainer, self).setUp()
self.exp = theanets.Experiment(
theanets.Autoencoder,
layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE))
def assert_progress(self, algo, **kwargs):
trainer... | <commit_before>import theanets
import util
class TestTrainer(util.MNIST):
def setUp(self):
super(TestTrainer, self).setUp()
self.exp = theanets.Experiment(
theanets.Autoencoder,
layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE))
def assert_progress(self, algo, **kwargs):
... | import theanets
import util
class TestTrainer(util.MNIST):
def setUp(self):
super(TestTrainer, self).setUp()
self.exp = theanets.Experiment(
theanets.Autoencoder,
layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE))
def assert_progress(self, algo, **kwargs):
trainer... | import theanets
import util
class TestTrainer(util.MNIST):
def setUp(self):
super(TestTrainer, self).setUp()
self.exp = theanets.Experiment(
theanets.Autoencoder,
layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE))
def assert_progress(self, algo, **kwargs):
trainer... | <commit_before>import theanets
import util
class TestTrainer(util.MNIST):
def setUp(self):
super(TestTrainer, self).setUp()
self.exp = theanets.Experiment(
theanets.Autoencoder,
layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE))
def assert_progress(self, algo, **kwargs):
... |
1d2eef3bf6a1a5c9b5a1f34c224d3a9651e77d73 | gocd/response.py | gocd/response.py | import json
class Response(object):
def __init__(self, status_code, body, headers=None):
self.status_code = status_code
self._body = body
self._body_parsed = None
self.content_type = headers['content-type'].split(';')[0]
self.headers = headers
@property
def is_ok(s... | import json
class Response(object):
def __init__(self, status_code, body, headers=None, ok_status=None):
self.status_code = status_code
self._body = body
self._body_parsed = None
self.content_type = headers['content-type'].split(';')[0]
self.headers = headers
self.o... | Add configurable ok status code for Response | Add configurable ok status code for Response
When scheduling a pipeline the successful code is 202, so tihis needs
to be configurable.
| Python | mit | henriquegemignani/py-gocd,gaqzi/py-gocd | import json
class Response(object):
def __init__(self, status_code, body, headers=None):
self.status_code = status_code
self._body = body
self._body_parsed = None
self.content_type = headers['content-type'].split(';')[0]
self.headers = headers
@property
def is_ok(s... | import json
class Response(object):
def __init__(self, status_code, body, headers=None, ok_status=None):
self.status_code = status_code
self._body = body
self._body_parsed = None
self.content_type = headers['content-type'].split(';')[0]
self.headers = headers
self.o... | <commit_before>import json
class Response(object):
def __init__(self, status_code, body, headers=None):
self.status_code = status_code
self._body = body
self._body_parsed = None
self.content_type = headers['content-type'].split(';')[0]
self.headers = headers
@property
... | import json
class Response(object):
def __init__(self, status_code, body, headers=None, ok_status=None):
self.status_code = status_code
self._body = body
self._body_parsed = None
self.content_type = headers['content-type'].split(';')[0]
self.headers = headers
self.o... | import json
class Response(object):
def __init__(self, status_code, body, headers=None):
self.status_code = status_code
self._body = body
self._body_parsed = None
self.content_type = headers['content-type'].split(';')[0]
self.headers = headers
@property
def is_ok(s... | <commit_before>import json
class Response(object):
def __init__(self, status_code, body, headers=None):
self.status_code = status_code
self._body = body
self._body_parsed = None
self.content_type = headers['content-type'].split(';')[0]
self.headers = headers
@property
... |
89fcfbd71a4fc9e8a5aaea65c106a092cbd27ac0 | src/plone.example/plone/example/todo.py | src/plone.example/plone/example/todo.py | # -*- encoding: utf-8 -*-
from aiohttp.web import Response
from zope.interface import Attribute
from zope.interface import Interface
class ITodo(Interface):
title = Attribute("""Title""")
done = Attribute("""Done""")
class View(object):
def __init__(self, context, request):
self.context = contex... | # -*- encoding: utf-8 -*-
from aiohttp.web import Response
from plone.supermodel import model
from zope import schema
class ITodo(model.Schema):
title = schema.TextLine(title=u"Title",
required=False)
done = schema.Bool(title=u"Done",
required=False)
class ... | Use supermodel/zope.schema for Todo field definition | Use supermodel/zope.schema for Todo field definition
| Python | bsd-2-clause | plone/plone.server,plone/plone.server | # -*- encoding: utf-8 -*-
from aiohttp.web import Response
from zope.interface import Attribute
from zope.interface import Interface
class ITodo(Interface):
title = Attribute("""Title""")
done = Attribute("""Done""")
class View(object):
def __init__(self, context, request):
self.context = contex... | # -*- encoding: utf-8 -*-
from aiohttp.web import Response
from plone.supermodel import model
from zope import schema
class ITodo(model.Schema):
title = schema.TextLine(title=u"Title",
required=False)
done = schema.Bool(title=u"Done",
required=False)
class ... | <commit_before># -*- encoding: utf-8 -*-
from aiohttp.web import Response
from zope.interface import Attribute
from zope.interface import Interface
class ITodo(Interface):
title = Attribute("""Title""")
done = Attribute("""Done""")
class View(object):
def __init__(self, context, request):
self.c... | # -*- encoding: utf-8 -*-
from aiohttp.web import Response
from plone.supermodel import model
from zope import schema
class ITodo(model.Schema):
title = schema.TextLine(title=u"Title",
required=False)
done = schema.Bool(title=u"Done",
required=False)
class ... | # -*- encoding: utf-8 -*-
from aiohttp.web import Response
from zope.interface import Attribute
from zope.interface import Interface
class ITodo(Interface):
title = Attribute("""Title""")
done = Attribute("""Done""")
class View(object):
def __init__(self, context, request):
self.context = contex... | <commit_before># -*- encoding: utf-8 -*-
from aiohttp.web import Response
from zope.interface import Attribute
from zope.interface import Interface
class ITodo(Interface):
title = Attribute("""Title""")
done = Attribute("""Done""")
class View(object):
def __init__(self, context, request):
self.c... |
548423bb940a38c599ac3b82bf8a1207b5112646 | viewer_examples/plugins/lineprofile_rgb.py | viewer_examples/plugins/lineprofile_rgb.py | from skimage import data
from skimage.viewer import ImageViewer
from skimage.viewer.plugins.lineprofile import LineProfile
image = data.chelsea()
viewer = ImageViewer(image)
viewer += LineProfile()
line, profiles = viewer.show()[0]
| from skimage import data
from skimage.viewer import ImageViewer
from skimage.viewer.plugins.lineprofile import LineProfile
image = data.chelsea()
viewer = ImageViewer(image)
viewer += LineProfile()
line, rgb_profiles = viewer.show()[0]
| Update variable name for RGB line profile | Update variable name for RGB line profile
| Python | bsd-3-clause | paalge/scikit-image,pratapvardhan/scikit-image,jwiggins/scikit-image,dpshelio/scikit-image,bsipocz/scikit-image,paalge/scikit-image,rjeli/scikit-image,Britefury/scikit-image,GaZ3ll3/scikit-image,blink1073/scikit-image,ClinicalGraphics/scikit-image,juliusbierk/scikit-image,robintw/scikit-image,Hiyorimi/scikit-image,Warr... | from skimage import data
from skimage.viewer import ImageViewer
from skimage.viewer.plugins.lineprofile import LineProfile
image = data.chelsea()
viewer = ImageViewer(image)
viewer += LineProfile()
line, profiles = viewer.show()[0]
Update variable name for RGB line profile | from skimage import data
from skimage.viewer import ImageViewer
from skimage.viewer.plugins.lineprofile import LineProfile
image = data.chelsea()
viewer = ImageViewer(image)
viewer += LineProfile()
line, rgb_profiles = viewer.show()[0]
| <commit_before>from skimage import data
from skimage.viewer import ImageViewer
from skimage.viewer.plugins.lineprofile import LineProfile
image = data.chelsea()
viewer = ImageViewer(image)
viewer += LineProfile()
line, profiles = viewer.show()[0]
<commit_msg>Update variable name for RGB line profile<commit_after> | from skimage import data
from skimage.viewer import ImageViewer
from skimage.viewer.plugins.lineprofile import LineProfile
image = data.chelsea()
viewer = ImageViewer(image)
viewer += LineProfile()
line, rgb_profiles = viewer.show()[0]
| from skimage import data
from skimage.viewer import ImageViewer
from skimage.viewer.plugins.lineprofile import LineProfile
image = data.chelsea()
viewer = ImageViewer(image)
viewer += LineProfile()
line, profiles = viewer.show()[0]
Update variable name for RGB line profilefrom skimage import data
from skimage.viewer ... | <commit_before>from skimage import data
from skimage.viewer import ImageViewer
from skimage.viewer.plugins.lineprofile import LineProfile
image = data.chelsea()
viewer = ImageViewer(image)
viewer += LineProfile()
line, profiles = viewer.show()[0]
<commit_msg>Update variable name for RGB line profile<commit_after>from... |
97bdc9679e9162a4ce101824dc37ac0f6e57e3d7 | fanstatic/checksum.py | fanstatic/checksum.py | import os
import hashlib
from datetime import datetime
VCS_NAMES = ['.svn', '.git', '.bzr', '.hg']
IGNORED_EXTENSIONS = ['.swp', '.tmp', '.pyc', '.pyo']
def list_directory(path, include_directories=True):
# Skip over any VCS directories.
for root, dirs, files in os.walk(path):
for dir in VCS_NAMES:
... | import os
import hashlib
from datetime import datetime
VCS_NAMES = ['.svn', '.git', '.bzr', '.hg']
IGNORED_EXTENSIONS = ['.swp', '.tmp', '.pyc', '.pyo']
def list_directory(path, include_directories=True):
# Skip over any VCS directories.
for root, dirs, files in os.walk(path):
for dir in VCS_NAMES:
... | Fix given path order for Google App Engine | Fix given path order for Google App Engine
| Python | bsd-3-clause | MiCHiLU/fanstatic-tools,MiCHiLU/fanstatic-gae,MiCHiLU/fanstatic-gae | import os
import hashlib
from datetime import datetime
VCS_NAMES = ['.svn', '.git', '.bzr', '.hg']
IGNORED_EXTENSIONS = ['.swp', '.tmp', '.pyc', '.pyo']
def list_directory(path, include_directories=True):
# Skip over any VCS directories.
for root, dirs, files in os.walk(path):
for dir in VCS_NAMES:
... | import os
import hashlib
from datetime import datetime
VCS_NAMES = ['.svn', '.git', '.bzr', '.hg']
IGNORED_EXTENSIONS = ['.swp', '.tmp', '.pyc', '.pyo']
def list_directory(path, include_directories=True):
# Skip over any VCS directories.
for root, dirs, files in os.walk(path):
for dir in VCS_NAMES:
... | <commit_before>import os
import hashlib
from datetime import datetime
VCS_NAMES = ['.svn', '.git', '.bzr', '.hg']
IGNORED_EXTENSIONS = ['.swp', '.tmp', '.pyc', '.pyo']
def list_directory(path, include_directories=True):
# Skip over any VCS directories.
for root, dirs, files in os.walk(path):
for dir ... | import os
import hashlib
from datetime import datetime
VCS_NAMES = ['.svn', '.git', '.bzr', '.hg']
IGNORED_EXTENSIONS = ['.swp', '.tmp', '.pyc', '.pyo']
def list_directory(path, include_directories=True):
# Skip over any VCS directories.
for root, dirs, files in os.walk(path):
for dir in VCS_NAMES:
... | import os
import hashlib
from datetime import datetime
VCS_NAMES = ['.svn', '.git', '.bzr', '.hg']
IGNORED_EXTENSIONS = ['.swp', '.tmp', '.pyc', '.pyo']
def list_directory(path, include_directories=True):
# Skip over any VCS directories.
for root, dirs, files in os.walk(path):
for dir in VCS_NAMES:
... | <commit_before>import os
import hashlib
from datetime import datetime
VCS_NAMES = ['.svn', '.git', '.bzr', '.hg']
IGNORED_EXTENSIONS = ['.swp', '.tmp', '.pyc', '.pyo']
def list_directory(path, include_directories=True):
# Skip over any VCS directories.
for root, dirs, files in os.walk(path):
for dir ... |
d8557db156e277078e10584b2ee32320ac808772 | sentry/client/handlers.py | sentry/client/handlers.py | import logging
import sys
class SentryHandler(logging.Handler):
def emit(self, record):
from sentry.client.models import get_client
from sentry.client.middleware import SentryLogMiddleware
# Fetch the request from a threadlocal variable, if available
request = getattr(SentryLogMidd... | import logging
import sys
class SentryHandler(logging.Handler):
def emit(self, record):
from sentry.client.models import get_client
from sentry.client.middleware import SentryLogMiddleware
# Fetch the request from a threadlocal variable, if available
request = getattr(SentryLogMidd... | Revert "fixed the issue of a client throwing exception - log to stderr and return gracefully" | Revert "fixed the issue of a client throwing exception - log to stderr and return gracefully"
This reverts commit 4cecd6558ec9457d0c3e933023a8a1f77714eee5.
| Python | bsd-3-clause | icereval/raven-python,patrys/opbeat_python,smarkets/raven-python,beeftornado/sentry,gg7/sentry,NickPresta/sentry,JamesMura/sentry,hzy/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,jokey2k/sentry,dirtycoder/opbeat_python,icereval/raven-python,jmagnusson/raven-python,johansteffner/raven-python,mvaled/sentry,J... | import logging
import sys
class SentryHandler(logging.Handler):
def emit(self, record):
from sentry.client.models import get_client
from sentry.client.middleware import SentryLogMiddleware
# Fetch the request from a threadlocal variable, if available
request = getattr(SentryLogMidd... | import logging
import sys
class SentryHandler(logging.Handler):
def emit(self, record):
from sentry.client.models import get_client
from sentry.client.middleware import SentryLogMiddleware
# Fetch the request from a threadlocal variable, if available
request = getattr(SentryLogMidd... | <commit_before>import logging
import sys
class SentryHandler(logging.Handler):
def emit(self, record):
from sentry.client.models import get_client
from sentry.client.middleware import SentryLogMiddleware
# Fetch the request from a threadlocal variable, if available
request = getatt... | import logging
import sys
class SentryHandler(logging.Handler):
def emit(self, record):
from sentry.client.models import get_client
from sentry.client.middleware import SentryLogMiddleware
# Fetch the request from a threadlocal variable, if available
request = getattr(SentryLogMidd... | import logging
import sys
class SentryHandler(logging.Handler):
def emit(self, record):
from sentry.client.models import get_client
from sentry.client.middleware import SentryLogMiddleware
# Fetch the request from a threadlocal variable, if available
request = getattr(SentryLogMidd... | <commit_before>import logging
import sys
class SentryHandler(logging.Handler):
def emit(self, record):
from sentry.client.models import get_client
from sentry.client.middleware import SentryLogMiddleware
# Fetch the request from a threadlocal variable, if available
request = getatt... |
199aee78cb494169eb8b73fbb65de5ae40a5d436 | other/wrapping-cpp/swig/c++/test_mylib.py | other/wrapping-cpp/swig/c++/test_mylib.py | import os
import mylib
os.system('make all')
def test_squared():
assert 16. == mylib.squared(4)
def test_myfunction():
assert 16. == mylib.myfunction(mylib.squared, 4)
os.system('make clean')
| import os
import pytest
@pytest.fixture
def setup(request):
def teardown():
print("Running make clean")
os.system('make clean')
print("Completed finaliser")
request.addfinalizer(teardown)
os.system('make clean')
os.system('make all')
def test_squared(setup):
import mylib
... | Use pytest fixture to deal with compilation | Use pytest fixture to deal with compilation
| Python | bsd-2-clause | fangohr/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python | import os
import mylib
os.system('make all')
def test_squared():
assert 16. == mylib.squared(4)
def test_myfunction():
assert 16. == mylib.myfunction(mylib.squared, 4)
os.system('make clean')
Use pytest fixture to deal with compilation | import os
import pytest
@pytest.fixture
def setup(request):
def teardown():
print("Running make clean")
os.system('make clean')
print("Completed finaliser")
request.addfinalizer(teardown)
os.system('make clean')
os.system('make all')
def test_squared(setup):
import mylib
... | <commit_before>import os
import mylib
os.system('make all')
def test_squared():
assert 16. == mylib.squared(4)
def test_myfunction():
assert 16. == mylib.myfunction(mylib.squared, 4)
os.system('make clean')
<commit_msg>Use pytest fixture to deal with compilation<commit_after> | import os
import pytest
@pytest.fixture
def setup(request):
def teardown():
print("Running make clean")
os.system('make clean')
print("Completed finaliser")
request.addfinalizer(teardown)
os.system('make clean')
os.system('make all')
def test_squared(setup):
import mylib
... | import os
import mylib
os.system('make all')
def test_squared():
assert 16. == mylib.squared(4)
def test_myfunction():
assert 16. == mylib.myfunction(mylib.squared, 4)
os.system('make clean')
Use pytest fixture to deal with compilationimport os
import pytest
@pytest.fixture
def setup(request):
def... | <commit_before>import os
import mylib
os.system('make all')
def test_squared():
assert 16. == mylib.squared(4)
def test_myfunction():
assert 16. == mylib.myfunction(mylib.squared, 4)
os.system('make clean')
<commit_msg>Use pytest fixture to deal with compilation<commit_after>import os
import pytest
@p... |
08a09d1b258eb775f641c5edf3aba4ac1c522652 | build/get_landmines.py | build/get_landmines.py | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This file emits the list of reasons why a particular build needs to be clobbered
(or a list of 'landmines').
"""
import sys
de... | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This file emits the list of reasons why a particular build needs to be clobbered
(or a list of 'landmines').
"""
import sys
de... | Add landmine after change to messages.h | Add landmine after change to messages.h
BUG=N
LOG=N
TBR=machenbach@chromium.org
Review URL: https://codereview.chromium.org/1174523004
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#28875}
| Python | mit | UniversalFuture/moosh,UniversalFuture/moosh,UniversalFuture/moosh,UniversalFuture/moosh | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This file emits the list of reasons why a particular build needs to be clobbered
(or a list of 'landmines').
"""
import sys
de... | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This file emits the list of reasons why a particular build needs to be clobbered
(or a list of 'landmines').
"""
import sys
de... | <commit_before>#!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This file emits the list of reasons why a particular build needs to be clobbered
(or a list of 'landmines').
"""
... | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This file emits the list of reasons why a particular build needs to be clobbered
(or a list of 'landmines').
"""
import sys
de... | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This file emits the list of reasons why a particular build needs to be clobbered
(or a list of 'landmines').
"""
import sys
de... | <commit_before>#!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This file emits the list of reasons why a particular build needs to be clobbered
(or a list of 'landmines').
"""
... |
b1906e66dc9f7ce7d164d0df2622e8c2213e1692 | tests/query_test/test_chars.py | tests/query_test/test_chars.py | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | Fix char test to only run on test/none. | Fix char test to only run on test/none.
Change-Id: I8f5ac5a6e7399ce2fdbe78d07ae24deaa1d7532d
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4326
Tested-by: jenkins
Reviewed-by: Alex Behm <fe1626037acfc2dc542d2aa723a6d14f2464a20c@cloudera.com>
| Python | apache-2.0 | andybab/Impala,gistic/PublicSpatialImpala,ImpalaToGo/ImpalaToGo,andybab/Impala,andybab/Impala,andybab/Impala,gistic/PublicSpatialImpala,placrosse/ImpalaToGo,andybab/Impala,gistic/PublicSpatialImpala,AtScaleInc/Impala,placrosse/ImpalaToGo,andybab/Impala,AtScaleInc/Impala,placrosse/ImpalaToGo,ImpalaToGo/ImpalaToGo,Impala... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
r... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
return 'function... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
import logging
import pytest
from copy import copy
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
class TestStringQueries(ImpalaTestSuite):
@classmethod
def get_workload(cls):
r... |
d2cbcad65914ccd26b57dcec12c048c3524ecdc4 | src/cclib/__init__.py | src/cclib/__init__.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""A library for parsing and interpreting results from computational chemistry packages.
The goals of cclib are centered ... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""A library for parsing and interpreting results from computational chemistry packages.
The goals of cclib are centered ... | Add alias cclib.ccopen for easy access | Add alias cclib.ccopen for easy access
| Python | bsd-3-clause | langner/cclib,gaursagar/cclib,ATenderholt/cclib,cclib/cclib,berquist/cclib,berquist/cclib,langner/cclib,berquist/cclib,ATenderholt/cclib,gaursagar/cclib,langner/cclib,cclib/cclib,cclib/cclib | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""A library for parsing and interpreting results from computational chemistry packages.
The goals of cclib are centered ... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""A library for parsing and interpreting results from computational chemistry packages.
The goals of cclib are centered ... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""A library for parsing and interpreting results from computational chemistry packages.
The goals of ccli... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""A library for parsing and interpreting results from computational chemistry packages.
The goals of cclib are centered ... | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""A library for parsing and interpreting results from computational chemistry packages.
The goals of cclib are centered ... | <commit_before># -*- coding: utf-8 -*-
#
# Copyright (c) 2016, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""A library for parsing and interpreting results from computational chemistry packages.
The goals of ccli... |
fa08cec02a0cddfbb2fca4962b01044c323f3737 | test/functional/test_framework/__init__.py | test/functional/test_framework/__init__.py | # Copyright (c) 2018 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.ionlib.ionlib import init, bin2hex, signTxInput, randombytes, pubkey, spendscript, addrbin, txid, SIGHASH_AL... | # Copyright (c) 2018 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.ionlib import init, bin2hex, signTxInput, randombytes, pubkey, spendscript, addrbin, txid, SIGHASH_ALL, SIGH... | Remove extra iolib fron init.py | Remove extra iolib fron init.py
| Python | mit | ionomy/ion,ionomy/ion,ionomy/ion,ionomy/ion,ionomy/ion,ionomy/ion | # Copyright (c) 2018 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.ionlib.ionlib import init, bin2hex, signTxInput, randombytes, pubkey, spendscript, addrbin, txid, SIGHASH_AL... | # Copyright (c) 2018 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.ionlib import init, bin2hex, signTxInput, randombytes, pubkey, spendscript, addrbin, txid, SIGHASH_ALL, SIGH... | <commit_before># Copyright (c) 2018 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.ionlib.ionlib import init, bin2hex, signTxInput, randombytes, pubkey, spendscript, addrbin, t... | # Copyright (c) 2018 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.ionlib import init, bin2hex, signTxInput, randombytes, pubkey, spendscript, addrbin, txid, SIGHASH_ALL, SIGH... | # Copyright (c) 2018 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.ionlib.ionlib import init, bin2hex, signTxInput, randombytes, pubkey, spendscript, addrbin, txid, SIGHASH_AL... | <commit_before># Copyright (c) 2018 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.ionlib.ionlib import init, bin2hex, signTxInput, randombytes, pubkey, spendscript, addrbin, t... |
5fbf5bac84a7ededde99e109d206681af99c112c | sort/bubble_sort_optimized/python/bubble_sort_optimized.py | sort/bubble_sort_optimized/python/bubble_sort_optimized.py | class Solution:
def bubbleSortOptimized(self, nums: List[int]) -> None:
if len(nums) == 1:
return nums
else:
swapped = False
while not swapped:
swapped = True
for i in range(0, len(nums)-1):
if nums[i] > nums[i+1... | class Solution:
def bubbleSortOptimized(self, nums):
if len(nums) == 1:
return nums
else:
swapped = False
while not swapped:
swapped = True
for i in range(0, len(nums)-1):
if nums[i] > nums[i+1]:
... | Add dijkstras algorithm and depth first search in python | Add dijkstras algorithm and depth first search in python
| Python | cc0-1.0 | ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs... | class Solution:
def bubbleSortOptimized(self, nums: List[int]) -> None:
if len(nums) == 1:
return nums
else:
swapped = False
while not swapped:
swapped = True
for i in range(0, len(nums)-1):
if nums[i] > nums[i+1... | class Solution:
def bubbleSortOptimized(self, nums):
if len(nums) == 1:
return nums
else:
swapped = False
while not swapped:
swapped = True
for i in range(0, len(nums)-1):
if nums[i] > nums[i+1]:
... | <commit_before>class Solution:
def bubbleSortOptimized(self, nums: List[int]) -> None:
if len(nums) == 1:
return nums
else:
swapped = False
while not swapped:
swapped = True
for i in range(0, len(nums)-1):
if num... | class Solution:
def bubbleSortOptimized(self, nums):
if len(nums) == 1:
return nums
else:
swapped = False
while not swapped:
swapped = True
for i in range(0, len(nums)-1):
if nums[i] > nums[i+1]:
... | class Solution:
def bubbleSortOptimized(self, nums: List[int]) -> None:
if len(nums) == 1:
return nums
else:
swapped = False
while not swapped:
swapped = True
for i in range(0, len(nums)-1):
if nums[i] > nums[i+1... | <commit_before>class Solution:
def bubbleSortOptimized(self, nums: List[int]) -> None:
if len(nums) == 1:
return nums
else:
swapped = False
while not swapped:
swapped = True
for i in range(0, len(nums)-1):
if num... |
807f0e14acf7685c2655c6843423104ffc9bb015 | tests/integration/test_repos_deployment.py | tests/integration/test_repos_deployment.py | import github3
from .helper import IntegrationHelper
def find(func, iterable):
return next(filter(func, iterable))
class TestDeployment(IntegrationHelper):
def test_create_status(self):
"""
Test that using a Deployment instance, a user can create a status.
"""
self.basic_log... | import github3
from .helper import IntegrationHelper
def find(func, iterable):
return next(iter(filter(func, iterable)))
class TestDeployment(IntegrationHelper):
def test_create_status(self):
"""
Test that using a Deployment instance, a user can create a status.
"""
self.bas... | Fix test helper once and for all | Fix test helper once and for all
| Python | bsd-3-clause | icio/github3.py,jim-minter/github3.py,itsmemattchung/github3.py,agamdua/github3.py,wbrefvem/github3.py,christophelec/github3.py,balloob/github3.py,h4ck3rm1k3/github3.py,krxsky/github3.py,degustaf/github3.py,ueg1990/github3.py,sigmavirus24/github3.py | import github3
from .helper import IntegrationHelper
def find(func, iterable):
return next(filter(func, iterable))
class TestDeployment(IntegrationHelper):
def test_create_status(self):
"""
Test that using a Deployment instance, a user can create a status.
"""
self.basic_log... | import github3
from .helper import IntegrationHelper
def find(func, iterable):
return next(iter(filter(func, iterable)))
class TestDeployment(IntegrationHelper):
def test_create_status(self):
"""
Test that using a Deployment instance, a user can create a status.
"""
self.bas... | <commit_before>import github3
from .helper import IntegrationHelper
def find(func, iterable):
return next(filter(func, iterable))
class TestDeployment(IntegrationHelper):
def test_create_status(self):
"""
Test that using a Deployment instance, a user can create a status.
"""
... | import github3
from .helper import IntegrationHelper
def find(func, iterable):
return next(iter(filter(func, iterable)))
class TestDeployment(IntegrationHelper):
def test_create_status(self):
"""
Test that using a Deployment instance, a user can create a status.
"""
self.bas... | import github3
from .helper import IntegrationHelper
def find(func, iterable):
return next(filter(func, iterable))
class TestDeployment(IntegrationHelper):
def test_create_status(self):
"""
Test that using a Deployment instance, a user can create a status.
"""
self.basic_log... | <commit_before>import github3
from .helper import IntegrationHelper
def find(func, iterable):
return next(filter(func, iterable))
class TestDeployment(IntegrationHelper):
def test_create_status(self):
"""
Test that using a Deployment instance, a user can create a status.
"""
... |
be202ab0f991dad50a4eaf200f4a719c99b8bab2 | tests/middleware/test_https_redirect.py | tests/middleware/test_https_redirect.py | from starlette.applications import Starlette
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.responses import PlainTextResponse
from starlette.testclient import TestClient
def test_https_redirect_middleware():
app = Starlette()
app.add_middleware(HTTPSRedirectMiddleware)... | from starlette.applications import Starlette
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.responses import PlainTextResponse
from starlette.testclient import TestClient
def test_https_redirect_middleware():
app = Starlette()
app.add_middleware(HTTPSRedirectMiddleware)... | Fix test case for https redirects | Fix test case for https redirects
| Python | bsd-3-clause | encode/starlette,encode/starlette | from starlette.applications import Starlette
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.responses import PlainTextResponse
from starlette.testclient import TestClient
def test_https_redirect_middleware():
app = Starlette()
app.add_middleware(HTTPSRedirectMiddleware)... | from starlette.applications import Starlette
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.responses import PlainTextResponse
from starlette.testclient import TestClient
def test_https_redirect_middleware():
app = Starlette()
app.add_middleware(HTTPSRedirectMiddleware)... | <commit_before>from starlette.applications import Starlette
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.responses import PlainTextResponse
from starlette.testclient import TestClient
def test_https_redirect_middleware():
app = Starlette()
app.add_middleware(HTTPSRedi... | from starlette.applications import Starlette
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.responses import PlainTextResponse
from starlette.testclient import TestClient
def test_https_redirect_middleware():
app = Starlette()
app.add_middleware(HTTPSRedirectMiddleware)... | from starlette.applications import Starlette
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.responses import PlainTextResponse
from starlette.testclient import TestClient
def test_https_redirect_middleware():
app = Starlette()
app.add_middleware(HTTPSRedirectMiddleware)... | <commit_before>from starlette.applications import Starlette
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
from starlette.responses import PlainTextResponse
from starlette.testclient import TestClient
def test_https_redirect_middleware():
app = Starlette()
app.add_middleware(HTTPSRedi... |
f0daa1674ef6fd59173fe7d1904f8598f7418f8b | tests/mock_vws/test_inactive_project.py | tests/mock_vws/test_inactive_project.py | """
Tests for inactive projects.
"""
| """
Tests for inactive projects.
"""
import pytest
from tests.utils import VuforiaServerCredentials
@pytest.mark.usefixtures('verify_mock_vuforia')
class TestInactiveProject:
"""
Tests for inactive projects.
"""
def test_inactive_project(
self,
verify_mock_vuforia_inactive: VuforiaS... | Add stub for inactive project test | Add stub for inactive project test
| Python | mit | adamtheturtle/vws-python,adamtheturtle/vws-python | """
Tests for inactive projects.
"""
Add stub for inactive project test | """
Tests for inactive projects.
"""
import pytest
from tests.utils import VuforiaServerCredentials
@pytest.mark.usefixtures('verify_mock_vuforia')
class TestInactiveProject:
"""
Tests for inactive projects.
"""
def test_inactive_project(
self,
verify_mock_vuforia_inactive: VuforiaS... | <commit_before>"""
Tests for inactive projects.
"""
<commit_msg>Add stub for inactive project test<commit_after> | """
Tests for inactive projects.
"""
import pytest
from tests.utils import VuforiaServerCredentials
@pytest.mark.usefixtures('verify_mock_vuforia')
class TestInactiveProject:
"""
Tests for inactive projects.
"""
def test_inactive_project(
self,
verify_mock_vuforia_inactive: VuforiaS... | """
Tests for inactive projects.
"""
Add stub for inactive project test"""
Tests for inactive projects.
"""
import pytest
from tests.utils import VuforiaServerCredentials
@pytest.mark.usefixtures('verify_mock_vuforia')
class TestInactiveProject:
"""
Tests for inactive projects.
"""
def test_inactiv... | <commit_before>"""
Tests for inactive projects.
"""
<commit_msg>Add stub for inactive project test<commit_after>"""
Tests for inactive projects.
"""
import pytest
from tests.utils import VuforiaServerCredentials
@pytest.mark.usefixtures('verify_mock_vuforia')
class TestInactiveProject:
"""
Tests for inactiv... |
bcc962313107ec4714b2e53d793f172c4a77576f | src/shipit_code_coverage/shipit_code_coverage/coveralls.py | src/shipit_code_coverage/shipit_code_coverage/coveralls.py | import requests
def upload(data):
r = requests.post('https://coveralls.io/api/v1/jobs', files={
'json_file': data
})
try:
print(r.json())
except ValueError:
raise Exception('Failure to submit data. Response [%s]: %s' % (r.status_code, r.text)) # NOQA
| import gzip
import requests
def upload(data):
r = requests.post('https://coveralls.io/api/v1/jobs', files={
'json_file': ('json_file', gzip.compress(data), 'gzip/json')
})
try:
print(r.json())
except ValueError:
raise Exception('Failure to submit data. Response [%s]: %s' % (r.... | Compress data sent to Coveralls using gzip | shipit_code_coverage: Compress data sent to Coveralls using gzip
| Python | mpl-2.0 | lundjordan/services,garbas/mozilla-releng-services,mozilla-releng/services,La0/mozilla-relengapi,La0/mozilla-relengapi,lundjordan/services,garbas/mozilla-releng-services,lundjordan/services,srfraser/services,mozilla-releng/services,srfraser/services,garbas/mozilla-releng-services,mozilla-releng/services,lundjordan/serv... | import requests
def upload(data):
r = requests.post('https://coveralls.io/api/v1/jobs', files={
'json_file': data
})
try:
print(r.json())
except ValueError:
raise Exception('Failure to submit data. Response [%s]: %s' % (r.status_code, r.text)) # NOQA
shipit_code_coverage: Com... | import gzip
import requests
def upload(data):
r = requests.post('https://coveralls.io/api/v1/jobs', files={
'json_file': ('json_file', gzip.compress(data), 'gzip/json')
})
try:
print(r.json())
except ValueError:
raise Exception('Failure to submit data. Response [%s]: %s' % (r.... | <commit_before>import requests
def upload(data):
r = requests.post('https://coveralls.io/api/v1/jobs', files={
'json_file': data
})
try:
print(r.json())
except ValueError:
raise Exception('Failure to submit data. Response [%s]: %s' % (r.status_code, r.text)) # NOQA
<commit_ms... | import gzip
import requests
def upload(data):
r = requests.post('https://coveralls.io/api/v1/jobs', files={
'json_file': ('json_file', gzip.compress(data), 'gzip/json')
})
try:
print(r.json())
except ValueError:
raise Exception('Failure to submit data. Response [%s]: %s' % (r.... | import requests
def upload(data):
r = requests.post('https://coveralls.io/api/v1/jobs', files={
'json_file': data
})
try:
print(r.json())
except ValueError:
raise Exception('Failure to submit data. Response [%s]: %s' % (r.status_code, r.text)) # NOQA
shipit_code_coverage: Com... | <commit_before>import requests
def upload(data):
r = requests.post('https://coveralls.io/api/v1/jobs', files={
'json_file': data
})
try:
print(r.json())
except ValueError:
raise Exception('Failure to submit data. Response [%s]: %s' % (r.status_code, r.text)) # NOQA
<commit_ms... |
0e7be2adf1101ae842dddb3db3217957a8e5957f | iati/core/rulesets.py | iati/core/rulesets.py | """A module containg a core representation of IATI Rulesets."""
class Ruleset(object):
"""Representation of a Ruleset as defined within the IATI SSOT."""
pass
class Rule(object):
"""Representation of a Rule contained within a Ruleset.
Acts as a base class for specific types of Rule that actually d... | """A module containg a core representation of IATI Rulesets.
Todo:
Implement Rulesets (and Rules). Likely worth completing the Codelist implementation first since the two will be similar.
"""
class Ruleset(object):
"""Representation of a Ruleset as defined within the IATI SSOT."""
pass
class Rule(obje... | Add a ruleset module TODO | Add a ruleset module TODO
| Python | mit | IATI/iati.core,IATI/iati.core | """A module containg a core representation of IATI Rulesets."""
class Ruleset(object):
"""Representation of a Ruleset as defined within the IATI SSOT."""
pass
class Rule(object):
"""Representation of a Rule contained within a Ruleset.
Acts as a base class for specific types of Rule that actually d... | """A module containg a core representation of IATI Rulesets.
Todo:
Implement Rulesets (and Rules). Likely worth completing the Codelist implementation first since the two will be similar.
"""
class Ruleset(object):
"""Representation of a Ruleset as defined within the IATI SSOT."""
pass
class Rule(obje... | <commit_before>"""A module containg a core representation of IATI Rulesets."""
class Ruleset(object):
"""Representation of a Ruleset as defined within the IATI SSOT."""
pass
class Rule(object):
"""Representation of a Rule contained within a Ruleset.
Acts as a base class for specific types of Rule ... | """A module containg a core representation of IATI Rulesets.
Todo:
Implement Rulesets (and Rules). Likely worth completing the Codelist implementation first since the two will be similar.
"""
class Ruleset(object):
"""Representation of a Ruleset as defined within the IATI SSOT."""
pass
class Rule(obje... | """A module containg a core representation of IATI Rulesets."""
class Ruleset(object):
"""Representation of a Ruleset as defined within the IATI SSOT."""
pass
class Rule(object):
"""Representation of a Rule contained within a Ruleset.
Acts as a base class for specific types of Rule that actually d... | <commit_before>"""A module containg a core representation of IATI Rulesets."""
class Ruleset(object):
"""Representation of a Ruleset as defined within the IATI SSOT."""
pass
class Rule(object):
"""Representation of a Rule contained within a Ruleset.
Acts as a base class for specific types of Rule ... |
bf46ceea3c77f87768be7773fe2b26112a151606 | src/waypoints_reader/scripts/yaml_reader.py | src/waypoints_reader/scripts/yaml_reader.py | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def get_waypo... | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def get_waypo... | Add errer handling for python code | Add errer handling for python code
| Python | bsd-3-clause | CIR-KIT/fifth_robot_pkg,CIR-KIT/fifth_robot_pkg,CIR-KIT/fifth_robot_pkg | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def get_waypo... | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def get_waypo... | <commit_before>#!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints... | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def get_waypo... | #!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints
def get_waypo... | <commit_before>#!/usr/bin/env python
# coding UTF-8
import yaml
import rospy
from goal_sender_msgs.srv import ApplyGoals
from goal_sender_msgs.msg import GoalSequence
from goal_sender_msgs.msg import Waypoint
def read_yaml(path):
f = open(path, 'r')
waypoints = yaml.load(f)
f.close()
return waypoints... |
a977f0540410e5994405f3f6e579e866f1e3c119 | steel/bits/__init__.py | steel/bits/__init__.py | from steel.common import Remainder
from steel.common.fields import *
from steel.byte.base import *
from steel.fields import *
| from steel.common import Remainder
from steel.common.fields import *
from steel.base import *
from steel.fields import *
| Update the bits package to use new imports | Update the bits package to use new imports
| Python | bsd-3-clause | gulopine/steel | from steel.common import Remainder
from steel.common.fields import *
from steel.byte.base import *
from steel.fields import *
Update the bits package to use new imports | from steel.common import Remainder
from steel.common.fields import *
from steel.base import *
from steel.fields import *
| <commit_before>from steel.common import Remainder
from steel.common.fields import *
from steel.byte.base import *
from steel.fields import *
<commit_msg>Update the bits package to use new imports<commit_after> | from steel.common import Remainder
from steel.common.fields import *
from steel.base import *
from steel.fields import *
| from steel.common import Remainder
from steel.common.fields import *
from steel.byte.base import *
from steel.fields import *
Update the bits package to use new importsfrom steel.common import Remainder
from steel.common.fields import *
from steel.base import *
from steel.fields import *
| <commit_before>from steel.common import Remainder
from steel.common.fields import *
from steel.byte.base import *
from steel.fields import *
<commit_msg>Update the bits package to use new imports<commit_after>from steel.common import Remainder
from steel.common.fields import *
from steel.base import *
from s... |
76ca05a20fcdf36dc81d3ec98048f89f98325d68 | imhotep_jsl/plugin.py | imhotep_jsl/plugin.py | from imhotep.tools import Tool
from collections import defaultdict
import re
class JSL(Tool):
regex = re.compile(
r'^(?P<type>[WE]) '
r'(?P<filename>.*?) L(?P<line_number>\d+): (?P<message>.*)$')
def invoke(self, dirname, filenames=set()):
retval = defaultdict(lambda: defaultdict(list... | from imhotep.tools import Tool
from collections import defaultdict
import re
class JSL(Tool):
regex = re.compile(
r'^(?P<type>[WE]) '
r'(?P<filename>.*?) L(?P<line_number>\d+): (?P<message>.*)$')
def invoke(self, dirname, filenames=set()):
retval = defaultdict(lambda: defaultdict(list... | Add support for imhotep to pass a list of filenames. | Add support for imhotep to pass a list of filenames.
| Python | mit | hayes/imhotep_jsl | from imhotep.tools import Tool
from collections import defaultdict
import re
class JSL(Tool):
regex = re.compile(
r'^(?P<type>[WE]) '
r'(?P<filename>.*?) L(?P<line_number>\d+): (?P<message>.*)$')
def invoke(self, dirname, filenames=set()):
retval = defaultdict(lambda: defaultdict(list... | from imhotep.tools import Tool
from collections import defaultdict
import re
class JSL(Tool):
regex = re.compile(
r'^(?P<type>[WE]) '
r'(?P<filename>.*?) L(?P<line_number>\d+): (?P<message>.*)$')
def invoke(self, dirname, filenames=set()):
retval = defaultdict(lambda: defaultdict(list... | <commit_before>from imhotep.tools import Tool
from collections import defaultdict
import re
class JSL(Tool):
regex = re.compile(
r'^(?P<type>[WE]) '
r'(?P<filename>.*?) L(?P<line_number>\d+): (?P<message>.*)$')
def invoke(self, dirname, filenames=set()):
retval = defaultdict(lambda: d... | from imhotep.tools import Tool
from collections import defaultdict
import re
class JSL(Tool):
regex = re.compile(
r'^(?P<type>[WE]) '
r'(?P<filename>.*?) L(?P<line_number>\d+): (?P<message>.*)$')
def invoke(self, dirname, filenames=set()):
retval = defaultdict(lambda: defaultdict(list... | from imhotep.tools import Tool
from collections import defaultdict
import re
class JSL(Tool):
regex = re.compile(
r'^(?P<type>[WE]) '
r'(?P<filename>.*?) L(?P<line_number>\d+): (?P<message>.*)$')
def invoke(self, dirname, filenames=set()):
retval = defaultdict(lambda: defaultdict(list... | <commit_before>from imhotep.tools import Tool
from collections import defaultdict
import re
class JSL(Tool):
regex = re.compile(
r'^(?P<type>[WE]) '
r'(?P<filename>.*?) L(?P<line_number>\d+): (?P<message>.*)$')
def invoke(self, dirname, filenames=set()):
retval = defaultdict(lambda: d... |
2c357a54e30eecb1d7b717be3ed774dcfecc2814 | src/stratis_cli/_actions/_stratis.py | src/stratis_cli/_actions/_stratis.py | # Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | # Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | Use '_' prefix instead of disabling pylint unused-argument lint | Use '_' prefix instead of disabling pylint unused-argument lint
It is more precise to mark the unused parameters this way.
Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>
| Python | apache-2.0 | stratis-storage/stratis-cli,stratis-storage/stratis-cli | # Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | # Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | <commit_before># Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | # Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | # Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | <commit_before># Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... |
77ff64c858aa21c9651ccf58c95b739db45cd97b | Instanssi/kompomaatti/templatetags/kompomaatti_base_tags.py | Instanssi/kompomaatti/templatetags/kompomaatti_base_tags.py | # -*- coding: utf-8 -*-
from django import template
from Instanssi.kompomaatti.models import Compo, Competition
register = template.Library()
@register.inclusion_tag('kompomaatti/compo_nav_items.html')
def render_base_compos_nav(event_id):
return {
'event_id': event_id,
'compos': Compo.objects.fi... | # -*- coding: utf-8 -*-
from django import template
from Instanssi.kompomaatti.models import Compo, Competition
register = template.Library()
@register.inclusion_tag('kompomaatti/tags/compo_nav_items.html')
def render_base_compos_nav(event_id):
return {
'event_id': event_id,
'compos': Compo.objec... | Update tags to use new template subdirectory. | kompomaatti: Update tags to use new template subdirectory.
| Python | mit | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | # -*- coding: utf-8 -*-
from django import template
from Instanssi.kompomaatti.models import Compo, Competition
register = template.Library()
@register.inclusion_tag('kompomaatti/compo_nav_items.html')
def render_base_compos_nav(event_id):
return {
'event_id': event_id,
'compos': Compo.objects.fi... | # -*- coding: utf-8 -*-
from django import template
from Instanssi.kompomaatti.models import Compo, Competition
register = template.Library()
@register.inclusion_tag('kompomaatti/tags/compo_nav_items.html')
def render_base_compos_nav(event_id):
return {
'event_id': event_id,
'compos': Compo.objec... | <commit_before># -*- coding: utf-8 -*-
from django import template
from Instanssi.kompomaatti.models import Compo, Competition
register = template.Library()
@register.inclusion_tag('kompomaatti/compo_nav_items.html')
def render_base_compos_nav(event_id):
return {
'event_id': event_id,
'compos': C... | # -*- coding: utf-8 -*-
from django import template
from Instanssi.kompomaatti.models import Compo, Competition
register = template.Library()
@register.inclusion_tag('kompomaatti/tags/compo_nav_items.html')
def render_base_compos_nav(event_id):
return {
'event_id': event_id,
'compos': Compo.objec... | # -*- coding: utf-8 -*-
from django import template
from Instanssi.kompomaatti.models import Compo, Competition
register = template.Library()
@register.inclusion_tag('kompomaatti/compo_nav_items.html')
def render_base_compos_nav(event_id):
return {
'event_id': event_id,
'compos': Compo.objects.fi... | <commit_before># -*- coding: utf-8 -*-
from django import template
from Instanssi.kompomaatti.models import Compo, Competition
register = template.Library()
@register.inclusion_tag('kompomaatti/compo_nav_items.html')
def render_base_compos_nav(event_id):
return {
'event_id': event_id,
'compos': C... |
c2fd8515666476cc0b6760b72b6cd71ef030e6f4 | thinc/neural/tests/unit/Affine/test_init.py | thinc/neural/tests/unit/Affine/test_init.py | # encoding: utf8
from __future__ import unicode_literals
import pytest
from flexmock import flexmock
from hypothesis import given, strategies
import abc
from .... import vec2vec
from ....ops import NumpyOps
@pytest.fixture
def model_with_no_args():
model = vec2vec.Affine(ops=NumpyOps())
return model
def te... | # encoding: utf8
from __future__ import unicode_literals
import pytest
from mock import Mock, patch
from hypothesis import given, strategies
import abc
from ...._classes.affine import Affine
from ....ops import NumpyOps
@pytest.fixture
def model():
orig_desc = dict(Affine.descriptions)
orig_on_init = list(Af... | Test Affine init calls hooks correctly, and sets descriptors | Test Affine init calls hooks correctly, and sets descriptors
| Python | mit | explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc | # encoding: utf8
from __future__ import unicode_literals
import pytest
from flexmock import flexmock
from hypothesis import given, strategies
import abc
from .... import vec2vec
from ....ops import NumpyOps
@pytest.fixture
def model_with_no_args():
model = vec2vec.Affine(ops=NumpyOps())
return model
def te... | # encoding: utf8
from __future__ import unicode_literals
import pytest
from mock import Mock, patch
from hypothesis import given, strategies
import abc
from ...._classes.affine import Affine
from ....ops import NumpyOps
@pytest.fixture
def model():
orig_desc = dict(Affine.descriptions)
orig_on_init = list(Af... | <commit_before># encoding: utf8
from __future__ import unicode_literals
import pytest
from flexmock import flexmock
from hypothesis import given, strategies
import abc
from .... import vec2vec
from ....ops import NumpyOps
@pytest.fixture
def model_with_no_args():
model = vec2vec.Affine(ops=NumpyOps())
return... | # encoding: utf8
from __future__ import unicode_literals
import pytest
from mock import Mock, patch
from hypothesis import given, strategies
import abc
from ...._classes.affine import Affine
from ....ops import NumpyOps
@pytest.fixture
def model():
orig_desc = dict(Affine.descriptions)
orig_on_init = list(Af... | # encoding: utf8
from __future__ import unicode_literals
import pytest
from flexmock import flexmock
from hypothesis import given, strategies
import abc
from .... import vec2vec
from ....ops import NumpyOps
@pytest.fixture
def model_with_no_args():
model = vec2vec.Affine(ops=NumpyOps())
return model
def te... | <commit_before># encoding: utf8
from __future__ import unicode_literals
import pytest
from flexmock import flexmock
from hypothesis import given, strategies
import abc
from .... import vec2vec
from ....ops import NumpyOps
@pytest.fixture
def model_with_no_args():
model = vec2vec.Affine(ops=NumpyOps())
return... |
04eae79deb30e63f68534784f1eaf0412cfb1aa9 | reporting_scripts/forum_data.py | reporting_scripts/forum_data.py | from collections import defaultdict
import json
import sys
from base_edx import EdXConnection
from generate_csv_report import CSV
db_name = sys.argv[1]
# Change name of collection as required
connection = EdXConnection(db_name, 'forum' )
collection = connection.get_access_to_collection()
forum_data = collection['... | from collections import defaultdict
import json
import sys
from base_edx import EdXConnection
from generate_csv_report import CSV
db_name = sys.argv[1]
# Change name of collection as required
connection = EdXConnection(db_name, 'forum' )
collection = connection.get_access_to_collection()
forum_data = collection['... | Update script with latest fields | Update script with latest fields
| Python | mit | andyzsf/edx_data_research,andyzsf/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research | from collections import defaultdict
import json
import sys
from base_edx import EdXConnection
from generate_csv_report import CSV
db_name = sys.argv[1]
# Change name of collection as required
connection = EdXConnection(db_name, 'forum' )
collection = connection.get_access_to_collection()
forum_data = collection['... | from collections import defaultdict
import json
import sys
from base_edx import EdXConnection
from generate_csv_report import CSV
db_name = sys.argv[1]
# Change name of collection as required
connection = EdXConnection(db_name, 'forum' )
collection = connection.get_access_to_collection()
forum_data = collection['... | <commit_before>from collections import defaultdict
import json
import sys
from base_edx import EdXConnection
from generate_csv_report import CSV
db_name = sys.argv[1]
# Change name of collection as required
connection = EdXConnection(db_name, 'forum' )
collection = connection.get_access_to_collection()
forum_data... | from collections import defaultdict
import json
import sys
from base_edx import EdXConnection
from generate_csv_report import CSV
db_name = sys.argv[1]
# Change name of collection as required
connection = EdXConnection(db_name, 'forum' )
collection = connection.get_access_to_collection()
forum_data = collection['... | from collections import defaultdict
import json
import sys
from base_edx import EdXConnection
from generate_csv_report import CSV
db_name = sys.argv[1]
# Change name of collection as required
connection = EdXConnection(db_name, 'forum' )
collection = connection.get_access_to_collection()
forum_data = collection['... | <commit_before>from collections import defaultdict
import json
import sys
from base_edx import EdXConnection
from generate_csv_report import CSV
db_name = sys.argv[1]
# Change name of collection as required
connection = EdXConnection(db_name, 'forum' )
collection = connection.get_access_to_collection()
forum_data... |
af45e43c46a22f3168ab946bf914a45eae9ade19 | avatar/urls.py | avatar/urls.py | try:
from django.conf.urls import patterns, url
except ImportError:
# Django < 1.4
from django.conf.urls.defaults import patterns, url
from avatar import views
urlpatterns = patterns('',
url(r'^add/$', views.add, name='avatar_add'),
url(r'^change/$', views.change, name='avatar_change'),
url(r'... | try:
from django.conf.urls import patterns, url
except ImportError:
# Django < 1.4
from django.conf.urls.defaults import url
from avatar import views
urlpatterns = [
url(r'^add/$', views.add, name='avatar_add'),
url(r'^change/$', views.change, name='avatar_change'),
url(r'^delete/$', views.del... | Remove replace urlpatterns with simple array, make compatible with Django 1.9 | Remove replace urlpatterns with simple array, make compatible with Django 1.9
| Python | bsd-3-clause | ad-m/django-avatar,ad-m/django-avatar,grantmcconnaughey/django-avatar,grantmcconnaughey/django-avatar,jezdez/django-avatar,jezdez/django-avatar,MachineandMagic/django-avatar,MachineandMagic/django-avatar | try:
from django.conf.urls import patterns, url
except ImportError:
# Django < 1.4
from django.conf.urls.defaults import patterns, url
from avatar import views
urlpatterns = patterns('',
url(r'^add/$', views.add, name='avatar_add'),
url(r'^change/$', views.change, name='avatar_change'),
url(r'... | try:
from django.conf.urls import patterns, url
except ImportError:
# Django < 1.4
from django.conf.urls.defaults import url
from avatar import views
urlpatterns = [
url(r'^add/$', views.add, name='avatar_add'),
url(r'^change/$', views.change, name='avatar_change'),
url(r'^delete/$', views.del... | <commit_before>try:
from django.conf.urls import patterns, url
except ImportError:
# Django < 1.4
from django.conf.urls.defaults import patterns, url
from avatar import views
urlpatterns = patterns('',
url(r'^add/$', views.add, name='avatar_add'),
url(r'^change/$', views.change, name='avatar_chang... | try:
from django.conf.urls import patterns, url
except ImportError:
# Django < 1.4
from django.conf.urls.defaults import url
from avatar import views
urlpatterns = [
url(r'^add/$', views.add, name='avatar_add'),
url(r'^change/$', views.change, name='avatar_change'),
url(r'^delete/$', views.del... | try:
from django.conf.urls import patterns, url
except ImportError:
# Django < 1.4
from django.conf.urls.defaults import patterns, url
from avatar import views
urlpatterns = patterns('',
url(r'^add/$', views.add, name='avatar_add'),
url(r'^change/$', views.change, name='avatar_change'),
url(r'... | <commit_before>try:
from django.conf.urls import patterns, url
except ImportError:
# Django < 1.4
from django.conf.urls.defaults import patterns, url
from avatar import views
urlpatterns = patterns('',
url(r'^add/$', views.add, name='avatar_add'),
url(r'^change/$', views.change, name='avatar_chang... |
3e4eacae396f2101b677859ea01f8b225fa957d2 | branches/extracting_oxford/molly/demos/molly_oxford/urls.py | branches/extracting_oxford/molly/demos/molly_oxford/urls.py | from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from molly.conf import applications
admin.autodiscover()
urlpatterns = patterns('',
(r'adm/(.*)', admin.site.root),
# These are how we expect all applications to be eventually.
(r'^contact/', applic... | from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from molly.conf import applications
admin.autodiscover()
urlpatterns = patterns('',
(r'adm/(.*)', admin.site.root),
# These are how we expect all applications to be eventually.
(r'^contact/', applic... | Update Mobile Oxford views to reflect use of app framework in molly.maps. | Update Mobile Oxford views to reflect use of app framework in
molly.maps.
| Python | apache-2.0 | mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject | from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from molly.conf import applications
admin.autodiscover()
urlpatterns = patterns('',
(r'adm/(.*)', admin.site.root),
# These are how we expect all applications to be eventually.
(r'^contact/', applic... | from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from molly.conf import applications
admin.autodiscover()
urlpatterns = patterns('',
(r'adm/(.*)', admin.site.root),
# These are how we expect all applications to be eventually.
(r'^contact/', applic... | <commit_before>from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from molly.conf import applications
admin.autodiscover()
urlpatterns = patterns('',
(r'adm/(.*)', admin.site.root),
# These are how we expect all applications to be eventually.
(r'^co... | from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from molly.conf import applications
admin.autodiscover()
urlpatterns = patterns('',
(r'adm/(.*)', admin.site.root),
# These are how we expect all applications to be eventually.
(r'^contact/', applic... | from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from molly.conf import applications
admin.autodiscover()
urlpatterns = patterns('',
(r'adm/(.*)', admin.site.root),
# These are how we expect all applications to be eventually.
(r'^contact/', applic... | <commit_before>from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from molly.conf import applications
admin.autodiscover()
urlpatterns = patterns('',
(r'adm/(.*)', admin.site.root),
# These are how we expect all applications to be eventually.
(r'^co... |
d0f18bed554c58873776eefba5b2be1d60926f95 | elevator_cli/io.py | elevator_cli/io.py | # -*- coding: utf-8 -*-
# Copyright (c) 2012 theo crevon
#
# See the file LICENSE for copying permission.
from clint.textui import puts, colored
from elevator.utils.patterns import destructurate
from .helpers import FAILURE_STATUS
def prompt(*args, **kwargs):
current_db = kwargs.pop('current_db', 'default')
... | # -*- coding: utf-8 -*-
# Copyright (c) 2012 theo crevon
#
# See the file LICENSE for copying permission.
import shlex
from clint.textui import puts, colored
from elevator.utils.patterns import destructurate
from .helpers import FAILURE_STATUS
def prompt(*args, **kwargs):
current_db = kwargs.pop('current_db'... | Update : protect cli quoted arguments while parsing | Update : protect cli quoted arguments while parsing
| Python | mit | oleiade/Elevator | # -*- coding: utf-8 -*-
# Copyright (c) 2012 theo crevon
#
# See the file LICENSE for copying permission.
from clint.textui import puts, colored
from elevator.utils.patterns import destructurate
from .helpers import FAILURE_STATUS
def prompt(*args, **kwargs):
current_db = kwargs.pop('current_db', 'default')
... | # -*- coding: utf-8 -*-
# Copyright (c) 2012 theo crevon
#
# See the file LICENSE for copying permission.
import shlex
from clint.textui import puts, colored
from elevator.utils.patterns import destructurate
from .helpers import FAILURE_STATUS
def prompt(*args, **kwargs):
current_db = kwargs.pop('current_db'... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2012 theo crevon
#
# See the file LICENSE for copying permission.
from clint.textui import puts, colored
from elevator.utils.patterns import destructurate
from .helpers import FAILURE_STATUS
def prompt(*args, **kwargs):
current_db = kwargs.pop('current_db... | # -*- coding: utf-8 -*-
# Copyright (c) 2012 theo crevon
#
# See the file LICENSE for copying permission.
import shlex
from clint.textui import puts, colored
from elevator.utils.patterns import destructurate
from .helpers import FAILURE_STATUS
def prompt(*args, **kwargs):
current_db = kwargs.pop('current_db'... | # -*- coding: utf-8 -*-
# Copyright (c) 2012 theo crevon
#
# See the file LICENSE for copying permission.
from clint.textui import puts, colored
from elevator.utils.patterns import destructurate
from .helpers import FAILURE_STATUS
def prompt(*args, **kwargs):
current_db = kwargs.pop('current_db', 'default')
... | <commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2012 theo crevon
#
# See the file LICENSE for copying permission.
from clint.textui import puts, colored
from elevator.utils.patterns import destructurate
from .helpers import FAILURE_STATUS
def prompt(*args, **kwargs):
current_db = kwargs.pop('current_db... |
22499afe4e434377e449226c5b073251165f4151 | src/geoserver/style.py | src/geoserver/style.py | from geoserver.support import ResourceInfo, atom_link
class Style(ResourceInfo):
def __init__(self,catalog, node):
self.catalog = catalog
self.name = node.find("name").text
self.href = atom_link(node)
self.update()
def update(self):
ResourceInfo.update(self)
self.name = self.metadata.f... | from geoserver.support import ResourceInfo, atom_link
class Style(ResourceInfo):
def __init__(self,catalog, node):
self.catalog = catalog
self.name = node.find("name").text
self.href = atom_link(node)
self.update()
def update(self):
ResourceInfo.update(self)
self.name = self.metadata.f... | Add basic support for inspecting the body of SLDs | Add basic support for inspecting the body of SLDs
| Python | mit | cristianzamar/gsconfig,Geode/gsconfig,scottp-dpaw/gsconfig,boundlessgeo/gsconfig,afabiani/gsconfig,garnertb/gsconfig.py | from geoserver.support import ResourceInfo, atom_link
class Style(ResourceInfo):
def __init__(self,catalog, node):
self.catalog = catalog
self.name = node.find("name").text
self.href = atom_link(node)
self.update()
def update(self):
ResourceInfo.update(self)
self.name = self.metadata.f... | from geoserver.support import ResourceInfo, atom_link
class Style(ResourceInfo):
def __init__(self,catalog, node):
self.catalog = catalog
self.name = node.find("name").text
self.href = atom_link(node)
self.update()
def update(self):
ResourceInfo.update(self)
self.name = self.metadata.f... | <commit_before>from geoserver.support import ResourceInfo, atom_link
class Style(ResourceInfo):
def __init__(self,catalog, node):
self.catalog = catalog
self.name = node.find("name").text
self.href = atom_link(node)
self.update()
def update(self):
ResourceInfo.update(self)
self.name = ... | from geoserver.support import ResourceInfo, atom_link
class Style(ResourceInfo):
def __init__(self,catalog, node):
self.catalog = catalog
self.name = node.find("name").text
self.href = atom_link(node)
self.update()
def update(self):
ResourceInfo.update(self)
self.name = self.metadata.f... | from geoserver.support import ResourceInfo, atom_link
class Style(ResourceInfo):
def __init__(self,catalog, node):
self.catalog = catalog
self.name = node.find("name").text
self.href = atom_link(node)
self.update()
def update(self):
ResourceInfo.update(self)
self.name = self.metadata.f... | <commit_before>from geoserver.support import ResourceInfo, atom_link
class Style(ResourceInfo):
def __init__(self,catalog, node):
self.catalog = catalog
self.name = node.find("name").text
self.href = atom_link(node)
self.update()
def update(self):
ResourceInfo.update(self)
self.name = ... |
f48066555e6a4f778887b0600e13b304d36c9529 | minutes/forms.py | minutes/forms.py | from django.forms import ModelForm, Textarea, ChoiceField
from django.utils.functional import lazy
from .models import Meeting, Folder
MD_INPUT = {
'class': 'markdown-input'
}
def sorted_folders():
return sorted([(x.pk, str(x)) for x in Folder.objects.all()], key=lambda x: x[1])
class MeetingForm(ModelFor... | from django.forms import ModelForm, Textarea, ChoiceField
from django.urls import reverse_lazy
from .models import Meeting, Folder
MD_INPUT = {
'class': 'markdown-input',
'data-endpoint': reverse_lazy('utilities:preview_safe')
}
def sorted_folders():
return sorted([(x.pk, str(x)) for x in Folder.objects... | Allow admin preview in minutes as well | Allow admin preview in minutes as well
| Python | isc | ashbc/tgrsite,ashbc/tgrsite,ashbc/tgrsite | from django.forms import ModelForm, Textarea, ChoiceField
from django.utils.functional import lazy
from .models import Meeting, Folder
MD_INPUT = {
'class': 'markdown-input'
}
def sorted_folders():
return sorted([(x.pk, str(x)) for x in Folder.objects.all()], key=lambda x: x[1])
class MeetingForm(ModelFor... | from django.forms import ModelForm, Textarea, ChoiceField
from django.urls import reverse_lazy
from .models import Meeting, Folder
MD_INPUT = {
'class': 'markdown-input',
'data-endpoint': reverse_lazy('utilities:preview_safe')
}
def sorted_folders():
return sorted([(x.pk, str(x)) for x in Folder.objects... | <commit_before>from django.forms import ModelForm, Textarea, ChoiceField
from django.utils.functional import lazy
from .models import Meeting, Folder
MD_INPUT = {
'class': 'markdown-input'
}
def sorted_folders():
return sorted([(x.pk, str(x)) for x in Folder.objects.all()], key=lambda x: x[1])
class Meeti... | from django.forms import ModelForm, Textarea, ChoiceField
from django.urls import reverse_lazy
from .models import Meeting, Folder
MD_INPUT = {
'class': 'markdown-input',
'data-endpoint': reverse_lazy('utilities:preview_safe')
}
def sorted_folders():
return sorted([(x.pk, str(x)) for x in Folder.objects... | from django.forms import ModelForm, Textarea, ChoiceField
from django.utils.functional import lazy
from .models import Meeting, Folder
MD_INPUT = {
'class': 'markdown-input'
}
def sorted_folders():
return sorted([(x.pk, str(x)) for x in Folder.objects.all()], key=lambda x: x[1])
class MeetingForm(ModelFor... | <commit_before>from django.forms import ModelForm, Textarea, ChoiceField
from django.utils.functional import lazy
from .models import Meeting, Folder
MD_INPUT = {
'class': 'markdown-input'
}
def sorted_folders():
return sorted([(x.pk, str(x)) for x in Folder.objects.all()], key=lambda x: x[1])
class Meeti... |
1b325d5d910039a3702db8a1b00127870625b209 | test/conftest.py | test/conftest.py | from coverage import coverage
cov = coverage(source=('doubles',))
cov.start()
from doubles.pytest import pytest_runtest_call # noqa
def pytest_sessionfinish(session, exitstatus):
cov.stop()
def pytest_terminal_summary(terminalreporter):
print "\nCoverage report:\n"
cov.report(show_missing=True, ignor... | from coverage import coverage
cov = coverage(source=('doubles',))
cov.start()
from doubles.pytest import pytest_runtest_call # noqa
def pytest_sessionfinish(session, exitstatus):
cov.stop()
cov.save()
def pytest_terminal_summary(terminalreporter):
print "\nCoverage report:\n"
cov.report(show_miss... | Save coverage data file to disk for Coveralls. | Save coverage data file to disk for Coveralls.
| Python | mit | uber/doubles | from coverage import coverage
cov = coverage(source=('doubles',))
cov.start()
from doubles.pytest import pytest_runtest_call # noqa
def pytest_sessionfinish(session, exitstatus):
cov.stop()
def pytest_terminal_summary(terminalreporter):
print "\nCoverage report:\n"
cov.report(show_missing=True, ignor... | from coverage import coverage
cov = coverage(source=('doubles',))
cov.start()
from doubles.pytest import pytest_runtest_call # noqa
def pytest_sessionfinish(session, exitstatus):
cov.stop()
cov.save()
def pytest_terminal_summary(terminalreporter):
print "\nCoverage report:\n"
cov.report(show_miss... | <commit_before>from coverage import coverage
cov = coverage(source=('doubles',))
cov.start()
from doubles.pytest import pytest_runtest_call # noqa
def pytest_sessionfinish(session, exitstatus):
cov.stop()
def pytest_terminal_summary(terminalreporter):
print "\nCoverage report:\n"
cov.report(show_miss... | from coverage import coverage
cov = coverage(source=('doubles',))
cov.start()
from doubles.pytest import pytest_runtest_call # noqa
def pytest_sessionfinish(session, exitstatus):
cov.stop()
cov.save()
def pytest_terminal_summary(terminalreporter):
print "\nCoverage report:\n"
cov.report(show_miss... | from coverage import coverage
cov = coverage(source=('doubles',))
cov.start()
from doubles.pytest import pytest_runtest_call # noqa
def pytest_sessionfinish(session, exitstatus):
cov.stop()
def pytest_terminal_summary(terminalreporter):
print "\nCoverage report:\n"
cov.report(show_missing=True, ignor... | <commit_before>from coverage import coverage
cov = coverage(source=('doubles',))
cov.start()
from doubles.pytest import pytest_runtest_call # noqa
def pytest_sessionfinish(session, exitstatus):
cov.stop()
def pytest_terminal_summary(terminalreporter):
print "\nCoverage report:\n"
cov.report(show_miss... |
99952c977eee74ecc95a6af4b2867738850bc435 | topoflow_utils/hook.py | topoflow_utils/hook.py | def get_dtype(parameter_value):
"""Get the TopoFlow data type of a parameter.
Parameters
----------
parameter_value : object
An object, a scalar.
"""
try:
float(parameter_value)
except ValueError:
return 'string'
else:
return 'float'
def assign_parameter... | """Routines used by WMT hooks for TopoFlow components."""
choices_map = {
'Yes': 1,
'No': 0
}
units_map = {
'meters': 'm^2',
'kilometers': 'km^2'
}
def get_dtype(parameter_value):
"""Get the TopoFlow data type of a parameter.
Parameters
----------
parameter_value : object
An ob... | Add choices_map and units_map global variables | Add choices_map and units_map global variables
| Python | mit | csdms/topoflow-utils | def get_dtype(parameter_value):
"""Get the TopoFlow data type of a parameter.
Parameters
----------
parameter_value : object
An object, a scalar.
"""
try:
float(parameter_value)
except ValueError:
return 'string'
else:
return 'float'
def assign_parameter... | """Routines used by WMT hooks for TopoFlow components."""
choices_map = {
'Yes': 1,
'No': 0
}
units_map = {
'meters': 'm^2',
'kilometers': 'km^2'
}
def get_dtype(parameter_value):
"""Get the TopoFlow data type of a parameter.
Parameters
----------
parameter_value : object
An ob... | <commit_before>def get_dtype(parameter_value):
"""Get the TopoFlow data type of a parameter.
Parameters
----------
parameter_value : object
An object, a scalar.
"""
try:
float(parameter_value)
except ValueError:
return 'string'
else:
return 'float'
def a... | """Routines used by WMT hooks for TopoFlow components."""
choices_map = {
'Yes': 1,
'No': 0
}
units_map = {
'meters': 'm^2',
'kilometers': 'km^2'
}
def get_dtype(parameter_value):
"""Get the TopoFlow data type of a parameter.
Parameters
----------
parameter_value : object
An ob... | def get_dtype(parameter_value):
"""Get the TopoFlow data type of a parameter.
Parameters
----------
parameter_value : object
An object, a scalar.
"""
try:
float(parameter_value)
except ValueError:
return 'string'
else:
return 'float'
def assign_parameter... | <commit_before>def get_dtype(parameter_value):
"""Get the TopoFlow data type of a parameter.
Parameters
----------
parameter_value : object
An object, a scalar.
"""
try:
float(parameter_value)
except ValueError:
return 'string'
else:
return 'float'
def a... |
95c2f9b9b0a64611a482d25993b0fa289f19ece8 | test_settings.py | test_settings.py | DATABASES = {'default':{
'NAME':':memory:',
'ENGINE':'django.db.backends.sqlite3'
}}
# install the bare minimum for
# testing django-brake
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'brake',
)
# This is where our ratelimiting information is stored.
# Unfortunately, t... | DATABASES = {'default':{
'NAME':':memory:',
'ENGINE':'django.db.backends.sqlite3'
}}
# install the bare minimum for
# testing django-brake
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'brake',
)
# This is where our ratelimiting information is stored.
CACHES = {
'de... | Use LocMemCache instead of real memcache | Use LocMemCache instead of real memcache
| Python | bsd-3-clause | SilentCircle/django-brake,skorokithakis/django-brake,skorokithakis/django-brake,SilentCircle/django-brake | DATABASES = {'default':{
'NAME':':memory:',
'ENGINE':'django.db.backends.sqlite3'
}}
# install the bare minimum for
# testing django-brake
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'brake',
)
# This is where our ratelimiting information is stored.
# Unfortunately, t... | DATABASES = {'default':{
'NAME':':memory:',
'ENGINE':'django.db.backends.sqlite3'
}}
# install the bare minimum for
# testing django-brake
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'brake',
)
# This is where our ratelimiting information is stored.
CACHES = {
'de... | <commit_before>DATABASES = {'default':{
'NAME':':memory:',
'ENGINE':'django.db.backends.sqlite3'
}}
# install the bare minimum for
# testing django-brake
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'brake',
)
# This is where our ratelimiting information is stored.
# U... | DATABASES = {'default':{
'NAME':':memory:',
'ENGINE':'django.db.backends.sqlite3'
}}
# install the bare minimum for
# testing django-brake
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'brake',
)
# This is where our ratelimiting information is stored.
CACHES = {
'de... | DATABASES = {'default':{
'NAME':':memory:',
'ENGINE':'django.db.backends.sqlite3'
}}
# install the bare minimum for
# testing django-brake
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'brake',
)
# This is where our ratelimiting information is stored.
# Unfortunately, t... | <commit_before>DATABASES = {'default':{
'NAME':':memory:',
'ENGINE':'django.db.backends.sqlite3'
}}
# install the bare minimum for
# testing django-brake
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'brake',
)
# This is where our ratelimiting information is stored.
# U... |
3f7fc98591d11b0a67372699371843f9fd019e36 | numpy/version.py | numpy/version.py | version='0.9.7'
import os
svn_version_file = os.path.join(os.path.dirname(__file__),
'core','__svn_version__.py')
if os.path.isfile(svn_version_file):
import imp
svn = imp.load_module('numpy.core.__svn_version__',
open(svn_version_file),
... | version='0.9.9'
import os
svn_version_file = os.path.join(os.path.dirname(__file__),
'core','__svn_version__.py')
if os.path.isfile(svn_version_file):
import imp
svn = imp.load_module('numpy.core.__svn_version__',
open(svn_version_file),
... | Update head revision to 0.9.9 | Update head revision to 0.9.9
| Python | bsd-3-clause | githubmlai/numpy,dwf/numpy,pizzathief/numpy,kiwifb/numpy,dwf/numpy,immerrr/numpy,AustereCuriosity/numpy,pbrod/numpy,matthew-brett/numpy,jankoslavic/numpy,has2k1/numpy,numpy/numpy,mortada/numpy,ssanderson/numpy,ESSS/numpy,dch312/numpy,grlee77/numpy,simongibbons/numpy,rherault-insa/numpy,hainm/numpy,skymanaditya1/numpy,V... | version='0.9.7'
import os
svn_version_file = os.path.join(os.path.dirname(__file__),
'core','__svn_version__.py')
if os.path.isfile(svn_version_file):
import imp
svn = imp.load_module('numpy.core.__svn_version__',
open(svn_version_file),
... | version='0.9.9'
import os
svn_version_file = os.path.join(os.path.dirname(__file__),
'core','__svn_version__.py')
if os.path.isfile(svn_version_file):
import imp
svn = imp.load_module('numpy.core.__svn_version__',
open(svn_version_file),
... | <commit_before>version='0.9.7'
import os
svn_version_file = os.path.join(os.path.dirname(__file__),
'core','__svn_version__.py')
if os.path.isfile(svn_version_file):
import imp
svn = imp.load_module('numpy.core.__svn_version__',
open(svn_version_file),
... | version='0.9.9'
import os
svn_version_file = os.path.join(os.path.dirname(__file__),
'core','__svn_version__.py')
if os.path.isfile(svn_version_file):
import imp
svn = imp.load_module('numpy.core.__svn_version__',
open(svn_version_file),
... | version='0.9.7'
import os
svn_version_file = os.path.join(os.path.dirname(__file__),
'core','__svn_version__.py')
if os.path.isfile(svn_version_file):
import imp
svn = imp.load_module('numpy.core.__svn_version__',
open(svn_version_file),
... | <commit_before>version='0.9.7'
import os
svn_version_file = os.path.join(os.path.dirname(__file__),
'core','__svn_version__.py')
if os.path.isfile(svn_version_file):
import imp
svn = imp.load_module('numpy.core.__svn_version__',
open(svn_version_file),
... |
3341ba14250f086ab11aa55d8d72de14fe95aceb | tests/test_db.py | tests/test_db.py | # -*- coding: utf-8 -*-
import os
import unittest
from flask import Flask
from coaster.utils import buid
from coaster.sqlalchemy import BaseMixin
from nodular.db import db
class User(BaseMixin, db.Model):
__tablename__ = 'user'
userid = db.Column(db.Unicode(22), nullable=False, default=buid, unique=True)
... | # -*- coding: utf-8 -*-
import os
import unittest
from flask import Flask
from coaster.utils import buid
from coaster.sqlalchemy import BaseMixin
from nodular.db import db
class User(BaseMixin, db.Model):
__tablename__ = 'user'
userid = db.Column(db.Unicode(22), nullable=False, default=buid, unique=True)
... | Disable warning for unused feature | Disable warning for unused feature
| Python | bsd-2-clause | hasgeek/nodular,hasgeek/nodular | # -*- coding: utf-8 -*-
import os
import unittest
from flask import Flask
from coaster.utils import buid
from coaster.sqlalchemy import BaseMixin
from nodular.db import db
class User(BaseMixin, db.Model):
__tablename__ = 'user'
userid = db.Column(db.Unicode(22), nullable=False, default=buid, unique=True)
... | # -*- coding: utf-8 -*-
import os
import unittest
from flask import Flask
from coaster.utils import buid
from coaster.sqlalchemy import BaseMixin
from nodular.db import db
class User(BaseMixin, db.Model):
__tablename__ = 'user'
userid = db.Column(db.Unicode(22), nullable=False, default=buid, unique=True)
... | <commit_before># -*- coding: utf-8 -*-
import os
import unittest
from flask import Flask
from coaster.utils import buid
from coaster.sqlalchemy import BaseMixin
from nodular.db import db
class User(BaseMixin, db.Model):
__tablename__ = 'user'
userid = db.Column(db.Unicode(22), nullable=False, default=buid, u... | # -*- coding: utf-8 -*-
import os
import unittest
from flask import Flask
from coaster.utils import buid
from coaster.sqlalchemy import BaseMixin
from nodular.db import db
class User(BaseMixin, db.Model):
__tablename__ = 'user'
userid = db.Column(db.Unicode(22), nullable=False, default=buid, unique=True)
... | # -*- coding: utf-8 -*-
import os
import unittest
from flask import Flask
from coaster.utils import buid
from coaster.sqlalchemy import BaseMixin
from nodular.db import db
class User(BaseMixin, db.Model):
__tablename__ = 'user'
userid = db.Column(db.Unicode(22), nullable=False, default=buid, unique=True)
... | <commit_before># -*- coding: utf-8 -*-
import os
import unittest
from flask import Flask
from coaster.utils import buid
from coaster.sqlalchemy import BaseMixin
from nodular.db import db
class User(BaseMixin, db.Model):
__tablename__ = 'user'
userid = db.Column(db.Unicode(22), nullable=False, default=buid, u... |
63f7ba49a3577a35de59490185ae9c06c20e1cc8 | ticketing/app.py | ticketing/app.py | from django.conf.urls.defaults import patterns, url
from oscar.core.application import Application
from ticketing import views
class TicketingApplication(Application):
name = 'ticketing'
ticket_list_view = views.TicketListView
ticket_create_view = views.TicketCreateView
ticket_update_view = views.T... | from django.conf.urls.defaults import patterns, url
from django.contrib.auth.decorators import login_required
from oscar.core.application import Application
from ticketing import views
class TicketingApplication(Application):
name = 'ticketing'
ticket_list_view = views.TicketListView
ticket_create_view... | Fix login permissions for ticketing | Fix login permissions for ticketing
| Python | bsd-3-clause | snowball-one/django-oscar-support,snowball-one/django-oscar-support,snowball-one/django-oscar-support | from django.conf.urls.defaults import patterns, url
from oscar.core.application import Application
from ticketing import views
class TicketingApplication(Application):
name = 'ticketing'
ticket_list_view = views.TicketListView
ticket_create_view = views.TicketCreateView
ticket_update_view = views.T... | from django.conf.urls.defaults import patterns, url
from django.contrib.auth.decorators import login_required
from oscar.core.application import Application
from ticketing import views
class TicketingApplication(Application):
name = 'ticketing'
ticket_list_view = views.TicketListView
ticket_create_view... | <commit_before>from django.conf.urls.defaults import patterns, url
from oscar.core.application import Application
from ticketing import views
class TicketingApplication(Application):
name = 'ticketing'
ticket_list_view = views.TicketListView
ticket_create_view = views.TicketCreateView
ticket_update... | from django.conf.urls.defaults import patterns, url
from django.contrib.auth.decorators import login_required
from oscar.core.application import Application
from ticketing import views
class TicketingApplication(Application):
name = 'ticketing'
ticket_list_view = views.TicketListView
ticket_create_view... | from django.conf.urls.defaults import patterns, url
from oscar.core.application import Application
from ticketing import views
class TicketingApplication(Application):
name = 'ticketing'
ticket_list_view = views.TicketListView
ticket_create_view = views.TicketCreateView
ticket_update_view = views.T... | <commit_before>from django.conf.urls.defaults import patterns, url
from oscar.core.application import Application
from ticketing import views
class TicketingApplication(Application):
name = 'ticketing'
ticket_list_view = views.TicketListView
ticket_create_view = views.TicketCreateView
ticket_update... |
e6a1e9670e857119c7e6c9250849ee4edd026bad | tests/settings_base.py | tests/settings_base.py | import os
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'tests.app',
]
STATIC_URL = '/static/'
SECRET_KEY = 'foobar'
SITE_ID = 1234 # Needed for 1.3 compatibility
# Used to construct unique... | import os
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'tests.app',
]
STATIC_URL = '/static/'
SECRET_KEY = 'foobar'
SITE_ID = 1234 # Needed for 1.3 compatibility
# Used to construct unique... | Make sure AuthenticationMiddleware is defined in settings during tests. | Make sure AuthenticationMiddleware is defined in settings
during tests.
| Python | bsd-3-clause | ktosiek/pytest-django,RonnyPfannschmidt/pytest_django,pombredanne/pytest_django,hoh/pytest-django,davidszotten/pytest-django,ojake/pytest-django,bforchhammer/pytest-django,reincubate/pytest-django,pelme/pytest-django,thedrow/pytest-django,aptivate/pytest-django,tomviner/pytest-django,felixonmars/pytest-django | import os
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'tests.app',
]
STATIC_URL = '/static/'
SECRET_KEY = 'foobar'
SITE_ID = 1234 # Needed for 1.3 compatibility
# Used to construct unique... | import os
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'tests.app',
]
STATIC_URL = '/static/'
SECRET_KEY = 'foobar'
SITE_ID = 1234 # Needed for 1.3 compatibility
# Used to construct unique... | <commit_before>import os
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'tests.app',
]
STATIC_URL = '/static/'
SECRET_KEY = 'foobar'
SITE_ID = 1234 # Needed for 1.3 compatibility
# Used to c... | import os
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'tests.app',
]
STATIC_URL = '/static/'
SECRET_KEY = 'foobar'
SITE_ID = 1234 # Needed for 1.3 compatibility
# Used to construct unique... | import os
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'tests.app',
]
STATIC_URL = '/static/'
SECRET_KEY = 'foobar'
SITE_ID = 1234 # Needed for 1.3 compatibility
# Used to construct unique... | <commit_before>import os
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'tests.app',
]
STATIC_URL = '/static/'
SECRET_KEY = 'foobar'
SITE_ID = 1234 # Needed for 1.3 compatibility
# Used to c... |
0f51a231b3b11e89a82a429be0adb6422fd01d8b | tests/test_Sanitize.py | tests/test_Sanitize.py | import unittest
from s2f.Sanitize import (
sanitize_prefix,
sanitize_for_latex
)
class TestSanitize(unittest.TestCase):
""" Test case for the Sanitize module """
def testSanitizePrefix(self):
""" The function sanitize_prefix should only allow for lower case ASCII
letters, digits and th... | #coding=utf-8
import unittest
from s2f.Sanitize import (
sanitize_prefix,
sanitize_for_latex
)
class TestSanitize(unittest.TestCase):
""" Test case for the Sanitize module """
def testSanitizePrefix(self):
""" The function sanitize_prefix should only allow for lower case ASCII
letters... | Add UTF8 compatibility switch for py2. | Add UTF8 compatibility switch for py2.
| Python | mit | kdungs/lhcb-hltflow | import unittest
from s2f.Sanitize import (
sanitize_prefix,
sanitize_for_latex
)
class TestSanitize(unittest.TestCase):
""" Test case for the Sanitize module """
def testSanitizePrefix(self):
""" The function sanitize_prefix should only allow for lower case ASCII
letters, digits and th... | #coding=utf-8
import unittest
from s2f.Sanitize import (
sanitize_prefix,
sanitize_for_latex
)
class TestSanitize(unittest.TestCase):
""" Test case for the Sanitize module """
def testSanitizePrefix(self):
""" The function sanitize_prefix should only allow for lower case ASCII
letters... | <commit_before>import unittest
from s2f.Sanitize import (
sanitize_prefix,
sanitize_for_latex
)
class TestSanitize(unittest.TestCase):
""" Test case for the Sanitize module """
def testSanitizePrefix(self):
""" The function sanitize_prefix should only allow for lower case ASCII
letters... | #coding=utf-8
import unittest
from s2f.Sanitize import (
sanitize_prefix,
sanitize_for_latex
)
class TestSanitize(unittest.TestCase):
""" Test case for the Sanitize module """
def testSanitizePrefix(self):
""" The function sanitize_prefix should only allow for lower case ASCII
letters... | import unittest
from s2f.Sanitize import (
sanitize_prefix,
sanitize_for_latex
)
class TestSanitize(unittest.TestCase):
""" Test case for the Sanitize module """
def testSanitizePrefix(self):
""" The function sanitize_prefix should only allow for lower case ASCII
letters, digits and th... | <commit_before>import unittest
from s2f.Sanitize import (
sanitize_prefix,
sanitize_for_latex
)
class TestSanitize(unittest.TestCase):
""" Test case for the Sanitize module """
def testSanitizePrefix(self):
""" The function sanitize_prefix should only allow for lower case ASCII
letters... |
64750014a91669b6067459a14743a6c5e6257856 | umap/__init__.py | umap/__init__.py | from .umap_ import UMAP
# Workaround: https://github.com/numba/numba/issues/3341
import numba
import pkg_resources
__version__ = pkg_resources.get_distribution("umap-learn").version
| from .umap_ import UMAP
# Workaround: https://github.com/numba/numba/issues/3341
import numba
import pkg_resources
try:
__version__ = pkg_resources.get_distribution("umap-learn").version
except pkg_resources.DistributionNotFound:
__version__ = '0.4-dev'
| Patch init import to allow for local dev of UMAP code | Patch init import to allow for local dev of UMAP code
| Python | bsd-3-clause | lmcinnes/umap,lmcinnes/umap | from .umap_ import UMAP
# Workaround: https://github.com/numba/numba/issues/3341
import numba
import pkg_resources
__version__ = pkg_resources.get_distribution("umap-learn").version
Patch init import to allow for local dev of UMAP code | from .umap_ import UMAP
# Workaround: https://github.com/numba/numba/issues/3341
import numba
import pkg_resources
try:
__version__ = pkg_resources.get_distribution("umap-learn").version
except pkg_resources.DistributionNotFound:
__version__ = '0.4-dev'
| <commit_before>from .umap_ import UMAP
# Workaround: https://github.com/numba/numba/issues/3341
import numba
import pkg_resources
__version__ = pkg_resources.get_distribution("umap-learn").version
<commit_msg>Patch init import to allow for local dev of UMAP code<commit_after> | from .umap_ import UMAP
# Workaround: https://github.com/numba/numba/issues/3341
import numba
import pkg_resources
try:
__version__ = pkg_resources.get_distribution("umap-learn").version
except pkg_resources.DistributionNotFound:
__version__ = '0.4-dev'
| from .umap_ import UMAP
# Workaround: https://github.com/numba/numba/issues/3341
import numba
import pkg_resources
__version__ = pkg_resources.get_distribution("umap-learn").version
Patch init import to allow for local dev of UMAP codefrom .umap_ import UMAP
# Workaround: https://github.com/numba/numba/issues/3341
... | <commit_before>from .umap_ import UMAP
# Workaround: https://github.com/numba/numba/issues/3341
import numba
import pkg_resources
__version__ = pkg_resources.get_distribution("umap-learn").version
<commit_msg>Patch init import to allow for local dev of UMAP code<commit_after>from .umap_ import UMAP
# Workaround: ht... |
c4c9115e7f67a6cc80b283cb0c2cc0e378e08ab8 | tests/test_rainflow.py | tests/test_rainflow.py | import unittest, rainflow
class TestRainflowCounting(unittest.TestCase):
series = [0, -2, 1, -3, 5, -1, 3, -4, 4, -2, 0]
cycles = [(3, 0.5), (4, 1.5), (6, 0.5), (8, 1.0), (9, 0.5)]
def test_rainflow_counting(self):
self.assertItemsEqual(rainflow.count_cycles(self.series), self.cycles)
... | import unittest, rainflow, random, itertools
class TestRainflowCounting(unittest.TestCase):
# Load series and corresponding cycle counts from ASTM E1049-85
series = [0, -2, 1, -3, 5, -1, 3, -4, 4, -2, 0]
cycles = [(3, 0.5), (4, 1.5), (6, 0.5), (8, 1.0), (9, 0.5)]
def test_rainflow_counting(... | Add additional tests for count_cycles | Add additional tests for count_cycles
| Python | mit | iamlikeme/rainflow | import unittest, rainflow
class TestRainflowCounting(unittest.TestCase):
series = [0, -2, 1, -3, 5, -1, 3, -4, 4, -2, 0]
cycles = [(3, 0.5), (4, 1.5), (6, 0.5), (8, 1.0), (9, 0.5)]
def test_rainflow_counting(self):
self.assertItemsEqual(rainflow.count_cycles(self.series), self.cycles)
... | import unittest, rainflow, random, itertools
class TestRainflowCounting(unittest.TestCase):
# Load series and corresponding cycle counts from ASTM E1049-85
series = [0, -2, 1, -3, 5, -1, 3, -4, 4, -2, 0]
cycles = [(3, 0.5), (4, 1.5), (6, 0.5), (8, 1.0), (9, 0.5)]
def test_rainflow_counting(... | <commit_before>import unittest, rainflow
class TestRainflowCounting(unittest.TestCase):
series = [0, -2, 1, -3, 5, -1, 3, -4, 4, -2, 0]
cycles = [(3, 0.5), (4, 1.5), (6, 0.5), (8, 1.0), (9, 0.5)]
def test_rainflow_counting(self):
self.assertItemsEqual(rainflow.count_cycles(self.series),... | import unittest, rainflow, random, itertools
class TestRainflowCounting(unittest.TestCase):
# Load series and corresponding cycle counts from ASTM E1049-85
series = [0, -2, 1, -3, 5, -1, 3, -4, 4, -2, 0]
cycles = [(3, 0.5), (4, 1.5), (6, 0.5), (8, 1.0), (9, 0.5)]
def test_rainflow_counting(... | import unittest, rainflow
class TestRainflowCounting(unittest.TestCase):
series = [0, -2, 1, -3, 5, -1, 3, -4, 4, -2, 0]
cycles = [(3, 0.5), (4, 1.5), (6, 0.5), (8, 1.0), (9, 0.5)]
def test_rainflow_counting(self):
self.assertItemsEqual(rainflow.count_cycles(self.series), self.cycles)
... | <commit_before>import unittest, rainflow
class TestRainflowCounting(unittest.TestCase):
series = [0, -2, 1, -3, 5, -1, 3, -4, 4, -2, 0]
cycles = [(3, 0.5), (4, 1.5), (6, 0.5), (8, 1.0), (9, 0.5)]
def test_rainflow_counting(self):
self.assertItemsEqual(rainflow.count_cycles(self.series),... |
757c2552c360be67ee5841c12c0da005afe631b0 | tests/test_settings.py | tests/test_settings.py | DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'fake_secret'
ROOT_URLCONF = 'tests.test_urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
MIDDLEWARE_CLASSES = []
INSTALLED_APPS = (
'djproxy',
)
STATIC_ROOT = ''
STATIC_URL = '/'
APPEND_S... | DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'fake_secret'
ROOT_URLCONF = 'tests.test_urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
MIDDLEWARE_CLASSES = []
INSTALLED_APPS = (
'djproxy',
)
STATIC_ROOT = ''
STATIC_URL = '/'
APPEND_S... | Remove test setting that’s no longer necessary | Remove test setting that’s no longer necessary
| Python | mit | thomasw/djproxy | DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'fake_secret'
ROOT_URLCONF = 'tests.test_urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
MIDDLEWARE_CLASSES = []
INSTALLED_APPS = (
'djproxy',
)
STATIC_ROOT = ''
STATIC_URL = '/'
APPEND_S... | DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'fake_secret'
ROOT_URLCONF = 'tests.test_urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
MIDDLEWARE_CLASSES = []
INSTALLED_APPS = (
'djproxy',
)
STATIC_ROOT = ''
STATIC_URL = '/'
APPEND_S... | <commit_before>DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'fake_secret'
ROOT_URLCONF = 'tests.test_urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
MIDDLEWARE_CLASSES = []
INSTALLED_APPS = (
'djproxy',
)
STATIC_ROOT = ''
STATIC_URL ... | DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'fake_secret'
ROOT_URLCONF = 'tests.test_urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
MIDDLEWARE_CLASSES = []
INSTALLED_APPS = (
'djproxy',
)
STATIC_ROOT = ''
STATIC_URL = '/'
APPEND_S... | DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'fake_secret'
ROOT_URLCONF = 'tests.test_urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
MIDDLEWARE_CLASSES = []
INSTALLED_APPS = (
'djproxy',
)
STATIC_ROOT = ''
STATIC_URL = '/'
APPEND_S... | <commit_before>DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'fake_secret'
ROOT_URLCONF = 'tests.test_urls'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
MIDDLEWARE_CLASSES = []
INSTALLED_APPS = (
'djproxy',
)
STATIC_ROOT = ''
STATIC_URL ... |
8bebd6f9c785333f670167e477f96944d1f45534 | matrix/matrix_test.py | matrix/matrix_test.py | import unittest
from matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_extract_a_row(self):
matrix = Matrix("1 2\n10 20")
self.assertEqual([1, 2], matrix.rows[0])
def test_extract_same_row_again(self):
matrix = Matrix("9 7\n8 6")
self.assertEqual([9, 7], matr... | import unittest
from matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_extract_a_row(self):
matrix = Matrix("1 2\n10 20")
self.assertEqual([1, 2], matrix.rows[0])
def test_extract_same_row_again(self):
matrix = Matrix("9 7\n8 6")
self.assertEqual([9, 7], matr... | Fix whitespace issue in matrix assertion | Fix whitespace issue in matrix assertion
| Python | mit | mweb/python,jmluy/xpython,ZacharyRSmith/xpython,outkaj/xpython,pheanex/xpython,Peque/xpython,behrtam/xpython,exercism/python,exercism/xpython,N-Parsons/exercism-python,behrtam/xpython,smalley/python,mweb/python,pombredanne/xpython,de2Zotjes/xpython,orozcoadrian/xpython,wobh/xpython,exercism/xpython,oalbe/xpython,rootul... | import unittest
from matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_extract_a_row(self):
matrix = Matrix("1 2\n10 20")
self.assertEqual([1, 2], matrix.rows[0])
def test_extract_same_row_again(self):
matrix = Matrix("9 7\n8 6")
self.assertEqual([9, 7], matr... | import unittest
from matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_extract_a_row(self):
matrix = Matrix("1 2\n10 20")
self.assertEqual([1, 2], matrix.rows[0])
def test_extract_same_row_again(self):
matrix = Matrix("9 7\n8 6")
self.assertEqual([9, 7], matr... | <commit_before>import unittest
from matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_extract_a_row(self):
matrix = Matrix("1 2\n10 20")
self.assertEqual([1, 2], matrix.rows[0])
def test_extract_same_row_again(self):
matrix = Matrix("9 7\n8 6")
self.assertEqu... | import unittest
from matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_extract_a_row(self):
matrix = Matrix("1 2\n10 20")
self.assertEqual([1, 2], matrix.rows[0])
def test_extract_same_row_again(self):
matrix = Matrix("9 7\n8 6")
self.assertEqual([9, 7], matr... | import unittest
from matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_extract_a_row(self):
matrix = Matrix("1 2\n10 20")
self.assertEqual([1, 2], matrix.rows[0])
def test_extract_same_row_again(self):
matrix = Matrix("9 7\n8 6")
self.assertEqual([9, 7], matr... | <commit_before>import unittest
from matrix import Matrix
class MatrixTest(unittest.TestCase):
def test_extract_a_row(self):
matrix = Matrix("1 2\n10 20")
self.assertEqual([1, 2], matrix.rows[0])
def test_extract_same_row_again(self):
matrix = Matrix("9 7\n8 6")
self.assertEqu... |
4f3646e07d592d5da214977732298b680b8fdee7 | zou/app/blueprints/crud/task_status.py | zou/app/blueprints/crud/task_status.py | from zou.app.models.task_status import TaskStatus
from zou.app.services import tasks_service
from .base import BaseModelResource, BaseModelsResource
class TaskStatusesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, TaskStatus)
def check_read_permissions(self):
... | from zou.app.models.task_status import TaskStatus
from zou.app.services import tasks_service
from .base import BaseModelResource, BaseModelsResource
class TaskStatusesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, TaskStatus)
def check_read_permissions(self):
... | Allow to modify the is_default flag | [tasks] Allow to modify the is_default flag
| Python | agpl-3.0 | cgwire/zou | from zou.app.models.task_status import TaskStatus
from zou.app.services import tasks_service
from .base import BaseModelResource, BaseModelsResource
class TaskStatusesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, TaskStatus)
def check_read_permissions(self):
... | from zou.app.models.task_status import TaskStatus
from zou.app.services import tasks_service
from .base import BaseModelResource, BaseModelsResource
class TaskStatusesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, TaskStatus)
def check_read_permissions(self):
... | <commit_before>from zou.app.models.task_status import TaskStatus
from zou.app.services import tasks_service
from .base import BaseModelResource, BaseModelsResource
class TaskStatusesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, TaskStatus)
def check_read_permissi... | from zou.app.models.task_status import TaskStatus
from zou.app.services import tasks_service
from .base import BaseModelResource, BaseModelsResource
class TaskStatusesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, TaskStatus)
def check_read_permissions(self):
... | from zou.app.models.task_status import TaskStatus
from zou.app.services import tasks_service
from .base import BaseModelResource, BaseModelsResource
class TaskStatusesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, TaskStatus)
def check_read_permissions(self):
... | <commit_before>from zou.app.models.task_status import TaskStatus
from zou.app.services import tasks_service
from .base import BaseModelResource, BaseModelsResource
class TaskStatusesResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, TaskStatus)
def check_read_permissi... |
3dc92d34f80762899959b2721bfcfcac78bcb069 | modloader/__init__.py | modloader/__init__.py | import renpy
import os
import sys
import modinfo
import importlib
print('AWSW Mod Loader Init')
def get_mod_path():
"""Get the mod path
Returns:
The full path to the mods folder
"""
#TODO: Use a path combining function
return renpy.config.gamedir + "/mods/"
# By setting the import path t... | import renpy
import os
import sys
import modinfo
import importlib
print('AWSW Mod Loader Init')
def get_mod_path():
"""Get the mod path
Returns:
The full path to the mods folder
"""
#TODO: Use a path combining function
return renpy.config.gamedir + "/mods/"
# By setting the import path t... | Stop catching import errors to improve stack trace readability | Stop catching import errors to improve stack trace readability
| Python | mit | AWSW-Modding/AWSW-Modtools | import renpy
import os
import sys
import modinfo
import importlib
print('AWSW Mod Loader Init')
def get_mod_path():
"""Get the mod path
Returns:
The full path to the mods folder
"""
#TODO: Use a path combining function
return renpy.config.gamedir + "/mods/"
# By setting the import path t... | import renpy
import os
import sys
import modinfo
import importlib
print('AWSW Mod Loader Init')
def get_mod_path():
"""Get the mod path
Returns:
The full path to the mods folder
"""
#TODO: Use a path combining function
return renpy.config.gamedir + "/mods/"
# By setting the import path t... | <commit_before>import renpy
import os
import sys
import modinfo
import importlib
print('AWSW Mod Loader Init')
def get_mod_path():
"""Get the mod path
Returns:
The full path to the mods folder
"""
#TODO: Use a path combining function
return renpy.config.gamedir + "/mods/"
# By setting th... | import renpy
import os
import sys
import modinfo
import importlib
print('AWSW Mod Loader Init')
def get_mod_path():
"""Get the mod path
Returns:
The full path to the mods folder
"""
#TODO: Use a path combining function
return renpy.config.gamedir + "/mods/"
# By setting the import path t... | import renpy
import os
import sys
import modinfo
import importlib
print('AWSW Mod Loader Init')
def get_mod_path():
"""Get the mod path
Returns:
The full path to the mods folder
"""
#TODO: Use a path combining function
return renpy.config.gamedir + "/mods/"
# By setting the import path t... | <commit_before>import renpy
import os
import sys
import modinfo
import importlib
print('AWSW Mod Loader Init')
def get_mod_path():
"""Get the mod path
Returns:
The full path to the mods folder
"""
#TODO: Use a path combining function
return renpy.config.gamedir + "/mods/"
# By setting th... |
01f2e41608e83fb4308c44c30ac9bb4fc6d49c86 | server/kcaa/manipulators/automission.py | server/kcaa/manipulators/automission.py | #!/usr/bin/env python
import logging
import time
import base
from kcaa import screens
logger = logging.getLogger('kcaa.manipulators.automission')
class CheckMissionResult(base.Manipulator):
def run(self):
logger.info('Checking mission result')
yield self.screen.check_mission_result()
class ... | #!/usr/bin/env python
import logging
import time
import base
from kcaa import screens
logger = logging.getLogger('kcaa.manipulators.automission')
class CheckMissionResult(base.Manipulator):
def run(self):
logger.info('Checking mission result')
yield self.screen.check_mission_result()
class ... | Stop confirming ETA is 10 seconds ago, as it's possible that AutoFleetCharge interrupt within that duration. | Stop confirming ETA is 10 seconds ago, as it's possible that AutoFleetCharge
interrupt within that duration.
| Python | apache-2.0 | kcaa/kcaa,kcaa/kcaa,kcaa/kcaa,kcaa/kcaa | #!/usr/bin/env python
import logging
import time
import base
from kcaa import screens
logger = logging.getLogger('kcaa.manipulators.automission')
class CheckMissionResult(base.Manipulator):
def run(self):
logger.info('Checking mission result')
yield self.screen.check_mission_result()
class ... | #!/usr/bin/env python
import logging
import time
import base
from kcaa import screens
logger = logging.getLogger('kcaa.manipulators.automission')
class CheckMissionResult(base.Manipulator):
def run(self):
logger.info('Checking mission result')
yield self.screen.check_mission_result()
class ... | <commit_before>#!/usr/bin/env python
import logging
import time
import base
from kcaa import screens
logger = logging.getLogger('kcaa.manipulators.automission')
class CheckMissionResult(base.Manipulator):
def run(self):
logger.info('Checking mission result')
yield self.screen.check_mission_re... | #!/usr/bin/env python
import logging
import time
import base
from kcaa import screens
logger = logging.getLogger('kcaa.manipulators.automission')
class CheckMissionResult(base.Manipulator):
def run(self):
logger.info('Checking mission result')
yield self.screen.check_mission_result()
class ... | #!/usr/bin/env python
import logging
import time
import base
from kcaa import screens
logger = logging.getLogger('kcaa.manipulators.automission')
class CheckMissionResult(base.Manipulator):
def run(self):
logger.info('Checking mission result')
yield self.screen.check_mission_result()
class ... | <commit_before>#!/usr/bin/env python
import logging
import time
import base
from kcaa import screens
logger = logging.getLogger('kcaa.manipulators.automission')
class CheckMissionResult(base.Manipulator):
def run(self):
logger.info('Checking mission result')
yield self.screen.check_mission_re... |
a0114088c9b9ec1bf52ef2c9cfb46743754fe4e1 | vagrant/roles/db/molecule/default/tests/test_default.py | vagrant/roles/db/molecule/default/tests/test_default.py | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is listen concrete host and port
def test_mongo_host_port(host):
socket = host.socket("tcp://127.0.0.1:27017")
assert ... | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is listen concrete host and port
def test_mongo_host_port(host):
socket = host.socket("tcp://127.0.0.1:27017")
assert ... | Edit test method 'test_config_file' to check configuration network interface | Edit test method 'test_config_file' to check configuration network interface
| Python | mit | DmitriySh/infra,DmitriySh/infra,DmitriySh/infra | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is listen concrete host and port
def test_mongo_host_port(host):
socket = host.socket("tcp://127.0.0.1:27017")
assert ... | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is listen concrete host and port
def test_mongo_host_port(host):
socket = host.socket("tcp://127.0.0.1:27017")
assert ... | <commit_before>import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is listen concrete host and port
def test_mongo_host_port(host):
socket = host.socket("tcp://127.0.0.1:2701... | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is listen concrete host and port
def test_mongo_host_port(host):
socket = host.socket("tcp://127.0.0.1:27017")
assert ... | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is listen concrete host and port
def test_mongo_host_port(host):
socket = host.socket("tcp://127.0.0.1:27017")
assert ... | <commit_before>import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is listen concrete host and port
def test_mongo_host_port(host):
socket = host.socket("tcp://127.0.0.1:2701... |
bc1e8baeb2698462dae5556e033c37a505cfcb2c | altair/examples/bar_chart_with_labels.py | altair/examples/bar_chart_with_labels.py | """
Simple Bar Chart with Labels
============================
This example shows a basic horizontal bar chart with labels created with Altair.
"""
# category: bar charts
import altair as alt
import pandas as pd
source = pd.DataFrame({
'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
'b': [28, 55, 43, 91, 81... | """
Bar Chart with Labels
=====================
This example shows a basic horizontal bar chart with labels created with Altair.
"""
# category: bar charts
import altair as alt
from vega_datasets import data
source = data.wheat.url
bars = alt.Chart(source).mark_bar().encode(
x='wheat:Q',
y="year:O"
)
text = ... | Standardize bar chat with labels example to use source consistent with other examples | DOC: Standardize bar chat with labels example to use source consistent with other examples | Python | bsd-3-clause | altair-viz/altair,jakevdp/altair | """
Simple Bar Chart with Labels
============================
This example shows a basic horizontal bar chart with labels created with Altair.
"""
# category: bar charts
import altair as alt
import pandas as pd
source = pd.DataFrame({
'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
'b': [28, 55, 43, 91, 81... | """
Bar Chart with Labels
=====================
This example shows a basic horizontal bar chart with labels created with Altair.
"""
# category: bar charts
import altair as alt
from vega_datasets import data
source = data.wheat.url
bars = alt.Chart(source).mark_bar().encode(
x='wheat:Q',
y="year:O"
)
text = ... | <commit_before>"""
Simple Bar Chart with Labels
============================
This example shows a basic horizontal bar chart with labels created with Altair.
"""
# category: bar charts
import altair as alt
import pandas as pd
source = pd.DataFrame({
'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
'b': [28,... | """
Bar Chart with Labels
=====================
This example shows a basic horizontal bar chart with labels created with Altair.
"""
# category: bar charts
import altair as alt
from vega_datasets import data
source = data.wheat.url
bars = alt.Chart(source).mark_bar().encode(
x='wheat:Q',
y="year:O"
)
text = ... | """
Simple Bar Chart with Labels
============================
This example shows a basic horizontal bar chart with labels created with Altair.
"""
# category: bar charts
import altair as alt
import pandas as pd
source = pd.DataFrame({
'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
'b': [28, 55, 43, 91, 81... | <commit_before>"""
Simple Bar Chart with Labels
============================
This example shows a basic horizontal bar chart with labels created with Altair.
"""
# category: bar charts
import altair as alt
import pandas as pd
source = pd.DataFrame({
'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
'b': [28,... |
0fbd183a95c65eb80bb813368eeb045e9c43b630 | ray/util.py | ray/util.py | import json
import itertools as it
all_sizes = [0.7, 1.0, 1.6, 3.5, 5.0]
all_types = ['Color', 'Texture', 'Edge', 'Orientation']
full_feature_set = list(it.product(all_types, all_sizes))
default_feature_set = list(it.product(all_types[:-1], all_sizes[1:-1]))
def write_segmentation_pipeline_json(jsonfn, ilfn, ilbfn, ... | import json
import itertools as it
all_sizes = [0.7, 1.0, 1.6, 3.5, 5.0]
all_types = ['Color', 'Texture', 'Edge', 'Orientation']
full_feature_set = list(it.product(all_types, all_sizes))
default_feature_set = list(it.product(all_types[:-1], all_sizes[1:-1]))
def write_segmentation_pipeline_json(jsonfn, ilfn, ilbfns,... | Allow multiple batch files for seg pipeline json | Allow multiple batch files for seg pipeline json
| Python | bsd-3-clause | janelia-flyem/gala,jni/gala,jni/ray | import json
import itertools as it
all_sizes = [0.7, 1.0, 1.6, 3.5, 5.0]
all_types = ['Color', 'Texture', 'Edge', 'Orientation']
full_feature_set = list(it.product(all_types, all_sizes))
default_feature_set = list(it.product(all_types[:-1], all_sizes[1:-1]))
def write_segmentation_pipeline_json(jsonfn, ilfn, ilbfn, ... | import json
import itertools as it
all_sizes = [0.7, 1.0, 1.6, 3.5, 5.0]
all_types = ['Color', 'Texture', 'Edge', 'Orientation']
full_feature_set = list(it.product(all_types, all_sizes))
default_feature_set = list(it.product(all_types[:-1], all_sizes[1:-1]))
def write_segmentation_pipeline_json(jsonfn, ilfn, ilbfns,... | <commit_before>import json
import itertools as it
all_sizes = [0.7, 1.0, 1.6, 3.5, 5.0]
all_types = ['Color', 'Texture', 'Edge', 'Orientation']
full_feature_set = list(it.product(all_types, all_sizes))
default_feature_set = list(it.product(all_types[:-1], all_sizes[1:-1]))
def write_segmentation_pipeline_json(jsonfn... | import json
import itertools as it
all_sizes = [0.7, 1.0, 1.6, 3.5, 5.0]
all_types = ['Color', 'Texture', 'Edge', 'Orientation']
full_feature_set = list(it.product(all_types, all_sizes))
default_feature_set = list(it.product(all_types[:-1], all_sizes[1:-1]))
def write_segmentation_pipeline_json(jsonfn, ilfn, ilbfns,... | import json
import itertools as it
all_sizes = [0.7, 1.0, 1.6, 3.5, 5.0]
all_types = ['Color', 'Texture', 'Edge', 'Orientation']
full_feature_set = list(it.product(all_types, all_sizes))
default_feature_set = list(it.product(all_types[:-1], all_sizes[1:-1]))
def write_segmentation_pipeline_json(jsonfn, ilfn, ilbfn, ... | <commit_before>import json
import itertools as it
all_sizes = [0.7, 1.0, 1.6, 3.5, 5.0]
all_types = ['Color', 'Texture', 'Edge', 'Orientation']
full_feature_set = list(it.product(all_types, all_sizes))
default_feature_set = list(it.product(all_types[:-1], all_sizes[1:-1]))
def write_segmentation_pipeline_json(jsonfn... |
7b9b144ce8e7fca38500f5f0c4e2f5ec3b5d9e0f | tests/px_rambar_test.py | tests/px_rambar_test.py | import os
import sys
from px import px_rambar
from px import px_terminal
def test_render_bar_happy_path():
names_and_numbers = [(u"apa", 1000), (u"bepa", 300), (u"cepa", 50)] + [
(u"long tail", 1)
] * 300
assert px_rambar.render_bar(10, names_and_numbers) == (
px_terminal.red(u" apa ")
... | # coding=utf-8
import os
import sys
from px import px_rambar
from px import px_terminal
def test_render_bar_happy_path():
names_and_numbers = [(u"apa", 1000), (u"bepa", 300), (u"cepa", 50)] + [
(u"long tail", 1)
] * 300
assert px_rambar.render_bar(10, names_and_numbers) == (
px_terminal.... | Verify rambar can do unicode | Verify rambar can do unicode
| Python | mit | walles/px,walles/px | import os
import sys
from px import px_rambar
from px import px_terminal
def test_render_bar_happy_path():
names_and_numbers = [(u"apa", 1000), (u"bepa", 300), (u"cepa", 50)] + [
(u"long tail", 1)
] * 300
assert px_rambar.render_bar(10, names_and_numbers) == (
px_terminal.red(u" apa ")
... | # coding=utf-8
import os
import sys
from px import px_rambar
from px import px_terminal
def test_render_bar_happy_path():
names_and_numbers = [(u"apa", 1000), (u"bepa", 300), (u"cepa", 50)] + [
(u"long tail", 1)
] * 300
assert px_rambar.render_bar(10, names_and_numbers) == (
px_terminal.... | <commit_before>import os
import sys
from px import px_rambar
from px import px_terminal
def test_render_bar_happy_path():
names_and_numbers = [(u"apa", 1000), (u"bepa", 300), (u"cepa", 50)] + [
(u"long tail", 1)
] * 300
assert px_rambar.render_bar(10, names_and_numbers) == (
px_terminal.r... | # coding=utf-8
import os
import sys
from px import px_rambar
from px import px_terminal
def test_render_bar_happy_path():
names_and_numbers = [(u"apa", 1000), (u"bepa", 300), (u"cepa", 50)] + [
(u"long tail", 1)
] * 300
assert px_rambar.render_bar(10, names_and_numbers) == (
px_terminal.... | import os
import sys
from px import px_rambar
from px import px_terminal
def test_render_bar_happy_path():
names_and_numbers = [(u"apa", 1000), (u"bepa", 300), (u"cepa", 50)] + [
(u"long tail", 1)
] * 300
assert px_rambar.render_bar(10, names_and_numbers) == (
px_terminal.red(u" apa ")
... | <commit_before>import os
import sys
from px import px_rambar
from px import px_terminal
def test_render_bar_happy_path():
names_and_numbers = [(u"apa", 1000), (u"bepa", 300), (u"cepa", 50)] + [
(u"long tail", 1)
] * 300
assert px_rambar.render_bar(10, names_and_numbers) == (
px_terminal.r... |
43edc7a519cb2e7c49a112f816c5192908ac7e6b | tests/test_validator.py | tests/test_validator.py | import pytest
from web_test_base import *
class TestIATIValidator(WebTestBase):
requests_to_load = {
'IATI Validator': {
'url': 'http://validator.iatistandard.org/'
}
}
def test_contains_links(self, loaded_request):
"""
Test that each page contains links to the ... | import pytest
from web_test_base import *
class TestIATIValidator(WebTestBase):
requests_to_load = {
'IATI Validator': {
'url': 'http://validator.iatistandard.org/'
}
}
def test_contains_links(self, loaded_request):
"""
Test that each page contains links to the ... | Check forms on validator page | Check forms on validator page
Add a test to check that each of the three forms exist on the
validator page.
This test does not check whether the three forms work correctly.
| Python | mit | IATI/IATI-Website-Tests | import pytest
from web_test_base import *
class TestIATIValidator(WebTestBase):
requests_to_load = {
'IATI Validator': {
'url': 'http://validator.iatistandard.org/'
}
}
def test_contains_links(self, loaded_request):
"""
Test that each page contains links to the ... | import pytest
from web_test_base import *
class TestIATIValidator(WebTestBase):
requests_to_load = {
'IATI Validator': {
'url': 'http://validator.iatistandard.org/'
}
}
def test_contains_links(self, loaded_request):
"""
Test that each page contains links to the ... | <commit_before>import pytest
from web_test_base import *
class TestIATIValidator(WebTestBase):
requests_to_load = {
'IATI Validator': {
'url': 'http://validator.iatistandard.org/'
}
}
def test_contains_links(self, loaded_request):
"""
Test that each page contain... | import pytest
from web_test_base import *
class TestIATIValidator(WebTestBase):
requests_to_load = {
'IATI Validator': {
'url': 'http://validator.iatistandard.org/'
}
}
def test_contains_links(self, loaded_request):
"""
Test that each page contains links to the ... | import pytest
from web_test_base import *
class TestIATIValidator(WebTestBase):
requests_to_load = {
'IATI Validator': {
'url': 'http://validator.iatistandard.org/'
}
}
def test_contains_links(self, loaded_request):
"""
Test that each page contains links to the ... | <commit_before>import pytest
from web_test_base import *
class TestIATIValidator(WebTestBase):
requests_to_load = {
'IATI Validator': {
'url': 'http://validator.iatistandard.org/'
}
}
def test_contains_links(self, loaded_request):
"""
Test that each page contain... |
390f7ff95755feadc25236feb1eb92655e113b38 | fancypages/__init__.py | fancypages/__init__.py | from __future__ import absolute_import
import os
__version__ = VERSION = "0.3.0"
def get_fancypages_paths(path, use_with_oscar=False):
""" Get absolute paths for *path* relative to the project root """
paths = []
if use_with_oscar:
from fancypages.contrib import oscar_fancypages
base_dir... | from __future__ import absolute_import
import os
__version__ = VERSION = "0.3.0"
def get_fancypages_paths(path, use_with_oscar=False):
""" Get absolute paths for *path* relative to the project root """
paths = []
if use_with_oscar:
from fancypages.contrib import oscar_fancypages
base_dir... | Remove south from app helper method for Django 1.7+ | Remove south from app helper method for Django 1.7+
| Python | bsd-3-clause | tangentlabs/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages | from __future__ import absolute_import
import os
__version__ = VERSION = "0.3.0"
def get_fancypages_paths(path, use_with_oscar=False):
""" Get absolute paths for *path* relative to the project root """
paths = []
if use_with_oscar:
from fancypages.contrib import oscar_fancypages
base_dir... | from __future__ import absolute_import
import os
__version__ = VERSION = "0.3.0"
def get_fancypages_paths(path, use_with_oscar=False):
""" Get absolute paths for *path* relative to the project root """
paths = []
if use_with_oscar:
from fancypages.contrib import oscar_fancypages
base_dir... | <commit_before>from __future__ import absolute_import
import os
__version__ = VERSION = "0.3.0"
def get_fancypages_paths(path, use_with_oscar=False):
""" Get absolute paths for *path* relative to the project root """
paths = []
if use_with_oscar:
from fancypages.contrib import oscar_fancypages
... | from __future__ import absolute_import
import os
__version__ = VERSION = "0.3.0"
def get_fancypages_paths(path, use_with_oscar=False):
""" Get absolute paths for *path* relative to the project root """
paths = []
if use_with_oscar:
from fancypages.contrib import oscar_fancypages
base_dir... | from __future__ import absolute_import
import os
__version__ = VERSION = "0.3.0"
def get_fancypages_paths(path, use_with_oscar=False):
""" Get absolute paths for *path* relative to the project root """
paths = []
if use_with_oscar:
from fancypages.contrib import oscar_fancypages
base_dir... | <commit_before>from __future__ import absolute_import
import os
__version__ = VERSION = "0.3.0"
def get_fancypages_paths(path, use_with_oscar=False):
""" Get absolute paths for *path* relative to the project root """
paths = []
if use_with_oscar:
from fancypages.contrib import oscar_fancypages
... |
402f71cc65f714cf880c9c9569e83f5bcd47ec72 | paintstore/widgets.py | paintstore/widgets.py | from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
class ColorPickerWidget(forms.TextInput):
class Media:
css = {
"all": ("%s/%s" % (settings.STATIC_URL, "paintstore/css/colorpicker.css"),)
}
js = (
("%s/%s" % (... | from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
class ColorPickerWidget(forms.TextInput):
class Media:
css = {
"all": ("%s/%s" % (settings.STATIC_URL, "paintstore/css/colorpicker.css"),)
}
js = (
("%s/%s" % (... | Change the background to reflect the color chosen | Change the background to reflect the color chosen | Python | mit | jamescw/django-paintstore,jamescw/django-paintstore | from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
class ColorPickerWidget(forms.TextInput):
class Media:
css = {
"all": ("%s/%s" % (settings.STATIC_URL, "paintstore/css/colorpicker.css"),)
}
js = (
("%s/%s" % (... | from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
class ColorPickerWidget(forms.TextInput):
class Media:
css = {
"all": ("%s/%s" % (settings.STATIC_URL, "paintstore/css/colorpicker.css"),)
}
js = (
("%s/%s" % (... | <commit_before>from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
class ColorPickerWidget(forms.TextInput):
class Media:
css = {
"all": ("%s/%s" % (settings.STATIC_URL, "paintstore/css/colorpicker.css"),)
}
js = (
... | from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
class ColorPickerWidget(forms.TextInput):
class Media:
css = {
"all": ("%s/%s" % (settings.STATIC_URL, "paintstore/css/colorpicker.css"),)
}
js = (
("%s/%s" % (... | from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
class ColorPickerWidget(forms.TextInput):
class Media:
css = {
"all": ("%s/%s" % (settings.STATIC_URL, "paintstore/css/colorpicker.css"),)
}
js = (
("%s/%s" % (... | <commit_before>from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
class ColorPickerWidget(forms.TextInput):
class Media:
css = {
"all": ("%s/%s" % (settings.STATIC_URL, "paintstore/css/colorpicker.css"),)
}
js = (
... |
bad2fea8a3a8e7a7d1da9ee83ec48657824eaa07 | tests/test_filesize.py | tests/test_filesize.py | from rich import filesize
def test_traditional():
assert filesize.decimal(0) == "0 bytes"
assert filesize.decimal(1) == "1 byte"
assert filesize.decimal(2) == "2 bytes"
assert filesize.decimal(1000) == "1.0 kB"
assert filesize.decimal(1.5 * 1000 * 1000) == "1.5 MB"
def test_pick_unit_and_suffix(... | from rich import filesize
def test_traditional():
assert filesize.decimal(0) == "0 bytes"
assert filesize.decimal(1) == "1 byte"
assert filesize.decimal(2) == "2 bytes"
assert filesize.decimal(1000) == "1.0 kB"
assert filesize.decimal(1.5 * 1000 * 1000) == "1.5 MB"
assert filesize.decimal(0, p... | Add some tests for new decimal() params | Add some tests for new decimal() params
| Python | mit | willmcgugan/rich | from rich import filesize
def test_traditional():
assert filesize.decimal(0) == "0 bytes"
assert filesize.decimal(1) == "1 byte"
assert filesize.decimal(2) == "2 bytes"
assert filesize.decimal(1000) == "1.0 kB"
assert filesize.decimal(1.5 * 1000 * 1000) == "1.5 MB"
def test_pick_unit_and_suffix(... | from rich import filesize
def test_traditional():
assert filesize.decimal(0) == "0 bytes"
assert filesize.decimal(1) == "1 byte"
assert filesize.decimal(2) == "2 bytes"
assert filesize.decimal(1000) == "1.0 kB"
assert filesize.decimal(1.5 * 1000 * 1000) == "1.5 MB"
assert filesize.decimal(0, p... | <commit_before>from rich import filesize
def test_traditional():
assert filesize.decimal(0) == "0 bytes"
assert filesize.decimal(1) == "1 byte"
assert filesize.decimal(2) == "2 bytes"
assert filesize.decimal(1000) == "1.0 kB"
assert filesize.decimal(1.5 * 1000 * 1000) == "1.5 MB"
def test_pick_u... | from rich import filesize
def test_traditional():
assert filesize.decimal(0) == "0 bytes"
assert filesize.decimal(1) == "1 byte"
assert filesize.decimal(2) == "2 bytes"
assert filesize.decimal(1000) == "1.0 kB"
assert filesize.decimal(1.5 * 1000 * 1000) == "1.5 MB"
assert filesize.decimal(0, p... | from rich import filesize
def test_traditional():
assert filesize.decimal(0) == "0 bytes"
assert filesize.decimal(1) == "1 byte"
assert filesize.decimal(2) == "2 bytes"
assert filesize.decimal(1000) == "1.0 kB"
assert filesize.decimal(1.5 * 1000 * 1000) == "1.5 MB"
def test_pick_unit_and_suffix(... | <commit_before>from rich import filesize
def test_traditional():
assert filesize.decimal(0) == "0 bytes"
assert filesize.decimal(1) == "1 byte"
assert filesize.decimal(2) == "2 bytes"
assert filesize.decimal(1000) == "1.0 kB"
assert filesize.decimal(1.5 * 1000 * 1000) == "1.5 MB"
def test_pick_u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.