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
89249f0b6663745172a6842291ffed9805f07f83
test/test_Table_class.py
test/test_Table_class.py
#!/usr/bin/env python # ScraperWiki Limited # Ian Hopkinson, 2013-07-30 # -*- coding: utf-8 -*- """ Tests the Table class which contains metadata """ import sys sys.path.append('code') from pdftables import get_tables from nose.tools import * def test_it_includes_page_numbers(): fh = open('fixtures/sample_data/...
Test for adding page numbers using Table class
Test for adding page numbers using Table class
Python
bsd-2-clause
davidastephens/pdftables,okfn/pdftables,okfn/pdftables,davidastephens/pdftables
Test for adding page numbers using Table class
#!/usr/bin/env python # ScraperWiki Limited # Ian Hopkinson, 2013-07-30 # -*- coding: utf-8 -*- """ Tests the Table class which contains metadata """ import sys sys.path.append('code') from pdftables import get_tables from nose.tools import * def test_it_includes_page_numbers(): fh = open('fixtures/sample_data/...
<commit_before><commit_msg>Test for adding page numbers using Table class<commit_after>
#!/usr/bin/env python # ScraperWiki Limited # Ian Hopkinson, 2013-07-30 # -*- coding: utf-8 -*- """ Tests the Table class which contains metadata """ import sys sys.path.append('code') from pdftables import get_tables from nose.tools import * def test_it_includes_page_numbers(): fh = open('fixtures/sample_data/...
Test for adding page numbers using Table class#!/usr/bin/env python # ScraperWiki Limited # Ian Hopkinson, 2013-07-30 # -*- coding: utf-8 -*- """ Tests the Table class which contains metadata """ import sys sys.path.append('code') from pdftables import get_tables from nose.tools import * def test_it_includes_page_n...
<commit_before><commit_msg>Test for adding page numbers using Table class<commit_after>#!/usr/bin/env python # ScraperWiki Limited # Ian Hopkinson, 2013-07-30 # -*- coding: utf-8 -*- """ Tests the Table class which contains metadata """ import sys sys.path.append('code') from pdftables import get_tables from nose.to...
2291964afbbb8f2d896bb069bb37f24afc2fb081
snippet_parser/cs.py
snippet_parser/cs.py
from base import * class SnippetParser(SnippetParserBase): def strip_template(self, template, normalize, collapse): if self.is_citation_needed(template): # These templates often contain other information # (date/justification), so we drop it all here return CITATION_NEED...
Drop dates and comments from Czech templates.
Drop dates and comments from Czech templates.
Python
mit
Stryn/citationhunt,Stryn/citationhunt,Stryn/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt,jhsoby/citationhunt,Stryn/citationhunt
Drop dates and comments from Czech templates.
from base import * class SnippetParser(SnippetParserBase): def strip_template(self, template, normalize, collapse): if self.is_citation_needed(template): # These templates often contain other information # (date/justification), so we drop it all here return CITATION_NEED...
<commit_before><commit_msg>Drop dates and comments from Czech templates.<commit_after>
from base import * class SnippetParser(SnippetParserBase): def strip_template(self, template, normalize, collapse): if self.is_citation_needed(template): # These templates often contain other information # (date/justification), so we drop it all here return CITATION_NEED...
Drop dates and comments from Czech templates.from base import * class SnippetParser(SnippetParserBase): def strip_template(self, template, normalize, collapse): if self.is_citation_needed(template): # These templates often contain other information # (date/justification), so we drop...
<commit_before><commit_msg>Drop dates and comments from Czech templates.<commit_after>from base import * class SnippetParser(SnippetParserBase): def strip_template(self, template, normalize, collapse): if self.is_citation_needed(template): # These templates often contain other information ...
68d4b700fe1ba8e0e7324a32821e31cdc899a66f
scriptserver.py
scriptserver.py
#!/usr/bin/env python '''ZoneScriptServer A server that runs scripts for all the objects in a zone. ''' import threading from threading import Timer import sched, time s = sched.scheduler(time.time, time.sleep) from settings import CLIENT_UPDATE_FREQ class ZoneScriptRunner(object): '''This is a class that holds...
Add a rudimentary script server. Does nothing at the moment.
Add a rudimentary script server. Does nothing at the moment.
Python
agpl-3.0
cnelsonsic/SimpleMMO,cnelsonsic/SimpleMMO,cnelsonsic/SimpleMMO
Add a rudimentary script server. Does nothing at the moment.
#!/usr/bin/env python '''ZoneScriptServer A server that runs scripts for all the objects in a zone. ''' import threading from threading import Timer import sched, time s = sched.scheduler(time.time, time.sleep) from settings import CLIENT_UPDATE_FREQ class ZoneScriptRunner(object): '''This is a class that holds...
<commit_before><commit_msg>Add a rudimentary script server. Does nothing at the moment.<commit_after>
#!/usr/bin/env python '''ZoneScriptServer A server that runs scripts for all the objects in a zone. ''' import threading from threading import Timer import sched, time s = sched.scheduler(time.time, time.sleep) from settings import CLIENT_UPDATE_FREQ class ZoneScriptRunner(object): '''This is a class that holds...
Add a rudimentary script server. Does nothing at the moment.#!/usr/bin/env python '''ZoneScriptServer A server that runs scripts for all the objects in a zone. ''' import threading from threading import Timer import sched, time s = sched.scheduler(time.time, time.sleep) from settings import CLIENT_UPDATE_FREQ class...
<commit_before><commit_msg>Add a rudimentary script server. Does nothing at the moment.<commit_after>#!/usr/bin/env python '''ZoneScriptServer A server that runs scripts for all the objects in a zone. ''' import threading from threading import Timer import sched, time s = sched.scheduler(time.time, time.sleep) from ...
dfc51c72149f437d8e3f0064d2b8da65adb0ee49
migrations/versions/201608231135_5596683819c9_enable_abstract_feature_for_conferences.py
migrations/versions/201608231135_5596683819c9_enable_abstract_feature_for_conferences.py
"""Enable abstract feature for conferences Revision ID: 5596683819c9 Revises: ccd9d0858ff Create Date: 2016-08-23 11:35:26.018462 """ import json import sqlalchemy as sa from alembic import context, op # revision identifiers, used by Alembic. revision = '5596683819c9' down_revision = 'ccd9d0858ff' _update_setting...
Add alembic revision to enable abstract feature
Add alembic revision to enable abstract feature
Python
mit
DirkHoffmann/indico,pferreir/indico,OmeGak/indico,mvidalgarcia/indico,mic4ael/indico,DirkHoffmann/indico,DirkHoffmann/indico,pferreir/indico,mvidalgarcia/indico,indico/indico,ThiefMaster/indico,mvidalgarcia/indico,pferreir/indico,OmeGak/indico,pferreir/indico,DirkHoffmann/indico,ThiefMaster/indico,OmeGak/indico,mic4ael...
Add alembic revision to enable abstract feature
"""Enable abstract feature for conferences Revision ID: 5596683819c9 Revises: ccd9d0858ff Create Date: 2016-08-23 11:35:26.018462 """ import json import sqlalchemy as sa from alembic import context, op # revision identifiers, used by Alembic. revision = '5596683819c9' down_revision = 'ccd9d0858ff' _update_setting...
<commit_before><commit_msg>Add alembic revision to enable abstract feature<commit_after>
"""Enable abstract feature for conferences Revision ID: 5596683819c9 Revises: ccd9d0858ff Create Date: 2016-08-23 11:35:26.018462 """ import json import sqlalchemy as sa from alembic import context, op # revision identifiers, used by Alembic. revision = '5596683819c9' down_revision = 'ccd9d0858ff' _update_setting...
Add alembic revision to enable abstract feature"""Enable abstract feature for conferences Revision ID: 5596683819c9 Revises: ccd9d0858ff Create Date: 2016-08-23 11:35:26.018462 """ import json import sqlalchemy as sa from alembic import context, op # revision identifiers, used by Alembic. revision = '5596683819c9'...
<commit_before><commit_msg>Add alembic revision to enable abstract feature<commit_after>"""Enable abstract feature for conferences Revision ID: 5596683819c9 Revises: ccd9d0858ff Create Date: 2016-08-23 11:35:26.018462 """ import json import sqlalchemy as sa from alembic import context, op # revision identifiers, u...
0bad9bbe99296044a631780d76e390f009cb977a
setup.py
setup.py
#!/usr/bin/env python """Setup script for the kconfiglib module.""" from distutils.core import setup setup (# Distribution meta-data name = "kconfiglib", version = "0.0.1", description = "A flexible Python Kconfig parser", author = "Ulfalizer Magnusson", author_email = "kconfiglib@...
Add dist-utils support for gentoo ebuild
Add dist-utils support for gentoo ebuild
Python
isc
ulfalizer/Kconfiglib,ulfalizer/Kconfiglib
Add dist-utils support for gentoo ebuild
#!/usr/bin/env python """Setup script for the kconfiglib module.""" from distutils.core import setup setup (# Distribution meta-data name = "kconfiglib", version = "0.0.1", description = "A flexible Python Kconfig parser", author = "Ulfalizer Magnusson", author_email = "kconfiglib@...
<commit_before><commit_msg>Add dist-utils support for gentoo ebuild<commit_after>
#!/usr/bin/env python """Setup script for the kconfiglib module.""" from distutils.core import setup setup (# Distribution meta-data name = "kconfiglib", version = "0.0.1", description = "A flexible Python Kconfig parser", author = "Ulfalizer Magnusson", author_email = "kconfiglib@...
Add dist-utils support for gentoo ebuild#!/usr/bin/env python """Setup script for the kconfiglib module.""" from distutils.core import setup setup (# Distribution meta-data name = "kconfiglib", version = "0.0.1", description = "A flexible Python Kconfig parser", author = "Ulfalizer Magnus...
<commit_before><commit_msg>Add dist-utils support for gentoo ebuild<commit_after>#!/usr/bin/env python """Setup script for the kconfiglib module.""" from distutils.core import setup setup (# Distribution meta-data name = "kconfiglib", version = "0.0.1", description = "A flexible Python Kconfig p...
74e6406b8a7e04b5092d5673e9911b89b0861bc1
sk_lr.py
sk_lr.py
import numpy as np import pylab as pl import feature_extractor as fe from sklearn import linear_model (features, targets) = fe.extract_train() (features_test, targets_test) = fe.extract_test() classifier = linear_model.LogisticRegression(C = 1e5, tol = 0.0001) classifier.fit(features, targets) target_test_hat = clas...
Implement first version of LR classifier
Implement first version of LR classifier
Python
mit
trein/quora-classifier
Implement first version of LR classifier
import numpy as np import pylab as pl import feature_extractor as fe from sklearn import linear_model (features, targets) = fe.extract_train() (features_test, targets_test) = fe.extract_test() classifier = linear_model.LogisticRegression(C = 1e5, tol = 0.0001) classifier.fit(features, targets) target_test_hat = clas...
<commit_before><commit_msg>Implement first version of LR classifier<commit_after>
import numpy as np import pylab as pl import feature_extractor as fe from sklearn import linear_model (features, targets) = fe.extract_train() (features_test, targets_test) = fe.extract_test() classifier = linear_model.LogisticRegression(C = 1e5, tol = 0.0001) classifier.fit(features, targets) target_test_hat = clas...
Implement first version of LR classifierimport numpy as np import pylab as pl import feature_extractor as fe from sklearn import linear_model (features, targets) = fe.extract_train() (features_test, targets_test) = fe.extract_test() classifier = linear_model.LogisticRegression(C = 1e5, tol = 0.0001) classifier.fit(fe...
<commit_before><commit_msg>Implement first version of LR classifier<commit_after>import numpy as np import pylab as pl import feature_extractor as fe from sklearn import linear_model (features, targets) = fe.extract_train() (features_test, targets_test) = fe.extract_test() classifier = linear_model.LogisticRegression...
65af5543d02ccbfb04a3137a03ed0ff3874bc0ca
app/migrations/versions/4673b3fa0d68_.py
app/migrations/versions/4673b3fa0d68_.py
"""Add geom field to zones to hold regions. Revision ID: 4673b3fa0d68 Revises: 4ef20b76cab1 Create Date: 2015-02-11 21:12:26.578588 """ # revision identifiers, used by Alembic. revision = '4673b3fa0d68' down_revision = '4ef20b76cab1' from alembic import op import sqlalchemy as sa import geoalchemy2 as geo def upg...
Add geography column to zones.
Add geography column to zones.
Python
mit
openchattanooga/cpd-zones-old,openchattanooga/cpd-zones-old
Add geography column to zones.
"""Add geom field to zones to hold regions. Revision ID: 4673b3fa0d68 Revises: 4ef20b76cab1 Create Date: 2015-02-11 21:12:26.578588 """ # revision identifiers, used by Alembic. revision = '4673b3fa0d68' down_revision = '4ef20b76cab1' from alembic import op import sqlalchemy as sa import geoalchemy2 as geo def upg...
<commit_before><commit_msg>Add geography column to zones.<commit_after>
"""Add geom field to zones to hold regions. Revision ID: 4673b3fa0d68 Revises: 4ef20b76cab1 Create Date: 2015-02-11 21:12:26.578588 """ # revision identifiers, used by Alembic. revision = '4673b3fa0d68' down_revision = '4ef20b76cab1' from alembic import op import sqlalchemy as sa import geoalchemy2 as geo def upg...
Add geography column to zones."""Add geom field to zones to hold regions. Revision ID: 4673b3fa0d68 Revises: 4ef20b76cab1 Create Date: 2015-02-11 21:12:26.578588 """ # revision identifiers, used by Alembic. revision = '4673b3fa0d68' down_revision = '4ef20b76cab1' from alembic import op import sqlalchemy as sa impor...
<commit_before><commit_msg>Add geography column to zones.<commit_after>"""Add geom field to zones to hold regions. Revision ID: 4673b3fa0d68 Revises: 4ef20b76cab1 Create Date: 2015-02-11 21:12:26.578588 """ # revision identifiers, used by Alembic. revision = '4673b3fa0d68' down_revision = '4ef20b76cab1' from alembi...
13619ef1404ca88ba08e74e0aa2cfa7d418c4c6b
tests/rules_tests/grammarManipulation_tests/InactiveRulesTest.py
tests/rules_tests/grammarManipulation_tests/InactiveRulesTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule as _R from ..grammar import * class InactiveRulesTest(TestCase): def __init__(self, *args): super().__init__(*...
Add file for inactive rules tests
Add file for inactive rules tests
Python
mit
PatrikValkovic/grammpy
Add file for inactive rules tests
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule as _R from ..grammar import * class InactiveRulesTest(TestCase): def __init__(self, *args): super().__init__(*...
<commit_before><commit_msg>Add file for inactive rules tests<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule as _R from ..grammar import * class InactiveRulesTest(TestCase): def __init__(self, *args): super().__init__(*...
Add file for inactive rules tests#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule as _R from ..grammar import * class InactiveRulesTest(TestCase): def __init__(self, *...
<commit_before><commit_msg>Add file for inactive rules tests<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Grammar, Nonterminal, Rule as _R from ..grammar import * class InactiveRule...
4e1985a0f69da6b8e2261795d2d710d86382596a
create_ands_rif_cs_xml.py
create_ands_rif_cs_xml.py
""" Create an ANDS RIF-CS XML file. Links ----- - http://ands.org.au/guides/cpguide/cpgrifcs.html - http://services.ands.org.au/documentation/rifcs/guidelines/rif-cs.html - http://www.ands.org.au/resource/rif-cs.html """ import logging import os from settings import ( ANDS_XML_FILE_NAME, ANDS_XML_FOLDER_PATH, AN...
Add ANDS RIF-CS conversion script
Add ANDS RIF-CS conversion script
Python
mit
AustralianAntarcticDataCentre/metadata_xml_convert,AustralianAntarcticDataCentre/metadata_xml_convert
Add ANDS RIF-CS conversion script
""" Create an ANDS RIF-CS XML file. Links ----- - http://ands.org.au/guides/cpguide/cpgrifcs.html - http://services.ands.org.au/documentation/rifcs/guidelines/rif-cs.html - http://www.ands.org.au/resource/rif-cs.html """ import logging import os from settings import ( ANDS_XML_FILE_NAME, ANDS_XML_FOLDER_PATH, AN...
<commit_before><commit_msg>Add ANDS RIF-CS conversion script<commit_after>
""" Create an ANDS RIF-CS XML file. Links ----- - http://ands.org.au/guides/cpguide/cpgrifcs.html - http://services.ands.org.au/documentation/rifcs/guidelines/rif-cs.html - http://www.ands.org.au/resource/rif-cs.html """ import logging import os from settings import ( ANDS_XML_FILE_NAME, ANDS_XML_FOLDER_PATH, AN...
Add ANDS RIF-CS conversion script""" Create an ANDS RIF-CS XML file. Links ----- - http://ands.org.au/guides/cpguide/cpgrifcs.html - http://services.ands.org.au/documentation/rifcs/guidelines/rif-cs.html - http://www.ands.org.au/resource/rif-cs.html """ import logging import os from settings import ( ANDS_XML_FI...
<commit_before><commit_msg>Add ANDS RIF-CS conversion script<commit_after>""" Create an ANDS RIF-CS XML file. Links ----- - http://ands.org.au/guides/cpguide/cpgrifcs.html - http://services.ands.org.au/documentation/rifcs/guidelines/rif-cs.html - http://www.ands.org.au/resource/rif-cs.html """ import logging impor...
fa6b42061c4aaa9354922c6942511892f3ff6386
extra/update_comments_from_spec.py
extra/update_comments_from_spec.py
import sys, os import re default_source_file = os.path.join(os.path.dirname(__file__), '../amqp/channel.py') def update_comments(comments_file, impl_file, result_file): text_file = open(impl_file, 'r') source = text_file.read() comments = get_comments(comments_file) for def_name, comment in com...
Add a script for updating comments(in methods). The script is used to sync the channnel.py comments with the AMQP spec.
Add a script for updating comments(in methods). The script is used to sync the channnel.py comments with the AMQP spec.
Python
lgpl-2.1
dims/py-amqp,yetone/py-amqp,yetone/py-amqp,jonahbull/py-amqp,dallasmarlow/py-amqp,smurfix/aio-py-amqp,dims/py-amqp,dallasmarlow/py-amqp,smurfix/aio-py-amqp,jonahbull/py-amqp
Add a script for updating comments(in methods). The script is used to sync the channnel.py comments with the AMQP spec.
import sys, os import re default_source_file = os.path.join(os.path.dirname(__file__), '../amqp/channel.py') def update_comments(comments_file, impl_file, result_file): text_file = open(impl_file, 'r') source = text_file.read() comments = get_comments(comments_file) for def_name, comment in com...
<commit_before><commit_msg>Add a script for updating comments(in methods). The script is used to sync the channnel.py comments with the AMQP spec.<commit_after>
import sys, os import re default_source_file = os.path.join(os.path.dirname(__file__), '../amqp/channel.py') def update_comments(comments_file, impl_file, result_file): text_file = open(impl_file, 'r') source = text_file.read() comments = get_comments(comments_file) for def_name, comment in com...
Add a script for updating comments(in methods). The script is used to sync the channnel.py comments with the AMQP spec.import sys, os import re default_source_file = os.path.join(os.path.dirname(__file__), '../amqp/channel.py') def update_comments(comments_file, impl_file, result_file): text_file = open(impl_f...
<commit_before><commit_msg>Add a script for updating comments(in methods). The script is used to sync the channnel.py comments with the AMQP spec.<commit_after>import sys, os import re default_source_file = os.path.join(os.path.dirname(__file__), '../amqp/channel.py') def update_comments(comments_file, impl_file, ...
e81e36304412e5cd86d91e3f79a17b845ec7a90d
django/neverlate/tasks.py
django/neverlate/tasks.py
from __future__ import absolute_import from celery import shared_task from calparser.tasks import parse_ical_from_url from calparser.models import CalendarEntry from django.contrib.auth.models import User @shared_task def reload_all_user_calendars(): """Reload calendars for all users using Celery""" for use...
Integrate calparser app with neverlate
Integrate calparser app with neverlate
Python
mit
myrjola/neverlate,myrjola/neverlate,myrjola/neverlate,myrjola/neverlate
Integrate calparser app with neverlate
from __future__ import absolute_import from celery import shared_task from calparser.tasks import parse_ical_from_url from calparser.models import CalendarEntry from django.contrib.auth.models import User @shared_task def reload_all_user_calendars(): """Reload calendars for all users using Celery""" for use...
<commit_before><commit_msg>Integrate calparser app with neverlate<commit_after>
from __future__ import absolute_import from celery import shared_task from calparser.tasks import parse_ical_from_url from calparser.models import CalendarEntry from django.contrib.auth.models import User @shared_task def reload_all_user_calendars(): """Reload calendars for all users using Celery""" for use...
Integrate calparser app with neverlatefrom __future__ import absolute_import from celery import shared_task from calparser.tasks import parse_ical_from_url from calparser.models import CalendarEntry from django.contrib.auth.models import User @shared_task def reload_all_user_calendars(): """Reload calendars for...
<commit_before><commit_msg>Integrate calparser app with neverlate<commit_after>from __future__ import absolute_import from celery import shared_task from calparser.tasks import parse_ical_from_url from calparser.models import CalendarEntry from django.contrib.auth.models import User @shared_task def reload_all_user...
8da10de91645206c6e47afbc7a955f5d69efa552
tests/font/BULLET.py
tests/font/BULLET.py
#!/usr/bin/env python '''Test that font.Text horizontal alignment works. Three labels will be rendered aligned left, center and right. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet import font import base_text class TEST_HALIGN(base_text.TextTestBase): font_name = ...
Test case for incorrect rendering of bullet noticed in a wydget test case.
Test case for incorrect rendering of bullet noticed in a wydget test case. git-svn-id: d4fdfcd4de20a449196f78acc655f735742cd30d@1197 14d46d22-621c-0410-bb3d-6f67920f7d95
Python
bsd-3-clause
regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations
Test case for incorrect rendering of bullet noticed in a wydget test case. git-svn-id: d4fdfcd4de20a449196f78acc655f735742cd30d@1197 14d46d22-621c-0410-bb3d-6f67920f7d95
#!/usr/bin/env python '''Test that font.Text horizontal alignment works. Three labels will be rendered aligned left, center and right. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet import font import base_text class TEST_HALIGN(base_text.TextTestBase): font_name = ...
<commit_before><commit_msg>Test case for incorrect rendering of bullet noticed in a wydget test case. git-svn-id: d4fdfcd4de20a449196f78acc655f735742cd30d@1197 14d46d22-621c-0410-bb3d-6f67920f7d95<commit_after>
#!/usr/bin/env python '''Test that font.Text horizontal alignment works. Three labels will be rendered aligned left, center and right. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet import font import base_text class TEST_HALIGN(base_text.TextTestBase): font_name = ...
Test case for incorrect rendering of bullet noticed in a wydget test case. git-svn-id: d4fdfcd4de20a449196f78acc655f735742cd30d@1197 14d46d22-621c-0410-bb3d-6f67920f7d95#!/usr/bin/env python '''Test that font.Text horizontal alignment works. Three labels will be rendered aligned left, center and right. ''' __docfo...
<commit_before><commit_msg>Test case for incorrect rendering of bullet noticed in a wydget test case. git-svn-id: d4fdfcd4de20a449196f78acc655f735742cd30d@1197 14d46d22-621c-0410-bb3d-6f67920f7d95<commit_after>#!/usr/bin/env python '''Test that font.Text horizontal alignment works. Three labels will be rendered ali...
dbe689882ad80e68750812950082d741e097b499
ipmi_constants.py
ipmi_constants.py
payload_types = { 'ipmi': 0x0, 'sol' : 0x1, 'rmcpplusopenreq': 0x10, 'rmcpplusopenresponse': 0x11, 'rakp1': 0x12, 'rakp2': 0x13, 'rakp3': 0x14, 'rakp4': 0x15, } rmcp_codes = { 1: 'Insufficient resources to create new session (wait for existing sessions to timeout)', 2: 'Invali...
Break out constantns to a diff file
Break out constantns to a diff file
Python
apache-2.0
openstack/pyghmi,openstack/pyghmi,benoit-canet/pyghmi,stackforge/pyghmi
Break out constantns to a diff file
payload_types = { 'ipmi': 0x0, 'sol' : 0x1, 'rmcpplusopenreq': 0x10, 'rmcpplusopenresponse': 0x11, 'rakp1': 0x12, 'rakp2': 0x13, 'rakp3': 0x14, 'rakp4': 0x15, } rmcp_codes = { 1: 'Insufficient resources to create new session (wait for existing sessions to timeout)', 2: 'Invali...
<commit_before><commit_msg>Break out constantns to a diff file<commit_after>
payload_types = { 'ipmi': 0x0, 'sol' : 0x1, 'rmcpplusopenreq': 0x10, 'rmcpplusopenresponse': 0x11, 'rakp1': 0x12, 'rakp2': 0x13, 'rakp3': 0x14, 'rakp4': 0x15, } rmcp_codes = { 1: 'Insufficient resources to create new session (wait for existing sessions to timeout)', 2: 'Invali...
Break out constantns to a diff file payload_types = { 'ipmi': 0x0, 'sol' : 0x1, 'rmcpplusopenreq': 0x10, 'rmcpplusopenresponse': 0x11, 'rakp1': 0x12, 'rakp2': 0x13, 'rakp3': 0x14, 'rakp4': 0x15, } rmcp_codes = { 1: 'Insufficient resources to create new session (wait for existing se...
<commit_before><commit_msg>Break out constantns to a diff file<commit_after> payload_types = { 'ipmi': 0x0, 'sol' : 0x1, 'rmcpplusopenreq': 0x10, 'rmcpplusopenresponse': 0x11, 'rakp1': 0x12, 'rakp2': 0x13, 'rakp3': 0x14, 'rakp4': 0x15, } rmcp_codes = { 1: 'Insufficient resources to...
e3ba99b74661f1b22340394b7e2b058371a0ed0e
rst2pdf/tests/input/test_180.py
rst2pdf/tests/input/test_180.py
# -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate from reportlab.platypus.paragraph import Paragraph from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.colors import Color from reportlab.platypus.flowables import _listWrapOn, _FUZZ from wordaxe.rl.NewParagraph...
Test case for wordaxe bug
Test case for wordaxe bug
Python
mit
rafaelmartins/rst2pdf,rafaelmartins/rst2pdf
Test case for wordaxe bug
# -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate from reportlab.platypus.paragraph import Paragraph from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.colors import Color from reportlab.platypus.flowables import _listWrapOn, _FUZZ from wordaxe.rl.NewParagraph...
<commit_before><commit_msg>Test case for wordaxe bug<commit_after>
# -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate from reportlab.platypus.paragraph import Paragraph from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.colors import Color from reportlab.platypus.flowables import _listWrapOn, _FUZZ from wordaxe.rl.NewParagraph...
Test case for wordaxe bug# -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate from reportlab.platypus.paragraph import Paragraph from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.colors import Color from reportlab.platypus.flowables import _listWrapOn, _FUZZ fro...
<commit_before><commit_msg>Test case for wordaxe bug<commit_after># -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate from reportlab.platypus.paragraph import Paragraph from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.colors import Color from reportlab.platypu...
0b5d7edd0be2301ea6442c4537b09b9bd38957b2
string/test2.py
string/test2.py
#!/usr/local/bin/python width=input('Please input width: ') price_width=10 item_width=width-price_width header='%-*s%*s' format='%-*s%*.2f' print width*'=' print header %(item_width,'Item',price_width,'Price') print width*'-' print format%(item_width,'Apple',price_width,0.442) print format%(item_width,'Pears',price_w...
Add a string format test.
Add a string format test.
Python
apache-2.0
Vayne-Lover/Python
Add a string format test.
#!/usr/local/bin/python width=input('Please input width: ') price_width=10 item_width=width-price_width header='%-*s%*s' format='%-*s%*.2f' print width*'=' print header %(item_width,'Item',price_width,'Price') print width*'-' print format%(item_width,'Apple',price_width,0.442) print format%(item_width,'Pears',price_w...
<commit_before><commit_msg>Add a string format test.<commit_after>
#!/usr/local/bin/python width=input('Please input width: ') price_width=10 item_width=width-price_width header='%-*s%*s' format='%-*s%*.2f' print width*'=' print header %(item_width,'Item',price_width,'Price') print width*'-' print format%(item_width,'Apple',price_width,0.442) print format%(item_width,'Pears',price_w...
Add a string format test.#!/usr/local/bin/python width=input('Please input width: ') price_width=10 item_width=width-price_width header='%-*s%*s' format='%-*s%*.2f' print width*'=' print header %(item_width,'Item',price_width,'Price') print width*'-' print format%(item_width,'Apple',price_width,0.442) print format%(i...
<commit_before><commit_msg>Add a string format test.<commit_after>#!/usr/local/bin/python width=input('Please input width: ') price_width=10 item_width=width-price_width header='%-*s%*s' format='%-*s%*.2f' print width*'=' print header %(item_width,'Item',price_width,'Price') print width*'-' print format%(item_width,'...
824c89ff8e6276271d6df57f5df80fbebc097ddc
backend/api_calls_test.py
backend/api_calls_test.py
#!/bin/python2.7 import mock import unittest import api_calls class FakeFirebase(object): def get(self, path, item): return None def put(self, path, item, data): return None def patch(self, path, data): return None class TestApiCalls(unittest.TestCase): def setUp(self): self.db = FakeF...
Add mostly empty unit tests
Add mostly empty unit tests
Python
apache-2.0
google/playhvz,google/playhvz,google/playhvz,google/playhvz,google/playhvz,google/playhvz,google/playhvz,google/playhvz
Add mostly empty unit tests
#!/bin/python2.7 import mock import unittest import api_calls class FakeFirebase(object): def get(self, path, item): return None def put(self, path, item, data): return None def patch(self, path, data): return None class TestApiCalls(unittest.TestCase): def setUp(self): self.db = FakeF...
<commit_before><commit_msg>Add mostly empty unit tests<commit_after>
#!/bin/python2.7 import mock import unittest import api_calls class FakeFirebase(object): def get(self, path, item): return None def put(self, path, item, data): return None def patch(self, path, data): return None class TestApiCalls(unittest.TestCase): def setUp(self): self.db = FakeF...
Add mostly empty unit tests#!/bin/python2.7 import mock import unittest import api_calls class FakeFirebase(object): def get(self, path, item): return None def put(self, path, item, data): return None def patch(self, path, data): return None class TestApiCalls(unittest.TestCase): def setUp...
<commit_before><commit_msg>Add mostly empty unit tests<commit_after>#!/bin/python2.7 import mock import unittest import api_calls class FakeFirebase(object): def get(self, path, item): return None def put(self, path, item, data): return None def patch(self, path, data): return None class Test...
606018600e1a6162ff343af10b706d62dba705a2
webrtc/api/android/PRESUBMIT.py
webrtc/api/android/PRESUBMIT.py
# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
Add presubmit format requirement for webrtc/api/android
Add presubmit format requirement for webrtc/api/android BUG=webrtc:6419 NOTRY=True TBR=kjellander@webrtc.org Review-Url: https://codereview.webrtc.org/2377113003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#14435}
Python
bsd-3-clause
ShiftMediaProject/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc
Add presubmit format requirement for webrtc/api/android BUG=webrtc:6419 NOTRY=True TBR=kjellander@webrtc.org Review-Url: https://codereview.webrtc.org/2377113003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#14435}
# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
<commit_before><commit_msg>Add presubmit format requirement for webrtc/api/android BUG=webrtc:6419 NOTRY=True TBR=kjellander@webrtc.org Review-Url: https://codereview.webrtc.org/2377113003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#14435}<commit_after>
# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
Add presubmit format requirement for webrtc/api/android BUG=webrtc:6419 NOTRY=True TBR=kjellander@webrtc.org Review-Url: https://codereview.webrtc.org/2377113003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#14435}# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. # # Use of this s...
<commit_before><commit_msg>Add presubmit format requirement for webrtc/api/android BUG=webrtc:6419 NOTRY=True TBR=kjellander@webrtc.org Review-Url: https://codereview.webrtc.org/2377113003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#14435}<commit_after># Copyright (c) 2016 The WebRTC project author...
552289fd86446416eefec6356659a8333d091f79
util/plot_dh.py
util/plot_dh.py
#!/usr/bin/env python # # Script for plotting ECTester ECDH results. # # Example usage: # # > java -jar ECTesterReader.jar -dh 10000 -b 192 -fp -o dh.csv # ... # > ./plot_dh.py dh.csv # ... # import numpy as np import matplotlib.pyplot as plt import argparse from operator import itemgetter if __name__...
Add script to plot ECDH timing.
Add script to plot ECDH timing.
Python
mit
petrs/ECTester,petrs/ECTester,petrs/ECTester
Add script to plot ECDH timing.
#!/usr/bin/env python # # Script for plotting ECTester ECDH results. # # Example usage: # # > java -jar ECTesterReader.jar -dh 10000 -b 192 -fp -o dh.csv # ... # > ./plot_dh.py dh.csv # ... # import numpy as np import matplotlib.pyplot as plt import argparse from operator import itemgetter if __name__...
<commit_before><commit_msg>Add script to plot ECDH timing.<commit_after>
#!/usr/bin/env python # # Script for plotting ECTester ECDH results. # # Example usage: # # > java -jar ECTesterReader.jar -dh 10000 -b 192 -fp -o dh.csv # ... # > ./plot_dh.py dh.csv # ... # import numpy as np import matplotlib.pyplot as plt import argparse from operator import itemgetter if __name__...
Add script to plot ECDH timing.#!/usr/bin/env python # # Script for plotting ECTester ECDH results. # # Example usage: # # > java -jar ECTesterReader.jar -dh 10000 -b 192 -fp -o dh.csv # ... # > ./plot_dh.py dh.csv # ... # import numpy as np import matplotlib.pyplot as plt import argparse from operator...
<commit_before><commit_msg>Add script to plot ECDH timing.<commit_after>#!/usr/bin/env python # # Script for plotting ECTester ECDH results. # # Example usage: # # > java -jar ECTesterReader.jar -dh 10000 -b 192 -fp -o dh.csv # ... # > ./plot_dh.py dh.csv # ... # import numpy as np import matplotlib.py...
cfb7d50943a2d410d088b83b1d601305b6eb9283
i8c/tests/test_empty_function.py
i8c/tests/test_empty_function.py
from i8c.tests import TestCase SOURCE = "define test::pretty_minimal" class TestEmptyFunction(TestCase): def test_empty_function(self): """Check that empty functions can be compiled.""" tree, output = self.compile(SOURCE) self.assertEqual([], output.operations)
Check that empty functions can be compiled
Check that empty functions can be compiled
Python
lgpl-2.1
gbenson/i8c
Check that empty functions can be compiled
from i8c.tests import TestCase SOURCE = "define test::pretty_minimal" class TestEmptyFunction(TestCase): def test_empty_function(self): """Check that empty functions can be compiled.""" tree, output = self.compile(SOURCE) self.assertEqual([], output.operations)
<commit_before><commit_msg>Check that empty functions can be compiled<commit_after>
from i8c.tests import TestCase SOURCE = "define test::pretty_minimal" class TestEmptyFunction(TestCase): def test_empty_function(self): """Check that empty functions can be compiled.""" tree, output = self.compile(SOURCE) self.assertEqual([], output.operations)
Check that empty functions can be compiledfrom i8c.tests import TestCase SOURCE = "define test::pretty_minimal" class TestEmptyFunction(TestCase): def test_empty_function(self): """Check that empty functions can be compiled.""" tree, output = self.compile(SOURCE) self.assertEqual([], outpu...
<commit_before><commit_msg>Check that empty functions can be compiled<commit_after>from i8c.tests import TestCase SOURCE = "define test::pretty_minimal" class TestEmptyFunction(TestCase): def test_empty_function(self): """Check that empty functions can be compiled.""" tree, output = self.compile(S...
408ba2172deee7d775d37f22e9f7f377682940fa
heat/tests/functional/test_WordPress_With_LB.py
heat/tests/functional/test_WordPress_With_LB.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
Add test case for WordPress_With_LB.template
Add test case for WordPress_With_LB.template Change-Id: I324da126b5a775a00b97d868cbd347dd65cb16aa Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com>
Python
apache-2.0
jasondunsmore/heat,cryptickp/heat,maestro-hybrid-cloud/heat,citrix-openstack-build/heat,jasondunsmore/heat,steveb/heat,JioCloud/heat,srznew/heat,srznew/heat,NeCTAR-RC/heat,takeshineshiro/heat,openstack/heat,noironetworks/heat,pratikmallya/heat,Triv90/Heat,takeshineshiro/heat,miguelgrinberg/heat,rickerc/heat_audit,gonzo...
Add test case for WordPress_With_LB.template Change-Id: I324da126b5a775a00b97d868cbd347dd65cb16aa Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
<commit_before><commit_msg>Add test case for WordPress_With_LB.template Change-Id: I324da126b5a775a00b97d868cbd347dd65cb16aa Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com><commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
Add test case for WordPress_With_LB.template Change-Id: I324da126b5a775a00b97d868cbd347dd65cb16aa Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this ...
<commit_before><commit_msg>Add test case for WordPress_With_LB.template Change-Id: I324da126b5a775a00b97d868cbd347dd65cb16aa Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com><commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (t...
7824a38ee1038790adbc7209920a9112e2231bd2
src/toil/test/src/systemTest.py
src/toil/test/src/systemTest.py
import errno import multiprocessing import os import tempfile from functools import partial from toil.test import ToilTest class SystemTest(ToilTest): """ Test various assumptions about the operating system's behavior """ def testAtomicityOfNonEmptyDirectoryRenames(self): for _ in range(100):...
Add test for atomicity of renames of non-empty directories
Add test for atomicity of renames of non-empty directories
Python
apache-2.0
BD2KGenomics/slugflow,BD2KGenomics/slugflow
Add test for atomicity of renames of non-empty directories
import errno import multiprocessing import os import tempfile from functools import partial from toil.test import ToilTest class SystemTest(ToilTest): """ Test various assumptions about the operating system's behavior """ def testAtomicityOfNonEmptyDirectoryRenames(self): for _ in range(100):...
<commit_before><commit_msg>Add test for atomicity of renames of non-empty directories<commit_after>
import errno import multiprocessing import os import tempfile from functools import partial from toil.test import ToilTest class SystemTest(ToilTest): """ Test various assumptions about the operating system's behavior """ def testAtomicityOfNonEmptyDirectoryRenames(self): for _ in range(100):...
Add test for atomicity of renames of non-empty directoriesimport errno import multiprocessing import os import tempfile from functools import partial from toil.test import ToilTest class SystemTest(ToilTest): """ Test various assumptions about the operating system's behavior """ def testAtomicityOfNo...
<commit_before><commit_msg>Add test for atomicity of renames of non-empty directories<commit_after>import errno import multiprocessing import os import tempfile from functools import partial from toil.test import ToilTest class SystemTest(ToilTest): """ Test various assumptions about the operating system's b...
716553051e35bddfab67a28679f2a28c0a454ad3
oslo_concurrency/_i18n.py
oslo_concurrency/_i18n.py
# Copyright 2014 Mirantis Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
# Copyright 2014 Mirantis Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
Correct the translation domain for loading messages
Correct the translation domain for loading messages Change-Id: If7fa8fd1915378bda3fc6e361049c2d90cdec8af
Python
apache-2.0
varunarya10/oslo.concurrency,JioCloud/oslo.concurrency
# Copyright 2014 Mirantis Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
# Copyright 2014 Mirantis Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
<commit_before># Copyright 2014 Mirantis Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
# Copyright 2014 Mirantis Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
# Copyright 2014 Mirantis Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
<commit_before># Copyright 2014 Mirantis Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
5d77e0d84e6b22c0d4accd895ae664736b7a27a5
lily/management/commands/tags.py
lily/management/commands/tags.py
from optparse import make_option from django.core.management.base import BaseCommand from lily.tags.models import Tag import difflib class Command(BaseCommand): help = """Find similar tags based on the difflib module, usefull to identify duplicates & typos.""" ratio_cut_off_default = 0.65 option_list =...
Add management script to identify similar tag names.
LILY-1099: Add management script to identify similar tag names.
Python
agpl-3.0
HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily
LILY-1099: Add management script to identify similar tag names.
from optparse import make_option from django.core.management.base import BaseCommand from lily.tags.models import Tag import difflib class Command(BaseCommand): help = """Find similar tags based on the difflib module, usefull to identify duplicates & typos.""" ratio_cut_off_default = 0.65 option_list =...
<commit_before><commit_msg>LILY-1099: Add management script to identify similar tag names.<commit_after>
from optparse import make_option from django.core.management.base import BaseCommand from lily.tags.models import Tag import difflib class Command(BaseCommand): help = """Find similar tags based on the difflib module, usefull to identify duplicates & typos.""" ratio_cut_off_default = 0.65 option_list =...
LILY-1099: Add management script to identify similar tag names.from optparse import make_option from django.core.management.base import BaseCommand from lily.tags.models import Tag import difflib class Command(BaseCommand): help = """Find similar tags based on the difflib module, usefull to identify duplicates ...
<commit_before><commit_msg>LILY-1099: Add management script to identify similar tag names.<commit_after>from optparse import make_option from django.core.management.base import BaseCommand from lily.tags.models import Tag import difflib class Command(BaseCommand): help = """Find similar tags based on the diffli...
bf0b3cb27fa2b518fcc3f5116da0e4dbde25aae8
src/django_richenum/__init__.py
src/django_richenum/__init__.py
import forms # noqa import models # noqa __all__ = ( 'forms', 'models', ) __version__ = 'unknown' try: __version__ = __import__('pkg_resources').get_distribution('django_richenum').version except Exception as e: pass
__version__ = 'unknown' try: __version__ = __import__('pkg_resources').get_distribution('django_richenum').version except Exception as e: pass
Remove unnecessary import of form submodule
Remove unnecessary import of form submodule
Python
mit
hearsaycorp/django-richenum,dhui/django-richenum,hearsaycorp/django-richenum,asherf/django-richenum,adepue/django-richenum
import forms # noqa import models # noqa __all__ = ( 'forms', 'models', ) __version__ = 'unknown' try: __version__ = __import__('pkg_resources').get_distribution('django_richenum').version except Exception as e: pass Remove unnecessary import of form submodule
__version__ = 'unknown' try: __version__ = __import__('pkg_resources').get_distribution('django_richenum').version except Exception as e: pass
<commit_before>import forms # noqa import models # noqa __all__ = ( 'forms', 'models', ) __version__ = 'unknown' try: __version__ = __import__('pkg_resources').get_distribution('django_richenum').version except Exception as e: pass <commit_msg>Remove unnecessary import of form submodule<commit_aft...
__version__ = 'unknown' try: __version__ = __import__('pkg_resources').get_distribution('django_richenum').version except Exception as e: pass
import forms # noqa import models # noqa __all__ = ( 'forms', 'models', ) __version__ = 'unknown' try: __version__ = __import__('pkg_resources').get_distribution('django_richenum').version except Exception as e: pass Remove unnecessary import of form submodule__version__ = 'unknown' try: __ver...
<commit_before>import forms # noqa import models # noqa __all__ = ( 'forms', 'models', ) __version__ = 'unknown' try: __version__ = __import__('pkg_resources').get_distribution('django_richenum').version except Exception as e: pass <commit_msg>Remove unnecessary import of form submodule<commit_aft...
c833f56f70c6d539f9d01308d2e118ef0557557b
src/excel_sheet_column_title.py
src/excel_sheet_column_title.py
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB """ # @return a string...
Add excel sheet column title question description
Add excel sheet column title question description
Python
mit
chancyWu/leetcode
Add excel sheet column title question description
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB """ # @return a string...
<commit_before><commit_msg>Add excel sheet column title question description<commit_after>
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB """ # @return a string...
Add excel sheet column title question description""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z ...
<commit_before><commit_msg>Add excel sheet column title question description<commit_after>""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: 1 -> A ...
c509ef35fb0ba77fbcb66dd968daa0a19a617867
tests/sim/test_skills.py
tests/sim/test_skills.py
import unittest import unittest.mock as mock from hunting.level.map import LevelMap, LevelTile from hunting.sim.entities import GameObject, Fighter from hunting.sim.skills import PowerStrike class TestPowerStrike(unittest.TestCase): def setUp(self): level = LevelMap() level.set_map([[LevelTile()]...
Add test for PowerStrike ability
Add test for PowerStrike ability
Python
mit
MoyTW/RL_Arena_Experiment
Add test for PowerStrike ability
import unittest import unittest.mock as mock from hunting.level.map import LevelMap, LevelTile from hunting.sim.entities import GameObject, Fighter from hunting.sim.skills import PowerStrike class TestPowerStrike(unittest.TestCase): def setUp(self): level = LevelMap() level.set_map([[LevelTile()]...
<commit_before><commit_msg>Add test for PowerStrike ability<commit_after>
import unittest import unittest.mock as mock from hunting.level.map import LevelMap, LevelTile from hunting.sim.entities import GameObject, Fighter from hunting.sim.skills import PowerStrike class TestPowerStrike(unittest.TestCase): def setUp(self): level = LevelMap() level.set_map([[LevelTile()]...
Add test for PowerStrike abilityimport unittest import unittest.mock as mock from hunting.level.map import LevelMap, LevelTile from hunting.sim.entities import GameObject, Fighter from hunting.sim.skills import PowerStrike class TestPowerStrike(unittest.TestCase): def setUp(self): level = LevelMap() ...
<commit_before><commit_msg>Add test for PowerStrike ability<commit_after>import unittest import unittest.mock as mock from hunting.level.map import LevelMap, LevelTile from hunting.sim.entities import GameObject, Fighter from hunting.sim.skills import PowerStrike class TestPowerStrike(unittest.TestCase): def set...
9bb9894b154a7a6bd6a8725e23cea4dbe78f84e0
generate_historic_liwc.py
generate_historic_liwc.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from bs4 import BeautifulSoup from time import sleep import json import sys def get_spelling_variants(term, categories, y_from, y_to): """Retrieve historic spelling variants from the INL Lexicon service. """ # options for service: # get_wo...
Add script for generating a historic version of the Dutch LIWC
Add script for generating a historic version of the Dutch LIWC Added the script for generating a historic version of the Dutch LIWC. This script was not yet committed in the old liwc project. The same holds for the files historic_Dutch_LIWC.dic and liwc_output.json.
Python
apache-2.0
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
Add script for generating a historic version of the Dutch LIWC Added the script for generating a historic version of the Dutch LIWC. This script was not yet committed in the old liwc project. The same holds for the files historic_Dutch_LIWC.dic and liwc_output.json.
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from bs4 import BeautifulSoup from time import sleep import json import sys def get_spelling_variants(term, categories, y_from, y_to): """Retrieve historic spelling variants from the INL Lexicon service. """ # options for service: # get_wo...
<commit_before><commit_msg>Add script for generating a historic version of the Dutch LIWC Added the script for generating a historic version of the Dutch LIWC. This script was not yet committed in the old liwc project. The same holds for the files historic_Dutch_LIWC.dic and liwc_output.json.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from bs4 import BeautifulSoup from time import sleep import json import sys def get_spelling_variants(term, categories, y_from, y_to): """Retrieve historic spelling variants from the INL Lexicon service. """ # options for service: # get_wo...
Add script for generating a historic version of the Dutch LIWC Added the script for generating a historic version of the Dutch LIWC. This script was not yet committed in the old liwc project. The same holds for the files historic_Dutch_LIWC.dic and liwc_output.json.#!/usr/bin/env python # -*- coding: utf-8 -*- import...
<commit_before><commit_msg>Add script for generating a historic version of the Dutch LIWC Added the script for generating a historic version of the Dutch LIWC. This script was not yet committed in the old liwc project. The same holds for the files historic_Dutch_LIWC.dic and liwc_output.json.<commit_after>#!/usr/bin/e...
2ef2d15fe305ade82fc760f0cc29f530458528fe
pronto_feedback/feedback/migrations/0005_remove_feedback_last_modification_date.py
pronto_feedback/feedback/migrations/0005_remove_feedback_last_modification_date.py
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-01 01:27 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('feedback', '0004_auto_20160827_0453'), ] operations = [ migrations.RemoveField( ...
Add migration file that removes last_modification_date
Add migration file that removes last_modification_date
Python
mit
zkan/pronto-feedback,zkan/pronto-feedback
Add migration file that removes last_modification_date
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-01 01:27 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('feedback', '0004_auto_20160827_0453'), ] operations = [ migrations.RemoveField( ...
<commit_before><commit_msg>Add migration file that removes last_modification_date<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-01 01:27 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('feedback', '0004_auto_20160827_0453'), ] operations = [ migrations.RemoveField( ...
Add migration file that removes last_modification_date# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-01 01:27 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('feedback', '0004_auto_20160827_0453'), ] ...
<commit_before><commit_msg>Add migration file that removes last_modification_date<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-01 01:27 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('feedbac...
b7cf20cea38f28f1f488e2667ea43ee579c0ed95
testserver.py
testserver.py
#!/usr/bin/python # Author: sc0tfree # Twitter: @sc0tfree # Email: henry@sc0tfree.com import os import socket def generate_random_hex(length): ''' Generates a hex string of arbitrary length - 1, ending in a newline. ''' hex_string = os.urandom(length - 1) hex_string += '\x0a' return hex_stri...
Add test server to demo functionality
Add test server to demo functionality
Python
mit
sc0tfree/netbyte
Add test server to demo functionality
#!/usr/bin/python # Author: sc0tfree # Twitter: @sc0tfree # Email: henry@sc0tfree.com import os import socket def generate_random_hex(length): ''' Generates a hex string of arbitrary length - 1, ending in a newline. ''' hex_string = os.urandom(length - 1) hex_string += '\x0a' return hex_stri...
<commit_before><commit_msg>Add test server to demo functionality<commit_after>
#!/usr/bin/python # Author: sc0tfree # Twitter: @sc0tfree # Email: henry@sc0tfree.com import os import socket def generate_random_hex(length): ''' Generates a hex string of arbitrary length - 1, ending in a newline. ''' hex_string = os.urandom(length - 1) hex_string += '\x0a' return hex_stri...
Add test server to demo functionality#!/usr/bin/python # Author: sc0tfree # Twitter: @sc0tfree # Email: henry@sc0tfree.com import os import socket def generate_random_hex(length): ''' Generates a hex string of arbitrary length - 1, ending in a newline. ''' hex_string = os.urandom(length - 1) hex...
<commit_before><commit_msg>Add test server to demo functionality<commit_after>#!/usr/bin/python # Author: sc0tfree # Twitter: @sc0tfree # Email: henry@sc0tfree.com import os import socket def generate_random_hex(length): ''' Generates a hex string of arbitrary length - 1, ending in a newline. ''' he...
b7887c3e2729605d50372f51178ec3f86a09b52a
tastycrust/api.py
tastycrust/api.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from importlib import import_module from inspect import isclass, getmembers from django.conf import settings from tastypie.api import Api as VanillaApi from tastypie.resources import Resource __all__ = ['Api'] def _is_resource_cl...
Implement Api addons (not tested)
Implement Api addons (not tested)
Python
bsd-3-clause
uranusjr/django-tastypie-crust
Implement Api addons (not tested)
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from importlib import import_module from inspect import isclass, getmembers from django.conf import settings from tastypie.api import Api as VanillaApi from tastypie.resources import Resource __all__ = ['Api'] def _is_resource_cl...
<commit_before><commit_msg>Implement Api addons (not tested)<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from importlib import import_module from inspect import isclass, getmembers from django.conf import settings from tastypie.api import Api as VanillaApi from tastypie.resources import Resource __all__ = ['Api'] def _is_resource_cl...
Implement Api addons (not tested)#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from importlib import import_module from inspect import isclass, getmembers from django.conf import settings from tastypie.api import Api as VanillaApi from tastypie.resources import Resource __all_...
<commit_before><commit_msg>Implement Api addons (not tested)<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from importlib import import_module from inspect import isclass, getmembers from django.conf import settings from tastypie.api import Api as VanillaApi from ta...
9f9db6242c3bac5626caf922487209f6f9af1cd8
vultr/v1_firewall.py
vultr/v1_firewall.py
'''Partial class to handle Vultr Firewall API calls''' from .utils import VultrBase class VultrFirewall(VultrBase): '''Handles Bultr Firewall API calls''' def __init__(self, api_key): VultrBase.__init__(self, api_key) def group_list(self, params=None): ''' /v1/firewall/group_list ...
'''Partial class to handle Vultr Firewall API calls''' from .utils import VultrBase class VultrFirewall(VultrBase): '''Handles Vultr Firewall API calls''' def __init__(self, api_key): VultrBase.__init__(self, api_key) def group_list(self, params=None): ''' /v1/firewall/group_list ...
Add partial support for firewall
Add partial support for firewall
Python
mit
spry-group/python-vultr
'''Partial class to handle Vultr Firewall API calls''' from .utils import VultrBase class VultrFirewall(VultrBase): '''Handles Bultr Firewall API calls''' def __init__(self, api_key): VultrBase.__init__(self, api_key) def group_list(self, params=None): ''' /v1/firewall/group_list ...
'''Partial class to handle Vultr Firewall API calls''' from .utils import VultrBase class VultrFirewall(VultrBase): '''Handles Vultr Firewall API calls''' def __init__(self, api_key): VultrBase.__init__(self, api_key) def group_list(self, params=None): ''' /v1/firewall/group_list ...
<commit_before>'''Partial class to handle Vultr Firewall API calls''' from .utils import VultrBase class VultrFirewall(VultrBase): '''Handles Bultr Firewall API calls''' def __init__(self, api_key): VultrBase.__init__(self, api_key) def group_list(self, params=None): ''' /v1/firewall/grou...
'''Partial class to handle Vultr Firewall API calls''' from .utils import VultrBase class VultrFirewall(VultrBase): '''Handles Vultr Firewall API calls''' def __init__(self, api_key): VultrBase.__init__(self, api_key) def group_list(self, params=None): ''' /v1/firewall/group_list ...
'''Partial class to handle Vultr Firewall API calls''' from .utils import VultrBase class VultrFirewall(VultrBase): '''Handles Bultr Firewall API calls''' def __init__(self, api_key): VultrBase.__init__(self, api_key) def group_list(self, params=None): ''' /v1/firewall/group_list ...
<commit_before>'''Partial class to handle Vultr Firewall API calls''' from .utils import VultrBase class VultrFirewall(VultrBase): '''Handles Bultr Firewall API calls''' def __init__(self, api_key): VultrBase.__init__(self, api_key) def group_list(self, params=None): ''' /v1/firewall/grou...
2c932a14fbf6a468176af77b39360be108777389
markers/mark_error_104.py
markers/mark_error_104.py
"""Marks all fixed errors #104 on ruwiki's CheckWikipedia.""" import re import pywikibot from checkwiki import load_page_list, mark_error_done, log NUMBER = "104" REGEXP = r"<ref\s+name=\s*(.*?)\s*(?:group=.*?)?\s*/?>" FLAGS = re.I def main(): """Downloads list from server and marks relevant errors as d...
Add marker for 104th error
Add marker for 104th error
Python
mit
Facenapalm/NapalmBot
Add marker for 104th error
"""Marks all fixed errors #104 on ruwiki's CheckWikipedia.""" import re import pywikibot from checkwiki import load_page_list, mark_error_done, log NUMBER = "104" REGEXP = r"<ref\s+name=\s*(.*?)\s*(?:group=.*?)?\s*/?>" FLAGS = re.I def main(): """Downloads list from server and marks relevant errors as d...
<commit_before><commit_msg>Add marker for 104th error<commit_after>
"""Marks all fixed errors #104 on ruwiki's CheckWikipedia.""" import re import pywikibot from checkwiki import load_page_list, mark_error_done, log NUMBER = "104" REGEXP = r"<ref\s+name=\s*(.*?)\s*(?:group=.*?)?\s*/?>" FLAGS = re.I def main(): """Downloads list from server and marks relevant errors as d...
Add marker for 104th error"""Marks all fixed errors #104 on ruwiki's CheckWikipedia.""" import re import pywikibot from checkwiki import load_page_list, mark_error_done, log NUMBER = "104" REGEXP = r"<ref\s+name=\s*(.*?)\s*(?:group=.*?)?\s*/?>" FLAGS = re.I def main(): """Downloads list from server and ...
<commit_before><commit_msg>Add marker for 104th error<commit_after>"""Marks all fixed errors #104 on ruwiki's CheckWikipedia.""" import re import pywikibot from checkwiki import load_page_list, mark_error_done, log NUMBER = "104" REGEXP = r"<ref\s+name=\s*(.*?)\s*(?:group=.*?)?\s*/?>" FLAGS = re.I def main()...
a0adf63c1f942f4cdbe839ea367772c5ae08fbfc
CodeFights/fixTree.py
CodeFights/fixTree.py
#!/usr/local/bin/python # Code Fights Fix Tree Problem def fixTree(tree): return [s.strip().center(len(s)) for s in tree] def main(): tests = [ [ [" * ", " * ", "*** ", " *****", " *******", "*********"...
Solve Code Fights fix tree problem
Solve Code Fights fix tree problem
Python
mit
HKuz/Test_Code
Solve Code Fights fix tree problem
#!/usr/local/bin/python # Code Fights Fix Tree Problem def fixTree(tree): return [s.strip().center(len(s)) for s in tree] def main(): tests = [ [ [" * ", " * ", "*** ", " *****", " *******", "*********"...
<commit_before><commit_msg>Solve Code Fights fix tree problem<commit_after>
#!/usr/local/bin/python # Code Fights Fix Tree Problem def fixTree(tree): return [s.strip().center(len(s)) for s in tree] def main(): tests = [ [ [" * ", " * ", "*** ", " *****", " *******", "*********"...
Solve Code Fights fix tree problem#!/usr/local/bin/python # Code Fights Fix Tree Problem def fixTree(tree): return [s.strip().center(len(s)) for s in tree] def main(): tests = [ [ [" * ", " * ", "*** ", " *****", " ...
<commit_before><commit_msg>Solve Code Fights fix tree problem<commit_after>#!/usr/local/bin/python # Code Fights Fix Tree Problem def fixTree(tree): return [s.strip().center(len(s)) for s in tree] def main(): tests = [ [ [" * ", " * ", "*** ", ...
8ad29d6563fd282b18884c345451a44a71eba890
tests/test_midi_note_numbers.py
tests/test_midi_note_numbers.py
# TODO: test if method to convert Note to a MIDI note number works import pytest from music_essentials import Note def test_midi_0(): n = Note.from_note_string('C-1') mid = n.midi_note_number() assert mid == 0 def test_midi_1_sharp(): n = Note.from_note_string('C-1#') mid = n.midi_note_number() ...
Add tests for calculating MIDI numbers - octave -1.
Add tests for calculating MIDI numbers - octave -1. Signed-off-by: Charlotte Pierce <351429ca27f6e4bff2dbb77adb5046c88cd12fae@malformed-bits.com>
Python
mit
charlottepierce/music_essentials
Add tests for calculating MIDI numbers - octave -1. Signed-off-by: Charlotte Pierce <351429ca27f6e4bff2dbb77adb5046c88cd12fae@malformed-bits.com>
# TODO: test if method to convert Note to a MIDI note number works import pytest from music_essentials import Note def test_midi_0(): n = Note.from_note_string('C-1') mid = n.midi_note_number() assert mid == 0 def test_midi_1_sharp(): n = Note.from_note_string('C-1#') mid = n.midi_note_number() ...
<commit_before><commit_msg>Add tests for calculating MIDI numbers - octave -1. Signed-off-by: Charlotte Pierce <351429ca27f6e4bff2dbb77adb5046c88cd12fae@malformed-bits.com><commit_after>
# TODO: test if method to convert Note to a MIDI note number works import pytest from music_essentials import Note def test_midi_0(): n = Note.from_note_string('C-1') mid = n.midi_note_number() assert mid == 0 def test_midi_1_sharp(): n = Note.from_note_string('C-1#') mid = n.midi_note_number() ...
Add tests for calculating MIDI numbers - octave -1. Signed-off-by: Charlotte Pierce <351429ca27f6e4bff2dbb77adb5046c88cd12fae@malformed-bits.com># TODO: test if method to convert Note to a MIDI note number works import pytest from music_essentials import Note def test_midi_0(): n = Note.from_note_string('C-1') ...
<commit_before><commit_msg>Add tests for calculating MIDI numbers - octave -1. Signed-off-by: Charlotte Pierce <351429ca27f6e4bff2dbb77adb5046c88cd12fae@malformed-bits.com><commit_after># TODO: test if method to convert Note to a MIDI note number works import pytest from music_essentials import Note def test_midi_0...
f37ee7d25cd00ade44926590ae6b7feb82844b4e
scripts/update_famplex.py
scripts/update_famplex.py
import os import requests # NOTE: this URL should be updated once the reach_export branch is merged base_url = ('https://raw.githubusercontent.com/bgyori/famplex/reach_export/' 'export/') famplex_groundings = 'famplex_groundings.tsv' famplex_overrides = 'famplex_groundings_override.tsv' if __name__ == '_...
Add script to update FamPlex groundings
Add script to update FamPlex groundings
Python
apache-2.0
clulab/bioresources
Add script to update FamPlex groundings
import os import requests # NOTE: this URL should be updated once the reach_export branch is merged base_url = ('https://raw.githubusercontent.com/bgyori/famplex/reach_export/' 'export/') famplex_groundings = 'famplex_groundings.tsv' famplex_overrides = 'famplex_groundings_override.tsv' if __name__ == '_...
<commit_before><commit_msg>Add script to update FamPlex groundings<commit_after>
import os import requests # NOTE: this URL should be updated once the reach_export branch is merged base_url = ('https://raw.githubusercontent.com/bgyori/famplex/reach_export/' 'export/') famplex_groundings = 'famplex_groundings.tsv' famplex_overrides = 'famplex_groundings_override.tsv' if __name__ == '_...
Add script to update FamPlex groundingsimport os import requests # NOTE: this URL should be updated once the reach_export branch is merged base_url = ('https://raw.githubusercontent.com/bgyori/famplex/reach_export/' 'export/') famplex_groundings = 'famplex_groundings.tsv' famplex_overrides = 'famplex_groun...
<commit_before><commit_msg>Add script to update FamPlex groundings<commit_after>import os import requests # NOTE: this URL should be updated once the reach_export branch is merged base_url = ('https://raw.githubusercontent.com/bgyori/famplex/reach_export/' 'export/') famplex_groundings = 'famplex_grounding...
bafd6eb44a0bbacbf11970e21435bd91c5ae610b
suitability/get_features.py
suitability/get_features.py
#!/usr/bin/env python2 import os import pickle import caffe caffe.set_mode_cpu() caffe_root = os.path.normpath(os.path.dirname('%s/../../../../' % caffe.__file__)) import numpy as np import util def main(): extractor = FeatureExtractor() cache_features(extractor, '../datasets/Michael') cache_features(e...
Use Caffe to cache feature vectors
Use Caffe to cache feature vectors
Python
mit
swook/autocrop,swook/autocrop,swook/autocrop,swook/autocrop
Use Caffe to cache feature vectors
#!/usr/bin/env python2 import os import pickle import caffe caffe.set_mode_cpu() caffe_root = os.path.normpath(os.path.dirname('%s/../../../../' % caffe.__file__)) import numpy as np import util def main(): extractor = FeatureExtractor() cache_features(extractor, '../datasets/Michael') cache_features(e...
<commit_before><commit_msg>Use Caffe to cache feature vectors<commit_after>
#!/usr/bin/env python2 import os import pickle import caffe caffe.set_mode_cpu() caffe_root = os.path.normpath(os.path.dirname('%s/../../../../' % caffe.__file__)) import numpy as np import util def main(): extractor = FeatureExtractor() cache_features(extractor, '../datasets/Michael') cache_features(e...
Use Caffe to cache feature vectors#!/usr/bin/env python2 import os import pickle import caffe caffe.set_mode_cpu() caffe_root = os.path.normpath(os.path.dirname('%s/../../../../' % caffe.__file__)) import numpy as np import util def main(): extractor = FeatureExtractor() cache_features(extractor, '../datas...
<commit_before><commit_msg>Use Caffe to cache feature vectors<commit_after>#!/usr/bin/env python2 import os import pickle import caffe caffe.set_mode_cpu() caffe_root = os.path.normpath(os.path.dirname('%s/../../../../' % caffe.__file__)) import numpy as np import util def main(): extractor = FeatureExtractor(...
a03004c621e1d82edbfc6866f8f8f79483a9c1cc
test/test_number_parsing.py
test/test_number_parsing.py
from nex.tokens import PLYTokenMixin from nex.parsing import parsing import pytest class T(PLYTokenMixin): def __init__(self, type_, v=None): self.type = type_ self.value = v def __repr__(self): v = self.value if self.value is not None else '' return f'T<{self.type}>({v})' ...
Add tests for parsing numbers
Add tests for parsing numbers
Python
mit
eddiejessup/nex
Add tests for parsing numbers
from nex.tokens import PLYTokenMixin from nex.parsing import parsing import pytest class T(PLYTokenMixin): def __init__(self, type_, v=None): self.type = type_ self.value = v def __repr__(self): v = self.value if self.value is not None else '' return f'T<{self.type}>({v})' ...
<commit_before><commit_msg>Add tests for parsing numbers<commit_after>
from nex.tokens import PLYTokenMixin from nex.parsing import parsing import pytest class T(PLYTokenMixin): def __init__(self, type_, v=None): self.type = type_ self.value = v def __repr__(self): v = self.value if self.value is not None else '' return f'T<{self.type}>({v})' ...
Add tests for parsing numbersfrom nex.tokens import PLYTokenMixin from nex.parsing import parsing import pytest class T(PLYTokenMixin): def __init__(self, type_, v=None): self.type = type_ self.value = v def __repr__(self): v = self.value if self.value is not None else '' re...
<commit_before><commit_msg>Add tests for parsing numbers<commit_after>from nex.tokens import PLYTokenMixin from nex.parsing import parsing import pytest class T(PLYTokenMixin): def __init__(self, type_, v=None): self.type = type_ self.value = v def __repr__(self): v = self.value if ...
f873c340f5121aa63117314ea9906695463d0854
numba/tests/test_typingerror.py
numba/tests/test_typingerror.py
from __future__ import print_function import unittest from numba.compiler import compile_isolated from numba import types from numba.typeinfer import TypingError def what(): pass def foo(): return what() def bar(x): return x.a class TestTypingError(unittest.TestCase): def test_unknown_function(s...
Add tests for typing errors
Add tests for typing errors
Python
bsd-2-clause
sklam/numba,cpcloud/numba,gmarkall/numba,IntelLabs/numba,seibert/numba,jriehl/numba,GaZ3ll3/numba,cpcloud/numba,numba/numba,stuartarchibald/numba,stonebig/numba,stuartarchibald/numba,pombredanne/numba,ssarangi/numba,gmarkall/numba,gdementen/numba,jriehl/numba,gmarkall/numba,ssarangi/numba,pitrou/numba,pitrou/numba,stef...
Add tests for typing errors
from __future__ import print_function import unittest from numba.compiler import compile_isolated from numba import types from numba.typeinfer import TypingError def what(): pass def foo(): return what() def bar(x): return x.a class TestTypingError(unittest.TestCase): def test_unknown_function(s...
<commit_before><commit_msg>Add tests for typing errors<commit_after>
from __future__ import print_function import unittest from numba.compiler import compile_isolated from numba import types from numba.typeinfer import TypingError def what(): pass def foo(): return what() def bar(x): return x.a class TestTypingError(unittest.TestCase): def test_unknown_function(s...
Add tests for typing errorsfrom __future__ import print_function import unittest from numba.compiler import compile_isolated from numba import types from numba.typeinfer import TypingError def what(): pass def foo(): return what() def bar(x): return x.a class TestTypingError(unittest.TestCase): ...
<commit_before><commit_msg>Add tests for typing errors<commit_after>from __future__ import print_function import unittest from numba.compiler import compile_isolated from numba import types from numba.typeinfer import TypingError def what(): pass def foo(): return what() def bar(x): return x.a class...
c49227c3a91fa173544d23d2133a94273187ae35
num-prediction.py
num-prediction.py
# Requires sci-kit learn and matplotlib import matplotlib.pyplot as pyplot from sklearn import datasets from sklearn import svm digits = datasets.load_digits() #Gamma breaks when greater than 0.01. Maintains high accuracy at 0.001 clf = svm.SVC(gamma=0.001, C=100) x,y = digits.data[:-1], digits.target[:-1] clf.fit...
Add number guess SVM file
Add number guess SVM file
Python
mit
FrizzBolt/machine-learning-sandbox
Add number guess SVM file
# Requires sci-kit learn and matplotlib import matplotlib.pyplot as pyplot from sklearn import datasets from sklearn import svm digits = datasets.load_digits() #Gamma breaks when greater than 0.01. Maintains high accuracy at 0.001 clf = svm.SVC(gamma=0.001, C=100) x,y = digits.data[:-1], digits.target[:-1] clf.fit...
<commit_before><commit_msg>Add number guess SVM file<commit_after>
# Requires sci-kit learn and matplotlib import matplotlib.pyplot as pyplot from sklearn import datasets from sklearn import svm digits = datasets.load_digits() #Gamma breaks when greater than 0.01. Maintains high accuracy at 0.001 clf = svm.SVC(gamma=0.001, C=100) x,y = digits.data[:-1], digits.target[:-1] clf.fit...
Add number guess SVM file# Requires sci-kit learn and matplotlib import matplotlib.pyplot as pyplot from sklearn import datasets from sklearn import svm digits = datasets.load_digits() #Gamma breaks when greater than 0.01. Maintains high accuracy at 0.001 clf = svm.SVC(gamma=0.001, C=100) x,y = digits.data[:-1], d...
<commit_before><commit_msg>Add number guess SVM file<commit_after># Requires sci-kit learn and matplotlib import matplotlib.pyplot as pyplot from sklearn import datasets from sklearn import svm digits = datasets.load_digits() #Gamma breaks when greater than 0.01. Maintains high accuracy at 0.001 clf = svm.SVC(gamma...
b042b715aaab917073a2587db1b2eca3525422e4
platforms/m3_ctl/programming/fake_ice.py
platforms/m3_ctl/programming/fake_ice.py
#!/usr/bin/env python MAX_GPIO = 24 import serial s = serial.Serial('/tmp/com2', 115200) if not s.isOpen(): raise IOError, "Failed to open serial port" GPIO_INPUT = 0 GPIO_OUTPUT = 1 GPIO_TRISTATE = 2 event = 0 gpio_level = [False for x in xrange(MAX_GPIO)] gpio_dir = [GPIO_TRISTATE for x in xrange(MAX_...
Add a stub fake ICE peripheral
Add a stub fake ICE peripheral
Python
apache-2.0
lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator
Add a stub fake ICE peripheral
#!/usr/bin/env python MAX_GPIO = 24 import serial s = serial.Serial('/tmp/com2', 115200) if not s.isOpen(): raise IOError, "Failed to open serial port" GPIO_INPUT = 0 GPIO_OUTPUT = 1 GPIO_TRISTATE = 2 event = 0 gpio_level = [False for x in xrange(MAX_GPIO)] gpio_dir = [GPIO_TRISTATE for x in xrange(MAX_...
<commit_before><commit_msg>Add a stub fake ICE peripheral<commit_after>
#!/usr/bin/env python MAX_GPIO = 24 import serial s = serial.Serial('/tmp/com2', 115200) if not s.isOpen(): raise IOError, "Failed to open serial port" GPIO_INPUT = 0 GPIO_OUTPUT = 1 GPIO_TRISTATE = 2 event = 0 gpio_level = [False for x in xrange(MAX_GPIO)] gpio_dir = [GPIO_TRISTATE for x in xrange(MAX_...
Add a stub fake ICE peripheral#!/usr/bin/env python MAX_GPIO = 24 import serial s = serial.Serial('/tmp/com2', 115200) if not s.isOpen(): raise IOError, "Failed to open serial port" GPIO_INPUT = 0 GPIO_OUTPUT = 1 GPIO_TRISTATE = 2 event = 0 gpio_level = [False for x in xrange(MAX_GPIO)] gpio_dir = [GPIO...
<commit_before><commit_msg>Add a stub fake ICE peripheral<commit_after>#!/usr/bin/env python MAX_GPIO = 24 import serial s = serial.Serial('/tmp/com2', 115200) if not s.isOpen(): raise IOError, "Failed to open serial port" GPIO_INPUT = 0 GPIO_OUTPUT = 1 GPIO_TRISTATE = 2 event = 0 gpio_level = [False for ...
696309f33320b0e45ea4a6c7577c87be23cb4462
example_config.py
example_config.py
from roland import lazy, Mode home_page = 'https://www.google.com' search_page = 'https://www.google.com/search?q=%s' commands = { 'i': lazy.set_mode(Mode.Insert), 'colon': lazy.set_mode(Mode.Command), 'b': lambda browser: browser.roland.select_window(), 'c': lazy.close(), 'o': lazy.open_or_sear...
Add my config as an example config.
Add my config as an example config.
Python
bsd-3-clause
nathan-hoad/roland,nathan-hoad/roland
Add my config as an example config.
from roland import lazy, Mode home_page = 'https://www.google.com' search_page = 'https://www.google.com/search?q=%s' commands = { 'i': lazy.set_mode(Mode.Insert), 'colon': lazy.set_mode(Mode.Command), 'b': lambda browser: browser.roland.select_window(), 'c': lazy.close(), 'o': lazy.open_or_sear...
<commit_before><commit_msg>Add my config as an example config.<commit_after>
from roland import lazy, Mode home_page = 'https://www.google.com' search_page = 'https://www.google.com/search?q=%s' commands = { 'i': lazy.set_mode(Mode.Insert), 'colon': lazy.set_mode(Mode.Command), 'b': lambda browser: browser.roland.select_window(), 'c': lazy.close(), 'o': lazy.open_or_sear...
Add my config as an example config.from roland import lazy, Mode home_page = 'https://www.google.com' search_page = 'https://www.google.com/search?q=%s' commands = { 'i': lazy.set_mode(Mode.Insert), 'colon': lazy.set_mode(Mode.Command), 'b': lambda browser: browser.roland.select_window(), 'c': lazy....
<commit_before><commit_msg>Add my config as an example config.<commit_after>from roland import lazy, Mode home_page = 'https://www.google.com' search_page = 'https://www.google.com/search?q=%s' commands = { 'i': lazy.set_mode(Mode.Insert), 'colon': lazy.set_mode(Mode.Command), 'b': lambda browser: brows...
e9ba95a16530ed29e387f6197573cc688b670aa1
Python/171_ExcelSheetColumNumber.py
Python/171_ExcelSheetColumNumber.py
class Solution(object): def titleToNumber(self, s): """ :type s: str :rtype: int """ # A-Z:65-90 || a-z:97-122 # ord('A') = 65, chr(65)=A n = len(s) if n == 0: return 0 result = 0 for x in xrange(0, n): asc2 = ord(s[n...
Add solution for 171:Excel sheet column number
Add solution for 171:Excel sheet column number
Python
mit
comicxmz001/LeetCode,comicxmz001/LeetCode
Add solution for 171:Excel sheet column number
class Solution(object): def titleToNumber(self, s): """ :type s: str :rtype: int """ # A-Z:65-90 || a-z:97-122 # ord('A') = 65, chr(65)=A n = len(s) if n == 0: return 0 result = 0 for x in xrange(0, n): asc2 = ord(s[n...
<commit_before><commit_msg>Add solution for 171:Excel sheet column number<commit_after>
class Solution(object): def titleToNumber(self, s): """ :type s: str :rtype: int """ # A-Z:65-90 || a-z:97-122 # ord('A') = 65, chr(65)=A n = len(s) if n == 0: return 0 result = 0 for x in xrange(0, n): asc2 = ord(s[n...
Add solution for 171:Excel sheet column numberclass Solution(object): def titleToNumber(self, s): """ :type s: str :rtype: int """ # A-Z:65-90 || a-z:97-122 # ord('A') = 65, chr(65)=A n = len(s) if n == 0: return 0 result = 0 ...
<commit_before><commit_msg>Add solution for 171:Excel sheet column number<commit_after>class Solution(object): def titleToNumber(self, s): """ :type s: str :rtype: int """ # A-Z:65-90 || a-z:97-122 # ord('A') = 65, chr(65)=A n = len(s) if n == 0: ...
a6cdc37e5770afb8995d9e04ef9a54b790861c3a
generate_conf.py
generate_conf.py
#!/usr/bin/env python3 RATE = 150000.00 FORMAT = 'list' PORT = '445' OUTFILE = 'internet_{0}.list'.format(PORT) BANNER = 'false' with open('internet.conf', 'w') as f: f.write('# Internet Masscan Configuration.\n') f.write('rate = {0}\n'.format(RATE)) f.write('output-format = {0}\n'.format(FORMAT)) f.w...
Create a conf file for the internet.
Create a conf file for the internet.
Python
bsd-3-clause
averagesecurityguy/research
Create a conf file for the internet.
#!/usr/bin/env python3 RATE = 150000.00 FORMAT = 'list' PORT = '445' OUTFILE = 'internet_{0}.list'.format(PORT) BANNER = 'false' with open('internet.conf', 'w') as f: f.write('# Internet Masscan Configuration.\n') f.write('rate = {0}\n'.format(RATE)) f.write('output-format = {0}\n'.format(FORMAT)) f.w...
<commit_before><commit_msg>Create a conf file for the internet.<commit_after>
#!/usr/bin/env python3 RATE = 150000.00 FORMAT = 'list' PORT = '445' OUTFILE = 'internet_{0}.list'.format(PORT) BANNER = 'false' with open('internet.conf', 'w') as f: f.write('# Internet Masscan Configuration.\n') f.write('rate = {0}\n'.format(RATE)) f.write('output-format = {0}\n'.format(FORMAT)) f.w...
Create a conf file for the internet.#!/usr/bin/env python3 RATE = 150000.00 FORMAT = 'list' PORT = '445' OUTFILE = 'internet_{0}.list'.format(PORT) BANNER = 'false' with open('internet.conf', 'w') as f: f.write('# Internet Masscan Configuration.\n') f.write('rate = {0}\n'.format(RATE)) f.write('output-for...
<commit_before><commit_msg>Create a conf file for the internet.<commit_after>#!/usr/bin/env python3 RATE = 150000.00 FORMAT = 'list' PORT = '445' OUTFILE = 'internet_{0}.list'.format(PORT) BANNER = 'false' with open('internet.conf', 'w') as f: f.write('# Internet Masscan Configuration.\n') f.write('rate = {0}...
69d573d3b544a6da8dd37f7605ab95fedbe63f6e
tests/test_channelfile.py
tests/test_channelfile.py
from mock import patch, MagicMock from paramiko import Channel, ChannelFile class TestChannelFile(object): @patch("paramiko.channel.ChannelFile._set_mode") def test_defaults_to_unbuffered_reading(self, setmode): cf = ChannelFile(Channel(None)) setmode.assert_called_once_with("r", -1) @pa...
Add some basic tests for Channel(Stderr)File
Add some basic tests for Channel(Stderr)File
Python
lgpl-2.1
ameily/paramiko,paramiko/paramiko
Add some basic tests for Channel(Stderr)File
from mock import patch, MagicMock from paramiko import Channel, ChannelFile class TestChannelFile(object): @patch("paramiko.channel.ChannelFile._set_mode") def test_defaults_to_unbuffered_reading(self, setmode): cf = ChannelFile(Channel(None)) setmode.assert_called_once_with("r", -1) @pa...
<commit_before><commit_msg>Add some basic tests for Channel(Stderr)File<commit_after>
from mock import patch, MagicMock from paramiko import Channel, ChannelFile class TestChannelFile(object): @patch("paramiko.channel.ChannelFile._set_mode") def test_defaults_to_unbuffered_reading(self, setmode): cf = ChannelFile(Channel(None)) setmode.assert_called_once_with("r", -1) @pa...
Add some basic tests for Channel(Stderr)Filefrom mock import patch, MagicMock from paramiko import Channel, ChannelFile class TestChannelFile(object): @patch("paramiko.channel.ChannelFile._set_mode") def test_defaults_to_unbuffered_reading(self, setmode): cf = ChannelFile(Channel(None)) setmo...
<commit_before><commit_msg>Add some basic tests for Channel(Stderr)File<commit_after>from mock import patch, MagicMock from paramiko import Channel, ChannelFile class TestChannelFile(object): @patch("paramiko.channel.ChannelFile._set_mode") def test_defaults_to_unbuffered_reading(self, setmode): cf =...
f2c6e9033b3ff33acdc0bd763a45ad6aa78b9f5e
generate_enums.py
generate_enums.py
#!/usr/bin/env python import re valgrind_home = "/usr" input = open(valgrind_home + "/include/valgrind/libvex_ir.h").read() input += open(valgrind_home + "/include/valgrind/libvex.h").read() out = """ #include <libvex.h> #include <stdio.h> #include <string.h> #include "pyvex_macros.h" #include "pyvex_logging.h" ""...
Add script for generating enums.
Add script for generating enums.
Python
bsd-2-clause
chubbymaggie/pyvex,0xbc/pyvex,0xbc/pyvex,avain/pyvex,angr/pyvex,angr/pyvex,avain/pyvex,chubbymaggie/pyvex
Add script for generating enums.
#!/usr/bin/env python import re valgrind_home = "/usr" input = open(valgrind_home + "/include/valgrind/libvex_ir.h").read() input += open(valgrind_home + "/include/valgrind/libvex.h").read() out = """ #include <libvex.h> #include <stdio.h> #include <string.h> #include "pyvex_macros.h" #include "pyvex_logging.h" ""...
<commit_before><commit_msg>Add script for generating enums.<commit_after>
#!/usr/bin/env python import re valgrind_home = "/usr" input = open(valgrind_home + "/include/valgrind/libvex_ir.h").read() input += open(valgrind_home + "/include/valgrind/libvex.h").read() out = """ #include <libvex.h> #include <stdio.h> #include <string.h> #include "pyvex_macros.h" #include "pyvex_logging.h" ""...
Add script for generating enums.#!/usr/bin/env python import re valgrind_home = "/usr" input = open(valgrind_home + "/include/valgrind/libvex_ir.h").read() input += open(valgrind_home + "/include/valgrind/libvex.h").read() out = """ #include <libvex.h> #include <stdio.h> #include <string.h> #include "pyvex_macros.h...
<commit_before><commit_msg>Add script for generating enums.<commit_after>#!/usr/bin/env python import re valgrind_home = "/usr" input = open(valgrind_home + "/include/valgrind/libvex_ir.h").read() input += open(valgrind_home + "/include/valgrind/libvex.h").read() out = """ #include <libvex.h> #include <stdio.h> #in...
8fe5d28b227ad0e59561e6be210eebfaa0f38ac8
paystackapi/tests/test_subaccount.py
paystackapi/tests/test_subaccount.py
import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.subaccount import SubAccount class TestSubAccount(BaseTestCase): @httpretty.activate def test_subaccount_create(self): pass
Add initial test class for subaccount
Add initial test class for subaccount
Python
mit
andela-sjames/paystack-python
Add initial test class for subaccount
import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.subaccount import SubAccount class TestSubAccount(BaseTestCase): @httpretty.activate def test_subaccount_create(self): pass
<commit_before><commit_msg>Add initial test class for subaccount<commit_after>
import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.subaccount import SubAccount class TestSubAccount(BaseTestCase): @httpretty.activate def test_subaccount_create(self): pass
Add initial test class for subaccountimport httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.subaccount import SubAccount class TestSubAccount(BaseTestCase): @httpretty.activate def test_subaccount_create(self): pass
<commit_before><commit_msg>Add initial test class for subaccount<commit_after>import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.subaccount import SubAccount class TestSubAccount(BaseTestCase): @httpretty.activate def test_subaccount_create(self): pass
503dd762c43f37b22407472271e9c4492827935a
pycoreutils/test/test_pycoreutils.py
pycoreutils/test/test_pycoreutils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009, 2010, 2011 Hans van Leeuwen. # See LICENSE.txt for details. from __future__ import unicode_literals import unittest import pycoreutils from pycoreutils.test import BaseTestCase class TestCase(BaseTestCase): def test_getcommand(self): ...
Test if all commands can import
Test if all commands can import
Python
mit
davidfischer/pycoreutils
Test if all commands can import
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009, 2010, 2011 Hans van Leeuwen. # See LICENSE.txt for details. from __future__ import unicode_literals import unittest import pycoreutils from pycoreutils.test import BaseTestCase class TestCase(BaseTestCase): def test_getcommand(self): ...
<commit_before><commit_msg>Test if all commands can import<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009, 2010, 2011 Hans van Leeuwen. # See LICENSE.txt for details. from __future__ import unicode_literals import unittest import pycoreutils from pycoreutils.test import BaseTestCase class TestCase(BaseTestCase): def test_getcommand(self): ...
Test if all commands can import#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009, 2010, 2011 Hans van Leeuwen. # See LICENSE.txt for details. from __future__ import unicode_literals import unittest import pycoreutils from pycoreutils.test import BaseTestCase class TestCase(BaseTestCase): def ...
<commit_before><commit_msg>Test if all commands can import<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009, 2010, 2011 Hans van Leeuwen. # See LICENSE.txt for details. from __future__ import unicode_literals import unittest import pycoreutils from pycoreutils.test import BaseTestCase...
b1149ce5e0bc639a5118432a1fdfd8af546996f7
rasterio/tests/test_blocks.py
rasterio/tests/test_blocks.py
import unittest import rasterio class RasterBlocksTest(unittest.TestCase): def test_blocks(self): with rasterio.open('rasterio/tests/data/RGB.byte.tif') as s: blocks = list(s.blocks) self.assertEqual(len(blocks), 1)
Test of access to a dataset's blocks.
Test of access to a dataset's blocks. See #6.
Python
bsd-3-clause
perrygeo/rasterio,kapadia/rasterio,johanvdw/rasterio,sgillies/rasterio,njwilson23/rasterio,clembou/rasterio,snorfalorpagus/rasterio,youngpm/rasterio,njwilson23/rasterio,johanvdw/rasterio,youngpm/rasterio,brendan-ward/rasterio,clembou/rasterio,brendan-ward/rasterio,johanvdw/rasterio,clembou/rasterio,brendan-ward/rasteri...
Test of access to a dataset's blocks. See #6.
import unittest import rasterio class RasterBlocksTest(unittest.TestCase): def test_blocks(self): with rasterio.open('rasterio/tests/data/RGB.byte.tif') as s: blocks = list(s.blocks) self.assertEqual(len(blocks), 1)
<commit_before><commit_msg>Test of access to a dataset's blocks. See #6.<commit_after>
import unittest import rasterio class RasterBlocksTest(unittest.TestCase): def test_blocks(self): with rasterio.open('rasterio/tests/data/RGB.byte.tif') as s: blocks = list(s.blocks) self.assertEqual(len(blocks), 1)
Test of access to a dataset's blocks. See #6.import unittest import rasterio class RasterBlocksTest(unittest.TestCase): def test_blocks(self): with rasterio.open('rasterio/tests/data/RGB.byte.tif') as s: blocks = list(s.blocks) self.assertEqual(len(blocks), 1)
<commit_before><commit_msg>Test of access to a dataset's blocks. See #6.<commit_after>import unittest import rasterio class RasterBlocksTest(unittest.TestCase): def test_blocks(self): with rasterio.open('rasterio/tests/data/RGB.byte.tif') as s: blocks = list(s.blocks) self.assertE...
b4a700dca980ef91247a0d0b0601fcb2c5166c07
laalaa/apps/advisers/tests/test_seed.py
laalaa/apps/advisers/tests/test_seed.py
from django.core.management import call_command from django.test import TestCase from advisers import models, tasks class SeedTest(TestCase): def test_seed_loads_models_with_organisation_type(self): tasks.clear_db() call_command("seed") # OrganisationType model loaded from initial_categor...
Create test case to ensure data from initial_categories is loaded
Create test case to ensure data from initial_categories is loaded Had to run tasks.clear_db() first as one of the migration files includes importing the initial_categories.json file and saving this to the db. Tests check data from both fixture files, initial_categories.json and initial_advisers.json are both present
Python
mit
ministryofjustice/laa-legal-adviser-api,ministryofjustice/laa-legal-adviser-api,ministryofjustice/laa-legal-adviser-api
Create test case to ensure data from initial_categories is loaded Had to run tasks.clear_db() first as one of the migration files includes importing the initial_categories.json file and saving this to the db. Tests check data from both fixture files, initial_categories.json and initial_advisers.json are both present
from django.core.management import call_command from django.test import TestCase from advisers import models, tasks class SeedTest(TestCase): def test_seed_loads_models_with_organisation_type(self): tasks.clear_db() call_command("seed") # OrganisationType model loaded from initial_categor...
<commit_before><commit_msg>Create test case to ensure data from initial_categories is loaded Had to run tasks.clear_db() first as one of the migration files includes importing the initial_categories.json file and saving this to the db. Tests check data from both fixture files, initial_categories.json and initial_advi...
from django.core.management import call_command from django.test import TestCase from advisers import models, tasks class SeedTest(TestCase): def test_seed_loads_models_with_organisation_type(self): tasks.clear_db() call_command("seed") # OrganisationType model loaded from initial_categor...
Create test case to ensure data from initial_categories is loaded Had to run tasks.clear_db() first as one of the migration files includes importing the initial_categories.json file and saving this to the db. Tests check data from both fixture files, initial_categories.json and initial_advisers.json are both presentf...
<commit_before><commit_msg>Create test case to ensure data from initial_categories is loaded Had to run tasks.clear_db() first as one of the migration files includes importing the initial_categories.json file and saving this to the db. Tests check data from both fixture files, initial_categories.json and initial_advi...
3e339aca69a9db2ff2cc2a05d6c7f7dbc1b2bb83
bin/get_barcode_hathi_record_number.py
bin/get_barcode_hathi_record_number.py
#!/usr/bin/env python3 # Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from argparse import ArgumentParser from urllib.request import urlopen from falcom.api.uri import URI, APIQuerier from...
Add binary script for getting HT record number
Add binary script for getting HT record number
Python
bsd-3-clause
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
Add binary script for getting HT record number
#!/usr/bin/env python3 # Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from argparse import ArgumentParser from urllib.request import urlopen from falcom.api.uri import URI, APIQuerier from...
<commit_before><commit_msg>Add binary script for getting HT record number<commit_after>
#!/usr/bin/env python3 # Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from argparse import ArgumentParser from urllib.request import urlopen from falcom.api.uri import URI, APIQuerier from...
Add binary script for getting HT record number#!/usr/bin/env python3 # Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from argparse import ArgumentParser from urllib.request import urlopen f...
<commit_before><commit_msg>Add binary script for getting HT record number<commit_after>#!/usr/bin/env python3 # Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from argparse import ArgumentPar...
7a04457e8003a638f0356e18d3c424f688e40a8f
tests/cli/test_rasa_show.py
tests/cli/test_rasa_show.py
def test_show_stories_help(run): help = run("show", "stories", "--help") help_text = """usage: rasa show stories [-h] [-v] [-vv] [--quiet] [-d DOMAIN] [-s STORIES] [-c CONFIG] [--output OUTPUT] [--max-history MAX_HISTORY] [-nlu NLU_DATA]""" lines = help_te...
Test rasa show stories help
Test rasa show stories help
Python
apache-2.0
RasaHQ/rasa_nlu,RasaHQ/rasa_nlu,RasaHQ/rasa_nlu
Test rasa show stories help
def test_show_stories_help(run): help = run("show", "stories", "--help") help_text = """usage: rasa show stories [-h] [-v] [-vv] [--quiet] [-d DOMAIN] [-s STORIES] [-c CONFIG] [--output OUTPUT] [--max-history MAX_HISTORY] [-nlu NLU_DATA]""" lines = help_te...
<commit_before><commit_msg>Test rasa show stories help<commit_after>
def test_show_stories_help(run): help = run("show", "stories", "--help") help_text = """usage: rasa show stories [-h] [-v] [-vv] [--quiet] [-d DOMAIN] [-s STORIES] [-c CONFIG] [--output OUTPUT] [--max-history MAX_HISTORY] [-nlu NLU_DATA]""" lines = help_te...
Test rasa show stories helpdef test_show_stories_help(run): help = run("show", "stories", "--help") help_text = """usage: rasa show stories [-h] [-v] [-vv] [--quiet] [-d DOMAIN] [-s STORIES] [-c CONFIG] [--output OUTPUT] [--max-history MAX_HISTORY] [-nlu NLU_DA...
<commit_before><commit_msg>Test rasa show stories help<commit_after>def test_show_stories_help(run): help = run("show", "stories", "--help") help_text = """usage: rasa show stories [-h] [-v] [-vv] [--quiet] [-d DOMAIN] [-s STORIES] [-c CONFIG] [--output OUTPUT] ...
9d29b4c569362dcd0af9519587aab576b895e159
txt2ml.py
txt2ml.py
"""Script to convert text file to input for embem classifier. The script tokenizes the text and writes it to a new file containing: <sentence id>\t<sentence (tokens separated by space)>\tNone\n Usage: python txt2ml.py <dir in> <dir out> """ import argparse import nltk.data from nltk.tokenize import word_tokenize imp...
Add script that converts text files to input for the classifier
Add script that converts text files to input for the classifier The script tokenizes the text and writes sentences in the correct format to file. Used for the Ceneton texts.
Python
apache-2.0
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
Add script that converts text files to input for the classifier The script tokenizes the text and writes sentences in the correct format to file. Used for the Ceneton texts.
"""Script to convert text file to input for embem classifier. The script tokenizes the text and writes it to a new file containing: <sentence id>\t<sentence (tokens separated by space)>\tNone\n Usage: python txt2ml.py <dir in> <dir out> """ import argparse import nltk.data from nltk.tokenize import word_tokenize imp...
<commit_before><commit_msg>Add script that converts text files to input for the classifier The script tokenizes the text and writes sentences in the correct format to file. Used for the Ceneton texts.<commit_after>
"""Script to convert text file to input for embem classifier. The script tokenizes the text and writes it to a new file containing: <sentence id>\t<sentence (tokens separated by space)>\tNone\n Usage: python txt2ml.py <dir in> <dir out> """ import argparse import nltk.data from nltk.tokenize import word_tokenize imp...
Add script that converts text files to input for the classifier The script tokenizes the text and writes sentences in the correct format to file. Used for the Ceneton texts."""Script to convert text file to input for embem classifier. The script tokenizes the text and writes it to a new file containing: <sentence id>...
<commit_before><commit_msg>Add script that converts text files to input for the classifier The script tokenizes the text and writes sentences in the correct format to file. Used for the Ceneton texts.<commit_after>"""Script to convert text file to input for embem classifier. The script tokenizes the text and writes i...
e9207faa45368eeb341555e94bd4fb41e39067df
tests/acceptance/test_running.py
tests/acceptance/test_running.py
import pytest from tests.acceptance import ( run_gitlabform, ) class TestRunning: # noinspection PyPep8Naming def test__ALL(self, gitlab, group, project, other_project): config = f""" projects_and_groups: '*': project_settings: request_access_enabled: tr...
Test running with ALL and ALL_DEFINED
Test running with ALL and ALL_DEFINED
Python
mit
egnyte/gitlabform,egnyte/gitlabform
Test running with ALL and ALL_DEFINED
import pytest from tests.acceptance import ( run_gitlabform, ) class TestRunning: # noinspection PyPep8Naming def test__ALL(self, gitlab, group, project, other_project): config = f""" projects_and_groups: '*': project_settings: request_access_enabled: tr...
<commit_before><commit_msg>Test running with ALL and ALL_DEFINED<commit_after>
import pytest from tests.acceptance import ( run_gitlabform, ) class TestRunning: # noinspection PyPep8Naming def test__ALL(self, gitlab, group, project, other_project): config = f""" projects_and_groups: '*': project_settings: request_access_enabled: tr...
Test running with ALL and ALL_DEFINEDimport pytest from tests.acceptance import ( run_gitlabform, ) class TestRunning: # noinspection PyPep8Naming def test__ALL(self, gitlab, group, project, other_project): config = f""" projects_and_groups: '*': project_settings: ...
<commit_before><commit_msg>Test running with ALL and ALL_DEFINED<commit_after>import pytest from tests.acceptance import ( run_gitlabform, ) class TestRunning: # noinspection PyPep8Naming def test__ALL(self, gitlab, group, project, other_project): config = f""" projects_and_groups: ...
f86cca3b06c48f7f3270648147878de8a389cebb
thermof/simulation/initialize.py
thermof/simulation/initialize.py
# Date: September 2017 # Author: Kutay B. Sezginel """ Initialize Lammps simulation using lammps_interface """ import os from lammps_interface.lammps_main import LammpsSimulation from lammps_interface.structure_data import from_CIF def write_lammps_files(parameters): """ Write Lammps files using lammps_interf...
Add function to write Lammps files using lammps_interface.
Add function to write Lammps files using lammps_interface.
Python
mit
kbsezginel/tee_mof,kbsezginel/tee_mof
Add function to write Lammps files using lammps_interface.
# Date: September 2017 # Author: Kutay B. Sezginel """ Initialize Lammps simulation using lammps_interface """ import os from lammps_interface.lammps_main import LammpsSimulation from lammps_interface.structure_data import from_CIF def write_lammps_files(parameters): """ Write Lammps files using lammps_interf...
<commit_before><commit_msg>Add function to write Lammps files using lammps_interface.<commit_after>
# Date: September 2017 # Author: Kutay B. Sezginel """ Initialize Lammps simulation using lammps_interface """ import os from lammps_interface.lammps_main import LammpsSimulation from lammps_interface.structure_data import from_CIF def write_lammps_files(parameters): """ Write Lammps files using lammps_interf...
Add function to write Lammps files using lammps_interface.# Date: September 2017 # Author: Kutay B. Sezginel """ Initialize Lammps simulation using lammps_interface """ import os from lammps_interface.lammps_main import LammpsSimulation from lammps_interface.structure_data import from_CIF def write_lammps_files(param...
<commit_before><commit_msg>Add function to write Lammps files using lammps_interface.<commit_after># Date: September 2017 # Author: Kutay B. Sezginel """ Initialize Lammps simulation using lammps_interface """ import os from lammps_interface.lammps_main import LammpsSimulation from lammps_interface.structure_data impor...
ab094c32b1bcea2978796d6118bf43365571f2b7
stacker_blueprints/security_rules.py
stacker_blueprints/security_rules.py
from troposphere.ec2 import SecurityGroupIngress, SecurityGroupEgress from stacker.blueprints.base import Blueprint CLASS_MAP = { "IngressRules": SecurityGroupIngress, "EgressRules": SecurityGroupEgress, } class SecurityGroupRules(Blueprint): """Used to add Ingress/Egress rules to existing security group...
Add new, low-level security group rule blueprint
Add new, low-level security group rule blueprint This should make it super simple to have a stack that maintains security group rules on security groups built in other stacks. Mostly useful for rules that glue two stacks together (like adding a rule to allow instances in your webserver stack to talk to your RDS databa...
Python
bsd-2-clause
remind101/stacker_blueprints,remind101/stacker_blueprints
Add new, low-level security group rule blueprint This should make it super simple to have a stack that maintains security group rules on security groups built in other stacks. Mostly useful for rules that glue two stacks together (like adding a rule to allow instances in your webserver stack to talk to your RDS databa...
from troposphere.ec2 import SecurityGroupIngress, SecurityGroupEgress from stacker.blueprints.base import Blueprint CLASS_MAP = { "IngressRules": SecurityGroupIngress, "EgressRules": SecurityGroupEgress, } class SecurityGroupRules(Blueprint): """Used to add Ingress/Egress rules to existing security group...
<commit_before><commit_msg>Add new, low-level security group rule blueprint This should make it super simple to have a stack that maintains security group rules on security groups built in other stacks. Mostly useful for rules that glue two stacks together (like adding a rule to allow instances in your webserver stack...
from troposphere.ec2 import SecurityGroupIngress, SecurityGroupEgress from stacker.blueprints.base import Blueprint CLASS_MAP = { "IngressRules": SecurityGroupIngress, "EgressRules": SecurityGroupEgress, } class SecurityGroupRules(Blueprint): """Used to add Ingress/Egress rules to existing security group...
Add new, low-level security group rule blueprint This should make it super simple to have a stack that maintains security group rules on security groups built in other stacks. Mostly useful for rules that glue two stacks together (like adding a rule to allow instances in your webserver stack to talk to your RDS databa...
<commit_before><commit_msg>Add new, low-level security group rule blueprint This should make it super simple to have a stack that maintains security group rules on security groups built in other stacks. Mostly useful for rules that glue two stacks together (like adding a rule to allow instances in your webserver stack...
dbe5a653785042c8a6051b331675235d1c7c60a2
contrib_bots/bots/help/test_help.py
contrib_bots/bots/help/test_help.py
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys our_dir = os.path.dirname(os.path.abspath(__file__)) # For dev setups, we can find the API in the repo itself. if os.path.exists(os.path.join(our_dir, '..')): sys.path.insert(0, '..') from bots...
Add tests for help bot in contrib_bots.
testsuite: Add tests for help bot in contrib_bots. Add test file 'test_help.py'.
Python
apache-2.0
dhcrzf/zulip,Galexrt/zulip,punchagan/zulip,Galexrt/zulip,andersk/zulip,rht/zulip,andersk/zulip,brockwhittaker/zulip,mahim97/zulip,shubhamdhama/zulip,mahim97/zulip,shubhamdhama/zulip,amanharitsh123/zulip,hackerkid/zulip,hackerkid/zulip,verma-varsha/zulip,timabbott/zulip,zulip/zulip,vabs22/zulip,kou/zulip,jrowan/zulip,ko...
testsuite: Add tests for help bot in contrib_bots. Add test file 'test_help.py'.
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys our_dir = os.path.dirname(os.path.abspath(__file__)) # For dev setups, we can find the API in the repo itself. if os.path.exists(os.path.join(our_dir, '..')): sys.path.insert(0, '..') from bots...
<commit_before><commit_msg>testsuite: Add tests for help bot in contrib_bots. Add test file 'test_help.py'.<commit_after>
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys our_dir = os.path.dirname(os.path.abspath(__file__)) # For dev setups, we can find the API in the repo itself. if os.path.exists(os.path.join(our_dir, '..')): sys.path.insert(0, '..') from bots...
testsuite: Add tests for help bot in contrib_bots. Add test file 'test_help.py'.#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys our_dir = os.path.dirname(os.path.abspath(__file__)) # For dev setups, we can find the API in the repo itself. if os...
<commit_before><commit_msg>testsuite: Add tests for help bot in contrib_bots. Add test file 'test_help.py'.<commit_after>#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys our_dir = os.path.dirname(os.path.abspath(__file__)) # For dev setups, we c...
cd088415d0fd652c3e485fcd3b6e16032f09d707
test/client/local_recognizer_test.py
test/client/local_recognizer_test.py
import unittest import os from speech_recognition import WavFile from mycroft.client.speech.listener import RecognizerLoop __author__ = 'seanfitz' DATA_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") class LocalRecognizerTest(unittest.TestCase): def setUp(self): self.recognizer ...
import unittest import os from speech_recognition import WavFile from mycroft.client.speech.listener import RecognizerLoop __author__ = 'seanfitz' DATA_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") class LocalRecognizerTest(unittest.TestCase): def setUp(self): rl = RecognizerL...
Fix init of local recognizer
Fix init of local recognizer
Python
apache-2.0
linuxipho/mycroft-core,Dark5ide/mycroft-core,forslund/mycroft-core,linuxipho/mycroft-core,forslund/mycroft-core,aatchison/mycroft-core,aatchison/mycroft-core,Dark5ide/mycroft-core,MycroftAI/mycroft-core,MycroftAI/mycroft-core
import unittest import os from speech_recognition import WavFile from mycroft.client.speech.listener import RecognizerLoop __author__ = 'seanfitz' DATA_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") class LocalRecognizerTest(unittest.TestCase): def setUp(self): self.recognizer ...
import unittest import os from speech_recognition import WavFile from mycroft.client.speech.listener import RecognizerLoop __author__ = 'seanfitz' DATA_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") class LocalRecognizerTest(unittest.TestCase): def setUp(self): rl = RecognizerL...
<commit_before>import unittest import os from speech_recognition import WavFile from mycroft.client.speech.listener import RecognizerLoop __author__ = 'seanfitz' DATA_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") class LocalRecognizerTest(unittest.TestCase): def setUp(self): s...
import unittest import os from speech_recognition import WavFile from mycroft.client.speech.listener import RecognizerLoop __author__ = 'seanfitz' DATA_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") class LocalRecognizerTest(unittest.TestCase): def setUp(self): rl = RecognizerL...
import unittest import os from speech_recognition import WavFile from mycroft.client.speech.listener import RecognizerLoop __author__ = 'seanfitz' DATA_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") class LocalRecognizerTest(unittest.TestCase): def setUp(self): self.recognizer ...
<commit_before>import unittest import os from speech_recognition import WavFile from mycroft.client.speech.listener import RecognizerLoop __author__ = 'seanfitz' DATA_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") class LocalRecognizerTest(unittest.TestCase): def setUp(self): s...
90def43806ca31e449ab70b1daa09fa354b7fd74
bin/generate_test_queries.py
bin/generate_test_queries.py
#!/usr/bin/env python import os import sys import time try: import wikipedia except ImportError: print('Queries generation requires wikipedia package. \n' 'You can install it by running "pip install wikipedia"') exit() # If user in bin directory set correct path to queries if os.getcwd().endswith...
Create script for generation test queries
Create script for generation test queries
Python
lgpl-2.1
daminisatya/loklak_server,PiotrKowalski/loklak_server,singhpratyush/loklak_server,smokingwheels/loklak_server_frontend_hdd,arashahmadi/sensemi_ai,singhpratyush/loklak_server,smsunarto/loklak_server,loklak/loklak_server,sudheesh001/loklak_server,singhpratyush/loklak_server,smsunarto/loklak_server,singhpratyush/loklak_se...
Create script for generation test queries
#!/usr/bin/env python import os import sys import time try: import wikipedia except ImportError: print('Queries generation requires wikipedia package. \n' 'You can install it by running "pip install wikipedia"') exit() # If user in bin directory set correct path to queries if os.getcwd().endswith...
<commit_before><commit_msg>Create script for generation test queries<commit_after>
#!/usr/bin/env python import os import sys import time try: import wikipedia except ImportError: print('Queries generation requires wikipedia package. \n' 'You can install it by running "pip install wikipedia"') exit() # If user in bin directory set correct path to queries if os.getcwd().endswith...
Create script for generation test queries#!/usr/bin/env python import os import sys import time try: import wikipedia except ImportError: print('Queries generation requires wikipedia package. \n' 'You can install it by running "pip install wikipedia"') exit() # If user in bin directory set correc...
<commit_before><commit_msg>Create script for generation test queries<commit_after>#!/usr/bin/env python import os import sys import time try: import wikipedia except ImportError: print('Queries generation requires wikipedia package. \n' 'You can install it by running "pip install wikipedia"') exit...
d3c5c5612c23c2ffcc103402d1f4d2acf7b81009
photutils/utils/tests/test_moments.py
photutils/utils/tests/test_moments.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from numpy.testing import assert_equal, assert_allclose import pytest from .._moments import _moments, _moments_central def ...
Add tests for new moment functions
Add tests for new moment functions
Python
bsd-3-clause
astropy/photutils,larrybradley/photutils
Add tests for new moment functions
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from numpy.testing import assert_equal, assert_allclose import pytest from .._moments import _moments, _moments_central def ...
<commit_before><commit_msg>Add tests for new moment functions<commit_after>
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from numpy.testing import assert_equal, assert_allclose import pytest from .._moments import _moments, _moments_central def ...
Add tests for new moment functions# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from numpy.testing import assert_equal, assert_allclose import pytest from .._moments import...
<commit_before><commit_msg>Add tests for new moment functions<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from numpy.testing import assert_equal, assert_allcl...
f217c8c6def69d8a7428c655c5d350b0c1d8deb2
dynd/tests/test_ndobject_cast.py
dynd/tests/test_ndobject_cast.py
import sys import unittest from datetime import date from dynd import nd, ndt class TestNDObjectCast(unittest.TestCase): def test_broadcast_cast(self): a = nd.ndobject(10) b = a.cast('3, int32') self.assertRaises(RuntimeError, b.eval) def test_strided_to_fixed(self): a = nd.ndo...
Test that uses the convert_dtype's get_shape
Test that uses the convert_dtype's get_shape
Python
bsd-2-clause
insertinterestingnamehere/dynd-python,cpcloud/dynd-python,pombredanne/dynd-python,ContinuumIO/dynd-python,insertinterestingnamehere/dynd-python,insertinterestingnamehere/dynd-python,ContinuumIO/dynd-python,izaid/dynd-python,aterrel/dynd-python,aterrel/dynd-python,cpcloud/dynd-python,ContinuumIO/dynd-python,michaelpacer...
Test that uses the convert_dtype's get_shape
import sys import unittest from datetime import date from dynd import nd, ndt class TestNDObjectCast(unittest.TestCase): def test_broadcast_cast(self): a = nd.ndobject(10) b = a.cast('3, int32') self.assertRaises(RuntimeError, b.eval) def test_strided_to_fixed(self): a = nd.ndo...
<commit_before><commit_msg>Test that uses the convert_dtype's get_shape<commit_after>
import sys import unittest from datetime import date from dynd import nd, ndt class TestNDObjectCast(unittest.TestCase): def test_broadcast_cast(self): a = nd.ndobject(10) b = a.cast('3, int32') self.assertRaises(RuntimeError, b.eval) def test_strided_to_fixed(self): a = nd.ndo...
Test that uses the convert_dtype's get_shapeimport sys import unittest from datetime import date from dynd import nd, ndt class TestNDObjectCast(unittest.TestCase): def test_broadcast_cast(self): a = nd.ndobject(10) b = a.cast('3, int32') self.assertRaises(RuntimeError, b.eval) def tes...
<commit_before><commit_msg>Test that uses the convert_dtype's get_shape<commit_after>import sys import unittest from datetime import date from dynd import nd, ndt class TestNDObjectCast(unittest.TestCase): def test_broadcast_cast(self): a = nd.ndobject(10) b = a.cast('3, int32') self.assert...
9416de2b1aae97639b9a77bfb0e0f50a1c09ea6d
sierra_adapter/sierra_window_generator/src/sierra_window_generator.py
sierra_adapter/sierra_window_generator/src/sierra_window_generator.py
# -*- encoding: utf-8 -*- """ Publish a new Sierra update window to SNS. """ import os import boto3 import maya from wellcome_aws_utils.sns_utils import publish_sns_message def main(event, _): print(f'event = {event!r}') topic_arn = os.environ['TOPIC_ARN'] window_start = os.environ['WINDOW_START'] ...
Create the first Sierra window generator
Create the first Sierra window generator
Python
mit
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
Create the first Sierra window generator
# -*- encoding: utf-8 -*- """ Publish a new Sierra update window to SNS. """ import os import boto3 import maya from wellcome_aws_utils.sns_utils import publish_sns_message def main(event, _): print(f'event = {event!r}') topic_arn = os.environ['TOPIC_ARN'] window_start = os.environ['WINDOW_START'] ...
<commit_before><commit_msg>Create the first Sierra window generator<commit_after>
# -*- encoding: utf-8 -*- """ Publish a new Sierra update window to SNS. """ import os import boto3 import maya from wellcome_aws_utils.sns_utils import publish_sns_message def main(event, _): print(f'event = {event!r}') topic_arn = os.environ['TOPIC_ARN'] window_start = os.environ['WINDOW_START'] ...
Create the first Sierra window generator# -*- encoding: utf-8 -*- """ Publish a new Sierra update window to SNS. """ import os import boto3 import maya from wellcome_aws_utils.sns_utils import publish_sns_message def main(event, _): print(f'event = {event!r}') topic_arn = os.environ['TOPIC_ARN'] windo...
<commit_before><commit_msg>Create the first Sierra window generator<commit_after># -*- encoding: utf-8 -*- """ Publish a new Sierra update window to SNS. """ import os import boto3 import maya from wellcome_aws_utils.sns_utils import publish_sns_message def main(event, _): print(f'event = {event!r}') topi...
fa85cd0d992b5153f9a48f3cf9d504a2b33cca1d
tempest/tests/lib/services/volume/v2/test_availability_zone_client.py
tempest/tests/lib/services/volume/v2/test_availability_zone_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 availability zone client
Add unit test for volume availability zone client This patch adds unit test for volume v2 availability zone client. Partially Implements: blueprint tempest-lib-missing-test-coverage Change-Id: I94f758307255de06fbaf8c6744912b46e15a6cb2
Python
apache-2.0
openstack/tempest,Juniper/tempest,openstack/tempest,masayukig/tempest,masayukig/tempest,Juniper/tempest,cisco-openstack/tempest,cisco-openstack/tempest
Add unit test for volume availability zone client This patch adds unit test for volume v2 availability zone client. Partially Implements: blueprint tempest-lib-missing-test-coverage Change-Id: I94f758307255de06fbaf8c6744912b46e15a6cb2
# 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 availability zone client This patch adds unit test for volume v2 availability zone client. Partially Implements: blueprint tempest-lib-missing-test-coverage Change-Id: I94f758307255de06fbaf8c6744912b46e15a6cb2<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 availability zone client This patch adds unit test for volume v2 availability zone client. Partially Implements: blueprint tempest-lib-missing-test-coverage Change-Id: I94f758307255de06fbaf8c6744912b46e15a6cb2# Copyright 2017 FiberHome Telecommunication Technologies CO.,LTD # All Rights Rese...
<commit_before><commit_msg>Add unit test for volume availability zone client This patch adds unit test for volume v2 availability zone client. Partially Implements: blueprint tempest-lib-missing-test-coverage Change-Id: I94f758307255de06fbaf8c6744912b46e15a6cb2<commit_after># Copyright 2017 FiberHome Telecommunicati...
6b6f6fb8a0266b19d1edc8272d0b3f1aea8d0c1b
analysis/patch-to-timeout.py
analysis/patch-to-timeout.py
#!/usr/bin/env python # vim: set sw=2 ts=2 softtabstop=2 expandtab: """ This script is designed to take a set of results and set them all to timeouts. """ import argparse import os import logging import sys import yaml from br_util import FinalResultType, classifyResult try: # Try to use libyaml which is faster fr...
Add script to take a result set and turn them all into timeouts.
Add script to take a result set and turn them all into timeouts.
Python
bsd-3-clause
symbooglix/boogie-runner,symbooglix/boogie-runner
Add script to take a result set and turn them all into timeouts.
#!/usr/bin/env python # vim: set sw=2 ts=2 softtabstop=2 expandtab: """ This script is designed to take a set of results and set them all to timeouts. """ import argparse import os import logging import sys import yaml from br_util import FinalResultType, classifyResult try: # Try to use libyaml which is faster fr...
<commit_before><commit_msg>Add script to take a result set and turn them all into timeouts.<commit_after>
#!/usr/bin/env python # vim: set sw=2 ts=2 softtabstop=2 expandtab: """ This script is designed to take a set of results and set them all to timeouts. """ import argparse import os import logging import sys import yaml from br_util import FinalResultType, classifyResult try: # Try to use libyaml which is faster fr...
Add script to take a result set and turn them all into timeouts.#!/usr/bin/env python # vim: set sw=2 ts=2 softtabstop=2 expandtab: """ This script is designed to take a set of results and set them all to timeouts. """ import argparse import os import logging import sys import yaml from br_util import FinalResultType, ...
<commit_before><commit_msg>Add script to take a result set and turn them all into timeouts.<commit_after>#!/usr/bin/env python # vim: set sw=2 ts=2 softtabstop=2 expandtab: """ This script is designed to take a set of results and set them all to timeouts. """ import argparse import os import logging import sys import y...
9382b3e6cf2dacb5380d482acd6a2bd97a6dd0ce
tests/benchmarks/benchmark_transform.py
tests/benchmarks/benchmark_transform.py
from warnings import WarningMessage import pytest import subprocess import os import h5py import numpy as np import time from desc.__main__ import main from desc.grid import Grid, LinearGrid, ConcentricGrid from desc.basis import ( PowerSeries, FourierSeries, DoubleFourierSeries, ZernikePolynomial, ...
Add benchmark for building transforms (not including compilation time)
Add benchmark for building transforms (not including compilation time)
Python
mit
PlasmaControl/DESC,PlasmaControl/DESC
Add benchmark for building transforms (not including compilation time)
from warnings import WarningMessage import pytest import subprocess import os import h5py import numpy as np import time from desc.__main__ import main from desc.grid import Grid, LinearGrid, ConcentricGrid from desc.basis import ( PowerSeries, FourierSeries, DoubleFourierSeries, ZernikePolynomial, ...
<commit_before><commit_msg>Add benchmark for building transforms (not including compilation time)<commit_after>
from warnings import WarningMessage import pytest import subprocess import os import h5py import numpy as np import time from desc.__main__ import main from desc.grid import Grid, LinearGrid, ConcentricGrid from desc.basis import ( PowerSeries, FourierSeries, DoubleFourierSeries, ZernikePolynomial, ...
Add benchmark for building transforms (not including compilation time)from warnings import WarningMessage import pytest import subprocess import os import h5py import numpy as np import time from desc.__main__ import main from desc.grid import Grid, LinearGrid, ConcentricGrid from desc.basis import ( PowerSeries, ...
<commit_before><commit_msg>Add benchmark for building transforms (not including compilation time)<commit_after>from warnings import WarningMessage import pytest import subprocess import os import h5py import numpy as np import time from desc.__main__ import main from desc.grid import Grid, LinearGrid, ConcentricGrid f...
bf40adfe7042518c4cefc1aaf4a0929c9ce8b2a4
mta.py
mta.py
from datetime import datetime import urllib2 import xml.etree.ElementTree as ET MTA_SERVICE_STATUS_URL = 'http://web.mta.info/status/serviceStatus.txt' def service_status(): service_status_xml = urllib2.urlopen(MTA_SERVICE_STATUS_URL).read() tree = ET.fromstring(service_status_xml) return MTASubwayStatus...
Add basic functionality for using the MTA service status feed
Add basic functionality for using the MTA service status feed
Python
isc
softdev-projects/mta-smart-alerts
Add basic functionality for using the MTA service status feed
from datetime import datetime import urllib2 import xml.etree.ElementTree as ET MTA_SERVICE_STATUS_URL = 'http://web.mta.info/status/serviceStatus.txt' def service_status(): service_status_xml = urllib2.urlopen(MTA_SERVICE_STATUS_URL).read() tree = ET.fromstring(service_status_xml) return MTASubwayStatus...
<commit_before><commit_msg>Add basic functionality for using the MTA service status feed<commit_after>
from datetime import datetime import urllib2 import xml.etree.ElementTree as ET MTA_SERVICE_STATUS_URL = 'http://web.mta.info/status/serviceStatus.txt' def service_status(): service_status_xml = urllib2.urlopen(MTA_SERVICE_STATUS_URL).read() tree = ET.fromstring(service_status_xml) return MTASubwayStatus...
Add basic functionality for using the MTA service status feedfrom datetime import datetime import urllib2 import xml.etree.ElementTree as ET MTA_SERVICE_STATUS_URL = 'http://web.mta.info/status/serviceStatus.txt' def service_status(): service_status_xml = urllib2.urlopen(MTA_SERVICE_STATUS_URL).read() tree =...
<commit_before><commit_msg>Add basic functionality for using the MTA service status feed<commit_after>from datetime import datetime import urllib2 import xml.etree.ElementTree as ET MTA_SERVICE_STATUS_URL = 'http://web.mta.info/status/serviceStatus.txt' def service_status(): service_status_xml = urllib2.urlopen(...
ffab86b081357fbd51e0c9676f03f4c39b65658b
emails/models.py
emails/models.py
from django.db import models from datetime import datetime import settings class Email(models.Model): ''' Monitor emails sent ''' to = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='emails') subject = models.CharField(max_length=150) body = models.TextField() at = models.Dat...
Add a django model to save emails and specify subscriptions.
Add a django model to save emails and specify subscriptions.
Python
bsd-3-clause
fmalina/emails,fmalina/emails
Add a django model to save emails and specify subscriptions.
from django.db import models from datetime import datetime import settings class Email(models.Model): ''' Monitor emails sent ''' to = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='emails') subject = models.CharField(max_length=150) body = models.TextField() at = models.Dat...
<commit_before><commit_msg>Add a django model to save emails and specify subscriptions.<commit_after>
from django.db import models from datetime import datetime import settings class Email(models.Model): ''' Monitor emails sent ''' to = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='emails') subject = models.CharField(max_length=150) body = models.TextField() at = models.Dat...
Add a django model to save emails and specify subscriptions.from django.db import models from datetime import datetime import settings class Email(models.Model): ''' Monitor emails sent ''' to = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='emails') subject = models.CharField(max_length=15...
<commit_before><commit_msg>Add a django model to save emails and specify subscriptions.<commit_after>from django.db import models from datetime import datetime import settings class Email(models.Model): ''' Monitor emails sent ''' to = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='emails') ...
4325bf0fc91011a263f9b27065659aca09ca3d49
tools/droplets/cleanup.py
tools/droplets/cleanup.py
import argparse import configparser import os import digitalocean def get_config() -> configparser.ConfigParser: config = configparser.ConfigParser() config.read(os.path.join(os.path.dirname(os.path.abspath(__file__)), "conf.ini")) return config parser = argparse.ArgumentParser(description="Clean up ol...
Add a tool to clean up old hostnames in DNS.
droplets: Add a tool to clean up old hostnames in DNS.
Python
apache-2.0
andersk/zulip,rht/zulip,andersk/zulip,andersk/zulip,zulip/zulip,zulip/zulip,zulip/zulip,zulip/zulip,andersk/zulip,andersk/zulip,andersk/zulip,rht/zulip,rht/zulip,rht/zulip,rht/zulip,zulip/zulip,rht/zulip,andersk/zulip,zulip/zulip,zulip/zulip,rht/zulip
droplets: Add a tool to clean up old hostnames in DNS.
import argparse import configparser import os import digitalocean def get_config() -> configparser.ConfigParser: config = configparser.ConfigParser() config.read(os.path.join(os.path.dirname(os.path.abspath(__file__)), "conf.ini")) return config parser = argparse.ArgumentParser(description="Clean up ol...
<commit_before><commit_msg>droplets: Add a tool to clean up old hostnames in DNS.<commit_after>
import argparse import configparser import os import digitalocean def get_config() -> configparser.ConfigParser: config = configparser.ConfigParser() config.read(os.path.join(os.path.dirname(os.path.abspath(__file__)), "conf.ini")) return config parser = argparse.ArgumentParser(description="Clean up ol...
droplets: Add a tool to clean up old hostnames in DNS.import argparse import configparser import os import digitalocean def get_config() -> configparser.ConfigParser: config = configparser.ConfigParser() config.read(os.path.join(os.path.dirname(os.path.abspath(__file__)), "conf.ini")) return config par...
<commit_before><commit_msg>droplets: Add a tool to clean up old hostnames in DNS.<commit_after>import argparse import configparser import os import digitalocean def get_config() -> configparser.ConfigParser: config = configparser.ConfigParser() config.read(os.path.join(os.path.dirname(os.path.abspath(__file_...
5fdb5e0537049d602a1bc4bfc6401e396076e333
py/ransom-note.py
py/ransom-note.py
from collections import Counter class Solution(object): def canConstruct(self, ransomNote, magazine): """ :type ransomNote: str :type magazine: str :rtype: bool """ cr = Counter(ransomNote) cm = Counter(magazine) for c, v in cr.iteritems(): ...
Add py solution for 383. Ransom Note
Add py solution for 383. Ransom Note 383. Ransom Note: https://leetcode.com/problems/ransom-note/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 383. Ransom Note 383. Ransom Note: https://leetcode.com/problems/ransom-note/
from collections import Counter class Solution(object): def canConstruct(self, ransomNote, magazine): """ :type ransomNote: str :type magazine: str :rtype: bool """ cr = Counter(ransomNote) cm = Counter(magazine) for c, v in cr.iteritems(): ...
<commit_before><commit_msg>Add py solution for 383. Ransom Note 383. Ransom Note: https://leetcode.com/problems/ransom-note/<commit_after>
from collections import Counter class Solution(object): def canConstruct(self, ransomNote, magazine): """ :type ransomNote: str :type magazine: str :rtype: bool """ cr = Counter(ransomNote) cm = Counter(magazine) for c, v in cr.iteritems(): ...
Add py solution for 383. Ransom Note 383. Ransom Note: https://leetcode.com/problems/ransom-note/from collections import Counter class Solution(object): def canConstruct(self, ransomNote, magazine): """ :type ransomNote: str :type magazine: str :rtype: bool """ cr = ...
<commit_before><commit_msg>Add py solution for 383. Ransom Note 383. Ransom Note: https://leetcode.com/problems/ransom-note/<commit_after>from collections import Counter class Solution(object): def canConstruct(self, ransomNote, magazine): """ :type ransomNote: str :type magazine: str ...
5cbd8ce4ef321b3c302ca731999b09abbb99db7f
hub/tests/test_globalsettings.py
hub/tests/test_globalsettings.py
# coding: utf-8 import constance from constance.test import override_config from django.urls import reverse from django.test import TestCase class GlobalSettingsTestCase(TestCase): fixtures = ['test_data'] @override_config(MFA_ENABLED=True) def test_mfa_enabled(self): self.client.login(username=...
Add test to valide MFA status in JS
Add test to valide MFA status in JS
Python
agpl-3.0
kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi
Add test to valide MFA status in JS
# coding: utf-8 import constance from constance.test import override_config from django.urls import reverse from django.test import TestCase class GlobalSettingsTestCase(TestCase): fixtures = ['test_data'] @override_config(MFA_ENABLED=True) def test_mfa_enabled(self): self.client.login(username=...
<commit_before><commit_msg>Add test to valide MFA status in JS<commit_after>
# coding: utf-8 import constance from constance.test import override_config from django.urls import reverse from django.test import TestCase class GlobalSettingsTestCase(TestCase): fixtures = ['test_data'] @override_config(MFA_ENABLED=True) def test_mfa_enabled(self): self.client.login(username=...
Add test to valide MFA status in JS# coding: utf-8 import constance from constance.test import override_config from django.urls import reverse from django.test import TestCase class GlobalSettingsTestCase(TestCase): fixtures = ['test_data'] @override_config(MFA_ENABLED=True) def test_mfa_enabled(self): ...
<commit_before><commit_msg>Add test to valide MFA status in JS<commit_after># coding: utf-8 import constance from constance.test import override_config from django.urls import reverse from django.test import TestCase class GlobalSettingsTestCase(TestCase): fixtures = ['test_data'] @override_config(MFA_ENABL...
8214d8b542e2da890bc6b34372de2016e98e7767
tests/services/shop/order/test_ordered_articles_service.py
tests/services/shop/order/test_ordered_articles_service.py
""" :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from itertools import count from byceps.services.shop.order import ordered_articles_service from byceps.services.shop.order.models.order import PaymentState from testfixtures.party import create_party from testfixture...
Add test for service function that counts ordered article by payment state
Add test for service function that counts ordered article by payment state
Python
bsd-3-clause
m-ober/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps
Add test for service function that counts ordered article by payment state
""" :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from itertools import count from byceps.services.shop.order import ordered_articles_service from byceps.services.shop.order.models.order import PaymentState from testfixtures.party import create_party from testfixture...
<commit_before><commit_msg>Add test for service function that counts ordered article by payment state<commit_after>
""" :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from itertools import count from byceps.services.shop.order import ordered_articles_service from byceps.services.shop.order.models.order import PaymentState from testfixtures.party import create_party from testfixture...
Add test for service function that counts ordered article by payment state""" :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from itertools import count from byceps.services.shop.order import ordered_articles_service from byceps.services.shop.order.models.order import ...
<commit_before><commit_msg>Add test for service function that counts ordered article by payment state<commit_after>""" :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from itertools import count from byceps.services.shop.order import ordered_articles_service from byceps...
c5faa45462ff217f4ce2ea4004de9b8c29ed3c87
bin/analyze.py
bin/analyze.py
#!/usr/bin/env python3 import math import numpy as np import sqlite3 def read(path='tests/fixtures/google.sqlite3'): connection = sqlite3.connect(path) cursor = connection.cursor() cursor.execute('SELECT time FROM arrivals ORDER BY time') data = np.diff(np.array([row[0] for row in cursor])) connec...
Add an auxiliary Python script
Add an auxiliary Python script
Python
mit
learning-on-chip/google-cluster-prediction
Add an auxiliary Python script
#!/usr/bin/env python3 import math import numpy as np import sqlite3 def read(path='tests/fixtures/google.sqlite3'): connection = sqlite3.connect(path) cursor = connection.cursor() cursor.execute('SELECT time FROM arrivals ORDER BY time') data = np.diff(np.array([row[0] for row in cursor])) connec...
<commit_before><commit_msg>Add an auxiliary Python script<commit_after>
#!/usr/bin/env python3 import math import numpy as np import sqlite3 def read(path='tests/fixtures/google.sqlite3'): connection = sqlite3.connect(path) cursor = connection.cursor() cursor.execute('SELECT time FROM arrivals ORDER BY time') data = np.diff(np.array([row[0] for row in cursor])) connec...
Add an auxiliary Python script#!/usr/bin/env python3 import math import numpy as np import sqlite3 def read(path='tests/fixtures/google.sqlite3'): connection = sqlite3.connect(path) cursor = connection.cursor() cursor.execute('SELECT time FROM arrivals ORDER BY time') data = np.diff(np.array([row[0] f...
<commit_before><commit_msg>Add an auxiliary Python script<commit_after>#!/usr/bin/env python3 import math import numpy as np import sqlite3 def read(path='tests/fixtures/google.sqlite3'): connection = sqlite3.connect(path) cursor = connection.cursor() cursor.execute('SELECT time FROM arrivals ORDER BY tim...
78fc07d59820db3f9992d0285bf18b27c2078ab7
choosealicense/test/test_info.py
choosealicense/test/test_info.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license info` function """ from click.testing import CliRunner from choosealicense.main import info def test_show_license_info(): all_the_licenses = { 'agpl-3.0': ('GNU Affero General Public License v3.0', 11), 'apache-2.0': (...
Add test for `license info` function
Add test for `license info` function
Python
mit
lord63/choosealicense-cli
Add test for `license info` function
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license info` function """ from click.testing import CliRunner from choosealicense.main import info def test_show_license_info(): all_the_licenses = { 'agpl-3.0': ('GNU Affero General Public License v3.0', 11), 'apache-2.0': (...
<commit_before><commit_msg>Add test for `license info` function<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license info` function """ from click.testing import CliRunner from choosealicense.main import info def test_show_license_info(): all_the_licenses = { 'agpl-3.0': ('GNU Affero General Public License v3.0', 11), 'apache-2.0': (...
Add test for `license info` function#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license info` function """ from click.testing import CliRunner from choosealicense.main import info def test_show_license_info(): all_the_licenses = { 'agpl-3.0': ('GNU Affero General Public License...
<commit_before><commit_msg>Add test for `license info` function<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license info` function """ from click.testing import CliRunner from choosealicense.main import info def test_show_license_info(): all_the_licenses = { 'agpl-...
6ba394fba3786ecac9eec8896b8fa40e3ddc0612
bmi_ilamb/tests/test_package_directories.py
bmi_ilamb/tests/test_package_directories.py
"""Tests directories set in the package definition file.""" import os from nose.tools import assert_true from .. import package_dir, data_dir def test_package_dir_is_set(): assert(package_dir is not None) def test_data_dir_is_set(): assert(data_dir is not None) def test_package_dir_exists(): assert_t...
Add unit tests for package directories
Add unit tests for package directories
Python
mit
permamodel/bmi-ilamb
Add unit tests for package directories
"""Tests directories set in the package definition file.""" import os from nose.tools import assert_true from .. import package_dir, data_dir def test_package_dir_is_set(): assert(package_dir is not None) def test_data_dir_is_set(): assert(data_dir is not None) def test_package_dir_exists(): assert_t...
<commit_before><commit_msg>Add unit tests for package directories<commit_after>
"""Tests directories set in the package definition file.""" import os from nose.tools import assert_true from .. import package_dir, data_dir def test_package_dir_is_set(): assert(package_dir is not None) def test_data_dir_is_set(): assert(data_dir is not None) def test_package_dir_exists(): assert_t...
Add unit tests for package directories"""Tests directories set in the package definition file.""" import os from nose.tools import assert_true from .. import package_dir, data_dir def test_package_dir_is_set(): assert(package_dir is not None) def test_data_dir_is_set(): assert(data_dir is not None) def t...
<commit_before><commit_msg>Add unit tests for package directories<commit_after>"""Tests directories set in the package definition file.""" import os from nose.tools import assert_true from .. import package_dir, data_dir def test_package_dir_is_set(): assert(package_dir is not None) def test_data_dir_is_set():...
8268b050ae98180a55b9c2e5285de1af5b8ca3e5
pages/tests.py
pages/tests.py
from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed correctly """ c = Client() c.login(...
from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed via the admin """ c = Client() c.l...
Add a create page test
Add a create page test
Python
bsd-3-clause
PiRSquared17/django-page-cms,google-code-export/django-page-cms,google-code-export/django-page-cms,odyaka341/django-page-cms,PiRSquared17/django-page-cms,odyaka341/django-page-cms,odyaka341/django-page-cms,google-code-export/django-page-cms,Alwnikrotikz/django-page-cms,odyaka341/django-page-cms,PiRSquared17/django-page...
from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed correctly """ c = Client() c.login(...
from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed via the admin """ c = Client() c.l...
<commit_before>from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed correctly """ c = Client() ...
from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed via the admin """ c = Client() c.l...
from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed correctly """ c = Client() c.login(...
<commit_before>from django.test import TestCase from pages.models import * from django.test.client import Client class PagesTestCase(TestCase): fixtures = ['tests.json'] def test_01_add_page(self): """ Test that the add admin page could be displayed correctly """ c = Client() ...
eb1cd979ed232690f819def5808a91431132079c
IPython/utils/py3compat.py
IPython/utils/py3compat.py
import sys def no_code(x, encoding=None): return x def decode(s, encoding=None): encoding = encoding or sys.stdin.encoding or sys.getdefaultencoding() return s.decode(encoding, "replace") def encode(u, encoding=None): encoding = encoding or sys.stdin.encoding or sys.getdefaultencoding() return u....
Add module for Python 3 compatibility layer.
Add module for Python 3 compatibility layer.
Python
bsd-3-clause
ipython/ipython,ipython/ipython
Add module for Python 3 compatibility layer.
import sys def no_code(x, encoding=None): return x def decode(s, encoding=None): encoding = encoding or sys.stdin.encoding or sys.getdefaultencoding() return s.decode(encoding, "replace") def encode(u, encoding=None): encoding = encoding or sys.stdin.encoding or sys.getdefaultencoding() return u....
<commit_before><commit_msg>Add module for Python 3 compatibility layer.<commit_after>
import sys def no_code(x, encoding=None): return x def decode(s, encoding=None): encoding = encoding or sys.stdin.encoding or sys.getdefaultencoding() return s.decode(encoding, "replace") def encode(u, encoding=None): encoding = encoding or sys.stdin.encoding or sys.getdefaultencoding() return u....
Add module for Python 3 compatibility layer.import sys def no_code(x, encoding=None): return x def decode(s, encoding=None): encoding = encoding or sys.stdin.encoding or sys.getdefaultencoding() return s.decode(encoding, "replace") def encode(u, encoding=None): encoding = encoding or sys.stdin.encodi...
<commit_before><commit_msg>Add module for Python 3 compatibility layer.<commit_after>import sys def no_code(x, encoding=None): return x def decode(s, encoding=None): encoding = encoding or sys.stdin.encoding or sys.getdefaultencoding() return s.decode(encoding, "replace") def encode(u, encoding=None): ...
720e398ac6d21c2e394dda08d47d5110b3a38c40
src/config/settings/secrets_sample.py
src/config/settings/secrets_sample.py
# SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '' # Database # https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'HOST': '127.0.0.1', 'PORT': 5432...
Add sample file with secrets (db credentials and secret_key).
Add sample file with secrets (db credentials and secret_key).
Python
mit
Alexx-G/django-project-template,Alexx-G/django-project-template
Add sample file with secrets (db credentials and secret_key).
# SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '' # Database # https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'HOST': '127.0.0.1', 'PORT': 5432...
<commit_before><commit_msg>Add sample file with secrets (db credentials and secret_key).<commit_after>
# SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '' # Database # https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'HOST': '127.0.0.1', 'PORT': 5432...
Add sample file with secrets (db credentials and secret_key).# SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '' # Database # https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', ...
<commit_before><commit_msg>Add sample file with secrets (db credentials and secret_key).<commit_after># SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '' # Database # https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.d...
8908727e9c288c607572e7352abb6016d2f5a640
kboard/board/migrations/0022_auto_20161111_1044.py
kboard/board/migrations/0022_auto_20161111_1044.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-11 01:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('board', '0021_auto_20161110_2019'), ] operations = [ migrations.AlterField(...
Add migration that add blank on file field
Add migration that add blank on file field
Python
mit
kboard/kboard,kboard/kboard,guswnsxodlf/k-board,darjeeling/k-board,kboard/kboard,guswnsxodlf/k-board,cjh5414/kboard,cjh5414/kboard,hyesun03/k-board,cjh5414/kboard,hyesun03/k-board,guswnsxodlf/k-board,hyesun03/k-board
Add migration that add blank on file field
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-11 01:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('board', '0021_auto_20161110_2019'), ] operations = [ migrations.AlterField(...
<commit_before><commit_msg>Add migration that add blank on file field<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-11 01:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('board', '0021_auto_20161110_2019'), ] operations = [ migrations.AlterField(...
Add migration that add blank on file field# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-11 01:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('board', '0021_auto_20161110_2019'), ] ope...
<commit_before><commit_msg>Add migration that add blank on file field<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-11 01:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('board', '...
4df8d31e638bfbab5893ded2da9350fdb9a630ba
src/main/python/scripts/train_test.py
src/main/python/scripts/train_test.py
# Copyright 2017 Rice University # # 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 writin...
Add script to split data into training and testing
Add script to split data into training and testing
Python
apache-2.0
capergroup/bayou,capergroup/bayou,capergroup/bayou
Add script to split data into training and testing
# Copyright 2017 Rice University # # 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 writin...
<commit_before><commit_msg>Add script to split data into training and testing<commit_after>
# Copyright 2017 Rice University # # 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 writin...
Add script to split data into training and testing# Copyright 2017 Rice University # # 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...
<commit_before><commit_msg>Add script to split data into training and testing<commit_after># Copyright 2017 Rice University # # 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.a...
aaae5af0570ded8cab9cb330c9c992dac62778c3
vcapp/geometry.py
vcapp/geometry.py
import math def line_magnitude (x1, y1, x2, y2): return math.sqrt(math.pow((x2 - x1), 2) + math.pow((y2 - y1), 2)) #Calc minimum distance from a point and a line segment (i.e. consecutive vertices in a polyline). def distance_point_line (px, py, x1, y1, x2, y2): #http://local.wasp.uwa.edu.au/~pbourke/geometry...
Move geometric functions into a separate file
Move geometric functions into a separate file
Python
cc0-1.0
edwinsteele/visual-commute,edwinsteele/visual-commute
Move geometric functions into a separate file
import math def line_magnitude (x1, y1, x2, y2): return math.sqrt(math.pow((x2 - x1), 2) + math.pow((y2 - y1), 2)) #Calc minimum distance from a point and a line segment (i.e. consecutive vertices in a polyline). def distance_point_line (px, py, x1, y1, x2, y2): #http://local.wasp.uwa.edu.au/~pbourke/geometry...
<commit_before><commit_msg>Move geometric functions into a separate file<commit_after>
import math def line_magnitude (x1, y1, x2, y2): return math.sqrt(math.pow((x2 - x1), 2) + math.pow((y2 - y1), 2)) #Calc minimum distance from a point and a line segment (i.e. consecutive vertices in a polyline). def distance_point_line (px, py, x1, y1, x2, y2): #http://local.wasp.uwa.edu.au/~pbourke/geometry...
Move geometric functions into a separate fileimport math def line_magnitude (x1, y1, x2, y2): return math.sqrt(math.pow((x2 - x1), 2) + math.pow((y2 - y1), 2)) #Calc minimum distance from a point and a line segment (i.e. consecutive vertices in a polyline). def distance_point_line (px, py, x1, y1, x2, y2): #h...
<commit_before><commit_msg>Move geometric functions into a separate file<commit_after>import math def line_magnitude (x1, y1, x2, y2): return math.sqrt(math.pow((x2 - x1), 2) + math.pow((y2 - y1), 2)) #Calc minimum distance from a point and a line segment (i.e. consecutive vertices in a polyline). def distance_po...
56455e27cd210f98c2cbad924bc7fdf2fc55eff0
girder_worker/docker/__init__.py
girder_worker/docker/__init__.py
from girder_worker import GirderWorkerPluginABC class DockerPlugin(GirderWorkerPluginABC): def __init__(self, app, *args, **kwargs): self.app = app def task_imports(self): return ['girder_worker.docker.tasks']
Add plugin for docker tasks
Add plugin for docker tasks
Python
apache-2.0
girder/girder_worker,girder/girder_worker,girder/girder_worker
Add plugin for docker tasks
from girder_worker import GirderWorkerPluginABC class DockerPlugin(GirderWorkerPluginABC): def __init__(self, app, *args, **kwargs): self.app = app def task_imports(self): return ['girder_worker.docker.tasks']
<commit_before><commit_msg>Add plugin for docker tasks<commit_after>
from girder_worker import GirderWorkerPluginABC class DockerPlugin(GirderWorkerPluginABC): def __init__(self, app, *args, **kwargs): self.app = app def task_imports(self): return ['girder_worker.docker.tasks']
Add plugin for docker tasksfrom girder_worker import GirderWorkerPluginABC class DockerPlugin(GirderWorkerPluginABC): def __init__(self, app, *args, **kwargs): self.app = app def task_imports(self): return ['girder_worker.docker.tasks']
<commit_before><commit_msg>Add plugin for docker tasks<commit_after>from girder_worker import GirderWorkerPluginABC class DockerPlugin(GirderWorkerPluginABC): def __init__(self, app, *args, **kwargs): self.app = app def task_imports(self): return ['girder_worker.docker.tasks']
c4520ff4d7b26eaa18ec7a30a12bba03859081d2
salt/states/status.py
salt/states/status.py
# -*- coding: utf-8 -*- ''' Minion status monitoring Maps to the `status` execution module. ''' __monitor__ = [ 'loadavg', ] def loadavg(name, maximum=None, minimum=None): ''' Return the current load average for the specified minion. Available values for name are `1-min`, `5-min` and `15...
Add monitoring state for load average
Add monitoring state for load average
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
Add monitoring state for load average
# -*- coding: utf-8 -*- ''' Minion status monitoring Maps to the `status` execution module. ''' __monitor__ = [ 'loadavg', ] def loadavg(name, maximum=None, minimum=None): ''' Return the current load average for the specified minion. Available values for name are `1-min`, `5-min` and `15...
<commit_before><commit_msg>Add monitoring state for load average<commit_after>
# -*- coding: utf-8 -*- ''' Minion status monitoring Maps to the `status` execution module. ''' __monitor__ = [ 'loadavg', ] def loadavg(name, maximum=None, minimum=None): ''' Return the current load average for the specified minion. Available values for name are `1-min`, `5-min` and `15...
Add monitoring state for load average# -*- coding: utf-8 -*- ''' Minion status monitoring Maps to the `status` execution module. ''' __monitor__ = [ 'loadavg', ] def loadavg(name, maximum=None, minimum=None): ''' Return the current load average for the specified minion. Available values ...
<commit_before><commit_msg>Add monitoring state for load average<commit_after># -*- coding: utf-8 -*- ''' Minion status monitoring Maps to the `status` execution module. ''' __monitor__ = [ 'loadavg', ] def loadavg(name, maximum=None, minimum=None): ''' Return the current load average for th...
b8a477d19c1ce5f06c8f3f0a17a8a5bb90ed9861
find_dups.py
find_dups.py
import sys, os, urllib, StringIO, traceback, cgi, binascii, getopt import store, config try: config = config.Config(sys.argv[1], 'webui') except IndexError: print "Usage: find_dups.py config.ini" raise SystemExit store = store.Store(config) store.open() def owner_email(p): result = set() for r,u ...
Add script to email users of name-conflicting packages.
Add script to email users of name-conflicting packages.
Python
bsd-3-clause
techtonik/pydotorg.pypi,techtonik/pydotorg.pypi
Add script to email users of name-conflicting packages.
import sys, os, urllib, StringIO, traceback, cgi, binascii, getopt import store, config try: config = config.Config(sys.argv[1], 'webui') except IndexError: print "Usage: find_dups.py config.ini" raise SystemExit store = store.Store(config) store.open() def owner_email(p): result = set() for r,u ...
<commit_before><commit_msg>Add script to email users of name-conflicting packages.<commit_after>
import sys, os, urllib, StringIO, traceback, cgi, binascii, getopt import store, config try: config = config.Config(sys.argv[1], 'webui') except IndexError: print "Usage: find_dups.py config.ini" raise SystemExit store = store.Store(config) store.open() def owner_email(p): result = set() for r,u ...
Add script to email users of name-conflicting packages.import sys, os, urllib, StringIO, traceback, cgi, binascii, getopt import store, config try: config = config.Config(sys.argv[1], 'webui') except IndexError: print "Usage: find_dups.py config.ini" raise SystemExit store = store.Store(config) store.open...
<commit_before><commit_msg>Add script to email users of name-conflicting packages.<commit_after>import sys, os, urllib, StringIO, traceback, cgi, binascii, getopt import store, config try: config = config.Config(sys.argv[1], 'webui') except IndexError: print "Usage: find_dups.py config.ini" raise SystemExi...
b5100e8ed538a2ffc9933efe1ef8f19e5e9f6fa8
regulations/views/notice_home.py
regulations/views/notice_home.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from operator import itemgetter import logging from django.http import Http404 from django.template.response import TemplateResponse from django.views.generic.base import View from regulations.generator.api_reader import ApiReader from regulations.vie...
Add view for notice and comment homepage.
Add view for notice and comment homepage.
Python
cc0-1.0
18F/regulations-site,eregs/regulations-site,eregs/regulations-site,eregs/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,18F/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,18F/regulations-site,tadhg-ohiggins/regulations-site,18F/regulations-site
Add view for notice and comment homepage.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from operator import itemgetter import logging from django.http import Http404 from django.template.response import TemplateResponse from django.views.generic.base import View from regulations.generator.api_reader import ApiReader from regulations.vie...
<commit_before><commit_msg>Add view for notice and comment homepage.<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from operator import itemgetter import logging from django.http import Http404 from django.template.response import TemplateResponse from django.views.generic.base import View from regulations.generator.api_reader import ApiReader from regulations.vie...
Add view for notice and comment homepage.# -*- coding: utf-8 -*- from __future__ import unicode_literals from operator import itemgetter import logging from django.http import Http404 from django.template.response import TemplateResponse from django.views.generic.base import View from regulations.generator.api_rea...
<commit_before><commit_msg>Add view for notice and comment homepage.<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from operator import itemgetter import logging from django.http import Http404 from django.template.response import TemplateResponse from django.views.generic.base import...
36746f17e138efedb615eedfd672b7efb81888e2
karabo_data/tests/test_writer.py
karabo_data/tests/test_writer.py
import os.path as osp from tempfile import TemporaryDirectory from testpath import assert_isfile from karabo_data import RunDirectory, H5File def test_write_selected(mock_fxe_run): with TemporaryDirectory() as td: new_file = osp.join(td, 'test.h5') with RunDirectory(mock_fxe_run) as run: ...
Add test of writing a file
Add test of writing a file
Python
bsd-3-clause
European-XFEL/h5tools-py
Add test of writing a file
import os.path as osp from tempfile import TemporaryDirectory from testpath import assert_isfile from karabo_data import RunDirectory, H5File def test_write_selected(mock_fxe_run): with TemporaryDirectory() as td: new_file = osp.join(td, 'test.h5') with RunDirectory(mock_fxe_run) as run: ...
<commit_before><commit_msg>Add test of writing a file<commit_after>
import os.path as osp from tempfile import TemporaryDirectory from testpath import assert_isfile from karabo_data import RunDirectory, H5File def test_write_selected(mock_fxe_run): with TemporaryDirectory() as td: new_file = osp.join(td, 'test.h5') with RunDirectory(mock_fxe_run) as run: ...
Add test of writing a fileimport os.path as osp from tempfile import TemporaryDirectory from testpath import assert_isfile from karabo_data import RunDirectory, H5File def test_write_selected(mock_fxe_run): with TemporaryDirectory() as td: new_file = osp.join(td, 'test.h5') with RunDirectory(mock...
<commit_before><commit_msg>Add test of writing a file<commit_after>import os.path as osp from tempfile import TemporaryDirectory from testpath import assert_isfile from karabo_data import RunDirectory, H5File def test_write_selected(mock_fxe_run): with TemporaryDirectory() as td: new_file = osp.join(td, '...
c7d61482938dd175e6aa6d607e9275eefd02bc2b
liwc_statistics.py
liwc_statistics.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to generate statistics on LIWC entities. The script calculates how many LIWC words are found. This script can be used to compare the differences in numbers of words found for the modern and historic versions of LIWC. """ from bs4 import BeautifulSoup from lxml im...
Add script to generate statistics on liwc entities in texts
Add script to generate statistics on liwc entities in texts The script count the frequencies of liwc words given a liwc dictionary (modern or historic).
Python
apache-2.0
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
Add script to generate statistics on liwc entities in texts The script count the frequencies of liwc words given a liwc dictionary (modern or historic).
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to generate statistics on LIWC entities. The script calculates how many LIWC words are found. This script can be used to compare the differences in numbers of words found for the modern and historic versions of LIWC. """ from bs4 import BeautifulSoup from lxml im...
<commit_before><commit_msg>Add script to generate statistics on liwc entities in texts The script count the frequencies of liwc words given a liwc dictionary (modern or historic).<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to generate statistics on LIWC entities. The script calculates how many LIWC words are found. This script can be used to compare the differences in numbers of words found for the modern and historic versions of LIWC. """ from bs4 import BeautifulSoup from lxml im...
Add script to generate statistics on liwc entities in texts The script count the frequencies of liwc words given a liwc dictionary (modern or historic).#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to generate statistics on LIWC entities. The script calculates how many LIWC words are found. This script can ...
<commit_before><commit_msg>Add script to generate statistics on liwc entities in texts The script count the frequencies of liwc words given a liwc dictionary (modern or historic).<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to generate statistics on LIWC entities. The script calculates how ma...
d67d6d70cb7504912c95c1b1c7e4bc078d9a746d
examples/shadow_root_test.py
examples/shadow_root_test.py
from seleniumbase import BaseCase class ShadowRootTest(BaseCase): def test_shadow_root(self): self.open("https://react-shadow.herokuapp.com/Patagonia") self.click("section.weather::shadow div::shadow button") self.assert_element('section.weather::shadow img[alt="Patagonia"]') ...
Add a simple Shadow DOM / Shadow Root test
Add a simple Shadow DOM / Shadow Root test
Python
mit
seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase
Add a simple Shadow DOM / Shadow Root test
from seleniumbase import BaseCase class ShadowRootTest(BaseCase): def test_shadow_root(self): self.open("https://react-shadow.herokuapp.com/Patagonia") self.click("section.weather::shadow div::shadow button") self.assert_element('section.weather::shadow img[alt="Patagonia"]') ...
<commit_before><commit_msg>Add a simple Shadow DOM / Shadow Root test<commit_after>
from seleniumbase import BaseCase class ShadowRootTest(BaseCase): def test_shadow_root(self): self.open("https://react-shadow.herokuapp.com/Patagonia") self.click("section.weather::shadow div::shadow button") self.assert_element('section.weather::shadow img[alt="Patagonia"]') ...
Add a simple Shadow DOM / Shadow Root testfrom seleniumbase import BaseCase class ShadowRootTest(BaseCase): def test_shadow_root(self): self.open("https://react-shadow.herokuapp.com/Patagonia") self.click("section.weather::shadow div::shadow button") self.assert_element('section.wea...
<commit_before><commit_msg>Add a simple Shadow DOM / Shadow Root test<commit_after>from seleniumbase import BaseCase class ShadowRootTest(BaseCase): def test_shadow_root(self): self.open("https://react-shadow.herokuapp.com/Patagonia") self.click("section.weather::shadow div::shadow button") ...
13c567621bd380c77ac2bb08fd736f3362996fec
designate/storage/impl_sqlalchemy/migrate_repo/versions/046_add_indices.py
designate/storage/impl_sqlalchemy/migrate_repo/versions/046_add_indices.py
# Copyright (c) 2014 Rackspace Inc. # # Author: Tim Simmons <tim.simmons@rackspace.com> # # 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 # #...
Add some helpful SQL indices
Add some helpful SQL indices Adds a few SQL indices that improve performance significantly as the Designate database grows in size. Change-Id: If68b3f7883487e5379e7ab45f51a27ef7ecb2f58 Blueprint: add-indices
Python
apache-2.0
ionrock/designate,ionrock/designate,kiall/designate-py3,ramsateesh/designate,kiall/designate-py3,ramsateesh/designate,openstack/designate,ramsateesh/designate,tonyli71/designate,cneill/designate-testing,muraliselva10/designate,cneill/designate,grahamhayes/designate,muraliselva10/designate,grahamhayes/designate,cneill/d...
Add some helpful SQL indices Adds a few SQL indices that improve performance significantly as the Designate database grows in size. Change-Id: If68b3f7883487e5379e7ab45f51a27ef7ecb2f58 Blueprint: add-indices
# Copyright (c) 2014 Rackspace Inc. # # Author: Tim Simmons <tim.simmons@rackspace.com> # # 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 # #...
<commit_before><commit_msg>Add some helpful SQL indices Adds a few SQL indices that improve performance significantly as the Designate database grows in size. Change-Id: If68b3f7883487e5379e7ab45f51a27ef7ecb2f58 Blueprint: add-indices<commit_after>
# Copyright (c) 2014 Rackspace Inc. # # Author: Tim Simmons <tim.simmons@rackspace.com> # # 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 # #...
Add some helpful SQL indices Adds a few SQL indices that improve performance significantly as the Designate database grows in size. Change-Id: If68b3f7883487e5379e7ab45f51a27ef7ecb2f58 Blueprint: add-indices# Copyright (c) 2014 Rackspace Inc. # # Author: Tim Simmons <tim.simmons@rackspace.com> # # Licensed under the ...
<commit_before><commit_msg>Add some helpful SQL indices Adds a few SQL indices that improve performance significantly as the Designate database grows in size. Change-Id: If68b3f7883487e5379e7ab45f51a27ef7ecb2f58 Blueprint: add-indices<commit_after># Copyright (c) 2014 Rackspace Inc. # # Author: Tim Simmons <tim.simmo...
fd0685960b2df7632bd384634a8ddcd1cfbde606
gmn/src/d1_gmn/app/model_util.py
gmn/src/d1_gmn/app/model_util.py
# -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2016 DataONE # # Licensed under the Apache License, Version 2.0 ...
Add utilities for working with Django models
Add utilities for working with Django models
Python
apache-2.0
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
Add utilities for working with Django models
# -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2016 DataONE # # Licensed under the Apache License, Version 2.0 ...
<commit_before><commit_msg>Add utilities for working with Django models<commit_after>
# -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2016 DataONE # # Licensed under the Apache License, Version 2.0 ...
Add utilities for working with Django models# -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2016 DataONE # # Lic...
<commit_before><commit_msg>Add utilities for working with Django models<commit_after># -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. ...
e55f72c62cefbbda7e0e213779dedb8ec51b9a5a
bottleneck/tests/memory_test.py
bottleneck/tests/memory_test.py
import numpy as np import sys import bottleneck as bn import pytest @pytest.mark.skipif( sys.platform.startswith("win"), reason="resource module not available on windows" ) def test_memory_leak(): import resource arr = np.arange(1).reshape((1, 1)) starting = resource.getrusage(resource.RUSAGE_SELF)....
Add memory leak regression test
TST: Add memory leak regression test
Python
bsd-2-clause
pydata/bottleneck,pydata/bottleneck,kwgoodman/bottleneck,kwgoodman/bottleneck,pydata/bottleneck,kwgoodman/bottleneck
TST: Add memory leak regression test
import numpy as np import sys import bottleneck as bn import pytest @pytest.mark.skipif( sys.platform.startswith("win"), reason="resource module not available on windows" ) def test_memory_leak(): import resource arr = np.arange(1).reshape((1, 1)) starting = resource.getrusage(resource.RUSAGE_SELF)....
<commit_before><commit_msg>TST: Add memory leak regression test<commit_after>
import numpy as np import sys import bottleneck as bn import pytest @pytest.mark.skipif( sys.platform.startswith("win"), reason="resource module not available on windows" ) def test_memory_leak(): import resource arr = np.arange(1).reshape((1, 1)) starting = resource.getrusage(resource.RUSAGE_SELF)....
TST: Add memory leak regression testimport numpy as np import sys import bottleneck as bn import pytest @pytest.mark.skipif( sys.platform.startswith("win"), reason="resource module not available on windows" ) def test_memory_leak(): import resource arr = np.arange(1).reshape((1, 1)) starting = resou...
<commit_before><commit_msg>TST: Add memory leak regression test<commit_after>import numpy as np import sys import bottleneck as bn import pytest @pytest.mark.skipif( sys.platform.startswith("win"), reason="resource module not available on windows" ) def test_memory_leak(): import resource arr = np.arange...
635b8b61be67a2c0f38ec95b30d9848dcd30de58
test_primes.py
test_primes.py
#!/usr/bin/env python2 if __name__ == '__main__': from find_primes import find_primes assert find_primes(50) == [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47] print 'All tests passed!'
Add a simple test of the trial division algorithm.
Add a simple test of the trial division algorithm.
Python
mit
ipqb/bootcamp-primes-activity
Add a simple test of the trial division algorithm.
#!/usr/bin/env python2 if __name__ == '__main__': from find_primes import find_primes assert find_primes(50) == [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47] print 'All tests passed!'
<commit_before><commit_msg>Add a simple test of the trial division algorithm.<commit_after>
#!/usr/bin/env python2 if __name__ == '__main__': from find_primes import find_primes assert find_primes(50) == [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47] print 'All tests passed!'
Add a simple test of the trial division algorithm.#!/usr/bin/env python2 if __name__ == '__main__': from find_primes import find_primes assert find_primes(50) == [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47] print 'All tests passed!'
<commit_before><commit_msg>Add a simple test of the trial division algorithm.<commit_after>#!/usr/bin/env python2 if __name__ == '__main__': from find_primes import find_primes assert find_primes(50) == [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47] print 'All tests passed!'
dbf436758f4b55010dcea6cea4416741ce21df8a
tests/conftest.py
tests/conftest.py
# Copyright (c) 2022. The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details from typing import cast import pytest from coverage.annotate import os from sqlalchemy import event from sql...
Add `session` and `connection` fixtures
Add `session` and `connection` fixtures
Python
apache-2.0
agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft
Add `session` and `connection` fixtures
# Copyright (c) 2022. The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details from typing import cast import pytest from coverage.annotate import os from sqlalchemy import event from sql...
<commit_before><commit_msg>Add `session` and `connection` fixtures<commit_after>
# Copyright (c) 2022. The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details from typing import cast import pytest from coverage.annotate import os from sqlalchemy import event from sql...
Add `session` and `connection` fixtures# Copyright (c) 2022. The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details from typing import cast import pytest from coverage.annotate import o...
<commit_before><commit_msg>Add `session` and `connection` fixtures<commit_after># Copyright (c) 2022. The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details from typing import cast impo...
087abbfa1f45f76cc86e4fc658d231af8a949264
tests/test_env.py
tests/test_env.py
import sys from botbot import env, envchecks def test_EnvironmentChecker_constructor(): assert env.EnvironmentChecker(sys.stdout) def test_env_check_constructor_register(): ec = env.EnvironmentChecker(sys.stdout, envchecks.ALLENVCHECKS) assert ec.checks def test_env_check_register_multiple_args(): e...
Add tests for EnvironmentChecker object
Add tests for EnvironmentChecker object
Python
mit
jackstanek/BotBot,jackstanek/BotBot
Add tests for EnvironmentChecker object
import sys from botbot import env, envchecks def test_EnvironmentChecker_constructor(): assert env.EnvironmentChecker(sys.stdout) def test_env_check_constructor_register(): ec = env.EnvironmentChecker(sys.stdout, envchecks.ALLENVCHECKS) assert ec.checks def test_env_check_register_multiple_args(): e...
<commit_before><commit_msg>Add tests for EnvironmentChecker object<commit_after>
import sys from botbot import env, envchecks def test_EnvironmentChecker_constructor(): assert env.EnvironmentChecker(sys.stdout) def test_env_check_constructor_register(): ec = env.EnvironmentChecker(sys.stdout, envchecks.ALLENVCHECKS) assert ec.checks def test_env_check_register_multiple_args(): e...
Add tests for EnvironmentChecker objectimport sys from botbot import env, envchecks def test_EnvironmentChecker_constructor(): assert env.EnvironmentChecker(sys.stdout) def test_env_check_constructor_register(): ec = env.EnvironmentChecker(sys.stdout, envchecks.ALLENVCHECKS) assert ec.checks def test_en...
<commit_before><commit_msg>Add tests for EnvironmentChecker object<commit_after>import sys from botbot import env, envchecks def test_EnvironmentChecker_constructor(): assert env.EnvironmentChecker(sys.stdout) def test_env_check_constructor_register(): ec = env.EnvironmentChecker(sys.stdout, envchecks.ALLENV...
77cb10ac2d524c43f43387d6c62f757c3e37fbbe
py/maximum-swap.py
py/maximum-swap.py
class Solution(object): def maximumSwap(self, num): """ :type num: int :rtype: int """ counter = [0] * 10 snum = str(num) lnum = len(snum) for d in map(int, snum): counter[d] += 1 for i, d in enumerate(map(int, snum)): f...
Add py solution for 670. Maximum Swap
Add py solution for 670. Maximum Swap 670. Maximum Swap: https://leetcode.com/problems/maximum-swap/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 670. Maximum Swap 670. Maximum Swap: https://leetcode.com/problems/maximum-swap/
class Solution(object): def maximumSwap(self, num): """ :type num: int :rtype: int """ counter = [0] * 10 snum = str(num) lnum = len(snum) for d in map(int, snum): counter[d] += 1 for i, d in enumerate(map(int, snum)): f...
<commit_before><commit_msg>Add py solution for 670. Maximum Swap 670. Maximum Swap: https://leetcode.com/problems/maximum-swap/<commit_after>
class Solution(object): def maximumSwap(self, num): """ :type num: int :rtype: int """ counter = [0] * 10 snum = str(num) lnum = len(snum) for d in map(int, snum): counter[d] += 1 for i, d in enumerate(map(int, snum)): f...
Add py solution for 670. Maximum Swap 670. Maximum Swap: https://leetcode.com/problems/maximum-swap/class Solution(object): def maximumSwap(self, num): """ :type num: int :rtype: int """ counter = [0] * 10 snum = str(num) lnum = len(snum) for d in map...
<commit_before><commit_msg>Add py solution for 670. Maximum Swap 670. Maximum Swap: https://leetcode.com/problems/maximum-swap/<commit_after>class Solution(object): def maximumSwap(self, num): """ :type num: int :rtype: int """ counter = [0] * 10 snum = str(num) ...
54749556c7c689bfd2bee85f60a69676cc74035b
capomastro_wsgi.py
capomastro_wsgi.py
""" WSGI config for capomastro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os app_root = os.path.dirname(os.path.realpath(__file__)) activate_this = os.path.join...
Add temporary bootstrapping to get the service working with how the charm presently expects to run the app.
Add temporary bootstrapping to get the service working with how the charm presently expects to run the app.
Python
mit
timrchavez/capomastro,timrchavez/capomastro
Add temporary bootstrapping to get the service working with how the charm presently expects to run the app.
""" WSGI config for capomastro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os app_root = os.path.dirname(os.path.realpath(__file__)) activate_this = os.path.join...
<commit_before><commit_msg>Add temporary bootstrapping to get the service working with how the charm presently expects to run the app.<commit_after>
""" WSGI config for capomastro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os app_root = os.path.dirname(os.path.realpath(__file__)) activate_this = os.path.join...
Add temporary bootstrapping to get the service working with how the charm presently expects to run the app.""" WSGI config for capomastro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deploymen...
<commit_before><commit_msg>Add temporary bootstrapping to get the service working with how the charm presently expects to run the app.<commit_after>""" WSGI config for capomastro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs...
186e8424a16188825210b4c05656ae3b8fcc28c2
provpy/provpyexample_Elements.py
provpy/provpyexample_Elements.py
import json from provpy import * # Define your namespaces (see provpyexample_PROVURIRef_PROVNamespace.py) FOAF = PROVNamespace("http://xmlns.com/foaf/0.1/") ex = PROVNamespace("http://www.example.com/") dcterms = PROVNamespace("http://purl.org/dc/terms/") xsd = PROVNamespace('http://www.w3.org/2001/XMLSchema-datatypes...
Add an example file demonstrating defining, adding and serializing prov elements in a prov container
Add an example file demonstrating defining, adding and serializing prov elements in a prov container
Python
mit
satra/prov,krischer/prov,trungdong/prov,krischer/prov
Add an example file demonstrating defining, adding and serializing prov elements in a prov container
import json from provpy import * # Define your namespaces (see provpyexample_PROVURIRef_PROVNamespace.py) FOAF = PROVNamespace("http://xmlns.com/foaf/0.1/") ex = PROVNamespace("http://www.example.com/") dcterms = PROVNamespace("http://purl.org/dc/terms/") xsd = PROVNamespace('http://www.w3.org/2001/XMLSchema-datatypes...
<commit_before><commit_msg>Add an example file demonstrating defining, adding and serializing prov elements in a prov container<commit_after>
import json from provpy import * # Define your namespaces (see provpyexample_PROVURIRef_PROVNamespace.py) FOAF = PROVNamespace("http://xmlns.com/foaf/0.1/") ex = PROVNamespace("http://www.example.com/") dcterms = PROVNamespace("http://purl.org/dc/terms/") xsd = PROVNamespace('http://www.w3.org/2001/XMLSchema-datatypes...
Add an example file demonstrating defining, adding and serializing prov elements in a prov containerimport json from provpy import * # Define your namespaces (see provpyexample_PROVURIRef_PROVNamespace.py) FOAF = PROVNamespace("http://xmlns.com/foaf/0.1/") ex = PROVNamespace("http://www.example.com/") dcterms = PROVNa...
<commit_before><commit_msg>Add an example file demonstrating defining, adding and serializing prov elements in a prov container<commit_after>import json from provpy import * # Define your namespaces (see provpyexample_PROVURIRef_PROVNamespace.py) FOAF = PROVNamespace("http://xmlns.com/foaf/0.1/") ex = PROVNamespace("h...
c44c26949b896840fe22e4f947decee1ac7b2382
examples/customizable_hotkey.py
examples/customizable_hotkey.py
import keyboard print('Press and release your desired shortcut: ') shortcut = keyboard.read_shortcut() print('Shortcut selected:', shortcut) def on_triggered(): print("Triggered!") keyboard.add_hotkey(shortcut, on_triggered) print("Press ESC to stop.") keyboard.wait('esc')
Add example for customizable hotkeys
Add example for customizable hotkeys
Python
mit
glitchassassin/keyboard,boppreh/keyboard
Add example for customizable hotkeys
import keyboard print('Press and release your desired shortcut: ') shortcut = keyboard.read_shortcut() print('Shortcut selected:', shortcut) def on_triggered(): print("Triggered!") keyboard.add_hotkey(shortcut, on_triggered) print("Press ESC to stop.") keyboard.wait('esc')
<commit_before><commit_msg>Add example for customizable hotkeys<commit_after>
import keyboard print('Press and release your desired shortcut: ') shortcut = keyboard.read_shortcut() print('Shortcut selected:', shortcut) def on_triggered(): print("Triggered!") keyboard.add_hotkey(shortcut, on_triggered) print("Press ESC to stop.") keyboard.wait('esc')
Add example for customizable hotkeysimport keyboard print('Press and release your desired shortcut: ') shortcut = keyboard.read_shortcut() print('Shortcut selected:', shortcut) def on_triggered(): print("Triggered!") keyboard.add_hotkey(shortcut, on_triggered) print("Press ESC to stop.") keyboard.wait('esc')
<commit_before><commit_msg>Add example for customizable hotkeys<commit_after>import keyboard print('Press and release your desired shortcut: ') shortcut = keyboard.read_shortcut() print('Shortcut selected:', shortcut) def on_triggered(): print("Triggered!") keyboard.add_hotkey(shortcut, on_triggered) print("Press E...
e68e9bc397d760a0d16acc695a1815141ad3658c
elmo/moon_tracker/utils.py
elmo/moon_tracker/utils.py
def user_can_view_scans(user, moon): return ( user_can_delete_scans(user, moon) or user.has_perm('eve_sde.can_view_scans', moon.planet.system) or user.has_perm('eve_sde.can_view_scans', moon.planet.system.constellation) or user.has_perm('eve_sde.can_view_scans', moon.planet.system.co...
Add helper functions for permissions.
Add helper functions for permissions.
Python
mit
StephenSwat/eve_lunar_mining_organiser,StephenSwat/eve_lunar_mining_organiser
Add helper functions for permissions.
def user_can_view_scans(user, moon): return ( user_can_delete_scans(user, moon) or user.has_perm('eve_sde.can_view_scans', moon.planet.system) or user.has_perm('eve_sde.can_view_scans', moon.planet.system.constellation) or user.has_perm('eve_sde.can_view_scans', moon.planet.system.co...
<commit_before><commit_msg>Add helper functions for permissions.<commit_after>
def user_can_view_scans(user, moon): return ( user_can_delete_scans(user, moon) or user.has_perm('eve_sde.can_view_scans', moon.planet.system) or user.has_perm('eve_sde.can_view_scans', moon.planet.system.constellation) or user.has_perm('eve_sde.can_view_scans', moon.planet.system.co...
Add helper functions for permissions.def user_can_view_scans(user, moon): return ( user_can_delete_scans(user, moon) or user.has_perm('eve_sde.can_view_scans', moon.planet.system) or user.has_perm('eve_sde.can_view_scans', moon.planet.system.constellation) or user.has_perm('eve_sde.c...
<commit_before><commit_msg>Add helper functions for permissions.<commit_after>def user_can_view_scans(user, moon): return ( user_can_delete_scans(user, moon) or user.has_perm('eve_sde.can_view_scans', moon.planet.system) or user.has_perm('eve_sde.can_view_scans', moon.planet.system.constella...
10f5e0585d471fdfb79181956baaa83d3dac5008
test/test_match.py
test/test_match.py
# encoding: utf-8 """ Tests for the udiskie.match module. These tests are intended to demonstrate and ensure the correct usage of the config file used by udiskie for custom device options. """ import unittest import tempfile import shutil import os.path import gc from udiskie.match import OptionFilter, FilterMatche...
Add unit tests for udiskie.match
Add unit tests for udiskie.match I hope this proves my modifications to be working.
Python
mit
coldfix/udiskie,coldfix/udiskie,khardix/udiskie,mathstuf/udiskie,pstray/udiskie,pstray/udiskie
Add unit tests for udiskie.match I hope this proves my modifications to be working.
# encoding: utf-8 """ Tests for the udiskie.match module. These tests are intended to demonstrate and ensure the correct usage of the config file used by udiskie for custom device options. """ import unittest import tempfile import shutil import os.path import gc from udiskie.match import OptionFilter, FilterMatche...
<commit_before><commit_msg>Add unit tests for udiskie.match I hope this proves my modifications to be working.<commit_after>
# encoding: utf-8 """ Tests for the udiskie.match module. These tests are intended to demonstrate and ensure the correct usage of the config file used by udiskie for custom device options. """ import unittest import tempfile import shutil import os.path import gc from udiskie.match import OptionFilter, FilterMatche...
Add unit tests for udiskie.match I hope this proves my modifications to be working.# encoding: utf-8 """ Tests for the udiskie.match module. These tests are intended to demonstrate and ensure the correct usage of the config file used by udiskie for custom device options. """ import unittest import tempfile import s...
<commit_before><commit_msg>Add unit tests for udiskie.match I hope this proves my modifications to be working.<commit_after># encoding: utf-8 """ Tests for the udiskie.match module. These tests are intended to demonstrate and ensure the correct usage of the config file used by udiskie for custom device options. """ ...
c672e12779061a7999ce5802730fd2502a68a8ce
l10n_it_ipa/model/partner.py
l10n_it_ipa/model/partner.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 KTec S.r.l. # (<http://www.ktec.it>). # # Copyright (C) 2014 Associazione Odoo Italia # (<http://www.odoo-italia.org>). # # This program is free software: you can redistribute it ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 KTec S.r.l. # (<http://www.ktec.it>). # # Copyright (C) 2014 Associazione Odoo Italia # (<http://www.odoo-italia.org>). # # This program is free software: you can redistribute it ...
Use PascaleCase notation in class
Use PascaleCase notation in class
Python
agpl-3.0
linkitspa/l10n-italy,hurrinico/l10n-italy,ApuliaSoftware/l10n-italy,linkitspa/l10n-italy,luca-vercelli/l10n-italy,linkitspa/l10n-italy,maxhome1/l10n-italy,abstract-open-solutions/l10n-italy,alessandrocamilli/l10n-italy,scigghia/l10n-italy,odoo-isa/l10n-italy
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 KTec S.r.l. # (<http://www.ktec.it>). # # Copyright (C) 2014 Associazione Odoo Italia # (<http://www.odoo-italia.org>). # # This program is free software: you can redistribute it ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 KTec S.r.l. # (<http://www.ktec.it>). # # Copyright (C) 2014 Associazione Odoo Italia # (<http://www.odoo-italia.org>). # # This program is free software: you can redistribute it ...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 KTec S.r.l. # (<http://www.ktec.it>). # # Copyright (C) 2014 Associazione Odoo Italia # (<http://www.odoo-italia.org>). # # This program is free software: you can r...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 KTec S.r.l. # (<http://www.ktec.it>). # # Copyright (C) 2014 Associazione Odoo Italia # (<http://www.odoo-italia.org>). # # This program is free software: you can redistribute it ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 KTec S.r.l. # (<http://www.ktec.it>). # # Copyright (C) 2014 Associazione Odoo Italia # (<http://www.odoo-italia.org>). # # This program is free software: you can redistribute it ...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 KTec S.r.l. # (<http://www.ktec.it>). # # Copyright (C) 2014 Associazione Odoo Italia # (<http://www.odoo-italia.org>). # # This program is free software: you can r...
be465be9b2224eadb93203f10ad4972d1d6e5dc4
python_apps/pypo/pure.py
python_apps/pypo/pure.py
import re def version_cmp(version1, version2): def normalize(v): return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")] return cmp(normalize(version1), normalize(version2))
Make sure Liquidsoap 1.1.1 is used
CC-5133: Make sure Liquidsoap 1.1.1 is used add missing file
Python
agpl-3.0
radiorabe/airtime,sourcefabric/Airtime,ReganDryke/airtime,radiorabe/airtime,comiconomenclaturist/libretime,radiorabe/airtime,sourcefabric/airtime,LibreTime/libretime,justvanbloom/airtime,comiconomenclaturist/libretime,thnkloud9/Airtime,Lapotor/libretime,justvanbloom/airtime,LibreTime/libretime,justvanbloom/airtime,Rega...
CC-5133: Make sure Liquidsoap 1.1.1 is used add missing file
import re def version_cmp(version1, version2): def normalize(v): return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")] return cmp(normalize(version1), normalize(version2))
<commit_before><commit_msg>CC-5133: Make sure Liquidsoap 1.1.1 is used add missing file<commit_after>
import re def version_cmp(version1, version2): def normalize(v): return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")] return cmp(normalize(version1), normalize(version2))
CC-5133: Make sure Liquidsoap 1.1.1 is used add missing fileimport re def version_cmp(version1, version2): def normalize(v): return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")] return cmp(normalize(version1), normalize(version2))
<commit_before><commit_msg>CC-5133: Make sure Liquidsoap 1.1.1 is used add missing file<commit_after>import re def version_cmp(version1, version2): def normalize(v): return [int(x) for x in re.sub(r'(\.0+)*$','', v).split(".")] return cmp(normalize(version1), normalize(version2))