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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
986e1283eacdca354ac56e590f6613b5f323758a | spec/integrations_spec.py | spec/integrations_spec.py | from expects import expect, be
from doublex import Spy
from doublex_expects import have_been_called
from pysellus import integrations
from pysellus.integrations import on_failure
with description('the integrations module'):
with context('exposes an `on_failure` decorator which'):
with before.each:
... | Add two basic tests for `on_failure`. | Add two basic tests for `on_failure`.
| Python | mit | angelsanz/pysellus,Pysellus/pysellus,cgvarela/pysellus,ergl/pysellus | Add two basic tests for `on_failure`. | from expects import expect, be
from doublex import Spy
from doublex_expects import have_been_called
from pysellus import integrations
from pysellus.integrations import on_failure
with description('the integrations module'):
with context('exposes an `on_failure` decorator which'):
with before.each:
... | <commit_before><commit_msg>Add two basic tests for `on_failure`.<commit_after> | from expects import expect, be
from doublex import Spy
from doublex_expects import have_been_called
from pysellus import integrations
from pysellus.integrations import on_failure
with description('the integrations module'):
with context('exposes an `on_failure` decorator which'):
with before.each:
... | Add two basic tests for `on_failure`.from expects import expect, be
from doublex import Spy
from doublex_expects import have_been_called
from pysellus import integrations
from pysellus.integrations import on_failure
with description('the integrations module'):
with context('exposes an `on_failure` decorator whic... | <commit_before><commit_msg>Add two basic tests for `on_failure`.<commit_after>from expects import expect, be
from doublex import Spy
from doublex_expects import have_been_called
from pysellus import integrations
from pysellus.integrations import on_failure
with description('the integrations module'):
with contex... | |
d6019cc60cf90d57a4804d8942a8fd1ccc7431f2 | openfisca_senegal/survey_scenarios.py | openfisca_senegal/survey_scenarios.py | # -*- coding: utf-8 -*-
from openfisca_senegal import CountryTaxBenefitSystem as SenegalTaxBenefitSystem
from openfisca_survey_manager.scenarios import AbstractSurveyScenario
class SenegalSurveyScenario(AbstractSurveyScenario):
id_variable_by_entity_key = dict(
famille = 'id_famille',
)
role... | Add SurveyScenario adapted to SenegalTaxBenFitSystem | Add SurveyScenario adapted to SenegalTaxBenFitSystem
| Python | agpl-3.0 | openfisca/senegal | Add SurveyScenario adapted to SenegalTaxBenFitSystem | # -*- coding: utf-8 -*-
from openfisca_senegal import CountryTaxBenefitSystem as SenegalTaxBenefitSystem
from openfisca_survey_manager.scenarios import AbstractSurveyScenario
class SenegalSurveyScenario(AbstractSurveyScenario):
id_variable_by_entity_key = dict(
famille = 'id_famille',
)
role... | <commit_before><commit_msg>Add SurveyScenario adapted to SenegalTaxBenFitSystem<commit_after> | # -*- coding: utf-8 -*-
from openfisca_senegal import CountryTaxBenefitSystem as SenegalTaxBenefitSystem
from openfisca_survey_manager.scenarios import AbstractSurveyScenario
class SenegalSurveyScenario(AbstractSurveyScenario):
id_variable_by_entity_key = dict(
famille = 'id_famille',
)
role... | Add SurveyScenario adapted to SenegalTaxBenFitSystem# -*- coding: utf-8 -*-
from openfisca_senegal import CountryTaxBenefitSystem as SenegalTaxBenefitSystem
from openfisca_survey_manager.scenarios import AbstractSurveyScenario
class SenegalSurveyScenario(AbstractSurveyScenario):
id_variable_by_entity_key = dict... | <commit_before><commit_msg>Add SurveyScenario adapted to SenegalTaxBenFitSystem<commit_after># -*- coding: utf-8 -*-
from openfisca_senegal import CountryTaxBenefitSystem as SenegalTaxBenefitSystem
from openfisca_survey_manager.scenarios import AbstractSurveyScenario
class SenegalSurveyScenario(AbstractSurveyScenar... | |
4088b0b3f4c5bf9887bdbe7fd43c5944dc1bceb7 | tests/python_tests/test_array_index.py | tests/python_tests/test_array_index.py | import pytest
import xchainer
def test_newaxis():
assert xchainer.newaxis is None
def test_broadcastable():
assert xchainer.broadcastable is xchainer.broadcastable
| Add simple tests of newaxis and broadcastable python binding | Add simple tests of newaxis and broadcastable python binding
| Python | mit | okuta/chainer,niboshi/chainer,hvy/chainer,jnishi/chainer,jnishi/chainer,niboshi/chainer,tkerola/chainer,hvy/chainer,chainer/chainer,wkentaro/chainer,keisuke-umezawa/chainer,chainer/chainer,ktnyt/chainer,okuta/chainer,hvy/chainer,wkentaro/chainer,keisuke-umezawa/chainer,niboshi/chainer,okuta/chainer,jnishi/chainer,jnish... | Add simple tests of newaxis and broadcastable python binding | import pytest
import xchainer
def test_newaxis():
assert xchainer.newaxis is None
def test_broadcastable():
assert xchainer.broadcastable is xchainer.broadcastable
| <commit_before><commit_msg>Add simple tests of newaxis and broadcastable python binding<commit_after> | import pytest
import xchainer
def test_newaxis():
assert xchainer.newaxis is None
def test_broadcastable():
assert xchainer.broadcastable is xchainer.broadcastable
| Add simple tests of newaxis and broadcastable python bindingimport pytest
import xchainer
def test_newaxis():
assert xchainer.newaxis is None
def test_broadcastable():
assert xchainer.broadcastable is xchainer.broadcastable
| <commit_before><commit_msg>Add simple tests of newaxis and broadcastable python binding<commit_after>import pytest
import xchainer
def test_newaxis():
assert xchainer.newaxis is None
def test_broadcastable():
assert xchainer.broadcastable is xchainer.broadcastable
| |
7378250087986dfeb1194b063d7b17e902d6bdcb | backend/breach/migrations/0001_initial.py | backend/breach/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-27 11:55
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations... | Add migration to first version of BREACH models | Add migration to first version of BREACH models
| Python | mit | esarafianou/rupture,esarafianou/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimriou/rupture,dimriou/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,dionyziz/rupture,di... | Add migration to first version of BREACH models | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-27 11:55
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations... | <commit_before><commit_msg>Add migration to first version of BREACH models<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-27 11:55
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations... | Add migration to first version of BREACH models# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-27 11:55
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = T... | <commit_before><commit_msg>Add migration to first version of BREACH models<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-27 11:55
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migratio... | |
af35c0cbf26b848dbc09813102a88c82f3d61280 | src/main/python/combine_tlda_result.py | src/main/python/combine_tlda_result.py | # -*- coding: utf-8 -*-
__author__ = 'stefanie & DJ'
'''
'''
import sys, os, re, shutil
def analyzeTopics(inputTopic):
str = inputTopic.read()
strwithoutEnter = str.replace("\n", "")
#In this case, '' should be in the beginning since it's before Topic 0
lineTopics = strwithoutEnter.split("Topic")
p... | Revert "Revert "the util to combine message"" | Revert "Revert "the util to combine message""
This reverts commit 91537f48ebd3af6e5d74f14be8bcf12b225f7c81.
| Python | apache-2.0 | anphoenix/demo_nlp_im,anphoenix/demo_nlp_im | Revert "Revert "the util to combine message""
This reverts commit 91537f48ebd3af6e5d74f14be8bcf12b225f7c81. | # -*- coding: utf-8 -*-
__author__ = 'stefanie & DJ'
'''
'''
import sys, os, re, shutil
def analyzeTopics(inputTopic):
str = inputTopic.read()
strwithoutEnter = str.replace("\n", "")
#In this case, '' should be in the beginning since it's before Topic 0
lineTopics = strwithoutEnter.split("Topic")
p... | <commit_before><commit_msg>Revert "Revert "the util to combine message""
This reverts commit 91537f48ebd3af6e5d74f14be8bcf12b225f7c81.<commit_after> | # -*- coding: utf-8 -*-
__author__ = 'stefanie & DJ'
'''
'''
import sys, os, re, shutil
def analyzeTopics(inputTopic):
str = inputTopic.read()
strwithoutEnter = str.replace("\n", "")
#In this case, '' should be in the beginning since it's before Topic 0
lineTopics = strwithoutEnter.split("Topic")
p... | Revert "Revert "the util to combine message""
This reverts commit 91537f48ebd3af6e5d74f14be8bcf12b225f7c81.# -*- coding: utf-8 -*-
__author__ = 'stefanie & DJ'
'''
'''
import sys, os, re, shutil
def analyzeTopics(inputTopic):
str = inputTopic.read()
strwithoutEnter = str.replace("\n", "")
#In this case, '... | <commit_before><commit_msg>Revert "Revert "the util to combine message""
This reverts commit 91537f48ebd3af6e5d74f14be8bcf12b225f7c81.<commit_after># -*- coding: utf-8 -*-
__author__ = 'stefanie & DJ'
'''
'''
import sys, os, re, shutil
def analyzeTopics(inputTopic):
str = inputTopic.read()
strwithoutEnter... | |
5c946b79b5060c7b1dbab3d86ba13cd8e2243add | oneflow/profiles/api.py | oneflow/profiles/api.py | # -*- coding: utf-8 -*-
import logging
from django.contrib.auth import get_user_model
from tastypie.resources import ModelResource
from tastypie import fields
from ..base.api import common_authentication, UserObjectsOnlyAuthorization
from .models import UserProfile
LOGGER = logging.getLogger(__name__)
User = get_u... | Create the User & UserProfile API resources (probably needs restrictions to avoid anyone getting all entries in the DB…). | Create the User & UserProfile API resources (probably needs restrictions to avoid anyone getting all entries in the DB…). | Python | agpl-3.0 | 1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow | Create the User & UserProfile API resources (probably needs restrictions to avoid anyone getting all entries in the DB…). | # -*- coding: utf-8 -*-
import logging
from django.contrib.auth import get_user_model
from tastypie.resources import ModelResource
from tastypie import fields
from ..base.api import common_authentication, UserObjectsOnlyAuthorization
from .models import UserProfile
LOGGER = logging.getLogger(__name__)
User = get_u... | <commit_before><commit_msg>Create the User & UserProfile API resources (probably needs restrictions to avoid anyone getting all entries in the DB…).<commit_after> | # -*- coding: utf-8 -*-
import logging
from django.contrib.auth import get_user_model
from tastypie.resources import ModelResource
from tastypie import fields
from ..base.api import common_authentication, UserObjectsOnlyAuthorization
from .models import UserProfile
LOGGER = logging.getLogger(__name__)
User = get_u... | Create the User & UserProfile API resources (probably needs restrictions to avoid anyone getting all entries in the DB…).# -*- coding: utf-8 -*-
import logging
from django.contrib.auth import get_user_model
from tastypie.resources import ModelResource
from tastypie import fields
from ..base.api import common_authen... | <commit_before><commit_msg>Create the User & UserProfile API resources (probably needs restrictions to avoid anyone getting all entries in the DB…).<commit_after># -*- coding: utf-8 -*-
import logging
from django.contrib.auth import get_user_model
from tastypie.resources import ModelResource
from tastypie import fie... | |
bb9d02276db7b753837119797c6a61fc4128d20e | tests/test_metrics.py | tests/test_metrics.py | from husc import metrics
import numpy as np
import os
import pandas as pd
from pymongo import MongoClient
import subprocess as sp
abspath = os.path.dirname(__file__)
def string2tuple(string_tuple):
# TODO add docstring
string_values = string_tuple.split(', ')
coords = (int(string_values[0][1:]), string_va... | Add tests for metrics functions | Add tests for metrics functions
| Python | bsd-3-clause | jni/microscopium,microscopium/microscopium,Don86/microscopium,Don86/microscopium,jni/microscopium,starcalibre/microscopium,microscopium/microscopium | Add tests for metrics functions | from husc import metrics
import numpy as np
import os
import pandas as pd
from pymongo import MongoClient
import subprocess as sp
abspath = os.path.dirname(__file__)
def string2tuple(string_tuple):
# TODO add docstring
string_values = string_tuple.split(', ')
coords = (int(string_values[0][1:]), string_va... | <commit_before><commit_msg>Add tests for metrics functions<commit_after> | from husc import metrics
import numpy as np
import os
import pandas as pd
from pymongo import MongoClient
import subprocess as sp
abspath = os.path.dirname(__file__)
def string2tuple(string_tuple):
# TODO add docstring
string_values = string_tuple.split(', ')
coords = (int(string_values[0][1:]), string_va... | Add tests for metrics functionsfrom husc import metrics
import numpy as np
import os
import pandas as pd
from pymongo import MongoClient
import subprocess as sp
abspath = os.path.dirname(__file__)
def string2tuple(string_tuple):
# TODO add docstring
string_values = string_tuple.split(', ')
coords = (int(s... | <commit_before><commit_msg>Add tests for metrics functions<commit_after>from husc import metrics
import numpy as np
import os
import pandas as pd
from pymongo import MongoClient
import subprocess as sp
abspath = os.path.dirname(__file__)
def string2tuple(string_tuple):
# TODO add docstring
string_values = str... | |
074e9d6328cb8e699c9afe717f70e15e884dd3d6 | test_goodRqst_sockserver.py | test_goodRqst_sockserver.py | #!/usr/bin/env python
import socket_server, pytest, socket
address= ('127.0.0.1', 50000)
tester_client= socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
def test_good_request():
request= "GET www.wombatlyfe.com HTTP/1.1\r\n"
tester_client.connect(address)
tester_client.sen... | Add test to ensure that a proper output is recieved by client when proper request is made | Add test to ensure that a proper output is recieved by client when proper request is made
| Python | mit | charlieRode/network_tools | Add test to ensure that a proper output is recieved by client when proper request is made | #!/usr/bin/env python
import socket_server, pytest, socket
address= ('127.0.0.1', 50000)
tester_client= socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
def test_good_request():
request= "GET www.wombatlyfe.com HTTP/1.1\r\n"
tester_client.connect(address)
tester_client.sen... | <commit_before><commit_msg>Add test to ensure that a proper output is recieved by client when proper request is made<commit_after> | #!/usr/bin/env python
import socket_server, pytest, socket
address= ('127.0.0.1', 50000)
tester_client= socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
def test_good_request():
request= "GET www.wombatlyfe.com HTTP/1.1\r\n"
tester_client.connect(address)
tester_client.sen... | Add test to ensure that a proper output is recieved by client when proper request is made#!/usr/bin/env python
import socket_server, pytest, socket
address= ('127.0.0.1', 50000)
tester_client= socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
def test_good_request():
request= "GET ... | <commit_before><commit_msg>Add test to ensure that a proper output is recieved by client when proper request is made<commit_after>#!/usr/bin/env python
import socket_server, pytest, socket
address= ('127.0.0.1', 50000)
tester_client= socket.socket(
socket.AF_INET,
socket.SOCK_STREAM,
socket.IPPROTO_IP)
de... | |
01fc606eabef14dca0b3e7f6b2a5e5a52c360fba | condor/python/resync_dashboards.py | condor/python/resync_dashboards.py | #!/usr/bin/env python
import argparse
import sys
import logging
import elasticsearch
import elasticsearch.helpers
ES_NODES = 'uct2-es-door.mwt2.org'
VERSION = '0.1'
SOURCE_INDEX = '.kibana'
TARGET_INDEX = 'osg-connect-kibana'
def get_es_client():
""" Instantiate DB client and pass connection back """
retur... | Add script to sync dashboards | Add script to sync dashboards
| Python | apache-2.0 | DHTC-Tools/logstash-confs,DHTC-Tools/logstash-confs,DHTC-Tools/logstash-confs | Add script to sync dashboards | #!/usr/bin/env python
import argparse
import sys
import logging
import elasticsearch
import elasticsearch.helpers
ES_NODES = 'uct2-es-door.mwt2.org'
VERSION = '0.1'
SOURCE_INDEX = '.kibana'
TARGET_INDEX = 'osg-connect-kibana'
def get_es_client():
""" Instantiate DB client and pass connection back """
retur... | <commit_before><commit_msg>Add script to sync dashboards<commit_after> | #!/usr/bin/env python
import argparse
import sys
import logging
import elasticsearch
import elasticsearch.helpers
ES_NODES = 'uct2-es-door.mwt2.org'
VERSION = '0.1'
SOURCE_INDEX = '.kibana'
TARGET_INDEX = 'osg-connect-kibana'
def get_es_client():
""" Instantiate DB client and pass connection back """
retur... | Add script to sync dashboards#!/usr/bin/env python
import argparse
import sys
import logging
import elasticsearch
import elasticsearch.helpers
ES_NODES = 'uct2-es-door.mwt2.org'
VERSION = '0.1'
SOURCE_INDEX = '.kibana'
TARGET_INDEX = 'osg-connect-kibana'
def get_es_client():
""" Instantiate DB client and pass ... | <commit_before><commit_msg>Add script to sync dashboards<commit_after>#!/usr/bin/env python
import argparse
import sys
import logging
import elasticsearch
import elasticsearch.helpers
ES_NODES = 'uct2-es-door.mwt2.org'
VERSION = '0.1'
SOURCE_INDEX = '.kibana'
TARGET_INDEX = 'osg-connect-kibana'
def get_es_client()... | |
8038e55e93b7e307d02c1f88527e06202801579e | notebooks/Model_Output/solutions/map.py | notebooks/Model_Output/solutions/map.py | import numpy as np
# Set up an NCSS query from thredds using siphon
query = ncss.query()
query.accept('netcdf4')
query.variables('Temperature_isobaric', 'Geopotential_height_isobaric')
query.vertical_level(50000)
now = datetime.utcnow()
query.time_range(now, now + timedelta(days=1))
query.lonlat_box(west=-110, east=-4... | Add solutions script for ModelOutput | Add solutions script for ModelOutput
| Python | mit | julienchastang/unidata-python-workshop,Unidata/unidata-python-workshop,julienchastang/unidata-python-workshop | Add solutions script for ModelOutput | import numpy as np
# Set up an NCSS query from thredds using siphon
query = ncss.query()
query.accept('netcdf4')
query.variables('Temperature_isobaric', 'Geopotential_height_isobaric')
query.vertical_level(50000)
now = datetime.utcnow()
query.time_range(now, now + timedelta(days=1))
query.lonlat_box(west=-110, east=-4... | <commit_before><commit_msg>Add solutions script for ModelOutput<commit_after> | import numpy as np
# Set up an NCSS query from thredds using siphon
query = ncss.query()
query.accept('netcdf4')
query.variables('Temperature_isobaric', 'Geopotential_height_isobaric')
query.vertical_level(50000)
now = datetime.utcnow()
query.time_range(now, now + timedelta(days=1))
query.lonlat_box(west=-110, east=-4... | Add solutions script for ModelOutputimport numpy as np
# Set up an NCSS query from thredds using siphon
query = ncss.query()
query.accept('netcdf4')
query.variables('Temperature_isobaric', 'Geopotential_height_isobaric')
query.vertical_level(50000)
now = datetime.utcnow()
query.time_range(now, now + timedelta(days=1))... | <commit_before><commit_msg>Add solutions script for ModelOutput<commit_after>import numpy as np
# Set up an NCSS query from thredds using siphon
query = ncss.query()
query.accept('netcdf4')
query.variables('Temperature_isobaric', 'Geopotential_height_isobaric')
query.vertical_level(50000)
now = datetime.utcnow()
query... | |
aca9fde589adba08fe335b2441c73e3f3769cf67 | paasta_tools/contrib/shared_ip_check.py | paasta_tools/contrib/shared_ip_check.py | import sys
from collections import defaultdict
from paasta_tools.utils import get_docker_client
def main():
docker_client = get_docker_client()
ip_to_containers = defaultdict(list)
for container in docker_client.containers():
networks = container['NetworkSettings']['Networks']
if 'bridge... | Add script to monitor for containers sharing an IP | Add script to monitor for containers sharing an IP
| Python | apache-2.0 | somic/paasta,Yelp/paasta,somic/paasta,Yelp/paasta | Add script to monitor for containers sharing an IP | import sys
from collections import defaultdict
from paasta_tools.utils import get_docker_client
def main():
docker_client = get_docker_client()
ip_to_containers = defaultdict(list)
for container in docker_client.containers():
networks = container['NetworkSettings']['Networks']
if 'bridge... | <commit_before><commit_msg>Add script to monitor for containers sharing an IP<commit_after> | import sys
from collections import defaultdict
from paasta_tools.utils import get_docker_client
def main():
docker_client = get_docker_client()
ip_to_containers = defaultdict(list)
for container in docker_client.containers():
networks = container['NetworkSettings']['Networks']
if 'bridge... | Add script to monitor for containers sharing an IPimport sys
from collections import defaultdict
from paasta_tools.utils import get_docker_client
def main():
docker_client = get_docker_client()
ip_to_containers = defaultdict(list)
for container in docker_client.containers():
networks = container... | <commit_before><commit_msg>Add script to monitor for containers sharing an IP<commit_after>import sys
from collections import defaultdict
from paasta_tools.utils import get_docker_client
def main():
docker_client = get_docker_client()
ip_to_containers = defaultdict(list)
for container in docker_client.c... | |
671825d63458712ca06dbcd1fe2028d64aa48e7d | jarn/mkrelease/tests/test_defaults.py | jarn/mkrelease/tests/test_defaults.py | import unittest
from jarn.mkrelease.mkrelease import Defaults
from jarn.mkrelease.testing import JailSetup
class DefaultsTests(JailSetup):
def test_defaults_defaults(self):
self.mkfile('my.cfg', """
[mkrelease]
""")
defaults = Defaults('my.cfg')
self.assertEqual(defaults.distbase, '')
... | Add tests for new defaults. | Add tests for new defaults.
| Python | bsd-2-clause | Jarn/jarn.mkrelease | Add tests for new defaults. | import unittest
from jarn.mkrelease.mkrelease import Defaults
from jarn.mkrelease.testing import JailSetup
class DefaultsTests(JailSetup):
def test_defaults_defaults(self):
self.mkfile('my.cfg', """
[mkrelease]
""")
defaults = Defaults('my.cfg')
self.assertEqual(defaults.distbase, '')
... | <commit_before><commit_msg>Add tests for new defaults.<commit_after> | import unittest
from jarn.mkrelease.mkrelease import Defaults
from jarn.mkrelease.testing import JailSetup
class DefaultsTests(JailSetup):
def test_defaults_defaults(self):
self.mkfile('my.cfg', """
[mkrelease]
""")
defaults = Defaults('my.cfg')
self.assertEqual(defaults.distbase, '')
... | Add tests for new defaults.import unittest
from jarn.mkrelease.mkrelease import Defaults
from jarn.mkrelease.testing import JailSetup
class DefaultsTests(JailSetup):
def test_defaults_defaults(self):
self.mkfile('my.cfg', """
[mkrelease]
""")
defaults = Defaults('my.cfg')
self.assertEqu... | <commit_before><commit_msg>Add tests for new defaults.<commit_after>import unittest
from jarn.mkrelease.mkrelease import Defaults
from jarn.mkrelease.testing import JailSetup
class DefaultsTests(JailSetup):
def test_defaults_defaults(self):
self.mkfile('my.cfg', """
[mkrelease]
""")
defaults = ... | |
d65182338acfc58bc4b87c1b9c506dd2b2c80a38 | project2/stepwise_forward_selection.py | project2/stepwise_forward_selection.py | """ Created by Max Robinson 9/20/2017 """
class SFS:
pass
"""
Pseudo code
function SFS(Features, D_train, D_valid, Learn()):
F_0 = <>
basePerf = -inf
do:
bestPerf = - inf
for all Features in FeatureSpace do:
F_0 = F_0 + F
h = Learn(F_0, D_train)
... | Add skeleton for SFS algorithm | Add skeleton for SFS algorithm
| Python | apache-2.0 | MaxRobinson/CS449,MaxRobinson/CS449,MaxRobinson/CS449 | Add skeleton for SFS algorithm | """ Created by Max Robinson 9/20/2017 """
class SFS:
pass
"""
Pseudo code
function SFS(Features, D_train, D_valid, Learn()):
F_0 = <>
basePerf = -inf
do:
bestPerf = - inf
for all Features in FeatureSpace do:
F_0 = F_0 + F
h = Learn(F_0, D_train)
... | <commit_before><commit_msg>Add skeleton for SFS algorithm<commit_after> | """ Created by Max Robinson 9/20/2017 """
class SFS:
pass
"""
Pseudo code
function SFS(Features, D_train, D_valid, Learn()):
F_0 = <>
basePerf = -inf
do:
bestPerf = - inf
for all Features in FeatureSpace do:
F_0 = F_0 + F
h = Learn(F_0, D_train)
... | Add skeleton for SFS algorithm""" Created by Max Robinson 9/20/2017 """
class SFS:
pass
"""
Pseudo code
function SFS(Features, D_train, D_valid, Learn()):
F_0 = <>
basePerf = -inf
do:
bestPerf = - inf
for all Features in FeatureSpace do:
F_0 = F_0 + F
h = L... | <commit_before><commit_msg>Add skeleton for SFS algorithm<commit_after>""" Created by Max Robinson 9/20/2017 """
class SFS:
pass
"""
Pseudo code
function SFS(Features, D_train, D_valid, Learn()):
F_0 = <>
basePerf = -inf
do:
bestPerf = - inf
for all Features in FeatureSpace do:
... | |
b365e5132a819e357bd960721fd7506fe538bbbf | corehq/apps/es/fake/forms_fake.py | corehq/apps/es/fake/forms_fake.py | from copy import deepcopy
from dateutil import parser
from corehq.pillows.xform import transform_xform_for_elasticsearch
from corehq.apps.es.fake.es_query_fake import HQESQueryFake
class FormESFake(HQESQueryFake):
_all_docs = []
def domain(self, domain):
return self._filtered(
lambda doc:... | Add a fake es forms orm | Add a fake es forms orm
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | Add a fake es forms orm | from copy import deepcopy
from dateutil import parser
from corehq.pillows.xform import transform_xform_for_elasticsearch
from corehq.apps.es.fake.es_query_fake import HQESQueryFake
class FormESFake(HQESQueryFake):
_all_docs = []
def domain(self, domain):
return self._filtered(
lambda doc:... | <commit_before><commit_msg>Add a fake es forms orm<commit_after> | from copy import deepcopy
from dateutil import parser
from corehq.pillows.xform import transform_xform_for_elasticsearch
from corehq.apps.es.fake.es_query_fake import HQESQueryFake
class FormESFake(HQESQueryFake):
_all_docs = []
def domain(self, domain):
return self._filtered(
lambda doc:... | Add a fake es forms ormfrom copy import deepcopy
from dateutil import parser
from corehq.pillows.xform import transform_xform_for_elasticsearch
from corehq.apps.es.fake.es_query_fake import HQESQueryFake
class FormESFake(HQESQueryFake):
_all_docs = []
def domain(self, domain):
return self._filtered(
... | <commit_before><commit_msg>Add a fake es forms orm<commit_after>from copy import deepcopy
from dateutil import parser
from corehq.pillows.xform import transform_xform_for_elasticsearch
from corehq.apps.es.fake.es_query_fake import HQESQueryFake
class FormESFake(HQESQueryFake):
_all_docs = []
def domain(self,... | |
c179aaeacd8d2b9c78831e6e3cce965b2eb58210 | spectral_cube/tests/test_cube_utils.py | spectral_cube/tests/test_cube_utils.py | import pytest
import numpy as np
from astropy import units as u
from astropy import convolution
from astropy.wcs import WCS
from astropy import wcs
from .test_spectral_cube import cube_and_raw
from ..cube_utils import largest_beam, smallest_beam
try:
from radio_beam import beam, Beam
RADIO_BEAM_INSTALLED = Tr... | Add tests for largest and smallest beams | Add tests for largest and smallest beams
| Python | bsd-3-clause | jzuhone/spectral-cube,radio-astro-tools/spectral-cube,keflavich/spectral-cube,low-sky/spectral-cube,e-koch/spectral-cube | Add tests for largest and smallest beams | import pytest
import numpy as np
from astropy import units as u
from astropy import convolution
from astropy.wcs import WCS
from astropy import wcs
from .test_spectral_cube import cube_and_raw
from ..cube_utils import largest_beam, smallest_beam
try:
from radio_beam import beam, Beam
RADIO_BEAM_INSTALLED = Tr... | <commit_before><commit_msg>Add tests for largest and smallest beams<commit_after> | import pytest
import numpy as np
from astropy import units as u
from astropy import convolution
from astropy.wcs import WCS
from astropy import wcs
from .test_spectral_cube import cube_and_raw
from ..cube_utils import largest_beam, smallest_beam
try:
from radio_beam import beam, Beam
RADIO_BEAM_INSTALLED = Tr... | Add tests for largest and smallest beamsimport pytest
import numpy as np
from astropy import units as u
from astropy import convolution
from astropy.wcs import WCS
from astropy import wcs
from .test_spectral_cube import cube_and_raw
from ..cube_utils import largest_beam, smallest_beam
try:
from radio_beam import ... | <commit_before><commit_msg>Add tests for largest and smallest beams<commit_after>import pytest
import numpy as np
from astropy import units as u
from astropy import convolution
from astropy.wcs import WCS
from astropy import wcs
from .test_spectral_cube import cube_and_raw
from ..cube_utils import largest_beam, smalle... | |
0c53edae37f87c8ef7cd46f5f9ecbf7c3ab3612d | scripts/cache_manager.py | scripts/cache_manager.py | #!/usr/bin/python2
# -*- coding: utf-8 -*-
import os
import cPickle
class CacheManager(object):
"""Manage cache saving and loading for a project"""
def __init__(self, home, tag):
"""Initialize the CacheManager
Args:
home: The home where data to be cached
tag: The tag... | Manage cache in an elegent way | Manage cache in an elegent way
| Python | mit | Cysu/Person-Reid,Cysu/Person-Reid,Cysu/Person-Reid,Cysu/Person-Reid,Cysu/Person-Reid | Manage cache in an elegent way | #!/usr/bin/python2
# -*- coding: utf-8 -*-
import os
import cPickle
class CacheManager(object):
"""Manage cache saving and loading for a project"""
def __init__(self, home, tag):
"""Initialize the CacheManager
Args:
home: The home where data to be cached
tag: The tag... | <commit_before><commit_msg>Manage cache in an elegent way<commit_after> | #!/usr/bin/python2
# -*- coding: utf-8 -*-
import os
import cPickle
class CacheManager(object):
"""Manage cache saving and loading for a project"""
def __init__(self, home, tag):
"""Initialize the CacheManager
Args:
home: The home where data to be cached
tag: The tag... | Manage cache in an elegent way#!/usr/bin/python2
# -*- coding: utf-8 -*-
import os
import cPickle
class CacheManager(object):
"""Manage cache saving and loading for a project"""
def __init__(self, home, tag):
"""Initialize the CacheManager
Args:
home: The home where data to be c... | <commit_before><commit_msg>Manage cache in an elegent way<commit_after>#!/usr/bin/python2
# -*- coding: utf-8 -*-
import os
import cPickle
class CacheManager(object):
"""Manage cache saving and loading for a project"""
def __init__(self, home, tag):
"""Initialize the CacheManager
Args:
... | |
be10f2588f128d1a15dd6121aa806a98f1f96bf1 | tests/test_result.py | tests/test_result.py | import unittest
from performance_testing.result import Result, File
import os
import shutil
class ResultTestCase(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
self.result_directory = os.path.join(self.current_directory, 'assets/test_result... | Create tests for result class | Create tests for result class
| Python | mit | BakeCode/performance-testing,BakeCode/performance-testing | Create tests for result class | import unittest
from performance_testing.result import Result, File
import os
import shutil
class ResultTestCase(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
self.result_directory = os.path.join(self.current_directory, 'assets/test_result... | <commit_before><commit_msg>Create tests for result class<commit_after> | import unittest
from performance_testing.result import Result, File
import os
import shutil
class ResultTestCase(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
self.result_directory = os.path.join(self.current_directory, 'assets/test_result... | Create tests for result classimport unittest
from performance_testing.result import Result, File
import os
import shutil
class ResultTestCase(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
self.result_directory = os.path.join(self.current_d... | <commit_before><commit_msg>Create tests for result class<commit_after>import unittest
from performance_testing.result import Result, File
import os
import shutil
class ResultTestCase(unittest.TestCase):
def setUp(self):
self.current_directory = os.path.dirname(os.path.abspath(__file__))
self.resul... | |
7f8285b8f92b217d00872dbd1a527d25768fa21c | apps/submission/tests/test_views.py | apps/submission/tests/test_views.py | from django.test import TestCase
from django.urls import reverse
from apps.core.factories import PIXELER_PASSWORD, PixelerFactory
class DownloadXLSXTemplateViewTestCase(TestCase):
def setUp(self):
self.url = reverse('submission:download')
self.template = 'submission/download_xlsx_template.html'... | Add tests for the DownloadXLSXTemplateView | Add tests for the DownloadXLSXTemplateView
| Python | bsd-3-clause | Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel | Add tests for the DownloadXLSXTemplateView | from django.test import TestCase
from django.urls import reverse
from apps.core.factories import PIXELER_PASSWORD, PixelerFactory
class DownloadXLSXTemplateViewTestCase(TestCase):
def setUp(self):
self.url = reverse('submission:download')
self.template = 'submission/download_xlsx_template.html'... | <commit_before><commit_msg>Add tests for the DownloadXLSXTemplateView<commit_after> | from django.test import TestCase
from django.urls import reverse
from apps.core.factories import PIXELER_PASSWORD, PixelerFactory
class DownloadXLSXTemplateViewTestCase(TestCase):
def setUp(self):
self.url = reverse('submission:download')
self.template = 'submission/download_xlsx_template.html'... | Add tests for the DownloadXLSXTemplateViewfrom django.test import TestCase
from django.urls import reverse
from apps.core.factories import PIXELER_PASSWORD, PixelerFactory
class DownloadXLSXTemplateViewTestCase(TestCase):
def setUp(self):
self.url = reverse('submission:download')
self.template ... | <commit_before><commit_msg>Add tests for the DownloadXLSXTemplateView<commit_after>from django.test import TestCase
from django.urls import reverse
from apps.core.factories import PIXELER_PASSWORD, PixelerFactory
class DownloadXLSXTemplateViewTestCase(TestCase):
def setUp(self):
self.url = reverse('sub... | |
8be12a3a28779cf3ad91f732f5dc45bc0843fba1 | cla_backend/apps/knowledgebase/management/commands/general_and_government_addition.py | cla_backend/apps/knowledgebase/management/commands/general_and_government_addition.py | from django.core.management.base import BaseCommand
from knowledgebase.models import ArticleCategory
class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write("Getting or creating General Article Category")
ArticleCategory.objects.get_or_create(name="General")
self.... | Add General and Government article categories | Add General and Government article categories
| Python | mit | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | Add General and Government article categories | from django.core.management.base import BaseCommand
from knowledgebase.models import ArticleCategory
class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write("Getting or creating General Article Category")
ArticleCategory.objects.get_or_create(name="General")
self.... | <commit_before><commit_msg>Add General and Government article categories<commit_after> | from django.core.management.base import BaseCommand
from knowledgebase.models import ArticleCategory
class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write("Getting or creating General Article Category")
ArticleCategory.objects.get_or_create(name="General")
self.... | Add General and Government article categoriesfrom django.core.management.base import BaseCommand
from knowledgebase.models import ArticleCategory
class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write("Getting or creating General Article Category")
ArticleCategory.object... | <commit_before><commit_msg>Add General and Government article categories<commit_after>from django.core.management.base import BaseCommand
from knowledgebase.models import ArticleCategory
class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write("Getting or creating General Article ... | |
ca7fc022df2ce3554a241554ae8da72016a2b015 | src/helloWorld.py | src/helloWorld.py | import cv2
cam = cv2.VideoCapture(0)
running = True
while running:
running, frame = cam.read()
if running:
# draw rectangle
cv2.rectangle(frame,(100, 100), (200, 200), (255,0,0), 2)
# write text
font = cv2.FONT_HERSHEY_SIMPLEX
cv2.putText(frame,'Press Escape to exit...'... | Add HelloWorld.py to test correct setup | Add HelloWorld.py to test correct setup
| Python | mit | FroeMic/CDTM-Deep-Learning-Drones,FroeMic/CDTM-Deep-Learning-Drones | Add HelloWorld.py to test correct setup | import cv2
cam = cv2.VideoCapture(0)
running = True
while running:
running, frame = cam.read()
if running:
# draw rectangle
cv2.rectangle(frame,(100, 100), (200, 200), (255,0,0), 2)
# write text
font = cv2.FONT_HERSHEY_SIMPLEX
cv2.putText(frame,'Press Escape to exit...'... | <commit_before><commit_msg>Add HelloWorld.py to test correct setup<commit_after> | import cv2
cam = cv2.VideoCapture(0)
running = True
while running:
running, frame = cam.read()
if running:
# draw rectangle
cv2.rectangle(frame,(100, 100), (200, 200), (255,0,0), 2)
# write text
font = cv2.FONT_HERSHEY_SIMPLEX
cv2.putText(frame,'Press Escape to exit...'... | Add HelloWorld.py to test correct setupimport cv2
cam = cv2.VideoCapture(0)
running = True
while running:
running, frame = cam.read()
if running:
# draw rectangle
cv2.rectangle(frame,(100, 100), (200, 200), (255,0,0), 2)
# write text
font = cv2.FONT_HERSHEY_SIMPLEX
cv2.... | <commit_before><commit_msg>Add HelloWorld.py to test correct setup<commit_after>import cv2
cam = cv2.VideoCapture(0)
running = True
while running:
running, frame = cam.read()
if running:
# draw rectangle
cv2.rectangle(frame,(100, 100), (200, 200), (255,0,0), 2)
# write text
fon... | |
21eb7e06f175a08b4d90146d1bfb48670577e59b | bin/analysis/create_static_model.py | bin/analysis/create_static_model.py | # The old seed pipeline
import logging
import emission.analysis.classification.inference.mode.seed.pipeline as pipeline
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
seed_pipeline = pipeline.ModeInferencePipelineMovesFormat()
seed_pipeline.runPipeline()
| Check in a simple script to create and save a model based on old-style data | Check in a simple script to create and save a model based on old-style data
Since the analysis pipeline has already been defined, this was pretty easy.
And it is even tested.
Testing done: Ran it, there was a json file created.
| Python | bsd-3-clause | shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server | Check in a simple script to create and save a model based on old-style data
Since the analysis pipeline has already been defined, this was pretty easy.
And it is even tested.
Testing done: Ran it, there was a json file created. | # The old seed pipeline
import logging
import emission.analysis.classification.inference.mode.seed.pipeline as pipeline
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
seed_pipeline = pipeline.ModeInferencePipelineMovesFormat()
seed_pipeline.runPipeline()
| <commit_before><commit_msg>Check in a simple script to create and save a model based on old-style data
Since the analysis pipeline has already been defined, this was pretty easy.
And it is even tested.
Testing done: Ran it, there was a json file created.<commit_after> | # The old seed pipeline
import logging
import emission.analysis.classification.inference.mode.seed.pipeline as pipeline
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
seed_pipeline = pipeline.ModeInferencePipelineMovesFormat()
seed_pipeline.runPipeline()
| Check in a simple script to create and save a model based on old-style data
Since the analysis pipeline has already been defined, this was pretty easy.
And it is even tested.
Testing done: Ran it, there was a json file created.# The old seed pipeline
import logging
import emission.analysis.classification.inference.mo... | <commit_before><commit_msg>Check in a simple script to create and save a model based on old-style data
Since the analysis pipeline has already been defined, this was pretty easy.
And it is even tested.
Testing done: Ran it, there was a json file created.<commit_after># The old seed pipeline
import logging
import emis... | |
c2a8863d579830ae63131bef5fdd4320720e05c7 | services/mixins/utils.py | services/mixins/utils.py | from services.mixins.constants import LICENSE_UNKNOWN, LICENSE_CC0, LICENSE_CC_BY, LICENSE_CC_BY_NC, \
LICENSE_CC_BY_NC_ND, LICENSE_CC_BY_NC_SA, LICENSE_CC_BY_ND, LICENSE_CC_BY_SA, LICENSE_CC_SAMPLING_PLUS
def translate_cc_license_url(url):
# TODO: this does not include license versioning (3.0, 4.0...)
if... | Add util function to translate from cc license urls | Add util function to translate from cc license urls
| Python | apache-2.0 | AudioCommons/ac-mediator,AudioCommons/ac-mediator,AudioCommons/ac-mediator | Add util function to translate from cc license urls | from services.mixins.constants import LICENSE_UNKNOWN, LICENSE_CC0, LICENSE_CC_BY, LICENSE_CC_BY_NC, \
LICENSE_CC_BY_NC_ND, LICENSE_CC_BY_NC_SA, LICENSE_CC_BY_ND, LICENSE_CC_BY_SA, LICENSE_CC_SAMPLING_PLUS
def translate_cc_license_url(url):
# TODO: this does not include license versioning (3.0, 4.0...)
if... | <commit_before><commit_msg>Add util function to translate from cc license urls<commit_after> | from services.mixins.constants import LICENSE_UNKNOWN, LICENSE_CC0, LICENSE_CC_BY, LICENSE_CC_BY_NC, \
LICENSE_CC_BY_NC_ND, LICENSE_CC_BY_NC_SA, LICENSE_CC_BY_ND, LICENSE_CC_BY_SA, LICENSE_CC_SAMPLING_PLUS
def translate_cc_license_url(url):
# TODO: this does not include license versioning (3.0, 4.0...)
if... | Add util function to translate from cc license urlsfrom services.mixins.constants import LICENSE_UNKNOWN, LICENSE_CC0, LICENSE_CC_BY, LICENSE_CC_BY_NC, \
LICENSE_CC_BY_NC_ND, LICENSE_CC_BY_NC_SA, LICENSE_CC_BY_ND, LICENSE_CC_BY_SA, LICENSE_CC_SAMPLING_PLUS
def translate_cc_license_url(url):
# TODO: this does ... | <commit_before><commit_msg>Add util function to translate from cc license urls<commit_after>from services.mixins.constants import LICENSE_UNKNOWN, LICENSE_CC0, LICENSE_CC_BY, LICENSE_CC_BY_NC, \
LICENSE_CC_BY_NC_ND, LICENSE_CC_BY_NC_SA, LICENSE_CC_BY_ND, LICENSE_CC_BY_SA, LICENSE_CC_SAMPLING_PLUS
def translate_cc... | |
9ce809a4067d311c23dd1fa4f39b5808c885afdc | scripts/analytics/run_keen_snapshots.py | scripts/analytics/run_keen_snapshots.py | import logging
from datetime import datetime
from keen.client import KeenClient
from website.app import init_app
from website.settings import KEEN as keen_settings
from scripts.analytics.addon_snapshot import get_events as addon_events
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
d... | Add other base script that will run addon and other snapshot scripts | Add other base script that will run addon and other snapshot scripts
| Python | apache-2.0 | chennan47/osf.io,acshi/osf.io,Nesiehr/osf.io,Johnetordoff/osf.io,felliott/osf.io,mattclark/osf.io,hmoco/osf.io,pattisdr/osf.io,CenterForOpenScience/osf.io,monikagrabowska/osf.io,acshi/osf.io,alexschiller/osf.io,mfraezz/osf.io,mluo613/osf.io,mfraezz/osf.io,erinspace/osf.io,mattclark/osf.io,chrisseto/osf.io,hmoco/osf.io,... | Add other base script that will run addon and other snapshot scripts | import logging
from datetime import datetime
from keen.client import KeenClient
from website.app import init_app
from website.settings import KEEN as keen_settings
from scripts.analytics.addon_snapshot import get_events as addon_events
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
d... | <commit_before><commit_msg>Add other base script that will run addon and other snapshot scripts<commit_after> | import logging
from datetime import datetime
from keen.client import KeenClient
from website.app import init_app
from website.settings import KEEN as keen_settings
from scripts.analytics.addon_snapshot import get_events as addon_events
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
d... | Add other base script that will run addon and other snapshot scriptsimport logging
from datetime import datetime
from keen.client import KeenClient
from website.app import init_app
from website.settings import KEEN as keen_settings
from scripts.analytics.addon_snapshot import get_events as addon_events
logger = logg... | <commit_before><commit_msg>Add other base script that will run addon and other snapshot scripts<commit_after>import logging
from datetime import datetime
from keen.client import KeenClient
from website.app import init_app
from website.settings import KEEN as keen_settings
from scripts.analytics.addon_snapshot import ... | |
c2ded8bea952162ba38e9378c5d3ddaace9bea20 | tests/test_toggle_livesync_command.py | tests/test_toggle_livesync_command.py | from unittest import TestCase
from unittest.mock import MagicMock, patch
from sys import modules
class TestLiveSync(TestCase):
@patch('nativescript-plugin.toggle_livesync_command.ToggleLiveSyncNsCommand.on_finished', side_effect=lambda succeded: None)
def test_toggle_livesync_command_when_project_is_none_shou... | Add tests for Toggle LiveSync command | Add tests for Toggle LiveSync command
| Python | apache-2.0 | Mitko-Kerezov/ns-sublime-plugin,Mitko-Kerezov/ns-sublime-plugin | Add tests for Toggle LiveSync command | from unittest import TestCase
from unittest.mock import MagicMock, patch
from sys import modules
class TestLiveSync(TestCase):
@patch('nativescript-plugin.toggle_livesync_command.ToggleLiveSyncNsCommand.on_finished', side_effect=lambda succeded: None)
def test_toggle_livesync_command_when_project_is_none_shou... | <commit_before><commit_msg>Add tests for Toggle LiveSync command<commit_after> | from unittest import TestCase
from unittest.mock import MagicMock, patch
from sys import modules
class TestLiveSync(TestCase):
@patch('nativescript-plugin.toggle_livesync_command.ToggleLiveSyncNsCommand.on_finished', side_effect=lambda succeded: None)
def test_toggle_livesync_command_when_project_is_none_shou... | Add tests for Toggle LiveSync commandfrom unittest import TestCase
from unittest.mock import MagicMock, patch
from sys import modules
class TestLiveSync(TestCase):
@patch('nativescript-plugin.toggle_livesync_command.ToggleLiveSyncNsCommand.on_finished', side_effect=lambda succeded: None)
def test_toggle_lives... | <commit_before><commit_msg>Add tests for Toggle LiveSync command<commit_after>from unittest import TestCase
from unittest.mock import MagicMock, patch
from sys import modules
class TestLiveSync(TestCase):
@patch('nativescript-plugin.toggle_livesync_command.ToggleLiveSyncNsCommand.on_finished', side_effect=lambda ... | |
f1fc7e4f2200863535ffbc3cb47b1b0f7375b943 | analysis/check_serum_strain_serum_id_match.py | analysis/check_serum_strain_serum_id_match.py | # Open downloaded titer table and check matches between serum_strain and serum_id
# There should only be a single serum_strain for each serum_id
# There can be multiple serum_ids for each serum_strain
import argparse
import csv
parser = argparse.ArgumentParser()
parser.add_argument('infile', default=None, type=str, h... | Include analysis script to test for broken serum_id / serum_strain matches | Include analysis script to test for broken serum_id / serum_strain matches
| Python | agpl-3.0 | nextstrain/fauna,blab/nextstrain-db,blab/nextstrain-db,nextstrain/fauna | Include analysis script to test for broken serum_id / serum_strain matches | # Open downloaded titer table and check matches between serum_strain and serum_id
# There should only be a single serum_strain for each serum_id
# There can be multiple serum_ids for each serum_strain
import argparse
import csv
parser = argparse.ArgumentParser()
parser.add_argument('infile', default=None, type=str, h... | <commit_before><commit_msg>Include analysis script to test for broken serum_id / serum_strain matches<commit_after> | # Open downloaded titer table and check matches between serum_strain and serum_id
# There should only be a single serum_strain for each serum_id
# There can be multiple serum_ids for each serum_strain
import argparse
import csv
parser = argparse.ArgumentParser()
parser.add_argument('infile', default=None, type=str, h... | Include analysis script to test for broken serum_id / serum_strain matches# Open downloaded titer table and check matches between serum_strain and serum_id
# There should only be a single serum_strain for each serum_id
# There can be multiple serum_ids for each serum_strain
import argparse
import csv
parser = argpars... | <commit_before><commit_msg>Include analysis script to test for broken serum_id / serum_strain matches<commit_after># Open downloaded titer table and check matches between serum_strain and serum_id
# There should only be a single serum_strain for each serum_id
# There can be multiple serum_ids for each serum_strain
imp... | |
3d7707d20c299358476cca01babf14c7cacddb50 | smaug/tests/fullstack/test_providers.py | smaug/tests/fullstack/test_providers.py | # 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, software
# distributed under t... | Add fullstack tests of the resource providers | Add fullstack tests of the resource providers
Change-Id: Ie4f769de3060fdb279320637ba965d5b452e2a2d
Closes-Bug: #1578889
| Python | apache-2.0 | openstack/smaug,openstack/smaug | Add fullstack tests of the resource providers
Change-Id: Ie4f769de3060fdb279320637ba965d5b452e2a2d
Closes-Bug: #1578889 | # 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, software
# distributed under t... | <commit_before><commit_msg>Add fullstack tests of the resource providers
Change-Id: Ie4f769de3060fdb279320637ba965d5b452e2a2d
Closes-Bug: #1578889<commit_after> | # 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, software
# distributed under t... | Add fullstack tests of the resource providers
Change-Id: Ie4f769de3060fdb279320637ba965d5b452e2a2d
Closes-Bug: #1578889# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | <commit_before><commit_msg>Add fullstack tests of the resource providers
Change-Id: Ie4f769de3060fdb279320637ba965d5b452e2a2d
Closes-Bug: #1578889<commit_after># 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... | |
522e71e1fd210994c6745aa012c6663f34d3a397 | randlov1998/analysis.py | randlov1998/analysis.py | """Functions for plotting results, etc.
"""
import numpy as np
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import pylab as pl
from scipy import r_
from pybrain.tools.customxml.networkreader import NetworkReader
from pybrain.utilities import one_to_n
def plot_nfq_action_value_history(netw... | Add file to visualize nfq network evolution. | Add file to visualize nfq network evolution.
| Python | mit | chrisdembia/agent-bicycle,chrisdembia/agent-bicycle | Add file to visualize nfq network evolution. | """Functions for plotting results, etc.
"""
import numpy as np
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import pylab as pl
from scipy import r_
from pybrain.tools.customxml.networkreader import NetworkReader
from pybrain.utilities import one_to_n
def plot_nfq_action_value_history(netw... | <commit_before><commit_msg>Add file to visualize nfq network evolution.<commit_after> | """Functions for plotting results, etc.
"""
import numpy as np
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import pylab as pl
from scipy import r_
from pybrain.tools.customxml.networkreader import NetworkReader
from pybrain.utilities import one_to_n
def plot_nfq_action_value_history(netw... | Add file to visualize nfq network evolution."""Functions for plotting results, etc.
"""
import numpy as np
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import pylab as pl
from scipy import r_
from pybrain.tools.customxml.networkreader import NetworkReader
from pybrain.utilities import one_t... | <commit_before><commit_msg>Add file to visualize nfq network evolution.<commit_after>"""Functions for plotting results, etc.
"""
import numpy as np
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import pylab as pl
from scipy import r_
from pybrain.tools.customxml.networkreader import NetworkR... | |
00fc7eff1f9c1d1ddcc61210c1a80f966e085d1f | course_discovery/apps/course_metadata/migrations/0191_add_microbachelors_program_type.py | course_discovery/apps/course_metadata/migrations/0191_add_microbachelors_program_type.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-07-26 18:14
from __future__ import unicode_literals
from django.db import migrations
SEAT_TYPES = ('audit', 'verified',)
PROGRAM_TYPES = ('MicroBachelors',)
def add_program_types(apps, schema_editor): # pylint: disable=unused-argument
SeatType = app... | Add MicroBachelors program_type Co-authored-by: Lise <albemarle> | MICROB-3: Add MicroBachelors program_type
Co-authored-by: Lise <albemarle>
| Python | agpl-3.0 | edx/course-discovery,edx/course-discovery,edx/course-discovery,edx/course-discovery | MICROB-3: Add MicroBachelors program_type
Co-authored-by: Lise <albemarle> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-07-26 18:14
from __future__ import unicode_literals
from django.db import migrations
SEAT_TYPES = ('audit', 'verified',)
PROGRAM_TYPES = ('MicroBachelors',)
def add_program_types(apps, schema_editor): # pylint: disable=unused-argument
SeatType = app... | <commit_before><commit_msg>MICROB-3: Add MicroBachelors program_type
Co-authored-by: Lise <albemarle><commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-07-26 18:14
from __future__ import unicode_literals
from django.db import migrations
SEAT_TYPES = ('audit', 'verified',)
PROGRAM_TYPES = ('MicroBachelors',)
def add_program_types(apps, schema_editor): # pylint: disable=unused-argument
SeatType = app... | MICROB-3: Add MicroBachelors program_type
Co-authored-by: Lise <albemarle># -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-07-26 18:14
from __future__ import unicode_literals
from django.db import migrations
SEAT_TYPES = ('audit', 'verified',)
PROGRAM_TYPES = ('MicroBachelors',)
def add_program_types(a... | <commit_before><commit_msg>MICROB-3: Add MicroBachelors program_type
Co-authored-by: Lise <albemarle><commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-07-26 18:14
from __future__ import unicode_literals
from django.db import migrations
SEAT_TYPES = ('audit', 'verified',)
PROGRAM_TYPES = ('Mi... | |
175114bb680fae35a1248e41e15a2e82a5cbdc3f | feed_sources/AlbanyNy.py | feed_sources/AlbanyNy.py | """Fetch Capital District Transportation Authority (Albany, New York) feed."""
import logging
from FeedSource import FeedSource
URL = 'http://www.cdta.org/schedules/google_transit.zip'
LOG = logging.getLogger(__name__)
class AlbanyNy(FeedSource):
"""Fetch CDTA feed."""
def __init__(self):
super(Alb... | Add CDTA (for Albany, NY) | Add CDTA (for Albany, NY)
| Python | mit | azavea/gtfs-feed-fetcher,flibbertigibbet/gtfs-feed-fetcher | Add CDTA (for Albany, NY) | """Fetch Capital District Transportation Authority (Albany, New York) feed."""
import logging
from FeedSource import FeedSource
URL = 'http://www.cdta.org/schedules/google_transit.zip'
LOG = logging.getLogger(__name__)
class AlbanyNy(FeedSource):
"""Fetch CDTA feed."""
def __init__(self):
super(Alb... | <commit_before><commit_msg>Add CDTA (for Albany, NY)<commit_after> | """Fetch Capital District Transportation Authority (Albany, New York) feed."""
import logging
from FeedSource import FeedSource
URL = 'http://www.cdta.org/schedules/google_transit.zip'
LOG = logging.getLogger(__name__)
class AlbanyNy(FeedSource):
"""Fetch CDTA feed."""
def __init__(self):
super(Alb... | Add CDTA (for Albany, NY)"""Fetch Capital District Transportation Authority (Albany, New York) feed."""
import logging
from FeedSource import FeedSource
URL = 'http://www.cdta.org/schedules/google_transit.zip'
LOG = logging.getLogger(__name__)
class AlbanyNy(FeedSource):
"""Fetch CDTA feed."""
def __init__... | <commit_before><commit_msg>Add CDTA (for Albany, NY)<commit_after>"""Fetch Capital District Transportation Authority (Albany, New York) feed."""
import logging
from FeedSource import FeedSource
URL = 'http://www.cdta.org/schedules/google_transit.zip'
LOG = logging.getLogger(__name__)
class AlbanyNy(FeedSource):
... | |
3ad4d95f0a886e5722717bd6b9b91a09dfcb9194 | src/dbus_python_client_gen/_gmoreaders.py | src/dbus_python_client_gen/_gmoreaders.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
Code for generating classes suitable for invoking dbus-python methods.
"""
from ._errors import DPClientGenerationE... | Add a method for generating GetManagedObjects() data wrappers | Add a method for generating GetManagedObjects() data wrappers
Signed-off-by: mulhern <[email protected]>
| Python | mpl-2.0 | mulkieran/dbus-python-client-gen | Add a method for generating GetManagedObjects() data wrappers
Signed-off-by: mulhern <[email protected]> | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
Code for generating classes suitable for invoking dbus-python methods.
"""
from ._errors import DPClientGenerationE... | <commit_before><commit_msg>Add a method for generating GetManagedObjects() data wrappers
Signed-off-by: mulhern <[email protected]><commit_after> | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""
Code for generating classes suitable for invoking dbus-python methods.
"""
from ._errors import DPClientGenerationE... | Add a method for generating GetManagedObjects() data wrappers
Signed-off-by: mulhern <[email protected]># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozi... | <commit_before><commit_msg>Add a method for generating GetManagedObjects() data wrappers
Signed-off-by: mulhern <[email protected]><commit_after># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
... | |
43c112c07c4a990b16276eebded2e33bf92ca174 | src/trajectory/lemniscate_trajectory.py | src/trajectory/lemniscate_trajectory.py | #!/usr/bin/env python
from math import sqrt, cos, pi, sin
from .trajectory import Trajectory
class LemniscateTrajectory(object, Trajectory):
def __init__(self, radius, period):
Trajectory.__init__(self)
self.radius = radius
self. period = period
def get_position_at(self, t):
... | Implement Lemniscate of Bernoulli trajectory | feat: Implement Lemniscate of Bernoulli trajectory
| Python | mit | bit0001/trajectory_tracking,bit0001/trajectory_tracking | feat: Implement Lemniscate of Bernoulli trajectory | #!/usr/bin/env python
from math import sqrt, cos, pi, sin
from .trajectory import Trajectory
class LemniscateTrajectory(object, Trajectory):
def __init__(self, radius, period):
Trajectory.__init__(self)
self.radius = radius
self. period = period
def get_position_at(self, t):
... | <commit_before><commit_msg>feat: Implement Lemniscate of Bernoulli trajectory<commit_after> | #!/usr/bin/env python
from math import sqrt, cos, pi, sin
from .trajectory import Trajectory
class LemniscateTrajectory(object, Trajectory):
def __init__(self, radius, period):
Trajectory.__init__(self)
self.radius = radius
self. period = period
def get_position_at(self, t):
... | feat: Implement Lemniscate of Bernoulli trajectory#!/usr/bin/env python
from math import sqrt, cos, pi, sin
from .trajectory import Trajectory
class LemniscateTrajectory(object, Trajectory):
def __init__(self, radius, period):
Trajectory.__init__(self)
self.radius = radius
self. period = ... | <commit_before><commit_msg>feat: Implement Lemniscate of Bernoulli trajectory<commit_after>#!/usr/bin/env python
from math import sqrt, cos, pi, sin
from .trajectory import Trajectory
class LemniscateTrajectory(object, Trajectory):
def __init__(self, radius, period):
Trajectory.__init__(self)
sel... | |
fca96bc38abdfbc075b4dd0e85d3cd48be30f9bc | CodeFights/circleOfNumbers.py | CodeFights/circleOfNumbers.py | #!/usr/local/bin/python
# Code Fights Circle of Numbers Problem
def circleOfNumbers(n, firstNumber):
pass
def main():
tests = [
["crazy", "dsbaz"],
["z", "a"]
]
for t in tests:
res = circleOfNumbers(t[0], t[1])
if t[2] == res:
print("PASSED: circleOfNumbe... | Set up Code Fights circle of numbers problem | Set up Code Fights circle of numbers problem
| Python | mit | HKuz/Test_Code | Set up Code Fights circle of numbers problem | #!/usr/local/bin/python
# Code Fights Circle of Numbers Problem
def circleOfNumbers(n, firstNumber):
pass
def main():
tests = [
["crazy", "dsbaz"],
["z", "a"]
]
for t in tests:
res = circleOfNumbers(t[0], t[1])
if t[2] == res:
print("PASSED: circleOfNumbe... | <commit_before><commit_msg>Set up Code Fights circle of numbers problem<commit_after> | #!/usr/local/bin/python
# Code Fights Circle of Numbers Problem
def circleOfNumbers(n, firstNumber):
pass
def main():
tests = [
["crazy", "dsbaz"],
["z", "a"]
]
for t in tests:
res = circleOfNumbers(t[0], t[1])
if t[2] == res:
print("PASSED: circleOfNumbe... | Set up Code Fights circle of numbers problem#!/usr/local/bin/python
# Code Fights Circle of Numbers Problem
def circleOfNumbers(n, firstNumber):
pass
def main():
tests = [
["crazy", "dsbaz"],
["z", "a"]
]
for t in tests:
res = circleOfNumbers(t[0], t[1])
if t[2] == r... | <commit_before><commit_msg>Set up Code Fights circle of numbers problem<commit_after>#!/usr/local/bin/python
# Code Fights Circle of Numbers Problem
def circleOfNumbers(n, firstNumber):
pass
def main():
tests = [
["crazy", "dsbaz"],
["z", "a"]
]
for t in tests:
res = circleO... | |
221f949958e3ec0a73a90f3db9a451b743797761 | tests/client/test_encryption_client.py | tests/client/test_encryption_client.py | from __future__ import unicode_literals
import os
import unittest
from qingstor.sdk.client.encryption_client import EncryptionClient
RIGHT_OUT_KWARGS = {
"content_type": "video",
"x_qs_encryption_customer_algorithm": "AES256",
"x_qs_encryption_customer_key":
"MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM... | Create test class for encryption client | Create test class for encryption client
| Python | apache-2.0 | yunify/qingstor-sdk-python | Create test class for encryption client | from __future__ import unicode_literals
import os
import unittest
from qingstor.sdk.client.encryption_client import EncryptionClient
RIGHT_OUT_KWARGS = {
"content_type": "video",
"x_qs_encryption_customer_algorithm": "AES256",
"x_qs_encryption_customer_key":
"MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM... | <commit_before><commit_msg>Create test class for encryption client<commit_after> | from __future__ import unicode_literals
import os
import unittest
from qingstor.sdk.client.encryption_client import EncryptionClient
RIGHT_OUT_KWARGS = {
"content_type": "video",
"x_qs_encryption_customer_algorithm": "AES256",
"x_qs_encryption_customer_key":
"MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM... | Create test class for encryption clientfrom __future__ import unicode_literals
import os
import unittest
from qingstor.sdk.client.encryption_client import EncryptionClient
RIGHT_OUT_KWARGS = {
"content_type": "video",
"x_qs_encryption_customer_algorithm": "AES256",
"x_qs_encryption_customer_key":
"MD... | <commit_before><commit_msg>Create test class for encryption client<commit_after>from __future__ import unicode_literals
import os
import unittest
from qingstor.sdk.client.encryption_client import EncryptionClient
RIGHT_OUT_KWARGS = {
"content_type": "video",
"x_qs_encryption_customer_algorithm": "AES256",
... | |
5012e2b28920ff96f8ed14911866818a0ba032fa | tests/test_dft.py | tests/test_dft.py | import unittest
import numpy as np
from pyquante2.dft.functionals import xs,cvwn
from pyquante2.dft.reference import data
class test_dft(unittest.TestCase):
def test_xs(self):
na = data['xs'][:,0]
nb = data['xs'][:,1]
fa,dfa = xs(na)
fb,dfb = xs(nb)
max_f = np.max(fa+fb-data... | Test suite for lda functionals | Test suite for lda functionals
| Python | bsd-3-clause | Konjkov/pyquante2,Konjkov/pyquante2,Konjkov/pyquante2 | Test suite for lda functionals | import unittest
import numpy as np
from pyquante2.dft.functionals import xs,cvwn
from pyquante2.dft.reference import data
class test_dft(unittest.TestCase):
def test_xs(self):
na = data['xs'][:,0]
nb = data['xs'][:,1]
fa,dfa = xs(na)
fb,dfb = xs(nb)
max_f = np.max(fa+fb-data... | <commit_before><commit_msg>Test suite for lda functionals<commit_after> | import unittest
import numpy as np
from pyquante2.dft.functionals import xs,cvwn
from pyquante2.dft.reference import data
class test_dft(unittest.TestCase):
def test_xs(self):
na = data['xs'][:,0]
nb = data['xs'][:,1]
fa,dfa = xs(na)
fb,dfb = xs(nb)
max_f = np.max(fa+fb-data... | Test suite for lda functionalsimport unittest
import numpy as np
from pyquante2.dft.functionals import xs,cvwn
from pyquante2.dft.reference import data
class test_dft(unittest.TestCase):
def test_xs(self):
na = data['xs'][:,0]
nb = data['xs'][:,1]
fa,dfa = xs(na)
fb,dfb = xs(nb)
... | <commit_before><commit_msg>Test suite for lda functionals<commit_after>import unittest
import numpy as np
from pyquante2.dft.functionals import xs,cvwn
from pyquante2.dft.reference import data
class test_dft(unittest.TestCase):
def test_xs(self):
na = data['xs'][:,0]
nb = data['xs'][:,1]
fa... | |
98877b442080c1a653192da71e6c582a67643e97 | tools/data/box_proto_from_proposals.py | tools/data/box_proto_from_proposals.py | #!/usr/bin/env python
import os, sys
import pdb
import argparse
import scipy.io as sio
import h5py
sys.path.insert(1, '.')
from vdetlib.utils.protocol import proto_dump, path_to_index, proto_load
def save_if_not_exist(proto, path):
if not os.path.isfile(path):
proto_dump(box_proto, path)
if __name__ == '... | Add script to generate box proto files from proposal mat files. | Add script to generate box proto files from proposal mat files.
| Python | mit | myfavouritekk/TPN | Add script to generate box proto files from proposal mat files. | #!/usr/bin/env python
import os, sys
import pdb
import argparse
import scipy.io as sio
import h5py
sys.path.insert(1, '.')
from vdetlib.utils.protocol import proto_dump, path_to_index, proto_load
def save_if_not_exist(proto, path):
if not os.path.isfile(path):
proto_dump(box_proto, path)
if __name__ == '... | <commit_before><commit_msg>Add script to generate box proto files from proposal mat files.<commit_after> | #!/usr/bin/env python
import os, sys
import pdb
import argparse
import scipy.io as sio
import h5py
sys.path.insert(1, '.')
from vdetlib.utils.protocol import proto_dump, path_to_index, proto_load
def save_if_not_exist(proto, path):
if not os.path.isfile(path):
proto_dump(box_proto, path)
if __name__ == '... | Add script to generate box proto files from proposal mat files.#!/usr/bin/env python
import os, sys
import pdb
import argparse
import scipy.io as sio
import h5py
sys.path.insert(1, '.')
from vdetlib.utils.protocol import proto_dump, path_to_index, proto_load
def save_if_not_exist(proto, path):
if not os.path.isfi... | <commit_before><commit_msg>Add script to generate box proto files from proposal mat files.<commit_after>#!/usr/bin/env python
import os, sys
import pdb
import argparse
import scipy.io as sio
import h5py
sys.path.insert(1, '.')
from vdetlib.utils.protocol import proto_dump, path_to_index, proto_load
def save_if_not_ex... | |
ebb07da268eb57d1b8145eb2f7312b412c817217 | tests/unit/asyncio/test_asyncio_repr.py | tests/unit/asyncio/test_asyncio_repr.py | from butter.asyncio.eventfd import Eventfd_async
from butter.asyncio.fanotify import Fanotify_async
from butter.asyncio.inotify import Inotify_async
from butter.asyncio.signalfd import Signalfd_async
from butter.asyncio.timerfd import Timerfd_async
from collections import namedtuple
import pytest
import sys
class Mock... | Test async objects for __repr__ as well | Test async objects for __repr__ as well
| Python | bsd-3-clause | dasSOZO/python-butter,wdv4758h/butter | Test async objects for __repr__ as well | from butter.asyncio.eventfd import Eventfd_async
from butter.asyncio.fanotify import Fanotify_async
from butter.asyncio.inotify import Inotify_async
from butter.asyncio.signalfd import Signalfd_async
from butter.asyncio.timerfd import Timerfd_async
from collections import namedtuple
import pytest
import sys
class Mock... | <commit_before><commit_msg>Test async objects for __repr__ as well<commit_after> | from butter.asyncio.eventfd import Eventfd_async
from butter.asyncio.fanotify import Fanotify_async
from butter.asyncio.inotify import Inotify_async
from butter.asyncio.signalfd import Signalfd_async
from butter.asyncio.timerfd import Timerfd_async
from collections import namedtuple
import pytest
import sys
class Mock... | Test async objects for __repr__ as wellfrom butter.asyncio.eventfd import Eventfd_async
from butter.asyncio.fanotify import Fanotify_async
from butter.asyncio.inotify import Inotify_async
from butter.asyncio.signalfd import Signalfd_async
from butter.asyncio.timerfd import Timerfd_async
from collections import namedtup... | <commit_before><commit_msg>Test async objects for __repr__ as well<commit_after>from butter.asyncio.eventfd import Eventfd_async
from butter.asyncio.fanotify import Fanotify_async
from butter.asyncio.inotify import Inotify_async
from butter.asyncio.signalfd import Signalfd_async
from butter.asyncio.timerfd import Timer... | |
70cad3e6f9b2ceac0ab7082843e6902e1934afe0 | tohu/v5/extras.py | tohu/v5/extras.py | from .base import TohuBaseGenerator
from .primitive_generators import Constant
__all__ = ['as_tohu_generator']
def as_tohu_generator(g):
"""
If g is a tohu generator return it unchanged,
otherwise wrap it in a Constant generator.
"""
if isinstance(g, TohuBaseGenerator):
return g
else... | Add helper function to ensure an input value is a tohu generator | Add helper function to ensure an input value is a tohu generator
| Python | mit | maxalbert/tohu | Add helper function to ensure an input value is a tohu generator | from .base import TohuBaseGenerator
from .primitive_generators import Constant
__all__ = ['as_tohu_generator']
def as_tohu_generator(g):
"""
If g is a tohu generator return it unchanged,
otherwise wrap it in a Constant generator.
"""
if isinstance(g, TohuBaseGenerator):
return g
else... | <commit_before><commit_msg>Add helper function to ensure an input value is a tohu generator<commit_after> | from .base import TohuBaseGenerator
from .primitive_generators import Constant
__all__ = ['as_tohu_generator']
def as_tohu_generator(g):
"""
If g is a tohu generator return it unchanged,
otherwise wrap it in a Constant generator.
"""
if isinstance(g, TohuBaseGenerator):
return g
else... | Add helper function to ensure an input value is a tohu generatorfrom .base import TohuBaseGenerator
from .primitive_generators import Constant
__all__ = ['as_tohu_generator']
def as_tohu_generator(g):
"""
If g is a tohu generator return it unchanged,
otherwise wrap it in a Constant generator.
"""
... | <commit_before><commit_msg>Add helper function to ensure an input value is a tohu generator<commit_after>from .base import TohuBaseGenerator
from .primitive_generators import Constant
__all__ = ['as_tohu_generator']
def as_tohu_generator(g):
"""
If g is a tohu generator return it unchanged,
otherwise wra... | |
2e2c5d394e57837386d17d24e219cadbd625aa09 | nbs/utils.py | nbs/utils.py | # -*- coding: utf-8 -*-
from werkzeug.routing import BaseConverter
class ListConverter(BaseConverter):
_subtypes = {
'int': int,
'str': str,
'u': unicode,
}
def __init__(self, url_map, subtype=None, mutable=False):
super(ListConverter, self).__init__(url_map)
sel... | Add ListConverter to url parser | Add ListConverter to url parser
| Python | mit | coyotevz/nobix-app | Add ListConverter to url parser | # -*- coding: utf-8 -*-
from werkzeug.routing import BaseConverter
class ListConverter(BaseConverter):
_subtypes = {
'int': int,
'str': str,
'u': unicode,
}
def __init__(self, url_map, subtype=None, mutable=False):
super(ListConverter, self).__init__(url_map)
sel... | <commit_before><commit_msg>Add ListConverter to url parser<commit_after> | # -*- coding: utf-8 -*-
from werkzeug.routing import BaseConverter
class ListConverter(BaseConverter):
_subtypes = {
'int': int,
'str': str,
'u': unicode,
}
def __init__(self, url_map, subtype=None, mutable=False):
super(ListConverter, self).__init__(url_map)
sel... | Add ListConverter to url parser# -*- coding: utf-8 -*-
from werkzeug.routing import BaseConverter
class ListConverter(BaseConverter):
_subtypes = {
'int': int,
'str': str,
'u': unicode,
}
def __init__(self, url_map, subtype=None, mutable=False):
super(ListConverter, self... | <commit_before><commit_msg>Add ListConverter to url parser<commit_after># -*- coding: utf-8 -*-
from werkzeug.routing import BaseConverter
class ListConverter(BaseConverter):
_subtypes = {
'int': int,
'str': str,
'u': unicode,
}
def __init__(self, url_map, subtype=None, mutable=... | |
ee2a83e26fc1319e97fe02109bc28a7b061e7a2a | tests/test_gen_sql.py | tests/test_gen_sql.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class TestGenSql:
def test_gen_drop_statement(self):
pass
def test_create_statement(self):
pass
| Add tests placeholder for pg_bawler.gen_sql | Add tests placeholder for pg_bawler.gen_sql
| Python | bsd-3-clause | beezz/pg_bawler,beezz/pg_bawler | Add tests placeholder for pg_bawler.gen_sql | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class TestGenSql:
def test_gen_drop_statement(self):
pass
def test_create_statement(self):
pass
| <commit_before><commit_msg>Add tests placeholder for pg_bawler.gen_sql<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class TestGenSql:
def test_gen_drop_statement(self):
pass
def test_create_statement(self):
pass
| Add tests placeholder for pg_bawler.gen_sql#!/usr/bin/env python
# -*- coding: utf-8 -*-
class TestGenSql:
def test_gen_drop_statement(self):
pass
def test_create_statement(self):
pass
| <commit_before><commit_msg>Add tests placeholder for pg_bawler.gen_sql<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
class TestGenSql:
def test_gen_drop_statement(self):
pass
def test_create_statement(self):
pass
| |
4da185d2902c9a83db1c7022f2e9c65b39957384 | aerodynamics_2d.py | aerodynamics_2d.py | """
This module enables XLFR5 data to numpy.array.
"""
import numpy as np
# import matplotlib.pyplot as plt
def read_xflr5_data(wing_foil_name):
reynolds_numbers = np.arange(0, 1.01, 0.1)
headers = ["alpha", "CL", "CD", "CDp", "Cm", "Top Xtr", "Bot Xtr", "Cpmin", "Chinge", "XCp"]
tmpdict = {i: [] for i i... | Add 2D wing foil reader | Add 2D wing foil reader
| Python | mit | salamann/fpadesigner | Add 2D wing foil reader | """
This module enables XLFR5 data to numpy.array.
"""
import numpy as np
# import matplotlib.pyplot as plt
def read_xflr5_data(wing_foil_name):
reynolds_numbers = np.arange(0, 1.01, 0.1)
headers = ["alpha", "CL", "CD", "CDp", "Cm", "Top Xtr", "Bot Xtr", "Cpmin", "Chinge", "XCp"]
tmpdict = {i: [] for i i... | <commit_before><commit_msg>Add 2D wing foil reader<commit_after> | """
This module enables XLFR5 data to numpy.array.
"""
import numpy as np
# import matplotlib.pyplot as plt
def read_xflr5_data(wing_foil_name):
reynolds_numbers = np.arange(0, 1.01, 0.1)
headers = ["alpha", "CL", "CD", "CDp", "Cm", "Top Xtr", "Bot Xtr", "Cpmin", "Chinge", "XCp"]
tmpdict = {i: [] for i i... | Add 2D wing foil reader"""
This module enables XLFR5 data to numpy.array.
"""
import numpy as np
# import matplotlib.pyplot as plt
def read_xflr5_data(wing_foil_name):
reynolds_numbers = np.arange(0, 1.01, 0.1)
headers = ["alpha", "CL", "CD", "CDp", "Cm", "Top Xtr", "Bot Xtr", "Cpmin", "Chinge", "XCp"]
t... | <commit_before><commit_msg>Add 2D wing foil reader<commit_after>"""
This module enables XLFR5 data to numpy.array.
"""
import numpy as np
# import matplotlib.pyplot as plt
def read_xflr5_data(wing_foil_name):
reynolds_numbers = np.arange(0, 1.01, 0.1)
headers = ["alpha", "CL", "CD", "CDp", "Cm", "Top Xtr", "... | |
b0360709bd80df9756a41089ac0c6a4eb19109df | glance/db/sqlalchemy/migrate_repo/versions/018_add_image_locations_table.py | glance/db/sqlalchemy/migrate_repo/versions/018_add_image_locations_table.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | Add migration 18 - create the image_locations table | Add migration 18 - create the image_locations table
This migration simply creates the new image_locations table. It does
not yet use the table for anything.
Related to bp multiple-image-locations
Change-Id: I1536c9276bc807aac26849e37556b465e8b5c9eb
| Python | apache-2.0 | rajalokan/glance,rickerc/glance_audit,ntt-sic/glance,kfwang/Glance-OVA-OVF,sigmavirus24/glance,wkoathp/glance,JioCloud/glance,vuntz/glance,citrix-openstack-build/glance,takeshineshiro/glance,cloudbau/glance,redhat-openstack/glance,tanglei528/glance,ntt-sic/glance,stevelle/glance,saeki-masaki/glance,dims/glance,saeki-ma... | Add migration 18 - create the image_locations table
This migration simply creates the new image_locations table. It does
not yet use the table for anything.
Related to bp multiple-image-locations
Change-Id: I1536c9276bc807aac26849e37556b465e8b5c9eb | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | <commit_before><commit_msg>Add migration 18 - create the image_locations table
This migration simply creates the new image_locations table. It does
not yet use the table for anything.
Related to bp multiple-image-locations
Change-Id: I1536c9276bc807aac26849e37556b465e8b5c9eb<commit_after> | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | Add migration 18 - create the image_locations table
This migration simply creates the new image_locations table. It does
not yet use the table for anything.
Related to bp multiple-image-locations
Change-Id: I1536c9276bc807aac26849e37556b465e8b5c9eb# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenSta... | <commit_before><commit_msg>Add migration 18 - create the image_locations table
This migration simply creates the new image_locations table. It does
not yet use the table for anything.
Related to bp multiple-image-locations
Change-Id: I1536c9276bc807aac26849e37556b465e8b5c9eb<commit_after># vim: tabstop=4 shiftwidth=... | |
8e773cb6df43c697e0d088813cf143fff9453624 | pyQuantuccia/tests/test_quantuccia.py | pyQuantuccia/tests/test_quantuccia.py | import pytest
from pyQuantuccia import quantuccia
def test_function_fails_correctly_on_bad_input():
"""
If we send in something which isn't three
appropriate ints, something reasonable should
happen.
"""
with pytest.raises(Exception):
quantuccia.united_kingdom_is_business_day(1, 2, 3... | Add a test which directly calls the c function. | Add a test which directly calls the c function.
| Python | bsd-3-clause | jwg4/pyQuantuccia,jwg4/pyQuantuccia | Add a test which directly calls the c function. | import pytest
from pyQuantuccia import quantuccia
def test_function_fails_correctly_on_bad_input():
"""
If we send in something which isn't three
appropriate ints, something reasonable should
happen.
"""
with pytest.raises(Exception):
quantuccia.united_kingdom_is_business_day(1, 2, 3... | <commit_before><commit_msg>Add a test which directly calls the c function.<commit_after> | import pytest
from pyQuantuccia import quantuccia
def test_function_fails_correctly_on_bad_input():
"""
If we send in something which isn't three
appropriate ints, something reasonable should
happen.
"""
with pytest.raises(Exception):
quantuccia.united_kingdom_is_business_day(1, 2, 3... | Add a test which directly calls the c function.import pytest
from pyQuantuccia import quantuccia
def test_function_fails_correctly_on_bad_input():
"""
If we send in something which isn't three
appropriate ints, something reasonable should
happen.
"""
with pytest.raises(Exception):
qu... | <commit_before><commit_msg>Add a test which directly calls the c function.<commit_after>import pytest
from pyQuantuccia import quantuccia
def test_function_fails_correctly_on_bad_input():
"""
If we send in something which isn't three
appropriate ints, something reasonable should
happen.
"""
... | |
84ffbc997ae289eba1c8cb0666f05c54c37e5704 | dmrx_most_heard_n0gsg.py | dmrx_most_heard_n0gsg.py | #!/usr/bin/env python2
import csv
# dmrx.net uses SSL SNI, which urllib2 doesn't support
import requests
from dmr_marc_users_cs750 import get_groups
MOST_HEARD_URL = 'https://dmrx.net/csvfiles/MostHeard.csv'
# Neither of these formats uses a header row
COLUMNS_N0GSG = ('Call ID', 'Call Alias', 'Call Type', 'Receive... | Add support for N0GSG csv and DMRX MostHeard.csv | Add support for N0GSG csv and DMRX MostHeard.csv
| Python | apache-2.0 | ajorg/DMR_contacts | Add support for N0GSG csv and DMRX MostHeard.csv | #!/usr/bin/env python2
import csv
# dmrx.net uses SSL SNI, which urllib2 doesn't support
import requests
from dmr_marc_users_cs750 import get_groups
MOST_HEARD_URL = 'https://dmrx.net/csvfiles/MostHeard.csv'
# Neither of these formats uses a header row
COLUMNS_N0GSG = ('Call ID', 'Call Alias', 'Call Type', 'Receive... | <commit_before><commit_msg>Add support for N0GSG csv and DMRX MostHeard.csv<commit_after> | #!/usr/bin/env python2
import csv
# dmrx.net uses SSL SNI, which urllib2 doesn't support
import requests
from dmr_marc_users_cs750 import get_groups
MOST_HEARD_URL = 'https://dmrx.net/csvfiles/MostHeard.csv'
# Neither of these formats uses a header row
COLUMNS_N0GSG = ('Call ID', 'Call Alias', 'Call Type', 'Receive... | Add support for N0GSG csv and DMRX MostHeard.csv#!/usr/bin/env python2
import csv
# dmrx.net uses SSL SNI, which urllib2 doesn't support
import requests
from dmr_marc_users_cs750 import get_groups
MOST_HEARD_URL = 'https://dmrx.net/csvfiles/MostHeard.csv'
# Neither of these formats uses a header row
COLUMNS_N0GSG =... | <commit_before><commit_msg>Add support for N0GSG csv and DMRX MostHeard.csv<commit_after>#!/usr/bin/env python2
import csv
# dmrx.net uses SSL SNI, which urllib2 doesn't support
import requests
from dmr_marc_users_cs750 import get_groups
MOST_HEARD_URL = 'https://dmrx.net/csvfiles/MostHeard.csv'
# Neither of these ... | |
a684564eace2185b40acf3413c8f75587195ff46 | unitary/examples/tictactoe/ascii_board.py | unitary/examples/tictactoe/ascii_board.py | # Copyright 2022 Google
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | Add ASCII board for Quantum TicTacToe board | Add ASCII board for Quantum TicTacToe board
- Add preliminary ASCII board for Quantum TicTacToe
- Displays probability for blank (.) and X and O.
| Python | apache-2.0 | quantumlib/unitary,quantumlib/unitary | Add ASCII board for Quantum TicTacToe board
- Add preliminary ASCII board for Quantum TicTacToe
- Displays probability for blank (.) and X and O. | # Copyright 2022 Google
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | <commit_before><commit_msg>Add ASCII board for Quantum TicTacToe board
- Add preliminary ASCII board for Quantum TicTacToe
- Displays probability for blank (.) and X and O.<commit_after> | # Copyright 2022 Google
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | Add ASCII board for Quantum TicTacToe board
- Add preliminary ASCII board for Quantum TicTacToe
- Displays probability for blank (.) and X and O.# Copyright 2022 Google
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtai... | <commit_before><commit_msg>Add ASCII board for Quantum TicTacToe board
- Add preliminary ASCII board for Quantum TicTacToe
- Displays probability for blank (.) and X and O.<commit_after># Copyright 2022 Google
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in com... | |
a176d05ec1481ab3892b4d4768e6bad1fdbd4868 | tools/update_whatsnew.py | tools/update_whatsnew.py | """Update the What's New doc (development version)
This collects the snippets from whatsnew/pr/, moves their content into
whatsnew/development.rst (chronologically ordered), and deletes the snippets.
"""
import io
import os
from os.path import dirname, basename, abspath, join as pjoin
from subprocess import check_cal... | Add script to update whatsnew file from PR snippets | Add script to update whatsnew file from PR snippets
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | Add script to update whatsnew file from PR snippets | """Update the What's New doc (development version)
This collects the snippets from whatsnew/pr/, moves their content into
whatsnew/development.rst (chronologically ordered), and deletes the snippets.
"""
import io
import os
from os.path import dirname, basename, abspath, join as pjoin
from subprocess import check_cal... | <commit_before><commit_msg>Add script to update whatsnew file from PR snippets<commit_after> | """Update the What's New doc (development version)
This collects the snippets from whatsnew/pr/, moves their content into
whatsnew/development.rst (chronologically ordered), and deletes the snippets.
"""
import io
import os
from os.path import dirname, basename, abspath, join as pjoin
from subprocess import check_cal... | Add script to update whatsnew file from PR snippets"""Update the What's New doc (development version)
This collects the snippets from whatsnew/pr/, moves their content into
whatsnew/development.rst (chronologically ordered), and deletes the snippets.
"""
import io
import os
from os.path import dirname, basename, absp... | <commit_before><commit_msg>Add script to update whatsnew file from PR snippets<commit_after>"""Update the What's New doc (development version)
This collects the snippets from whatsnew/pr/, moves their content into
whatsnew/development.rst (chronologically ordered), and deletes the snippets.
"""
import io
import os
fr... | |
ad301e03c4c1109b7caf3371fe64f638dfc1349b | NeedForCryptography/Tools/discretelog.py | NeedForCryptography/Tools/discretelog.py | def log(base, value, modulo):
for power in range(0, modulo + 1):
if value == base ** power % modulo:
return power
raise ValueError('log{}({}) does not have discrete logarithm in {}'
.format(base, value, modulo))
| Add brute-force algorithm for discrete logarithm. | Add brute-force algorithm for discrete logarithm.
| Python | mit | Veselin-Genadiev/NeedForCryptography | Add brute-force algorithm for discrete logarithm. | def log(base, value, modulo):
for power in range(0, modulo + 1):
if value == base ** power % modulo:
return power
raise ValueError('log{}({}) does not have discrete logarithm in {}'
.format(base, value, modulo))
| <commit_before><commit_msg>Add brute-force algorithm for discrete logarithm.<commit_after> | def log(base, value, modulo):
for power in range(0, modulo + 1):
if value == base ** power % modulo:
return power
raise ValueError('log{}({}) does not have discrete logarithm in {}'
.format(base, value, modulo))
| Add brute-force algorithm for discrete logarithm.def log(base, value, modulo):
for power in range(0, modulo + 1):
if value == base ** power % modulo:
return power
raise ValueError('log{}({}) does not have discrete logarithm in {}'
.format(base, value, modulo))
| <commit_before><commit_msg>Add brute-force algorithm for discrete logarithm.<commit_after>def log(base, value, modulo):
for power in range(0, modulo + 1):
if value == base ** power % modulo:
return power
raise ValueError('log{}({}) does not have discrete logarithm in {}'
... | |
7b1dfeab79040e03aa7a9e247028d5da4e37cf4f | examples/test_cycle_elements.py | examples/test_cycle_elements.py | from seleniumbase import BaseCase
class CycleTests(BaseCase):
def test_cycle_elements_with_tab_and_press_enter(self):
""" Test pressing the tab key to cycle through elements.
Then click on the active element and verify actions.
This can all be performed by using a single com... | Add test that tabs through and clicks the active element | Add test that tabs through and clicks the active element
| Python | mit | seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase | Add test that tabs through and clicks the active element | from seleniumbase import BaseCase
class CycleTests(BaseCase):
def test_cycle_elements_with_tab_and_press_enter(self):
""" Test pressing the tab key to cycle through elements.
Then click on the active element and verify actions.
This can all be performed by using a single com... | <commit_before><commit_msg>Add test that tabs through and clicks the active element<commit_after> | from seleniumbase import BaseCase
class CycleTests(BaseCase):
def test_cycle_elements_with_tab_and_press_enter(self):
""" Test pressing the tab key to cycle through elements.
Then click on the active element and verify actions.
This can all be performed by using a single com... | Add test that tabs through and clicks the active elementfrom seleniumbase import BaseCase
class CycleTests(BaseCase):
def test_cycle_elements_with_tab_and_press_enter(self):
""" Test pressing the tab key to cycle through elements.
Then click on the active element and verify actions.
... | <commit_before><commit_msg>Add test that tabs through and clicks the active element<commit_after>from seleniumbase import BaseCase
class CycleTests(BaseCase):
def test_cycle_elements_with_tab_and_press_enter(self):
""" Test pressing the tab key to cycle through elements.
Then click on th... | |
f3a4a21b7e8c4b9d2c1983aec77c91f5193146a2 | exp/recommendexp/SparsityExp.py | exp/recommendexp/SparsityExp.py |
#Test if we can easily get the SVD of a set of matrices with low rank but under
#a fixed structure
import numpy
import scipy.sparse
from exp.util.SparseUtils import SparseUtils
numpy.set_printoptions(suppress=True, precision=3, linewidth=150)
shape = (15, 20)
r = 10
k = 50
X, U, s, V = SparseUtils.generateSpar... | Test SVD of sparse matrix | Test SVD of sparse matrix | Python | bsd-3-clause | charanpald/APGL | Test SVD of sparse matrix |
#Test if we can easily get the SVD of a set of matrices with low rank but under
#a fixed structure
import numpy
import scipy.sparse
from exp.util.SparseUtils import SparseUtils
numpy.set_printoptions(suppress=True, precision=3, linewidth=150)
shape = (15, 20)
r = 10
k = 50
X, U, s, V = SparseUtils.generateSpar... | <commit_before><commit_msg>Test SVD of sparse matrix <commit_after> |
#Test if we can easily get the SVD of a set of matrices with low rank but under
#a fixed structure
import numpy
import scipy.sparse
from exp.util.SparseUtils import SparseUtils
numpy.set_printoptions(suppress=True, precision=3, linewidth=150)
shape = (15, 20)
r = 10
k = 50
X, U, s, V = SparseUtils.generateSpar... | Test SVD of sparse matrix
#Test if we can easily get the SVD of a set of matrices with low rank but under
#a fixed structure
import numpy
import scipy.sparse
from exp.util.SparseUtils import SparseUtils
numpy.set_printoptions(suppress=True, precision=3, linewidth=150)
shape = (15, 20)
r = 10
k = 50
X, U, s, V ... | <commit_before><commit_msg>Test SVD of sparse matrix <commit_after>
#Test if we can easily get the SVD of a set of matrices with low rank but under
#a fixed structure
import numpy
import scipy.sparse
from exp.util.SparseUtils import SparseUtils
numpy.set_printoptions(suppress=True, precision=3, linewidth=150)
s... | |
76aa34e0bad66e8bf0e4864b4654acbc57101441 | elpiwear/ads1015_demo.py | elpiwear/ads1015_demo.py | #Demo code for the Adafruit ADS1015 board using the Raspberry Pi
#The driver can also be used with the Ready pin using a GPIO to
#be used in an interrupt mode.
import Rpi.spi as SPI
import ads1015
DEVICE_ADDRESS = 0x48
SPI_PORT = 1
spi = SPI.spi(SPI_PORT,DEVICE_ADDRESS)
adc = ads1015.ads1015(spi)
adc.setchannel(0, T... | Add a simple demo code to use the ADS1015 driver | Add a simple demo code to use the ADS1015 driver
| Python | mit | fjacob21/pycon2015 | Add a simple demo code to use the ADS1015 driver | #Demo code for the Adafruit ADS1015 board using the Raspberry Pi
#The driver can also be used with the Ready pin using a GPIO to
#be used in an interrupt mode.
import Rpi.spi as SPI
import ads1015
DEVICE_ADDRESS = 0x48
SPI_PORT = 1
spi = SPI.spi(SPI_PORT,DEVICE_ADDRESS)
adc = ads1015.ads1015(spi)
adc.setchannel(0, T... | <commit_before><commit_msg>Add a simple demo code to use the ADS1015 driver<commit_after> | #Demo code for the Adafruit ADS1015 board using the Raspberry Pi
#The driver can also be used with the Ready pin using a GPIO to
#be used in an interrupt mode.
import Rpi.spi as SPI
import ads1015
DEVICE_ADDRESS = 0x48
SPI_PORT = 1
spi = SPI.spi(SPI_PORT,DEVICE_ADDRESS)
adc = ads1015.ads1015(spi)
adc.setchannel(0, T... | Add a simple demo code to use the ADS1015 driver#Demo code for the Adafruit ADS1015 board using the Raspberry Pi
#The driver can also be used with the Ready pin using a GPIO to
#be used in an interrupt mode.
import Rpi.spi as SPI
import ads1015
DEVICE_ADDRESS = 0x48
SPI_PORT = 1
spi = SPI.spi(SPI_PORT,DEVICE_ADDRESS... | <commit_before><commit_msg>Add a simple demo code to use the ADS1015 driver<commit_after>#Demo code for the Adafruit ADS1015 board using the Raspberry Pi
#The driver can also be used with the Ready pin using a GPIO to
#be used in an interrupt mode.
import Rpi.spi as SPI
import ads1015
DEVICE_ADDRESS = 0x48
SPI_PORT =... | |
5f1d0836ca81b5d043de09c9dd6d76d797a3dcd6 | dev/templates/python/python_unittest.py | dev/templates/python/python_unittest.py | #!/usr/bin/env python
# encoding: utf-8
"""
${TM_NEW_FILE_BASENAME}.py
Created by ${TM_FULLNAME} on ${TM_DATE}.
Copyright (c) ${TM_YEAR} ${TM_ORGANIZATION_NAME}. All rights reserved.
"""
import unittest
class ${TM_NEW_FILE_BASENAME}(unittest.TestCase):
def setUp(self):
pass
if __name__ == '__main__':
unittest... | Add python unittest template from TextMate | Add python unittest template from TextMate
| Python | isc | rcuza/init,rcuza/init | Add python unittest template from TextMate | #!/usr/bin/env python
# encoding: utf-8
"""
${TM_NEW_FILE_BASENAME}.py
Created by ${TM_FULLNAME} on ${TM_DATE}.
Copyright (c) ${TM_YEAR} ${TM_ORGANIZATION_NAME}. All rights reserved.
"""
import unittest
class ${TM_NEW_FILE_BASENAME}(unittest.TestCase):
def setUp(self):
pass
if __name__ == '__main__':
unittest... | <commit_before><commit_msg>Add python unittest template from TextMate<commit_after> | #!/usr/bin/env python
# encoding: utf-8
"""
${TM_NEW_FILE_BASENAME}.py
Created by ${TM_FULLNAME} on ${TM_DATE}.
Copyright (c) ${TM_YEAR} ${TM_ORGANIZATION_NAME}. All rights reserved.
"""
import unittest
class ${TM_NEW_FILE_BASENAME}(unittest.TestCase):
def setUp(self):
pass
if __name__ == '__main__':
unittest... | Add python unittest template from TextMate#!/usr/bin/env python
# encoding: utf-8
"""
${TM_NEW_FILE_BASENAME}.py
Created by ${TM_FULLNAME} on ${TM_DATE}.
Copyright (c) ${TM_YEAR} ${TM_ORGANIZATION_NAME}. All rights reserved.
"""
import unittest
class ${TM_NEW_FILE_BASENAME}(unittest.TestCase):
def setUp(self):
p... | <commit_before><commit_msg>Add python unittest template from TextMate<commit_after>#!/usr/bin/env python
# encoding: utf-8
"""
${TM_NEW_FILE_BASENAME}.py
Created by ${TM_FULLNAME} on ${TM_DATE}.
Copyright (c) ${TM_YEAR} ${TM_ORGANIZATION_NAME}. All rights reserved.
"""
import unittest
class ${TM_NEW_FILE_BASENAME}(... | |
0fb1c8ff1a7bba91d27303b7abfc37f460c97c86 | scripts/print_schema.py | scripts/print_schema.py | #!/usr/bin/env python3
import argparse
from sqlalchemy import MetaData
from sqlalchemy_schemadisplay import create_schema_graph
def plot_schema(fn):
graph = create_schema_graph(
metadata=MetaData('sqlite:///'+fn),
show_datatypes=False,
show_indexes=False,
rankdir='LR',
con... | Add script from printing the DB schema | Add script from printing the DB schema
| Python | bsd-3-clause | chrisburr/lhcb-talky,chrisburr/lhcb-talky | Add script from printing the DB schema | #!/usr/bin/env python3
import argparse
from sqlalchemy import MetaData
from sqlalchemy_schemadisplay import create_schema_graph
def plot_schema(fn):
graph = create_schema_graph(
metadata=MetaData('sqlite:///'+fn),
show_datatypes=False,
show_indexes=False,
rankdir='LR',
con... | <commit_before><commit_msg>Add script from printing the DB schema<commit_after> | #!/usr/bin/env python3
import argparse
from sqlalchemy import MetaData
from sqlalchemy_schemadisplay import create_schema_graph
def plot_schema(fn):
graph = create_schema_graph(
metadata=MetaData('sqlite:///'+fn),
show_datatypes=False,
show_indexes=False,
rankdir='LR',
con... | Add script from printing the DB schema#!/usr/bin/env python3
import argparse
from sqlalchemy import MetaData
from sqlalchemy_schemadisplay import create_schema_graph
def plot_schema(fn):
graph = create_schema_graph(
metadata=MetaData('sqlite:///'+fn),
show_datatypes=False,
show_indexes=Fa... | <commit_before><commit_msg>Add script from printing the DB schema<commit_after>#!/usr/bin/env python3
import argparse
from sqlalchemy import MetaData
from sqlalchemy_schemadisplay import create_schema_graph
def plot_schema(fn):
graph = create_schema_graph(
metadata=MetaData('sqlite:///'+fn),
show... | |
5c277a958f2ce8e97ff539870d13a28181c8ea65 | task_01.py | task_01.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This is a module gets today's date."""
import datetime
CURDATE = None
def get_current_date():
"""Return today's date
Args:
(int): Current day
Returns:
date: the year, month, day
Examples:
>>> import task_01
... | Use datetime.date.today() and then if__name__ = '__main__': to make CURDATE available. | Use datetime.date.today() and then if__name__ = '__main__': to make CURDATE available.
| Python | mpl-2.0 | gracehyemin/is210-week-05-synthesizing,gracehyemin/is210-week-05-synthesizing | Use datetime.date.today() and then if__name__ = '__main__': to make CURDATE available. | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This is a module gets today's date."""
import datetime
CURDATE = None
def get_current_date():
"""Return today's date
Args:
(int): Current day
Returns:
date: the year, month, day
Examples:
>>> import task_01
... | <commit_before><commit_msg>Use datetime.date.today() and then if__name__ = '__main__': to make CURDATE available.<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This is a module gets today's date."""
import datetime
CURDATE = None
def get_current_date():
"""Return today's date
Args:
(int): Current day
Returns:
date: the year, month, day
Examples:
>>> import task_01
... | Use datetime.date.today() and then if__name__ = '__main__': to make CURDATE available.#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This is a module gets today's date."""
import datetime
CURDATE = None
def get_current_date():
"""Return today's date
Args:
(int): Current day
Returns:
... | <commit_before><commit_msg>Use datetime.date.today() and then if__name__ = '__main__': to make CURDATE available.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This is a module gets today's date."""
import datetime
CURDATE = None
def get_current_date():
"""Return today's date
Args:
... | |
edba490c7274bf1afb3f13dbb9f82351aab03495 | migrations/versions/0125_remove_unique_constraint.py | migrations/versions/0125_remove_unique_constraint.py | """
Revision ID: 0125_remove_unique_constraint
Revises: 0124_add_free_sms_fragment_limit
Create Date: 2017-10-17 16:47:37.826333
"""
from alembic import op
import sqlalchemy as sa
revision = '0125_remove_unique_constraint'
down_revision = '0124_add_free_sms_fragment_limit'
def upgrade():
# ### commands auto ge... | Remove unique constraint for ServiceSmsSenders. This will allow a service to have multiple sms senders. | Remove unique constraint for ServiceSmsSenders.
This will allow a service to have multiple sms senders.
| Python | mit | alphagov/notifications-api,alphagov/notifications-api | Remove unique constraint for ServiceSmsSenders.
This will allow a service to have multiple sms senders. | """
Revision ID: 0125_remove_unique_constraint
Revises: 0124_add_free_sms_fragment_limit
Create Date: 2017-10-17 16:47:37.826333
"""
from alembic import op
import sqlalchemy as sa
revision = '0125_remove_unique_constraint'
down_revision = '0124_add_free_sms_fragment_limit'
def upgrade():
# ### commands auto ge... | <commit_before><commit_msg>Remove unique constraint for ServiceSmsSenders.
This will allow a service to have multiple sms senders.<commit_after> | """
Revision ID: 0125_remove_unique_constraint
Revises: 0124_add_free_sms_fragment_limit
Create Date: 2017-10-17 16:47:37.826333
"""
from alembic import op
import sqlalchemy as sa
revision = '0125_remove_unique_constraint'
down_revision = '0124_add_free_sms_fragment_limit'
def upgrade():
# ### commands auto ge... | Remove unique constraint for ServiceSmsSenders.
This will allow a service to have multiple sms senders."""
Revision ID: 0125_remove_unique_constraint
Revises: 0124_add_free_sms_fragment_limit
Create Date: 2017-10-17 16:47:37.826333
"""
from alembic import op
import sqlalchemy as sa
revision = '0125_remove_unique_con... | <commit_before><commit_msg>Remove unique constraint for ServiceSmsSenders.
This will allow a service to have multiple sms senders.<commit_after>"""
Revision ID: 0125_remove_unique_constraint
Revises: 0124_add_free_sms_fragment_limit
Create Date: 2017-10-17 16:47:37.826333
"""
from alembic import op
import sqlalchemy ... | |
24c757ee86ce121e5cfa27a66ee7d13d167c7f9d | tools/subset_symbols.py | tools/subset_symbols.py | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Add tool for subsetting symbols. | Add tool for subsetting symbols.
git-svn-id: ed1ad396822b1b6daf934b380f36d983ac38e44f@276 37e447bf-a746-2f79-0798-35135ca55e94
| Python | apache-2.0 | yannisl/noto-monolithic,yannisl/noto-monolithic,yannisl/noto-monolithic,wskplho/noto-monolithic,yannisl/noto-monolithic,wskplho/noto-monolithic,wskplho/noto-monolithic,wskplho/noto-monolithic | Add tool for subsetting symbols.
git-svn-id: ed1ad396822b1b6daf934b380f36d983ac38e44f@276 37e447bf-a746-2f79-0798-35135ca55e94 | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | <commit_before><commit_msg>Add tool for subsetting symbols.
git-svn-id: ed1ad396822b1b6daf934b380f36d983ac38e44f@276 37e447bf-a746-2f79-0798-35135ca55e94<commit_after> | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Add tool for subsetting symbols.
git-svn-id: ed1ad396822b1b6daf934b380f36d983ac38e44f@276 37e447bf-a746-2f79-0798-35135ca55e94#!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with ... | <commit_before><commit_msg>Add tool for subsetting symbols.
git-svn-id: ed1ad396822b1b6daf934b380f36d983ac38e44f@276 37e447bf-a746-2f79-0798-35135ca55e94<commit_after>#!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not... | |
537d2787b92b5ab3246c853a33030378c7fe15f0 | tests/test_load_tool.py | tests/test_load_tool.py | from cwltool.load_tool import load_tool
from cwltool.context import LoadingContext, RuntimeContext
from cwltool.errors import WorkflowException
import pytest
from .util import (get_data, get_main_output,
get_windows_safe_factory,
needs_docker, working_directory,
... | Add tests for version check and metadata behavior | Add tests for version check and metadata behavior
| Python | apache-2.0 | common-workflow-language/cwltool,common-workflow-language/cwltool,common-workflow-language/cwltool | Add tests for version check and metadata behavior | from cwltool.load_tool import load_tool
from cwltool.context import LoadingContext, RuntimeContext
from cwltool.errors import WorkflowException
import pytest
from .util import (get_data, get_main_output,
get_windows_safe_factory,
needs_docker, working_directory,
... | <commit_before><commit_msg>Add tests for version check and metadata behavior<commit_after> | from cwltool.load_tool import load_tool
from cwltool.context import LoadingContext, RuntimeContext
from cwltool.errors import WorkflowException
import pytest
from .util import (get_data, get_main_output,
get_windows_safe_factory,
needs_docker, working_directory,
... | Add tests for version check and metadata behaviorfrom cwltool.load_tool import load_tool
from cwltool.context import LoadingContext, RuntimeContext
from cwltool.errors import WorkflowException
import pytest
from .util import (get_data, get_main_output,
get_windows_safe_factory,
nee... | <commit_before><commit_msg>Add tests for version check and metadata behavior<commit_after>from cwltool.load_tool import load_tool
from cwltool.context import LoadingContext, RuntimeContext
from cwltool.errors import WorkflowException
import pytest
from .util import (get_data, get_main_output,
get_win... | |
b5ae3a97fde4421307e6cd86dba188cbf7999435 | chrome/browser/extensions/PRESUBMIT.py | chrome/browser/extensions/PRESUBMIT.py | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Chromium presubmit script for src/chrome/browser/extensions.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more det... | Add aura compile testing by default to likely areas (4). | Add aura compile testing by default to likely areas (4).
BUG=chromium:107599
TEST=None
Review URL: http://codereview.chromium.org/8907044
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@114847 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | Fireblend/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,chuan9/chromium-crosswalk,Just-D/chromium-1,markYoungH/chromium.src,fujunwei/chromium-crosswalk,hgl888/chro... | Add aura compile testing by default to likely areas (4).
BUG=chromium:107599
TEST=None
Review URL: http://codereview.chromium.org/8907044
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@114847 0039d316-1c4b-4281-b951-d872f2087c98 | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Chromium presubmit script for src/chrome/browser/extensions.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more det... | <commit_before><commit_msg>Add aura compile testing by default to likely areas (4).
BUG=chromium:107599
TEST=None
Review URL: http://codereview.chromium.org/8907044
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@114847 0039d316-1c4b-4281-b951-d872f2087c98<commit_after> | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Chromium presubmit script for src/chrome/browser/extensions.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more det... | Add aura compile testing by default to likely areas (4).
BUG=chromium:107599
TEST=None
Review URL: http://codereview.chromium.org/8907044
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@114847 0039d316-1c4b-4281-b951-d872f2087c98# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this sourc... | <commit_before><commit_msg>Add aura compile testing by default to likely areas (4).
BUG=chromium:107599
TEST=None
Review URL: http://codereview.chromium.org/8907044
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@114847 0039d316-1c4b-4281-b951-d872f2087c98<commit_after># Copyright (c) 2011 The Chromium Authors.... | |
cb4167278d3d342cbbb3ea185d0bbff7ff72ff4d | python/example_code/s3/s3-python-example-upload-file.py | python/example_code/s3/s3-python-example-upload-file.py | # Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This file is licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the
# License is located at
#
# http://aws.amazon.com/apache2.0/
#
# This f... | Revert "Delete duplicate Python example" | Revert "Delete duplicate Python example"
| Python | apache-2.0 | awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,a... | Revert "Delete duplicate Python example" | # Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This file is licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the
# License is located at
#
# http://aws.amazon.com/apache2.0/
#
# This f... | <commit_before><commit_msg>Revert "Delete duplicate Python example"<commit_after> | # Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This file is licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the
# License is located at
#
# http://aws.amazon.com/apache2.0/
#
# This f... | Revert "Delete duplicate Python example"# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This file is licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of the
# License is located at
#
# http:... | <commit_before><commit_msg>Revert "Delete duplicate Python example"<commit_after># Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This file is licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License. A copy of... | |
1fead9006e75aa9ea3933f5f24ff7c8042225a8a | version.py | version.py | ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.7'
| ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.8'
| Bump PROVISION_VERSION for recent package upgrades. | Bump PROVISION_VERSION for recent package upgrades.
| Python | apache-2.0 | kou/zulip,dhcrzf/zulip,jrowan/zulip,tommyip/zulip,brockwhittaker/zulip,rht/zulip,jackrzhang/zulip,Galexrt/zulip,brainwane/zulip,brainwane/zulip,zulip/zulip,kou/zulip,zulip/zulip,rishig/zulip,andersk/zulip,andersk/zulip,dhcrzf/zulip,vabs22/zulip,rishig/zulip,brockwhittaker/zulip,eeshangarg/zulip,timabbott/zulip,amanhari... | ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.7'
Bump PROVISION_VERSION for recent package upgrades. | ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.8'
| <commit_before>ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.7'
<commit_msg>Bump PROVISION_VERSION for recent package upgrades.<commit_after> | ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.8'
| ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.7'
Bump PROVISION_VERSION for recent package upgrades.ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.8'
| <commit_before>ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.7'
<commit_msg>Bump PROVISION_VERSION for recent package upgrades.<commit_after>ZULIP_VERSION = "1.6.0+git"
PROVISION_VERSION = '5.8'
|
bac6fb1d5287452bdda0dc9d6b730ebd092ae3ab | codingame/power_of_thor.py | codingame/power_of_thor.py | # LX: the X position of the light of power
# LY: the Y position of the light of power
# x: Thor's starting X position
# y: Thor's starting Y position
LX, LY, x, y = [int(i) for i in raw_input().split()]
# Game loop
while True:
E = int(raw_input()) # The level of Thor's remaining energy, representing the number of mov... | Add CodinGame Power of Thor | Add CodinGame Power of Thor
| Python | mit | AntoineAugusti/katas,AntoineAugusti/katas,AntoineAugusti/katas | Add CodinGame Power of Thor | # LX: the X position of the light of power
# LY: the Y position of the light of power
# x: Thor's starting X position
# y: Thor's starting Y position
LX, LY, x, y = [int(i) for i in raw_input().split()]
# Game loop
while True:
E = int(raw_input()) # The level of Thor's remaining energy, representing the number of mov... | <commit_before><commit_msg>Add CodinGame Power of Thor<commit_after> | # LX: the X position of the light of power
# LY: the Y position of the light of power
# x: Thor's starting X position
# y: Thor's starting Y position
LX, LY, x, y = [int(i) for i in raw_input().split()]
# Game loop
while True:
E = int(raw_input()) # The level of Thor's remaining energy, representing the number of mov... | Add CodinGame Power of Thor# LX: the X position of the light of power
# LY: the Y position of the light of power
# x: Thor's starting X position
# y: Thor's starting Y position
LX, LY, x, y = [int(i) for i in raw_input().split()]
# Game loop
while True:
E = int(raw_input()) # The level of Thor's remaining energy, rep... | <commit_before><commit_msg>Add CodinGame Power of Thor<commit_after># LX: the X position of the light of power
# LY: the Y position of the light of power
# x: Thor's starting X position
# y: Thor's starting Y position
LX, LY, x, y = [int(i) for i in raw_input().split()]
# Game loop
while True:
E = int(raw_input()) # ... | |
d47abe23bf1c88520ee6ecf954dadaae42142366 | src/engine/SCons/Tool/javacTests.py | src/engine/SCons/Tool/javacTests.py | #
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicen... | Add unit tests for SCons.Tool.javac (pathopt class only). This carefully avoids known bugs in order to have passing tests. | Add unit tests for SCons.Tool.javac (pathopt class only).
This carefully avoids known bugs in order to have passing tests.
| Python | mit | Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons | Add unit tests for SCons.Tool.javac (pathopt class only).
This carefully avoids known bugs in order to have passing tests. | #
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicen... | <commit_before><commit_msg>Add unit tests for SCons.Tool.javac (pathopt class only).
This carefully avoids known bugs in order to have passing tests.<commit_after> | #
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicen... | Add unit tests for SCons.Tool.javac (pathopt class only).
This carefully avoids known bugs in order to have passing tests.#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software w... | <commit_before><commit_msg>Add unit tests for SCons.Tool.javac (pathopt class only).
This carefully avoids known bugs in order to have passing tests.<commit_after>#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the... | |
0664983f6182fca7147d97fd2350bba3655da22a | CodeFights/weakNumbers.py | CodeFights/weakNumbers.py | #!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(count)
r... | Set up Code Fights weak numbers problem | Set up Code Fights weak numbers problem
| Python | mit | HKuz/Test_Code | Set up Code Fights weak numbers problem | #!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(count)
r... | <commit_before><commit_msg>Set up Code Fights weak numbers problem<commit_after> | #!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
divs.append(count)
r... | Set up Code Fights weak numbers problem#!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i % d == 0:
count += 1
... | <commit_before><commit_msg>Set up Code Fights weak numbers problem<commit_after>#!/usr/local/bin/python
# Code Fights Weak Numbers Problem
def weakNumbers(n):
def get_divisors(n):
divs = []
for i in range(1, n + 1):
count = 0
for d in range(1, i + 1):
if i %... | |
beb3882b89b41ca104dbb9f2fb97f609f45ce106 | corehq/apps/users/decorators.py | corehq/apps/users/decorators.py | from django.http import HttpResponseForbidden
from corehq.apps.domain.decorators import login_and_domain_required
def require_permission(permission, data=None, login_decorator=login_and_domain_required):
try:
permission = permission.name
except AttributeError:
try:
permission = perm... | from django.http import HttpResponseForbidden
from corehq.apps.domain.decorators import login_and_domain_required
def require_permission(permission, data=None, login_decorator=login_and_domain_required):
try:
permission = permission.name
except AttributeError:
try:
permission = perm... | Apply login decorator before permissions check; less 403s, more 302s | Apply login decorator before permissions check; less 403s, more 302s
| Python | bsd-3-clause | puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,gmimano/commcaretest,SEL-Columbia/commcare-hq,dimagi/commcare-hq,gmimano/commcaretest,SEL-Columbia/commcare-hq,gmimano/commcaretest,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftwar... | from django.http import HttpResponseForbidden
from corehq.apps.domain.decorators import login_and_domain_required
def require_permission(permission, data=None, login_decorator=login_and_domain_required):
try:
permission = permission.name
except AttributeError:
try:
permission = perm... | from django.http import HttpResponseForbidden
from corehq.apps.domain.decorators import login_and_domain_required
def require_permission(permission, data=None, login_decorator=login_and_domain_required):
try:
permission = permission.name
except AttributeError:
try:
permission = perm... | <commit_before>from django.http import HttpResponseForbidden
from corehq.apps.domain.decorators import login_and_domain_required
def require_permission(permission, data=None, login_decorator=login_and_domain_required):
try:
permission = permission.name
except AttributeError:
try:
pe... | from django.http import HttpResponseForbidden
from corehq.apps.domain.decorators import login_and_domain_required
def require_permission(permission, data=None, login_decorator=login_and_domain_required):
try:
permission = permission.name
except AttributeError:
try:
permission = perm... | from django.http import HttpResponseForbidden
from corehq.apps.domain.decorators import login_and_domain_required
def require_permission(permission, data=None, login_decorator=login_and_domain_required):
try:
permission = permission.name
except AttributeError:
try:
permission = perm... | <commit_before>from django.http import HttpResponseForbidden
from corehq.apps.domain.decorators import login_and_domain_required
def require_permission(permission, data=None, login_decorator=login_and_domain_required):
try:
permission = permission.name
except AttributeError:
try:
pe... |
743f999217fa2e87abe9d512a3e71d54386fe151 | carepoint/tests/models/cph/test_phone.py | carepoint/tests/models/cph/test_phone.py | # -*- coding: utf-8 -*-
# © 2015-TODAY LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import unittest
from sqlalchemy.schema import Table
from carepoint.tests.db.db import DatabaseTest
from carepoint.models.cph.phone import Phone
class TestModelsCphPhone(DatabaseTest):
def tes... | Add missing phone model test in carepoint cph | Add missing phone model test in carepoint cph
| Python | mit | laslabs/Python-Carepoint | Add missing phone model test in carepoint cph | # -*- coding: utf-8 -*-
# © 2015-TODAY LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import unittest
from sqlalchemy.schema import Table
from carepoint.tests.db.db import DatabaseTest
from carepoint.models.cph.phone import Phone
class TestModelsCphPhone(DatabaseTest):
def tes... | <commit_before><commit_msg>Add missing phone model test in carepoint cph<commit_after> | # -*- coding: utf-8 -*-
# © 2015-TODAY LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import unittest
from sqlalchemy.schema import Table
from carepoint.tests.db.db import DatabaseTest
from carepoint.models.cph.phone import Phone
class TestModelsCphPhone(DatabaseTest):
def tes... | Add missing phone model test in carepoint cph# -*- coding: utf-8 -*-
# © 2015-TODAY LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import unittest
from sqlalchemy.schema import Table
from carepoint.tests.db.db import DatabaseTest
from carepoint.models.cph.phone import Phone
class T... | <commit_before><commit_msg>Add missing phone model test in carepoint cph<commit_after># -*- coding: utf-8 -*-
# © 2015-TODAY LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import unittest
from sqlalchemy.schema import Table
from carepoint.tests.db.db import DatabaseTest
from carepoin... | |
eec8b527b54efd516eebfbc056d35158316fc222 | client/examples/update_image_metadata.py | client/examples/update_image_metadata.py | # -*- coding: utf-8 -*-
#
# * Copyright (c) 2009-2015. Authors: see NOTICE file.
# *
# * 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... | Update image metadata in a project | Update image metadata in a project
| Python | apache-2.0 | cytomine/Cytomine-python-client,cytomine/Cytomine-python-client | Update image metadata in a project | # -*- coding: utf-8 -*-
#
# * Copyright (c) 2009-2015. Authors: see NOTICE file.
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.apache.org/licenses/LICENSE-2... | <commit_before><commit_msg>Update image metadata in a project<commit_after> | # -*- coding: utf-8 -*-
#
# * Copyright (c) 2009-2015. Authors: see NOTICE file.
# *
# * 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... | Update image metadata in a project# -*- coding: utf-8 -*-
#
# * Copyright (c) 2009-2015. Authors: see NOTICE file.
# *
# * 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:/... | <commit_before><commit_msg>Update image metadata in a project<commit_after># -*- coding: utf-8 -*-
#
# * Copyright (c) 2009-2015. Authors: see NOTICE file.
# *
# * 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 c... | |
35f779cb56e4c710fb5321bd22d8187670993f62 | sci_lib.py | sci_lib.py | #!/usr/bin/python
#Author: Scott T. Salesky
#Created: 12.6.2014
#Purpose: Collection of functions, routines to use
#Python for scientific work
#----------------------------------------------
| Add function to read 3d direct access Fortran binary files into NumPy arrays. | Add function to read 3d direct access Fortran binary files into NumPy arrays.
| Python | mit | ssalesky/Science-Library | Add function to read 3d direct access Fortran binary files into NumPy arrays. | #!/usr/bin/python
#Author: Scott T. Salesky
#Created: 12.6.2014
#Purpose: Collection of functions, routines to use
#Python for scientific work
#----------------------------------------------
| <commit_before><commit_msg>Add function to read 3d direct access Fortran binary files into NumPy arrays.<commit_after> | #!/usr/bin/python
#Author: Scott T. Salesky
#Created: 12.6.2014
#Purpose: Collection of functions, routines to use
#Python for scientific work
#----------------------------------------------
| Add function to read 3d direct access Fortran binary files into NumPy arrays.#!/usr/bin/python
#Author: Scott T. Salesky
#Created: 12.6.2014
#Purpose: Collection of functions, routines to use
#Python for scientific work
#----------------------------------------------
| <commit_before><commit_msg>Add function to read 3d direct access Fortran binary files into NumPy arrays.<commit_after>#!/usr/bin/python
#Author: Scott T. Salesky
#Created: 12.6.2014
#Purpose: Collection of functions, routines to use
#Python for scientific work
#----------------------------------------------
| |
0eda613c7aafb974b1314c93d749b8ceb31a8459 | court_bulk_task_creator.py | court_bulk_task_creator.py | from courtreader import readers
from courtutils.database import Database
from courtutils.logger import get_logger
from datetime import datetime, timedelta
import csv
import pymongo
import os
import sys
import time
def get_db_connection():
return pymongo.MongoClient(os.environ['MONGO_DB'])['va_court_search']
start... | Add bulk collection task creator | Add bulk collection task creator
| Python | mit | bschoenfeld/va-court-scraper,bschoenfeld/va-court-scraper | Add bulk collection task creator | from courtreader import readers
from courtutils.database import Database
from courtutils.logger import get_logger
from datetime import datetime, timedelta
import csv
import pymongo
import os
import sys
import time
def get_db_connection():
return pymongo.MongoClient(os.environ['MONGO_DB'])['va_court_search']
start... | <commit_before><commit_msg>Add bulk collection task creator<commit_after> | from courtreader import readers
from courtutils.database import Database
from courtutils.logger import get_logger
from datetime import datetime, timedelta
import csv
import pymongo
import os
import sys
import time
def get_db_connection():
return pymongo.MongoClient(os.environ['MONGO_DB'])['va_court_search']
start... | Add bulk collection task creatorfrom courtreader import readers
from courtutils.database import Database
from courtutils.logger import get_logger
from datetime import datetime, timedelta
import csv
import pymongo
import os
import sys
import time
def get_db_connection():
return pymongo.MongoClient(os.environ['MONGO... | <commit_before><commit_msg>Add bulk collection task creator<commit_after>from courtreader import readers
from courtutils.database import Database
from courtutils.logger import get_logger
from datetime import datetime, timedelta
import csv
import pymongo
import os
import sys
import time
def get_db_connection():
ret... | |
d5ce5e325839d6094d163a58fc417bf4ee2a573f | tests/regression/test_f468afef89d1.py | tests/regression/test_f468afef89d1.py | #!/usr/bin/env python
"""when seconds or nano_seconds was set to 0 rather than None (the default) the
value would not be reset to 0 but instead the previous value would remain in
place
this was only visible if a user had previously set a value
"""
from butter.timerfd import Timer
from select import select
def test_f... | Put a regression test in place for commit f468afef89d1 | Put a regression test in place for commit f468afef89d1
| Python | bsd-3-clause | dasSOZO/python-butter,wdv4758h/butter | Put a regression test in place for commit f468afef89d1 | #!/usr/bin/env python
"""when seconds or nano_seconds was set to 0 rather than None (the default) the
value would not be reset to 0 but instead the previous value would remain in
place
this was only visible if a user had previously set a value
"""
from butter.timerfd import Timer
from select import select
def test_f... | <commit_before><commit_msg>Put a regression test in place for commit f468afef89d1<commit_after> | #!/usr/bin/env python
"""when seconds or nano_seconds was set to 0 rather than None (the default) the
value would not be reset to 0 but instead the previous value would remain in
place
this was only visible if a user had previously set a value
"""
from butter.timerfd import Timer
from select import select
def test_f... | Put a regression test in place for commit f468afef89d1#!/usr/bin/env python
"""when seconds or nano_seconds was set to 0 rather than None (the default) the
value would not be reset to 0 but instead the previous value would remain in
place
this was only visible if a user had previously set a value
"""
from butter.time... | <commit_before><commit_msg>Put a regression test in place for commit f468afef89d1<commit_after>#!/usr/bin/env python
"""when seconds or nano_seconds was set to 0 rather than None (the default) the
value would not be reset to 0 but instead the previous value would remain in
place
this was only visible if a user had pr... | |
8eab4037cef2490b99758554c3d4a17603f19d75 | bookmarks/feeds.py | bookmarks/feeds.py | from atomformat import Feed
from django.core.urlresolvers import reverse
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404
from bookmarks.models import Bookmark
from django.template.defaultfilters impo... | Add feed support for bookmarks by ericfo | Add feed support for bookmarks by ericfo
git-svn-id: e32780fd4e06e3e07c0119d454e1aebcae894468@13 413268e4-d34f-0410-bd0d-61523dc7b0b6
| Python | mit | incuna/incuna-bookmarks,pinax/django-bookmarks,incuna/incuna-bookmarks | Add feed support for bookmarks by ericfo
git-svn-id: e32780fd4e06e3e07c0119d454e1aebcae894468@13 413268e4-d34f-0410-bd0d-61523dc7b0b6 | from atomformat import Feed
from django.core.urlresolvers import reverse
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404
from bookmarks.models import Bookmark
from django.template.defaultfilters impo... | <commit_before><commit_msg>Add feed support for bookmarks by ericfo
git-svn-id: e32780fd4e06e3e07c0119d454e1aebcae894468@13 413268e4-d34f-0410-bd0d-61523dc7b0b6<commit_after> | from atomformat import Feed
from django.core.urlresolvers import reverse
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404
from bookmarks.models import Bookmark
from django.template.defaultfilters impo... | Add feed support for bookmarks by ericfo
git-svn-id: e32780fd4e06e3e07c0119d454e1aebcae894468@13 413268e4-d34f-0410-bd0d-61523dc7b0b6from atomformat import Feed
from django.core.urlresolvers import reverse
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth.models im... | <commit_before><commit_msg>Add feed support for bookmarks by ericfo
git-svn-id: e32780fd4e06e3e07c0119d454e1aebcae894468@13 413268e4-d34f-0410-bd0d-61523dc7b0b6<commit_after>from atomformat import Feed
from django.core.urlresolvers import reverse
from django.conf import settings
from django.contrib.sites.models impor... | |
07f46255120fd2dc6c33e2c6ed8b215fce9f01c5 | microdrop/bin/create_portable_config.py | microdrop/bin/create_portable_config.py | import os
import sys
import pkg_resources
from path_helpers import path
import jinja2
config_template = '''
data_dir = .
[plugins]
# directory containing microdrop plugins
directory = plugins
[microdrop.gui.experiment_log_controller]
notebook_directory = notebooks
[microdrop.gui.dmf_device_co... | Add script to create init portable settings | [NB] Add script to create init portable settings
Usage:
python -m microdrop.bin.create_portable_config [-h] output_dir
Create portable MicroDrop settings directory.
positional arguments:
output_dir
optional arguments:
-h, --help show this help message and exit
| Python | bsd-3-clause | wheeler-microfluidics/microdrop | [NB] Add script to create init portable settings
Usage:
python -m microdrop.bin.create_portable_config [-h] output_dir
Create portable MicroDrop settings directory.
positional arguments:
output_dir
optional arguments:
-h, --help show this help message and exit | import os
import sys
import pkg_resources
from path_helpers import path
import jinja2
config_template = '''
data_dir = .
[plugins]
# directory containing microdrop plugins
directory = plugins
[microdrop.gui.experiment_log_controller]
notebook_directory = notebooks
[microdrop.gui.dmf_device_co... | <commit_before><commit_msg>[NB] Add script to create init portable settings
Usage:
python -m microdrop.bin.create_portable_config [-h] output_dir
Create portable MicroDrop settings directory.
positional arguments:
output_dir
optional arguments:
-h, --help show this help message and exi... | import os
import sys
import pkg_resources
from path_helpers import path
import jinja2
config_template = '''
data_dir = .
[plugins]
# directory containing microdrop plugins
directory = plugins
[microdrop.gui.experiment_log_controller]
notebook_directory = notebooks
[microdrop.gui.dmf_device_co... | [NB] Add script to create init portable settings
Usage:
python -m microdrop.bin.create_portable_config [-h] output_dir
Create portable MicroDrop settings directory.
positional arguments:
output_dir
optional arguments:
-h, --help show this help message and exitimport os
import sys
impor... | <commit_before><commit_msg>[NB] Add script to create init portable settings
Usage:
python -m microdrop.bin.create_portable_config [-h] output_dir
Create portable MicroDrop settings directory.
positional arguments:
output_dir
optional arguments:
-h, --help show this help message and exi... | |
ee0abfe77086737ad4471d09e5f55536874132ab | ideascube/conf/idb_fra_grandesynthe.py | ideascube/conf/idb_fra_grandesynthe.py | # -*- coding: utf-8 -*-
"""Ideaxbox for Grande Synthe, France"""
from .idb import * # noqa
from django.utils.translation import ugettext_lazy as _
IDEASCUBE_NAME = u"Grande-Synthe"
IDEASCUBE_PLACE_NAME = _("city")
COUNTRIES_FIRST = ['FR']
TIME_ZONE = None
LANGUAGE_CODE = 'fr'
LOAN_DURATION = 14
MONITORING_ENTRY_EXPOR... | Add config file for Grande Synthe France | Add config file for Grande Synthe France
| Python | agpl-3.0 | ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube | Add config file for Grande Synthe France | # -*- coding: utf-8 -*-
"""Ideaxbox for Grande Synthe, France"""
from .idb import * # noqa
from django.utils.translation import ugettext_lazy as _
IDEASCUBE_NAME = u"Grande-Synthe"
IDEASCUBE_PLACE_NAME = _("city")
COUNTRIES_FIRST = ['FR']
TIME_ZONE = None
LANGUAGE_CODE = 'fr'
LOAN_DURATION = 14
MONITORING_ENTRY_EXPOR... | <commit_before><commit_msg>Add config file for Grande Synthe France<commit_after> | # -*- coding: utf-8 -*-
"""Ideaxbox for Grande Synthe, France"""
from .idb import * # noqa
from django.utils.translation import ugettext_lazy as _
IDEASCUBE_NAME = u"Grande-Synthe"
IDEASCUBE_PLACE_NAME = _("city")
COUNTRIES_FIRST = ['FR']
TIME_ZONE = None
LANGUAGE_CODE = 'fr'
LOAN_DURATION = 14
MONITORING_ENTRY_EXPOR... | Add config file for Grande Synthe France# -*- coding: utf-8 -*-
"""Ideaxbox for Grande Synthe, France"""
from .idb import * # noqa
from django.utils.translation import ugettext_lazy as _
IDEASCUBE_NAME = u"Grande-Synthe"
IDEASCUBE_PLACE_NAME = _("city")
COUNTRIES_FIRST = ['FR']
TIME_ZONE = None
LANGUAGE_CODE = 'fr'
L... | <commit_before><commit_msg>Add config file for Grande Synthe France<commit_after># -*- coding: utf-8 -*-
"""Ideaxbox for Grande Synthe, France"""
from .idb import * # noqa
from django.utils.translation import ugettext_lazy as _
IDEASCUBE_NAME = u"Grande-Synthe"
IDEASCUBE_PLACE_NAME = _("city")
COUNTRIES_FIRST = ['FR'... | |
f43a44f56ff965e772c2e8de0a7b485da05065a2 | ovp_projects/tests/test_serializers.py | ovp_projects/tests/test_serializers.py | from django.test import TestCase
from django.test import RequestFactory
from ovp_projects.models import Project
from ovp_projects.serializers.project import ProjectRetrieveSerializer
from ovp_projects.serializers.project import ProjectSearchSerializer
from ovp_users.models import User
from ovp_core.models import Goog... | Add tests for hidden address on ProjectRetrieveSerializer and ProjectSearchSerializer | Add tests for hidden address on ProjectRetrieveSerializer and ProjectSearchSerializer
| Python | agpl-3.0 | OpenVolunteeringPlatform/django-ovp-projects,OpenVolunteeringPlatform/django-ovp-projects | Add tests for hidden address on ProjectRetrieveSerializer and ProjectSearchSerializer | from django.test import TestCase
from django.test import RequestFactory
from ovp_projects.models import Project
from ovp_projects.serializers.project import ProjectRetrieveSerializer
from ovp_projects.serializers.project import ProjectSearchSerializer
from ovp_users.models import User
from ovp_core.models import Goog... | <commit_before><commit_msg>Add tests for hidden address on ProjectRetrieveSerializer and ProjectSearchSerializer<commit_after> | from django.test import TestCase
from django.test import RequestFactory
from ovp_projects.models import Project
from ovp_projects.serializers.project import ProjectRetrieveSerializer
from ovp_projects.serializers.project import ProjectSearchSerializer
from ovp_users.models import User
from ovp_core.models import Goog... | Add tests for hidden address on ProjectRetrieveSerializer and ProjectSearchSerializerfrom django.test import TestCase
from django.test import RequestFactory
from ovp_projects.models import Project
from ovp_projects.serializers.project import ProjectRetrieveSerializer
from ovp_projects.serializers.project import Projec... | <commit_before><commit_msg>Add tests for hidden address on ProjectRetrieveSerializer and ProjectSearchSerializer<commit_after>from django.test import TestCase
from django.test import RequestFactory
from ovp_projects.models import Project
from ovp_projects.serializers.project import ProjectRetrieveSerializer
from ovp_p... | |
985e9167bdfa857c5148ee0431fdd13d50ba787e | viewflow/migrations/0002_fsmchange.py | viewflow/migrations/0002_fsmchange.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_status(apps, schema_editor):
Process = apps.get_model("viewflow", "Process")
Process.objects.filter(status='STR').update(status='STARTED')
Process.objects.filter(status='FNS').update(status... | Fix migrations for 0.8 -> 0.9 upgrade | Fix migrations for 0.8 -> 0.9 upgrade
| Python | agpl-3.0 | pombredanne/viewflow,viewflow/viewflow,viewflow/viewflow,ribeiro-ucl/viewflow,ribeiro-ucl/viewflow,codingjoe/viewflow,codingjoe/viewflow,codingjoe/viewflow,pombredanne/viewflow,viewflow/viewflow,ribeiro-ucl/viewflow | Fix migrations for 0.8 -> 0.9 upgrade | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_status(apps, schema_editor):
Process = apps.get_model("viewflow", "Process")
Process.objects.filter(status='STR').update(status='STARTED')
Process.objects.filter(status='FNS').update(status... | <commit_before><commit_msg>Fix migrations for 0.8 -> 0.9 upgrade<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_status(apps, schema_editor):
Process = apps.get_model("viewflow", "Process")
Process.objects.filter(status='STR').update(status='STARTED')
Process.objects.filter(status='FNS').update(status... | Fix migrations for 0.8 -> 0.9 upgrade# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_status(apps, schema_editor):
Process = apps.get_model("viewflow", "Process")
Process.objects.filter(status='STR').update(status='STARTED')
Process.objec... | <commit_before><commit_msg>Fix migrations for 0.8 -> 0.9 upgrade<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def update_status(apps, schema_editor):
Process = apps.get_model("viewflow", "Process")
Process.objects.filter(status='STR').u... | |
3237345bdc725fc631b208ea705cb41b722bcd1f | exercises/chapter_03/exercise_03_01.py | exercises/chapter_03/exercise_03_01.py | # 3-1 Names
friend_names = ["Albert Einstein", "Isac Newton", "Marie Curie", "Galileo Galilei"]
print(friend_names[0])
print(friend_names[1])
print(friend_names[2])
print(friend_names[3])
| Add solution to exercise 3.1. | Add solution to exercise 3.1.
| Python | mit | HenrikSamuelsson/python-crash-course | Add solution to exercise 3.1. | # 3-1 Names
friend_names = ["Albert Einstein", "Isac Newton", "Marie Curie", "Galileo Galilei"]
print(friend_names[0])
print(friend_names[1])
print(friend_names[2])
print(friend_names[3])
| <commit_before><commit_msg>Add solution to exercise 3.1.<commit_after> | # 3-1 Names
friend_names = ["Albert Einstein", "Isac Newton", "Marie Curie", "Galileo Galilei"]
print(friend_names[0])
print(friend_names[1])
print(friend_names[2])
print(friend_names[3])
| Add solution to exercise 3.1.# 3-1 Names
friend_names = ["Albert Einstein", "Isac Newton", "Marie Curie", "Galileo Galilei"]
print(friend_names[0])
print(friend_names[1])
print(friend_names[2])
print(friend_names[3])
| <commit_before><commit_msg>Add solution to exercise 3.1.<commit_after># 3-1 Names
friend_names = ["Albert Einstein", "Isac Newton", "Marie Curie", "Galileo Galilei"]
print(friend_names[0])
print(friend_names[1])
print(friend_names[2])
print(friend_names[3])
| |
455806aa0a25f2c632c62f00de21b5d3768135cb | cherrypy/test/test_wsgi_unix_socket.py | cherrypy/test/test_wsgi_unix_socket.py | import os
import sys
import socket
import atexit
import cherrypy
from cherrypy.test import helper
from cherrypy._cpcompat import HTTPConnection
USOCKET_PATH = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'cp_test.sock'
)
class USocketHTTPConnection(HTTPConnection):
"""
HTTPConnection ... | Add a basic test case for the unix socket support in cherrypy. | Add a basic test case for the unix socket support in cherrypy.
| Python | bsd-3-clause | Safihre/cherrypy,cherrypy/cherrypy,Safihre/cherrypy,cherrypy/cherrypy,cherrypy/cheroot | Add a basic test case for the unix socket support in cherrypy. | import os
import sys
import socket
import atexit
import cherrypy
from cherrypy.test import helper
from cherrypy._cpcompat import HTTPConnection
USOCKET_PATH = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'cp_test.sock'
)
class USocketHTTPConnection(HTTPConnection):
"""
HTTPConnection ... | <commit_before><commit_msg>Add a basic test case for the unix socket support in cherrypy.<commit_after> | import os
import sys
import socket
import atexit
import cherrypy
from cherrypy.test import helper
from cherrypy._cpcompat import HTTPConnection
USOCKET_PATH = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'cp_test.sock'
)
class USocketHTTPConnection(HTTPConnection):
"""
HTTPConnection ... | Add a basic test case for the unix socket support in cherrypy.import os
import sys
import socket
import atexit
import cherrypy
from cherrypy.test import helper
from cherrypy._cpcompat import HTTPConnection
USOCKET_PATH = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'cp_test.sock'
)
class USoc... | <commit_before><commit_msg>Add a basic test case for the unix socket support in cherrypy.<commit_after>import os
import sys
import socket
import atexit
import cherrypy
from cherrypy.test import helper
from cherrypy._cpcompat import HTTPConnection
USOCKET_PATH = os.path.join(
os.path.dirname(os.path.realpath(__fi... | |
f48ebff1ba0bb8fd3c1335db5bec101032d0d31b | scripts/make-gaps-for-missing-layers.py | scripts/make-gaps-for-missing-layers.py | #!/usr/bin/python
# This script renames the directories in a CATMAID stack's image root
# to take into account missing layers corresponding to particular
# z-values. This can occur when exporting the data from TrakEM2.
import glob, os, re, sys, subprocess
layers_missing_z = [
4950.0,
9450.0,
17500.0,
17550.... | Add a script to rename CATMAID image directories to take account of missing layers | Add a script to rename CATMAID image directories to take account of missing layers
| Python | agpl-3.0 | fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID | Add a script to rename CATMAID image directories to take account of missing layers | #!/usr/bin/python
# This script renames the directories in a CATMAID stack's image root
# to take into account missing layers corresponding to particular
# z-values. This can occur when exporting the data from TrakEM2.
import glob, os, re, sys, subprocess
layers_missing_z = [
4950.0,
9450.0,
17500.0,
17550.... | <commit_before><commit_msg>Add a script to rename CATMAID image directories to take account of missing layers<commit_after> | #!/usr/bin/python
# This script renames the directories in a CATMAID stack's image root
# to take into account missing layers corresponding to particular
# z-values. This can occur when exporting the data from TrakEM2.
import glob, os, re, sys, subprocess
layers_missing_z = [
4950.0,
9450.0,
17500.0,
17550.... | Add a script to rename CATMAID image directories to take account of missing layers#!/usr/bin/python
# This script renames the directories in a CATMAID stack's image root
# to take into account missing layers corresponding to particular
# z-values. This can occur when exporting the data from TrakEM2.
import glob, os,... | <commit_before><commit_msg>Add a script to rename CATMAID image directories to take account of missing layers<commit_after>#!/usr/bin/python
# This script renames the directories in a CATMAID stack's image root
# to take into account missing layers corresponding to particular
# z-values. This can occur when exporting... | |
69738f5b8e9604b75ad49a72e86f322a7300e7c9 | tests/test_automaton.py | tests/test_automaton.py | #!/usr/bin/env python3
"""Functions for testing the Automaton abstract base class."""
import nose.tools as nose
from automata.base.automaton import Automaton
def test_abstract_methods_not_implemented():
"""Should raise NotImplementedError when calling abstract methods."""
with nose.assert_raises(NotImplemen... | Add tests for abstract method NotImplementedError | Add tests for abstract method NotImplementedError
| Python | mit | caleb531/automata | Add tests for abstract method NotImplementedError | #!/usr/bin/env python3
"""Functions for testing the Automaton abstract base class."""
import nose.tools as nose
from automata.base.automaton import Automaton
def test_abstract_methods_not_implemented():
"""Should raise NotImplementedError when calling abstract methods."""
with nose.assert_raises(NotImplemen... | <commit_before><commit_msg>Add tests for abstract method NotImplementedError<commit_after> | #!/usr/bin/env python3
"""Functions for testing the Automaton abstract base class."""
import nose.tools as nose
from automata.base.automaton import Automaton
def test_abstract_methods_not_implemented():
"""Should raise NotImplementedError when calling abstract methods."""
with nose.assert_raises(NotImplemen... | Add tests for abstract method NotImplementedError#!/usr/bin/env python3
"""Functions for testing the Automaton abstract base class."""
import nose.tools as nose
from automata.base.automaton import Automaton
def test_abstract_methods_not_implemented():
"""Should raise NotImplementedError when calling abstract me... | <commit_before><commit_msg>Add tests for abstract method NotImplementedError<commit_after>#!/usr/bin/env python3
"""Functions for testing the Automaton abstract base class."""
import nose.tools as nose
from automata.base.automaton import Automaton
def test_abstract_methods_not_implemented():
"""Should raise Not... | |
07867356f110026a2249d49fe5e583c42fc2a048 | tests/test_singleton.py | tests/test_singleton.py | import unittest
from nose.tools import *
import mock
from gargoyle.settings import manager
import gargoyle.models
class TestGargoyle(unittest.TestCase):
def test_gargoyle_global_is_a_switch_manager(self):
reload(gargoyle.singleton)
self.assertIsInstance(gargoyle.singleton.gargoyle,
... | import unittest
from nose.tools import *
import mock
from gargoyle.settings import manager
import gargoyle.models
class TestGargoyle(unittest.TestCase):
other_engine = dict()
def test_gargoyle_global_is_a_switch_manager(self):
reload(gargoyle.singleton)
self.assertIsInstance(gargoyle.single... | Add another test to make sure you can import settings and change them before importing the singleton | Add another test to make sure you can import settings and change them before importing the singleton
| Python | apache-2.0 | kalail/gutter,disqus/gutter,kalail/gutter,kalail/gutter,disqus/gutter | import unittest
from nose.tools import *
import mock
from gargoyle.settings import manager
import gargoyle.models
class TestGargoyle(unittest.TestCase):
def test_gargoyle_global_is_a_switch_manager(self):
reload(gargoyle.singleton)
self.assertIsInstance(gargoyle.singleton.gargoyle,
... | import unittest
from nose.tools import *
import mock
from gargoyle.settings import manager
import gargoyle.models
class TestGargoyle(unittest.TestCase):
other_engine = dict()
def test_gargoyle_global_is_a_switch_manager(self):
reload(gargoyle.singleton)
self.assertIsInstance(gargoyle.single... | <commit_before>import unittest
from nose.tools import *
import mock
from gargoyle.settings import manager
import gargoyle.models
class TestGargoyle(unittest.TestCase):
def test_gargoyle_global_is_a_switch_manager(self):
reload(gargoyle.singleton)
self.assertIsInstance(gargoyle.singleton.gargoyle... | import unittest
from nose.tools import *
import mock
from gargoyle.settings import manager
import gargoyle.models
class TestGargoyle(unittest.TestCase):
other_engine = dict()
def test_gargoyle_global_is_a_switch_manager(self):
reload(gargoyle.singleton)
self.assertIsInstance(gargoyle.single... | import unittest
from nose.tools import *
import mock
from gargoyle.settings import manager
import gargoyle.models
class TestGargoyle(unittest.TestCase):
def test_gargoyle_global_is_a_switch_manager(self):
reload(gargoyle.singleton)
self.assertIsInstance(gargoyle.singleton.gargoyle,
... | <commit_before>import unittest
from nose.tools import *
import mock
from gargoyle.settings import manager
import gargoyle.models
class TestGargoyle(unittest.TestCase):
def test_gargoyle_global_is_a_switch_manager(self):
reload(gargoyle.singleton)
self.assertIsInstance(gargoyle.singleton.gargoyle... |
ac8ec32258652deefb39b8d29e05e52ca28bf1b4 | 14B-088/HI/HI_correct_mask_model.py | 14B-088/HI/HI_correct_mask_model.py |
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, ::-1, ::-1]
hdu.flush()
execfile("~/Dropbox/code_development/ewky_scripts/header_swap_axis... | Correct regridded mask and model | Correct regridded mask and model
| Python | mit | e-koch/VLA_Lband,e-koch/VLA_Lband | Correct regridded mask and model |
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, ::-1, ::-1]
hdu.flush()
execfile("~/Dropbox/code_development/ewky_scripts/header_swap_axis... | <commit_before><commit_msg>Correct regridded mask and model<commit_after> |
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, ::-1, ::-1]
hdu.flush()
execfile("~/Dropbox/code_development/ewky_scripts/header_swap_axis... | Correct regridded mask and model
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, ::-1, ::-1]
hdu.flush()
execfile("~/Dropbox/code_developme... | <commit_before><commit_msg>Correct regridded mask and model<commit_after>
'''
Swap the spatial axes. Swap the spectral and stokes axes.
'''
import sys
from astropy.io import fits
hdu = fits.open(sys.argv[1], mode='update')
hdu[0].data = hdu[0].data.swapaxes(0, 1)
hdu[0].data = hdu[0].data[:, :, ::-1, ::-1]
hdu.fl... | |
b0d13f4f6332e18390a1d8e0152e55b8fb2e780e | sdntest/examples/customtopo/triangle.py | sdntest/examples/customtopo/triangle.py | """Custom topology example
s1---s2
| /
| /
| /
s3
Consist of three fixed core switches, and each core switches will connect to m hosts through n switches.
"""
from mininet.topo import Topo
from optparse import OptionParser
class MyTopo( Topo ):
"Simple topology example."
# def __init__( self ):
def ... | Add a custom topology example | Add a custom topology example
| Python | mit | snlab-freedom/sdntest,snlab-freedom/sdntest | Add a custom topology example | """Custom topology example
s1---s2
| /
| /
| /
s3
Consist of three fixed core switches, and each core switches will connect to m hosts through n switches.
"""
from mininet.topo import Topo
from optparse import OptionParser
class MyTopo( Topo ):
"Simple topology example."
# def __init__( self ):
def ... | <commit_before><commit_msg>Add a custom topology example<commit_after> | """Custom topology example
s1---s2
| /
| /
| /
s3
Consist of three fixed core switches, and each core switches will connect to m hosts through n switches.
"""
from mininet.topo import Topo
from optparse import OptionParser
class MyTopo( Topo ):
"Simple topology example."
# def __init__( self ):
def ... | Add a custom topology example"""Custom topology example
s1---s2
| /
| /
| /
s3
Consist of three fixed core switches, and each core switches will connect to m hosts through n switches.
"""
from mininet.topo import Topo
from optparse import OptionParser
class MyTopo( Topo ):
"Simple topology example."
# d... | <commit_before><commit_msg>Add a custom topology example<commit_after>"""Custom topology example
s1---s2
| /
| /
| /
s3
Consist of three fixed core switches, and each core switches will connect to m hosts through n switches.
"""
from mininet.topo import Topo
from optparse import OptionParser
class MyTopo( Topo ... | |
bdbd262be925e318a6096606884af793aca158f7 | Lib/fontbakery/profiles/iso15008.py | Lib/fontbakery/profiles/iso15008.py | """
Checks for suitability for in-car displays (ISO 15008).
"""
from fontbakery.callable import check
from fontbakery.section import Section
from fontbakery.status import PASS, FAIL, WARN
from fontbakery.fonts_profile import profile_factory
from fontbakery.message import Message
from fontTools.pens.boundsPen import Bo... | Add new ISO15008 profile and proportion check | Add new ISO15008 profile and proportion check | Python | apache-2.0 | moyogo/fontbakery,googlefonts/fontbakery,moyogo/fontbakery,googlefonts/fontbakery,moyogo/fontbakery,googlefonts/fontbakery | Add new ISO15008 profile and proportion check | """
Checks for suitability for in-car displays (ISO 15008).
"""
from fontbakery.callable import check
from fontbakery.section import Section
from fontbakery.status import PASS, FAIL, WARN
from fontbakery.fonts_profile import profile_factory
from fontbakery.message import Message
from fontTools.pens.boundsPen import Bo... | <commit_before><commit_msg>Add new ISO15008 profile and proportion check<commit_after> | """
Checks for suitability for in-car displays (ISO 15008).
"""
from fontbakery.callable import check
from fontbakery.section import Section
from fontbakery.status import PASS, FAIL, WARN
from fontbakery.fonts_profile import profile_factory
from fontbakery.message import Message
from fontTools.pens.boundsPen import Bo... | Add new ISO15008 profile and proportion check"""
Checks for suitability for in-car displays (ISO 15008).
"""
from fontbakery.callable import check
from fontbakery.section import Section
from fontbakery.status import PASS, FAIL, WARN
from fontbakery.fonts_profile import profile_factory
from fontbakery.message import Me... | <commit_before><commit_msg>Add new ISO15008 profile and proportion check<commit_after>"""
Checks for suitability for in-car displays (ISO 15008).
"""
from fontbakery.callable import check
from fontbakery.section import Section
from fontbakery.status import PASS, FAIL, WARN
from fontbakery.fonts_profile import profile_... | |
655d7777342b8446d94d0f81dda293740c574d3d | strategy/artifacting.py | strategy/artifacting.py | # Copyright 2017, Rackspace US, 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 w... | Add a new strategy filtering tasks | Add a new strategy filtering tasks
Ideally Ansible should allow (from a playbook) to run only part
of a role thanks to its tags (like the --skip-tags or --tags from
the cli). But it's not possible now.
This code is a PoC code for introducing a kind of filtering,
which basically skips tasks containing the word "config... | Python | apache-2.0 | os-cloud/openstack-ansible-plugins,openstack/openstack-ansible-plugins,os-cloud/openstack-ansible-plugins,openstack/openstack-ansible-plugins | Add a new strategy filtering tasks
Ideally Ansible should allow (from a playbook) to run only part
of a role thanks to its tags (like the --skip-tags or --tags from
the cli). But it's not possible now.
This code is a PoC code for introducing a kind of filtering,
which basically skips tasks containing the word "config... | # Copyright 2017, Rackspace US, 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 w... | <commit_before><commit_msg>Add a new strategy filtering tasks
Ideally Ansible should allow (from a playbook) to run only part
of a role thanks to its tags (like the --skip-tags or --tags from
the cli). But it's not possible now.
This code is a PoC code for introducing a kind of filtering,
which basically skips tasks ... | # Copyright 2017, Rackspace US, 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 w... | Add a new strategy filtering tasks
Ideally Ansible should allow (from a playbook) to run only part
of a role thanks to its tags (like the --skip-tags or --tags from
the cli). But it's not possible now.
This code is a PoC code for introducing a kind of filtering,
which basically skips tasks containing the word "config... | <commit_before><commit_msg>Add a new strategy filtering tasks
Ideally Ansible should allow (from a playbook) to run only part
of a role thanks to its tags (like the --skip-tags or --tags from
the cli). But it's not possible now.
This code is a PoC code for introducing a kind of filtering,
which basically skips tasks ... | |
2da56c5bd7b5f33eb8e7769cb76c29a64058c96e | flexget/plugins/est_released_series.py | flexget/plugins/est_released_series.py | from __future__ import unicode_literals, division, absolute_import
import logging
from sqlalchemy import desc, func
from flexget.manager import Session
from flexget.plugin import register_plugin, priority
from flexget.plugins.filter.series import SeriesDatabase, Series, Episode
from flexget.utils.tools import multipl... | from __future__ import unicode_literals, division, absolute_import
import logging
from sqlalchemy import desc, func
from flexget.manager import Session
from flexget.plugin import register_plugin, priority, DependencyError
from flexget.utils.tools import multiply_timedelta
try:
from flexget.plugins.filter.series i... | Raise DependencyError when series plugin is missing | Raise DependencyError when series plugin is missing
| Python | mit | vfrc2/Flexget,dsemi/Flexget,Danfocus/Flexget,thalamus/Flexget,JorisDeRieck/Flexget,crawln45/Flexget,antivirtel/Flexget,ibrahimkarahan/Flexget,poulpito/Flexget,voriux/Flexget,drwyrm/Flexget,Pretagonist/Flexget,qk4l/Flexget,patsissons/Flexget,JorisDeRieck/Flexget,malkavi/Flexget,X-dark/Flexget,JorisDeRieck/Flexget,tsnoam... | from __future__ import unicode_literals, division, absolute_import
import logging
from sqlalchemy import desc, func
from flexget.manager import Session
from flexget.plugin import register_plugin, priority
from flexget.plugins.filter.series import SeriesDatabase, Series, Episode
from flexget.utils.tools import multipl... | from __future__ import unicode_literals, division, absolute_import
import logging
from sqlalchemy import desc, func
from flexget.manager import Session
from flexget.plugin import register_plugin, priority, DependencyError
from flexget.utils.tools import multiply_timedelta
try:
from flexget.plugins.filter.series i... | <commit_before>from __future__ import unicode_literals, division, absolute_import
import logging
from sqlalchemy import desc, func
from flexget.manager import Session
from flexget.plugin import register_plugin, priority
from flexget.plugins.filter.series import SeriesDatabase, Series, Episode
from flexget.utils.tools... | from __future__ import unicode_literals, division, absolute_import
import logging
from sqlalchemy import desc, func
from flexget.manager import Session
from flexget.plugin import register_plugin, priority, DependencyError
from flexget.utils.tools import multiply_timedelta
try:
from flexget.plugins.filter.series i... | from __future__ import unicode_literals, division, absolute_import
import logging
from sqlalchemy import desc, func
from flexget.manager import Session
from flexget.plugin import register_plugin, priority
from flexget.plugins.filter.series import SeriesDatabase, Series, Episode
from flexget.utils.tools import multipl... | <commit_before>from __future__ import unicode_literals, division, absolute_import
import logging
from sqlalchemy import desc, func
from flexget.manager import Session
from flexget.plugin import register_plugin, priority
from flexget.plugins.filter.series import SeriesDatabase, Series, Episode
from flexget.utils.tools... |
04a8da721f246382967c4e834ffac8a54506ae94 | test/test_text_utils.py | test/test_text_utils.py | """
Tests for text_utils.py
part of https://github.com/evil-mad/plotink
"""
import unittest
from plotink import text_utils
# python -m unittest discover in top-level package dir
# pylint: disable=too-many-public-methods
class TextUtilsTestCase(unittest.TestCase):
"""
Unit tests for text_utils.py
"""... | Add unit tests for text_utils | Add unit tests for text_utils
| Python | mit | evil-mad/plotink | Add unit tests for text_utils | """
Tests for text_utils.py
part of https://github.com/evil-mad/plotink
"""
import unittest
from plotink import text_utils
# python -m unittest discover in top-level package dir
# pylint: disable=too-many-public-methods
class TextUtilsTestCase(unittest.TestCase):
"""
Unit tests for text_utils.py
"""... | <commit_before><commit_msg>Add unit tests for text_utils<commit_after> | """
Tests for text_utils.py
part of https://github.com/evil-mad/plotink
"""
import unittest
from plotink import text_utils
# python -m unittest discover in top-level package dir
# pylint: disable=too-many-public-methods
class TextUtilsTestCase(unittest.TestCase):
"""
Unit tests for text_utils.py
"""... | Add unit tests for text_utils"""
Tests for text_utils.py
part of https://github.com/evil-mad/plotink
"""
import unittest
from plotink import text_utils
# python -m unittest discover in top-level package dir
# pylint: disable=too-many-public-methods
class TextUtilsTestCase(unittest.TestCase):
"""
Unit te... | <commit_before><commit_msg>Add unit tests for text_utils<commit_after>"""
Tests for text_utils.py
part of https://github.com/evil-mad/plotink
"""
import unittest
from plotink import text_utils
# python -m unittest discover in top-level package dir
# pylint: disable=too-many-public-methods
class TextUtilsTestCas... | |
7b0d2caf4b2a0ed5074d847166b0868a4a2d5d7c | scripts/split_indexed.py | scripts/split_indexed.py | import argparse
import os
import struct
import tqdm
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--input', required=True)
parser.add_argument('--num-pieces', required=True, type=int)
args = parser.parse_args()
root, ext = os.path.splitext(args.input)
ind... | Add script to split indexed files | Add script to split indexed files
| Python | apache-2.0 | nearai/program_synthesis,nearai/program_synthesis | Add script to split indexed files | import argparse
import os
import struct
import tqdm
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--input', required=True)
parser.add_argument('--num-pieces', required=True, type=int)
args = parser.parse_args()
root, ext = os.path.splitext(args.input)
ind... | <commit_before><commit_msg>Add script to split indexed files<commit_after> | import argparse
import os
import struct
import tqdm
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--input', required=True)
parser.add_argument('--num-pieces', required=True, type=int)
args = parser.parse_args()
root, ext = os.path.splitext(args.input)
ind... | Add script to split indexed filesimport argparse
import os
import struct
import tqdm
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--input', required=True)
parser.add_argument('--num-pieces', required=True, type=int)
args = parser.parse_args()
root, ext = os.p... | <commit_before><commit_msg>Add script to split indexed files<commit_after>import argparse
import os
import struct
import tqdm
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--input', required=True)
parser.add_argument('--num-pieces', required=True, type=int)
args = ... | |
a42c4423748171c5611d82a101f3b70741ff75db | tests/test_increment.py | tests/test_increment.py | from gypsy import increment
def test_increment_basal_area_pl():
args = []
expected = None
result = increment.increment_basal_area_pl(*args)
assert result == expected
# TODO: known value
# TODO: 0 as an input
# TODO: negative as an input
def test_increment_basal_area_aw():
args = []
... | Add boilerplate for increment tests | Add boilerplate for increment tests
These would have been very helpful when introducing cython for increment
functions. It is a lot easier to debug at this fine grained level than
in wrapping functions.
| Python | mit | tesera/pygypsy,tesera/pygypsy | Add boilerplate for increment tests
These would have been very helpful when introducing cython for increment
functions. It is a lot easier to debug at this fine grained level than
in wrapping functions. | from gypsy import increment
def test_increment_basal_area_pl():
args = []
expected = None
result = increment.increment_basal_area_pl(*args)
assert result == expected
# TODO: known value
# TODO: 0 as an input
# TODO: negative as an input
def test_increment_basal_area_aw():
args = []
... | <commit_before><commit_msg>Add boilerplate for increment tests
These would have been very helpful when introducing cython for increment
functions. It is a lot easier to debug at this fine grained level than
in wrapping functions.<commit_after> | from gypsy import increment
def test_increment_basal_area_pl():
args = []
expected = None
result = increment.increment_basal_area_pl(*args)
assert result == expected
# TODO: known value
# TODO: 0 as an input
# TODO: negative as an input
def test_increment_basal_area_aw():
args = []
... | Add boilerplate for increment tests
These would have been very helpful when introducing cython for increment
functions. It is a lot easier to debug at this fine grained level than
in wrapping functions.from gypsy import increment
def test_increment_basal_area_pl():
args = []
expected = None
result = incre... | <commit_before><commit_msg>Add boilerplate for increment tests
These would have been very helpful when introducing cython for increment
functions. It is a lot easier to debug at this fine grained level than
in wrapping functions.<commit_after>from gypsy import increment
def test_increment_basal_area_pl():
args = ... | |
885abeff9859320a59d3afeb297b8138f9c7fa51 | tools/audio_in_cards.py | tools/audio_in_cards.py | #!/usr/bin/env python
#
# Licensed under the BSD license. See full license in LICENSE file.
# http://www.lightshowpi.com/
#
# Author: Todd Giles ([email protected])
"""Trivial wrapper around alsaaduio.cards() for getting a list of your audio cards.
Helpful in determining the list of USB audio cards in advanced aud... | Update some comments on audio-in mode, including links to new wiki page. Also add tool wrapper around alsaaudio.cards() | Update some comments on audio-in mode, including links to new wiki page. Also add tool wrapper around alsaaudio.cards()
| Python | bsd-2-clause | Cerberus98/lightshowpi,Cerberus98/lightshowpi,bradowen2011/lightshowpi,wheeldog515/lightshowPi,bradowen2011/lightshowpi,wheeldog515/lightshowPi | Update some comments on audio-in mode, including links to new wiki page. Also add tool wrapper around alsaaudio.cards() | #!/usr/bin/env python
#
# Licensed under the BSD license. See full license in LICENSE file.
# http://www.lightshowpi.com/
#
# Author: Todd Giles ([email protected])
"""Trivial wrapper around alsaaduio.cards() for getting a list of your audio cards.
Helpful in determining the list of USB audio cards in advanced aud... | <commit_before><commit_msg>Update some comments on audio-in mode, including links to new wiki page. Also add tool wrapper around alsaaudio.cards()<commit_after> | #!/usr/bin/env python
#
# Licensed under the BSD license. See full license in LICENSE file.
# http://www.lightshowpi.com/
#
# Author: Todd Giles ([email protected])
"""Trivial wrapper around alsaaduio.cards() for getting a list of your audio cards.
Helpful in determining the list of USB audio cards in advanced aud... | Update some comments on audio-in mode, including links to new wiki page. Also add tool wrapper around alsaaudio.cards()#!/usr/bin/env python
#
# Licensed under the BSD license. See full license in LICENSE file.
# http://www.lightshowpi.com/
#
# Author: Todd Giles ([email protected])
"""Trivial wrapper around alsaa... | <commit_before><commit_msg>Update some comments on audio-in mode, including links to new wiki page. Also add tool wrapper around alsaaudio.cards()<commit_after>#!/usr/bin/env python
#
# Licensed under the BSD license. See full license in LICENSE file.
# http://www.lightshowpi.com/
#
# Author: Todd Giles (todd@lightsh... | |
eada7c5b0a82f870fa4a0850481b28bc34eb25bd | ms2ldaviz/debug_motifdb.py | ms2ldaviz/debug_motifdb.py | import requests
server_url = 'http://ms2lda.org/motifdb/'
# server_url = 'http://localhost:8000/motifdb/'
"""Grabbing the latest Motifs from MS2LDA"""
motifset_dict = requests.get(server_url + 'list_motifsets/', verify=False).json()
db_list = []
db_list.append(2)
db_list.append(4)
db_list.append(1)
db_list.append(3)
... | Add a motifdb debug script | Add a motifdb debug script
| Python | mit | sdrogers/ms2ldaviz,sdrogers/ms2ldaviz,sdrogers/ms2ldaviz,sdrogers/ms2ldaviz | Add a motifdb debug script | import requests
server_url = 'http://ms2lda.org/motifdb/'
# server_url = 'http://localhost:8000/motifdb/'
"""Grabbing the latest Motifs from MS2LDA"""
motifset_dict = requests.get(server_url + 'list_motifsets/', verify=False).json()
db_list = []
db_list.append(2)
db_list.append(4)
db_list.append(1)
db_list.append(3)
... | <commit_before><commit_msg>Add a motifdb debug script<commit_after> | import requests
server_url = 'http://ms2lda.org/motifdb/'
# server_url = 'http://localhost:8000/motifdb/'
"""Grabbing the latest Motifs from MS2LDA"""
motifset_dict = requests.get(server_url + 'list_motifsets/', verify=False).json()
db_list = []
db_list.append(2)
db_list.append(4)
db_list.append(1)
db_list.append(3)
... | Add a motifdb debug scriptimport requests
server_url = 'http://ms2lda.org/motifdb/'
# server_url = 'http://localhost:8000/motifdb/'
"""Grabbing the latest Motifs from MS2LDA"""
motifset_dict = requests.get(server_url + 'list_motifsets/', verify=False).json()
db_list = []
db_list.append(2)
db_list.append(4)
db_list.ap... | <commit_before><commit_msg>Add a motifdb debug script<commit_after>import requests
server_url = 'http://ms2lda.org/motifdb/'
# server_url = 'http://localhost:8000/motifdb/'
"""Grabbing the latest Motifs from MS2LDA"""
motifset_dict = requests.get(server_url + 'list_motifsets/', verify=False).json()
db_list = []
db_li... | |
012ea594d171041a9ff064783b7c0a392a827d4c | spacy/tests/test_misc.py | spacy/tests/test_misc.py | # coding: utf-8
from __future__ import unicode_literals
from ..util import ensure_path
from pathlib import Path
import pytest
@pytest.mark.parametrize('text', ['hello/world', 'hello world'])
def test_util_ensure_path_succeeds(text):
path = ensure_path(text)
assert isinstance(path, Path)
@pytest.mark.param... | Add file for misc tests | Add file for misc tests
| Python | mit | honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,raphael0202/spaCy,aikramer2/spaCy,raphael0202/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,honnibal/spaCy,recognai/spaCy,spacy-io/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,aikramer2/spaCy,explosion/spaCy,Gregory-Howard/spaCy,Gregory-Howard/s... | Add file for misc tests | # coding: utf-8
from __future__ import unicode_literals
from ..util import ensure_path
from pathlib import Path
import pytest
@pytest.mark.parametrize('text', ['hello/world', 'hello world'])
def test_util_ensure_path_succeeds(text):
path = ensure_path(text)
assert isinstance(path, Path)
@pytest.mark.param... | <commit_before><commit_msg>Add file for misc tests<commit_after> | # coding: utf-8
from __future__ import unicode_literals
from ..util import ensure_path
from pathlib import Path
import pytest
@pytest.mark.parametrize('text', ['hello/world', 'hello world'])
def test_util_ensure_path_succeeds(text):
path = ensure_path(text)
assert isinstance(path, Path)
@pytest.mark.param... | Add file for misc tests# coding: utf-8
from __future__ import unicode_literals
from ..util import ensure_path
from pathlib import Path
import pytest
@pytest.mark.parametrize('text', ['hello/world', 'hello world'])
def test_util_ensure_path_succeeds(text):
path = ensure_path(text)
assert isinstance(path, Pat... | <commit_before><commit_msg>Add file for misc tests<commit_after># coding: utf-8
from __future__ import unicode_literals
from ..util import ensure_path
from pathlib import Path
import pytest
@pytest.mark.parametrize('text', ['hello/world', 'hello world'])
def test_util_ensure_path_succeeds(text):
path = ensure_p... | |
5ecaed42c8f4389a6d12851d41c22dad22e2a2d8 | storm/src/py/resources/morelikethis.py | storm/src/py/resources/morelikethis.py | # -*- coding: utf-8 -*-
"""
zeit.recommend.morelikethis
~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module has no description.
Copyright: (c) 2013 by Nicolas Drebenstedt.
License: BSD, see LICENSE for more details.
"""
from elasticsearch import Elasticsearch
from storm import Bolt
from storm import log
fro... | Add barebone content-based, Solr-powered recommender | Add barebone content-based, Solr-powered recommender
| Python | bsd-2-clause | cutoffthetop/recommender,cutoffthetop/recommender,cutoffthetop/recommender | Add barebone content-based, Solr-powered recommender | # -*- coding: utf-8 -*-
"""
zeit.recommend.morelikethis
~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module has no description.
Copyright: (c) 2013 by Nicolas Drebenstedt.
License: BSD, see LICENSE for more details.
"""
from elasticsearch import Elasticsearch
from storm import Bolt
from storm import log
fro... | <commit_before><commit_msg>Add barebone content-based, Solr-powered recommender<commit_after> | # -*- coding: utf-8 -*-
"""
zeit.recommend.morelikethis
~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module has no description.
Copyright: (c) 2013 by Nicolas Drebenstedt.
License: BSD, see LICENSE for more details.
"""
from elasticsearch import Elasticsearch
from storm import Bolt
from storm import log
fro... | Add barebone content-based, Solr-powered recommender# -*- coding: utf-8 -*-
"""
zeit.recommend.morelikethis
~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module has no description.
Copyright: (c) 2013 by Nicolas Drebenstedt.
License: BSD, see LICENSE for more details.
"""
from elasticsearch import Elasticsea... | <commit_before><commit_msg>Add barebone content-based, Solr-powered recommender<commit_after># -*- coding: utf-8 -*-
"""
zeit.recommend.morelikethis
~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module has no description.
Copyright: (c) 2013 by Nicolas Drebenstedt.
License: BSD, see LICENSE for more details.
... | |
3174797eea1bd7ae131a355ab020ad26274b379a | vispy/scene/cameras/tests/test_link.py | vispy/scene/cameras/tests/test_link.py | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
f... | Add tests for camera linking | Add tests for camera linking
| Python | bsd-3-clause | Eric89GXL/vispy,Eric89GXL/vispy,Eric89GXL/vispy | Add tests for camera linking | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
f... | <commit_before><commit_msg>Add tests for camera linking<commit_after> | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
f... | Add tests for camera linking# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# ---------------------------------------------------... | <commit_before><commit_msg>Add tests for camera linking<commit_after># -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# ----------... | |
a2ff7e03da07f75b4ce8e67e9e2ef065f45e3338 | messenger/make_octave.py | messenger/make_octave.py | #!/usr/bin/python
from __future__ import print_function
import os
import sys
import shutil
import subprocess
# Check the system platform first
platform = sys.platform
print("This is a " + platform + " system")
if platform.startswith('linux'):
messenger_dir = 'mexa64'
elif platform.startswith('darwin'):
messen... | Add an octave build script | Add an octave build script
| Python | bsd-3-clause | jjangsangy/python-matlab-bridge,jjangsangy/python-matlab-bridge,arokem/python-matlab-bridge,arokem/python-matlab-bridge,blink1073/python-matlab-bridge,arokem/python-matlab-bridge,blink1073/python-matlab-bridge,jjangsangy/python-matlab-bridge,blink1073/python-matlab-bridge | Add an octave build script | #!/usr/bin/python
from __future__ import print_function
import os
import sys
import shutil
import subprocess
# Check the system platform first
platform = sys.platform
print("This is a " + platform + " system")
if platform.startswith('linux'):
messenger_dir = 'mexa64'
elif platform.startswith('darwin'):
messen... | <commit_before><commit_msg>Add an octave build script<commit_after> | #!/usr/bin/python
from __future__ import print_function
import os
import sys
import shutil
import subprocess
# Check the system platform first
platform = sys.platform
print("This is a " + platform + " system")
if platform.startswith('linux'):
messenger_dir = 'mexa64'
elif platform.startswith('darwin'):
messen... | Add an octave build script#!/usr/bin/python
from __future__ import print_function
import os
import sys
import shutil
import subprocess
# Check the system platform first
platform = sys.platform
print("This is a " + platform + " system")
if platform.startswith('linux'):
messenger_dir = 'mexa64'
elif platform.starts... | <commit_before><commit_msg>Add an octave build script<commit_after>#!/usr/bin/python
from __future__ import print_function
import os
import sys
import shutil
import subprocess
# Check the system platform first
platform = sys.platform
print("This is a " + platform + " system")
if platform.startswith('linux'):
mess... | |
3ccd2e71b314ba63c3df9f43635c92d996b5fed8 | libcloud/test/common/test_base_driver.py | libcloud/test/common/test_base_driver.py | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | Add failing regression test case for timeout argument preservation on the BaseDriver class. | Add failing regression test case for timeout argument preservation on the
BaseDriver class.
| Python | apache-2.0 | watermelo/libcloud,Scalr/libcloud,Scalr/libcloud,Kami/libcloud,lochiiconnectivity/libcloud,iPlantCollaborativeOpenSource/libcloud,ByteInternet/libcloud,Kami/libcloud,supertom/libcloud,t-tran/libcloud,DimensionDataCBUSydney/libcloud,mgogoulos/libcloud,illfelder/libcloud,StackPointCloud/libcloud,apache/libcloud,StackPoin... | Add failing regression test case for timeout argument preservation on the
BaseDriver class. | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | <commit_before><commit_msg>Add failing regression test case for timeout argument preservation on the
BaseDriver class.<commit_after> | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | Add failing regression test case for timeout argument preservation on the
BaseDriver class.# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses... | <commit_before><commit_msg>Add failing regression test case for timeout argument preservation on the
BaseDriver class.<commit_after># Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regardin... | |
bf771afb7b6cdef86d6c310882299e31102425c9 | examples/test_get_pdf_text.py | examples/test_get_pdf_text.py | from seleniumbase import BaseCase
class PdfTestClass(BaseCase):
def test_get_pdf_text(self):
pdf = ("https://nostarch.com/download/"
"Automate_the_Boring_Stuff_sample_ch17.pdf")
pdf_text = self.get_pdf_text(pdf, page=1)
print(pdf_text)
| Add an example test for get_pdf_text(pdf, page) | Add an example test for get_pdf_text(pdf, page)
| Python | mit | seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase | Add an example test for get_pdf_text(pdf, page) | from seleniumbase import BaseCase
class PdfTestClass(BaseCase):
def test_get_pdf_text(self):
pdf = ("https://nostarch.com/download/"
"Automate_the_Boring_Stuff_sample_ch17.pdf")
pdf_text = self.get_pdf_text(pdf, page=1)
print(pdf_text)
| <commit_before><commit_msg>Add an example test for get_pdf_text(pdf, page)<commit_after> | from seleniumbase import BaseCase
class PdfTestClass(BaseCase):
def test_get_pdf_text(self):
pdf = ("https://nostarch.com/download/"
"Automate_the_Boring_Stuff_sample_ch17.pdf")
pdf_text = self.get_pdf_text(pdf, page=1)
print(pdf_text)
| Add an example test for get_pdf_text(pdf, page)from seleniumbase import BaseCase
class PdfTestClass(BaseCase):
def test_get_pdf_text(self):
pdf = ("https://nostarch.com/download/"
"Automate_the_Boring_Stuff_sample_ch17.pdf")
pdf_text = self.get_pdf_text(pdf, page=1)
print(p... | <commit_before><commit_msg>Add an example test for get_pdf_text(pdf, page)<commit_after>from seleniumbase import BaseCase
class PdfTestClass(BaseCase):
def test_get_pdf_text(self):
pdf = ("https://nostarch.com/download/"
"Automate_the_Boring_Stuff_sample_ch17.pdf")
pdf_text = self.... | |
f9c40170e545e851a8cf6c0f861aa590f1a6078e | tests/unit/modules/inspect_fsdb_test.py | tests/unit/modules/inspect_fsdb_test.py | # -*- coding: utf-8 -*-
#
# Copyright 2016 SUSE LLC
#
# 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 agr... | Add initial tests for fsdb | Add initial tests for fsdb
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | Add initial tests for fsdb | # -*- coding: utf-8 -*-
#
# Copyright 2016 SUSE LLC
#
# 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 agr... | <commit_before><commit_msg>Add initial tests for fsdb<commit_after> | # -*- coding: utf-8 -*-
#
# Copyright 2016 SUSE LLC
#
# 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 agr... | Add initial tests for fsdb# -*- coding: utf-8 -*-
#
# Copyright 2016 SUSE LLC
#
# 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 require... | <commit_before><commit_msg>Add initial tests for fsdb<commit_after># -*- coding: utf-8 -*-
#
# Copyright 2016 SUSE LLC
#
# 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.or... | |
8e065cb164b4ec1a9aafd7f448555707a875fab9 | aggregator/espn_fc.py | aggregator/espn_fc.py | import datetime
from aggregator import exceptions
from aggregator.base import Aggregator, Article, InvalidArticle, make_soup
EXCLUDE_IF_IN_TITLE = ['LIVE:', 'WATCH:', 'LISTEN:']
class ESPNFC(Aggregator):
base_url = 'http://www.espnfc.com/?country-view=www&lang-view=en'
source = 'ESPN FC'
def extract(se... | Implement web scraping functionality for ESPN FC | Implement web scraping functionality for ESPN FC
| Python | apache-2.0 | footynews/fn_backend | Implement web scraping functionality for ESPN FC | import datetime
from aggregator import exceptions
from aggregator.base import Aggregator, Article, InvalidArticle, make_soup
EXCLUDE_IF_IN_TITLE = ['LIVE:', 'WATCH:', 'LISTEN:']
class ESPNFC(Aggregator):
base_url = 'http://www.espnfc.com/?country-view=www&lang-view=en'
source = 'ESPN FC'
def extract(se... | <commit_before><commit_msg>Implement web scraping functionality for ESPN FC<commit_after> | import datetime
from aggregator import exceptions
from aggregator.base import Aggregator, Article, InvalidArticle, make_soup
EXCLUDE_IF_IN_TITLE = ['LIVE:', 'WATCH:', 'LISTEN:']
class ESPNFC(Aggregator):
base_url = 'http://www.espnfc.com/?country-view=www&lang-view=en'
source = 'ESPN FC'
def extract(se... | Implement web scraping functionality for ESPN FCimport datetime
from aggregator import exceptions
from aggregator.base import Aggregator, Article, InvalidArticle, make_soup
EXCLUDE_IF_IN_TITLE = ['LIVE:', 'WATCH:', 'LISTEN:']
class ESPNFC(Aggregator):
base_url = 'http://www.espnfc.com/?country-view=www&lang-vie... | <commit_before><commit_msg>Implement web scraping functionality for ESPN FC<commit_after>import datetime
from aggregator import exceptions
from aggregator.base import Aggregator, Article, InvalidArticle, make_soup
EXCLUDE_IF_IN_TITLE = ['LIVE:', 'WATCH:', 'LISTEN:']
class ESPNFC(Aggregator):
base_url = 'http://... | |
1ec2cac94d7f98d651df32b21971039bddfbb996 | tempest/tests/lib/services/volume/v2/test_extensions_client.py | tempest/tests/lib/services/volume/v2/test_extensions_client.py | # Copyright 2017 FiberHome Telecommunication Technologies CO.,LTD
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LI... | Add unit test for volume extensions client | Add unit test for volume extensions client
This patch adds unit test for volume v2 extensions client.
Partially Implements: blueprint tempest-lib-missing-test-coverage
Change-Id: I5a614fb92f44f5960610dc39299c6effb979be9a
| Python | apache-2.0 | masayukig/tempest,openstack/tempest,cisco-openstack/tempest,openstack/tempest,cisco-openstack/tempest,vedujoshi/tempest,Juniper/tempest,Juniper/tempest,vedujoshi/tempest,masayukig/tempest | Add unit test for volume extensions client
This patch adds unit test for volume v2 extensions client.
Partially Implements: blueprint tempest-lib-missing-test-coverage
Change-Id: I5a614fb92f44f5960610dc39299c6effb979be9a | # Copyright 2017 FiberHome Telecommunication Technologies CO.,LTD
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LI... | <commit_before><commit_msg>Add unit test for volume extensions client
This patch adds unit test for volume v2 extensions client.
Partially Implements: blueprint tempest-lib-missing-test-coverage
Change-Id: I5a614fb92f44f5960610dc39299c6effb979be9a<commit_after> | # Copyright 2017 FiberHome Telecommunication Technologies CO.,LTD
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LI... | Add unit test for volume extensions client
This patch adds unit test for volume v2 extensions client.
Partially Implements: blueprint tempest-lib-missing-test-coverage
Change-Id: I5a614fb92f44f5960610dc39299c6effb979be9a# Copyright 2017 FiberHome Telecommunication Technologies CO.,LTD
# All Rights Reserved.
#
# L... | <commit_before><commit_msg>Add unit test for volume extensions client
This patch adds unit test for volume v2 extensions client.
Partially Implements: blueprint tempest-lib-missing-test-coverage
Change-Id: I5a614fb92f44f5960610dc39299c6effb979be9a<commit_after># Copyright 2017 FiberHome Telecommunication Technologie... | |
9ef706517a0ee3b460881d99d667fa5ba2829a12 | admin/mailu/dockercli.py | admin/mailu/dockercli.py | from mailu import app
import docker
import signal
# Connect to the Docker socket
cli = docker.Client(base_url=app.config['DOCKER_SOCKET'])
def get(*names):
result = {}
all_containers = cli.containers(all=True)
for brief in all_containers:
if brief['Image'].startswith('mailu/'):
cont... | Add the Docker client helper | Add the Docker client helper
| Python | mit | kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io | Add the Docker client helper | from mailu import app
import docker
import signal
# Connect to the Docker socket
cli = docker.Client(base_url=app.config['DOCKER_SOCKET'])
def get(*names):
result = {}
all_containers = cli.containers(all=True)
for brief in all_containers:
if brief['Image'].startswith('mailu/'):
cont... | <commit_before><commit_msg>Add the Docker client helper<commit_after> | from mailu import app
import docker
import signal
# Connect to the Docker socket
cli = docker.Client(base_url=app.config['DOCKER_SOCKET'])
def get(*names):
result = {}
all_containers = cli.containers(all=True)
for brief in all_containers:
if brief['Image'].startswith('mailu/'):
cont... | Add the Docker client helperfrom mailu import app
import docker
import signal
# Connect to the Docker socket
cli = docker.Client(base_url=app.config['DOCKER_SOCKET'])
def get(*names):
result = {}
all_containers = cli.containers(all=True)
for brief in all_containers:
if brief['Image'].startswith... | <commit_before><commit_msg>Add the Docker client helper<commit_after>from mailu import app
import docker
import signal
# Connect to the Docker socket
cli = docker.Client(base_url=app.config['DOCKER_SOCKET'])
def get(*names):
result = {}
all_containers = cli.containers(all=True)
for brief in all_contain... | |
d9c59ed8556c02d612eeb55fdfc3fc6ceef8844c | setup.py | setup.py | from setuptools import setup, find_packages
def get_long_description():
with open('./README.rst', 'r') as readme:
return readme.read()
setup(
name='django-email-tracker',
version='0.2',
description='Email Tracker for Django',
author='Venelina Yanakieva',
author_email='vili@magicsoluti... | from setuptools import setup, find_packages
def get_long_description():
with open('./README.rst', 'r') as readme:
return readme.read()
setup(
name='django-email-tracker',
version='0.2',
description='Email Tracker for Django',
author='Venelina Yanakieva',
author_email='vili@magicsoluti... | Add maintainer and download URL | Add maintainer and download URL | Python | mit | MagicSolutions/django-email-tracker,IndustriaTech/django-email-tracker | from setuptools import setup, find_packages
def get_long_description():
with open('./README.rst', 'r') as readme:
return readme.read()
setup(
name='django-email-tracker',
version='0.2',
description='Email Tracker for Django',
author='Venelina Yanakieva',
author_email='vili@magicsoluti... | from setuptools import setup, find_packages
def get_long_description():
with open('./README.rst', 'r') as readme:
return readme.read()
setup(
name='django-email-tracker',
version='0.2',
description='Email Tracker for Django',
author='Venelina Yanakieva',
author_email='vili@magicsoluti... | <commit_before>from setuptools import setup, find_packages
def get_long_description():
with open('./README.rst', 'r') as readme:
return readme.read()
setup(
name='django-email-tracker',
version='0.2',
description='Email Tracker for Django',
author='Venelina Yanakieva',
author_email='v... | from setuptools import setup, find_packages
def get_long_description():
with open('./README.rst', 'r') as readme:
return readme.read()
setup(
name='django-email-tracker',
version='0.2',
description='Email Tracker for Django',
author='Venelina Yanakieva',
author_email='vili@magicsoluti... | from setuptools import setup, find_packages
def get_long_description():
with open('./README.rst', 'r') as readme:
return readme.read()
setup(
name='django-email-tracker',
version='0.2',
description='Email Tracker for Django',
author='Venelina Yanakieva',
author_email='vili@magicsoluti... | <commit_before>from setuptools import setup, find_packages
def get_long_description():
with open('./README.rst', 'r') as readme:
return readme.read()
setup(
name='django-email-tracker',
version='0.2',
description='Email Tracker for Django',
author='Venelina Yanakieva',
author_email='v... |
1ef6ec49377eee80c33f37ca7db5133404df9ce6 | setup.py | setup.py | from setuptools import setup
setup(
name='PyHunter',
packages=['PyHunter'],
version='0.2',
description='An (unofficial) Python wrapper for the Hunter.io API',
author='Quentin Durantay',
author_email='[email protected]',
url='https://github.com/VonStruddle/PyHunter',
download_u... | from setuptools import setup
setup(
name='pyhunter',
packages=['pyhunter'],
version='0.2',
description='An (unofficial) Python wrapper for the Hunter.io API',
author='Quentin Durantay',
author_email='[email protected]',
url='https://github.com/VonStruddle/PyHunter',
download_u... | Use lowercase name for library | Use lowercase name for library
| Python | mit | VonStruddle/PyHunter | from setuptools import setup
setup(
name='PyHunter',
packages=['PyHunter'],
version='0.2',
description='An (unofficial) Python wrapper for the Hunter.io API',
author='Quentin Durantay',
author_email='[email protected]',
url='https://github.com/VonStruddle/PyHunter',
download_u... | from setuptools import setup
setup(
name='pyhunter',
packages=['pyhunter'],
version='0.2',
description='An (unofficial) Python wrapper for the Hunter.io API',
author='Quentin Durantay',
author_email='[email protected]',
url='https://github.com/VonStruddle/PyHunter',
download_u... | <commit_before>from setuptools import setup
setup(
name='PyHunter',
packages=['PyHunter'],
version='0.2',
description='An (unofficial) Python wrapper for the Hunter.io API',
author='Quentin Durantay',
author_email='[email protected]',
url='https://github.com/VonStruddle/PyHunter',... | from setuptools import setup
setup(
name='pyhunter',
packages=['pyhunter'],
version='0.2',
description='An (unofficial) Python wrapper for the Hunter.io API',
author='Quentin Durantay',
author_email='[email protected]',
url='https://github.com/VonStruddle/PyHunter',
download_u... | from setuptools import setup
setup(
name='PyHunter',
packages=['PyHunter'],
version='0.2',
description='An (unofficial) Python wrapper for the Hunter.io API',
author='Quentin Durantay',
author_email='[email protected]',
url='https://github.com/VonStruddle/PyHunter',
download_u... | <commit_before>from setuptools import setup
setup(
name='PyHunter',
packages=['PyHunter'],
version='0.2',
description='An (unofficial) Python wrapper for the Hunter.io API',
author='Quentin Durantay',
author_email='[email protected]',
url='https://github.com/VonStruddle/PyHunter',... |
be5ccf56a43732ca799ebd9197af98f0175f0b7f | CodeFights/floatRange.py | CodeFights/floatRange.py | #!/usr/local/bin/python
# Code Fights Float Range Problem
from itertools import count, takewhile
def floatRange(start, stop, step):
gen = takewhile(lambda x: x < stop, count(start, step))
return list(gen)
def main():
tests = [
[-0.9, 0.45, 0.2, [-0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3]],
... | Solve Code Fights float range problem | Solve Code Fights float range problem
| Python | mit | HKuz/Test_Code | Solve Code Fights float range problem | #!/usr/local/bin/python
# Code Fights Float Range Problem
from itertools import count, takewhile
def floatRange(start, stop, step):
gen = takewhile(lambda x: x < stop, count(start, step))
return list(gen)
def main():
tests = [
[-0.9, 0.45, 0.2, [-0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3]],
... | <commit_before><commit_msg>Solve Code Fights float range problem<commit_after> | #!/usr/local/bin/python
# Code Fights Float Range Problem
from itertools import count, takewhile
def floatRange(start, stop, step):
gen = takewhile(lambda x: x < stop, count(start, step))
return list(gen)
def main():
tests = [
[-0.9, 0.45, 0.2, [-0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3]],
... | Solve Code Fights float range problem#!/usr/local/bin/python
# Code Fights Float Range Problem
from itertools import count, takewhile
def floatRange(start, stop, step):
gen = takewhile(lambda x: x < stop, count(start, step))
return list(gen)
def main():
tests = [
[-0.9, 0.45, 0.2, [-0.9, -0.7, ... | <commit_before><commit_msg>Solve Code Fights float range problem<commit_after>#!/usr/local/bin/python
# Code Fights Float Range Problem
from itertools import count, takewhile
def floatRange(start, stop, step):
gen = takewhile(lambda x: x < stop, count(start, step))
return list(gen)
def main():
tests = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.