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
fd4bf48267e5110c92f4a7c51833c556a99ffc87
tests/views/test_admin_organisations_page.py
tests/views/test_admin_organisations_page.py
from tests import PMGLiveServerTestCase from mock import patch import unittest from pmg.models import db, User from tests.fixtures import dbfixture, UserData, OrganisationData class TestAdminOrganisationsPage(PMGLiveServerTestCase): def setUp(self): super(TestAdminOrganisationsPage, self).setUp() ...
Add admin list organisations test
Add admin list organisations test
Python
apache-2.0
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
Add admin list organisations test
from tests import PMGLiveServerTestCase from mock import patch import unittest from pmg.models import db, User from tests.fixtures import dbfixture, UserData, OrganisationData class TestAdminOrganisationsPage(PMGLiveServerTestCase): def setUp(self): super(TestAdminOrganisationsPage, self).setUp() ...
<commit_before><commit_msg>Add admin list organisations test<commit_after>
from tests import PMGLiveServerTestCase from mock import patch import unittest from pmg.models import db, User from tests.fixtures import dbfixture, UserData, OrganisationData class TestAdminOrganisationsPage(PMGLiveServerTestCase): def setUp(self): super(TestAdminOrganisationsPage, self).setUp() ...
Add admin list organisations testfrom tests import PMGLiveServerTestCase from mock import patch import unittest from pmg.models import db, User from tests.fixtures import dbfixture, UserData, OrganisationData class TestAdminOrganisationsPage(PMGLiveServerTestCase): def setUp(self): super(TestAdminOrganisa...
<commit_before><commit_msg>Add admin list organisations test<commit_after>from tests import PMGLiveServerTestCase from mock import patch import unittest from pmg.models import db, User from tests.fixtures import dbfixture, UserData, OrganisationData class TestAdminOrganisationsPage(PMGLiveServerTestCase): def set...
e3349e71047381a487bf7abe8c5563c4811a3668
tests/consoles_tests.py
tests/consoles_tests.py
import io import spur from nose.tools import istest, assert_equal from toodlepip.consoles import Console @istest def console_writes_output_to_console(): console, output = _create_local_console() console.run("Action", ["echo", "Go go go!"]) assert b"Go go go!" in output.getvalue() def _create_local_con...
Add basic test for console
Add basic test for console
Python
bsd-2-clause
mwilliamson/toodlepip
Add basic test for console
import io import spur from nose.tools import istest, assert_equal from toodlepip.consoles import Console @istest def console_writes_output_to_console(): console, output = _create_local_console() console.run("Action", ["echo", "Go go go!"]) assert b"Go go go!" in output.getvalue() def _create_local_con...
<commit_before><commit_msg>Add basic test for console<commit_after>
import io import spur from nose.tools import istest, assert_equal from toodlepip.consoles import Console @istest def console_writes_output_to_console(): console, output = _create_local_console() console.run("Action", ["echo", "Go go go!"]) assert b"Go go go!" in output.getvalue() def _create_local_con...
Add basic test for consoleimport io import spur from nose.tools import istest, assert_equal from toodlepip.consoles import Console @istest def console_writes_output_to_console(): console, output = _create_local_console() console.run("Action", ["echo", "Go go go!"]) assert b"Go go go!" in output.getvalue...
<commit_before><commit_msg>Add basic test for console<commit_after>import io import spur from nose.tools import istest, assert_equal from toodlepip.consoles import Console @istest def console_writes_output_to_console(): console, output = _create_local_console() console.run("Action", ["echo", "Go go go!"]) ...
f5b33f7e80176efeb0eb0d0ea6fc8a8c7463a429
corehq/motech/repeaters/management/commands/delete_duplicate_cancelled_records.py
corehq/motech/repeaters/management/commands/delete_duplicate_cancelled_records.py
import csv import datetime from collections import defaultdict from django.core.management.base import BaseCommand from corehq.util.couch import IterDB from corehq.motech.repeaters.const import RECORD_CANCELLED_STATE from corehq.motech.repeaters.models import RepeatRecord from corehq.motech.repeaters.dbaccessors impo...
Add management command to delete duplicate cancelled repeat records
Add management command to delete duplicate cancelled repeat records
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add management command to delete duplicate cancelled repeat records
import csv import datetime from collections import defaultdict from django.core.management.base import BaseCommand from corehq.util.couch import IterDB from corehq.motech.repeaters.const import RECORD_CANCELLED_STATE from corehq.motech.repeaters.models import RepeatRecord from corehq.motech.repeaters.dbaccessors impo...
<commit_before><commit_msg>Add management command to delete duplicate cancelled repeat records<commit_after>
import csv import datetime from collections import defaultdict from django.core.management.base import BaseCommand from corehq.util.couch import IterDB from corehq.motech.repeaters.const import RECORD_CANCELLED_STATE from corehq.motech.repeaters.models import RepeatRecord from corehq.motech.repeaters.dbaccessors impo...
Add management command to delete duplicate cancelled repeat recordsimport csv import datetime from collections import defaultdict from django.core.management.base import BaseCommand from corehq.util.couch import IterDB from corehq.motech.repeaters.const import RECORD_CANCELLED_STATE from corehq.motech.repeaters.model...
<commit_before><commit_msg>Add management command to delete duplicate cancelled repeat records<commit_after>import csv import datetime from collections import defaultdict from django.core.management.base import BaseCommand from corehq.util.couch import IterDB from corehq.motech.repeaters.const import RECORD_CANCELLED...
4840b5b6326229a215ccd3ae4d230adc2f5cf374
tools/rename-library.py
tools/rename-library.py
# -*- coding: utf-8 -*- """ This script is mainly used to simplify benchmarks between different versions of the library: it allows to rename every mention of the library name, which helps to include two versions side-by-side without conflicts, and to compare them in the same benchmark. """ import argparse import file...
Add script to rename all references to cpp-sort in the library.
Add script to rename all references to cpp-sort in the library. This tool mostly exists to simplify including and comparing different versions of the same algorithms in benchmarks. [ci skip]
Python
mit
Morwenn/cpp-sort,Morwenn/cpp-sort,Morwenn/cpp-sort,Morwenn/cpp-sort
Add script to rename all references to cpp-sort in the library. This tool mostly exists to simplify including and comparing different versions of the same algorithms in benchmarks. [ci skip]
# -*- coding: utf-8 -*- """ This script is mainly used to simplify benchmarks between different versions of the library: it allows to rename every mention of the library name, which helps to include two versions side-by-side without conflicts, and to compare them in the same benchmark. """ import argparse import file...
<commit_before><commit_msg>Add script to rename all references to cpp-sort in the library. This tool mostly exists to simplify including and comparing different versions of the same algorithms in benchmarks. [ci skip]<commit_after>
# -*- coding: utf-8 -*- """ This script is mainly used to simplify benchmarks between different versions of the library: it allows to rename every mention of the library name, which helps to include two versions side-by-side without conflicts, and to compare them in the same benchmark. """ import argparse import file...
Add script to rename all references to cpp-sort in the library. This tool mostly exists to simplify including and comparing different versions of the same algorithms in benchmarks. [ci skip]# -*- coding: utf-8 -*- """ This script is mainly used to simplify benchmarks between different versions of the library: it all...
<commit_before><commit_msg>Add script to rename all references to cpp-sort in the library. This tool mostly exists to simplify including and comparing different versions of the same algorithms in benchmarks. [ci skip]<commit_after># -*- coding: utf-8 -*- """ This script is mainly used to simplify benchmarks between ...
7721cd26ca18b655e4866fff17d4522cccc02a7a
migrations/versions/0369_update_sms_rates.py
migrations/versions/0369_update_sms_rates.py
""" Revision ID: 0369_update_sms_rates Revises: 0368_move_orgs_to_nhs_branding Create Date: 2022-04-26 09:39:45.260951 """ import uuid from alembic import op revision = '0369_update_sms_rates' down_revision = '0368_move_orgs_to_nhs_branding' def upgrade(): op.execute( "INSERT INTO rates(id, valid_from...
Add new SMS rates for 1 May 2022 onwards
Add new SMS rates for 1 May 2022 onwards This change can be merged before the new rates go live, because they won't be used until the start date.
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add new SMS rates for 1 May 2022 onwards This change can be merged before the new rates go live, because they won't be used until the start date.
""" Revision ID: 0369_update_sms_rates Revises: 0368_move_orgs_to_nhs_branding Create Date: 2022-04-26 09:39:45.260951 """ import uuid from alembic import op revision = '0369_update_sms_rates' down_revision = '0368_move_orgs_to_nhs_branding' def upgrade(): op.execute( "INSERT INTO rates(id, valid_from...
<commit_before><commit_msg>Add new SMS rates for 1 May 2022 onwards This change can be merged before the new rates go live, because they won't be used until the start date.<commit_after>
""" Revision ID: 0369_update_sms_rates Revises: 0368_move_orgs_to_nhs_branding Create Date: 2022-04-26 09:39:45.260951 """ import uuid from alembic import op revision = '0369_update_sms_rates' down_revision = '0368_move_orgs_to_nhs_branding' def upgrade(): op.execute( "INSERT INTO rates(id, valid_from...
Add new SMS rates for 1 May 2022 onwards This change can be merged before the new rates go live, because they won't be used until the start date.""" Revision ID: 0369_update_sms_rates Revises: 0368_move_orgs_to_nhs_branding Create Date: 2022-04-26 09:39:45.260951 """ import uuid from alembic import op revision = '...
<commit_before><commit_msg>Add new SMS rates for 1 May 2022 onwards This change can be merged before the new rates go live, because they won't be used until the start date.<commit_after>""" Revision ID: 0369_update_sms_rates Revises: 0368_move_orgs_to_nhs_branding Create Date: 2022-04-26 09:39:45.260951 """ import u...
b168e05cfdf9df1c8d4fa2fa851b75b6a6633708
dosagelib/plugins/derideal.py
dosagelib/plugins/derideal.py
# -*- coding: utf-8 -*- # Copyright (C) 2019-2020 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from ..scraper import _ParserScraper from ..helpers import indirectStarter class Derideal(_ParserScraper): baseUrl = 'https://www.derideal.com/' imageSearch = '//img[contain...
Add site engine for Derideal
Add site engine for Derideal
Python
mit
peterjanes/dosage,webcomics/dosage,peterjanes/dosage,webcomics/dosage
Add site engine for Derideal
# -*- coding: utf-8 -*- # Copyright (C) 2019-2020 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from ..scraper import _ParserScraper from ..helpers import indirectStarter class Derideal(_ParserScraper): baseUrl = 'https://www.derideal.com/' imageSearch = '//img[contain...
<commit_before><commit_msg>Add site engine for Derideal<commit_after>
# -*- coding: utf-8 -*- # Copyright (C) 2019-2020 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from ..scraper import _ParserScraper from ..helpers import indirectStarter class Derideal(_ParserScraper): baseUrl = 'https://www.derideal.com/' imageSearch = '//img[contain...
Add site engine for Derideal# -*- coding: utf-8 -*- # Copyright (C) 2019-2020 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from ..scraper import _ParserScraper from ..helpers import indirectStarter class Derideal(_ParserScraper): baseUrl = 'https://www.derideal.com/' ...
<commit_before><commit_msg>Add site engine for Derideal<commit_after># -*- coding: utf-8 -*- # Copyright (C) 2019-2020 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from ..scraper import _ParserScraper from ..helpers import indirectStarter class Derideal(_ParserScraper): b...
a28e82121a5dcc68183c338b06264981227f8681
examples/example4_multiwf.py
examples/example4_multiwf.py
''' An example showing how you can run multiple workflow tasks, from a "Meta workflow" (MetaWF below) ''' import sciluigi as sl import luigi class MetaWF(sl.WorkflowTask): ''' Meta workflow ''' def workflow(self): tasks = [] for r in ['bar', 'tjo', 'hej']: wf = self.new_tas...
Add example 4, demonstrating how to run meta workflow of multiple workflows
Add example 4, demonstrating how to run meta workflow of multiple workflows
Python
mit
pharmbio/sciluigi,pharmbio/sciluigi,samuell/sciluigi
Add example 4, demonstrating how to run meta workflow of multiple workflows
''' An example showing how you can run multiple workflow tasks, from a "Meta workflow" (MetaWF below) ''' import sciluigi as sl import luigi class MetaWF(sl.WorkflowTask): ''' Meta workflow ''' def workflow(self): tasks = [] for r in ['bar', 'tjo', 'hej']: wf = self.new_tas...
<commit_before><commit_msg>Add example 4, demonstrating how to run meta workflow of multiple workflows<commit_after>
''' An example showing how you can run multiple workflow tasks, from a "Meta workflow" (MetaWF below) ''' import sciluigi as sl import luigi class MetaWF(sl.WorkflowTask): ''' Meta workflow ''' def workflow(self): tasks = [] for r in ['bar', 'tjo', 'hej']: wf = self.new_tas...
Add example 4, demonstrating how to run meta workflow of multiple workflows''' An example showing how you can run multiple workflow tasks, from a "Meta workflow" (MetaWF below) ''' import sciluigi as sl import luigi class MetaWF(sl.WorkflowTask): ''' Meta workflow ''' def workflow(self): tasks...
<commit_before><commit_msg>Add example 4, demonstrating how to run meta workflow of multiple workflows<commit_after>''' An example showing how you can run multiple workflow tasks, from a "Meta workflow" (MetaWF below) ''' import sciluigi as sl import luigi class MetaWF(sl.WorkflowTask): ''' Meta workflow ...
a73f320e61f7ff937f4be3c69939edf77be60e0e
accloudtant/__main__.py
accloudtant/__main__.py
import csv if __name__ == "__main__": usage = [] with open("tests/fixtures/2021/03/S3.csv") as f: reader = csv.DictReader(f) for row in reader: usage.append(row) print("Simple Storage Service") for entry in usage: print(entry)
Print list of usage records from S3 CSV
Print list of usage records from S3 CSV
Python
apache-2.0
ifosch/accloudtant
Print list of usage records from S3 CSV
import csv if __name__ == "__main__": usage = [] with open("tests/fixtures/2021/03/S3.csv") as f: reader = csv.DictReader(f) for row in reader: usage.append(row) print("Simple Storage Service") for entry in usage: print(entry)
<commit_before><commit_msg>Print list of usage records from S3 CSV<commit_after>
import csv if __name__ == "__main__": usage = [] with open("tests/fixtures/2021/03/S3.csv") as f: reader = csv.DictReader(f) for row in reader: usage.append(row) print("Simple Storage Service") for entry in usage: print(entry)
Print list of usage records from S3 CSVimport csv if __name__ == "__main__": usage = [] with open("tests/fixtures/2021/03/S3.csv") as f: reader = csv.DictReader(f) for row in reader: usage.append(row) print("Simple Storage Service") for entry in usage: print(entry...
<commit_before><commit_msg>Print list of usage records from S3 CSV<commit_after>import csv if __name__ == "__main__": usage = [] with open("tests/fixtures/2021/03/S3.csv") as f: reader = csv.DictReader(f) for row in reader: usage.append(row) print("Simple Storage Service") ...
c70818bbcb678e6a0ab94389e034c2d59da463f8
maker/tests/test_category.py
maker/tests/test_category.py
from django.test import TestCase from maker.migrations.default_categories import DEFAULT_CATEGORIES from maker.models import Category class CategoryTestCase(TestCase): def test_pre_install(self): categories = Category.objects.all() self.assertEqual(len(DEFAULT_CATEGORIES), len(categories)) ...
Add tests for Category model
Add tests for Category model
Python
agpl-3.0
fdroidtravis/repomaker,fdroidtravis/repomaker,fdroidtravis/repomaker,fdroidtravis/repomaker
Add tests for Category model
from django.test import TestCase from maker.migrations.default_categories import DEFAULT_CATEGORIES from maker.models import Category class CategoryTestCase(TestCase): def test_pre_install(self): categories = Category.objects.all() self.assertEqual(len(DEFAULT_CATEGORIES), len(categories)) ...
<commit_before><commit_msg>Add tests for Category model<commit_after>
from django.test import TestCase from maker.migrations.default_categories import DEFAULT_CATEGORIES from maker.models import Category class CategoryTestCase(TestCase): def test_pre_install(self): categories = Category.objects.all() self.assertEqual(len(DEFAULT_CATEGORIES), len(categories)) ...
Add tests for Category modelfrom django.test import TestCase from maker.migrations.default_categories import DEFAULT_CATEGORIES from maker.models import Category class CategoryTestCase(TestCase): def test_pre_install(self): categories = Category.objects.all() self.assertEqual(len(DEFAULT_CATEGOR...
<commit_before><commit_msg>Add tests for Category model<commit_after>from django.test import TestCase from maker.migrations.default_categories import DEFAULT_CATEGORIES from maker.models import Category class CategoryTestCase(TestCase): def test_pre_install(self): categories = Category.objects.all() ...
6f75300037254f51f1512a271bf7850a4bc0a8f8
djangospam/cookie/urls.py
djangospam/cookie/urls.py
# -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ from django.conf.urls.defaults impo...
# -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ try: from django.conf.urls impo...
Add support for Django 1.4 and up
Add support for Django 1.4 and up * Module django.conf.urls.defaults has been moved to django.conf.urls in version 1.4. Commit references issue #3.
Python
bsd-2-clause
leandroarndt/djangospam,leandroarndt/djangospam
# -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ from django.conf.urls.defaults impo...
# -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ try: from django.conf.urls impo...
<commit_before># -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ from django.conf.url...
# -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ try: from django.conf.urls impo...
# -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ from django.conf.urls.defaults impo...
<commit_before># -*- coding: utf-8 -*- """URL for setting SPAM value to the `djangospam.cookie` cookie. You must also add `(r"^somewhere/", include("djangospam.cookie.urls")` to your url patterns (usually in your root urls.conf; `somewhere` may be any path, except the one used for true posts). """ from django.conf.url...
42fdc9f9242df112046763560011336869d3efa1
sort_includes.py
sort_includes.py
#!/usr/bin/env python """Script to sort the top-most block of #include lines. Assumes the LLVM coding conventions. Currently, this script only bothers sorting the llvm/... headers. Patches welcome for more functionality, and sorting other header groups. """ import argparse import os import re import sys import temp...
Add a completely hack-ish tool to sort includes according to the coding standards.
Add a completely hack-ish tool to sort includes according to the coding standards. I am a terrible Python programmer. Patches more the welcome. Please tell me how this should look if it should look differently. It's just a tiny little script so it didn't make sense to go through pre-commit review, especially as someon...
Python
bsd-3-clause
lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx
Add a completely hack-ish tool to sort includes according to the coding standards. I am a terrible Python programmer. Patches more the welcome. Please tell me how this should look if it should look differently. It's just a tiny little script so it didn't make sense to go through pre-commit review, especially as someon...
#!/usr/bin/env python """Script to sort the top-most block of #include lines. Assumes the LLVM coding conventions. Currently, this script only bothers sorting the llvm/... headers. Patches welcome for more functionality, and sorting other header groups. """ import argparse import os import re import sys import temp...
<commit_before><commit_msg>Add a completely hack-ish tool to sort includes according to the coding standards. I am a terrible Python programmer. Patches more the welcome. Please tell me how this should look if it should look differently. It's just a tiny little script so it didn't make sense to go through pre-commit r...
#!/usr/bin/env python """Script to sort the top-most block of #include lines. Assumes the LLVM coding conventions. Currently, this script only bothers sorting the llvm/... headers. Patches welcome for more functionality, and sorting other header groups. """ import argparse import os import re import sys import temp...
Add a completely hack-ish tool to sort includes according to the coding standards. I am a terrible Python programmer. Patches more the welcome. Please tell me how this should look if it should look differently. It's just a tiny little script so it didn't make sense to go through pre-commit review, especially as someon...
<commit_before><commit_msg>Add a completely hack-ish tool to sort includes according to the coding standards. I am a terrible Python programmer. Patches more the welcome. Please tell me how this should look if it should look differently. It's just a tiny little script so it didn't make sense to go through pre-commit r...
12a5ed54c39dcabbf72c0a80b1e2ac6f3e9a576c
synoptic-to-org.py
synoptic-to-org.py
import sys import re def import_file(lines): tags_label = "TAGS: " separator = 60*"-" idx = 0 while idx < len(lines): assert lines[idx].startswith(tags_label) tags = lines[idx][len(tags_label):].split(",") tags = [t.strip() for t in tags if t.strip()] idx += 1 ...
Add org mode export script
Add org mode export script
Python
mit
inducer/synoptic,inducer/synoptic,inducer/synoptic
Add org mode export script
import sys import re def import_file(lines): tags_label = "TAGS: " separator = 60*"-" idx = 0 while idx < len(lines): assert lines[idx].startswith(tags_label) tags = lines[idx][len(tags_label):].split(",") tags = [t.strip() for t in tags if t.strip()] idx += 1 ...
<commit_before><commit_msg>Add org mode export script<commit_after>
import sys import re def import_file(lines): tags_label = "TAGS: " separator = 60*"-" idx = 0 while idx < len(lines): assert lines[idx].startswith(tags_label) tags = lines[idx][len(tags_label):].split(",") tags = [t.strip() for t in tags if t.strip()] idx += 1 ...
Add org mode export scriptimport sys import re def import_file(lines): tags_label = "TAGS: " separator = 60*"-" idx = 0 while idx < len(lines): assert lines[idx].startswith(tags_label) tags = lines[idx][len(tags_label):].split(",") tags = [t.strip() for t in tags if t.strip()]...
<commit_before><commit_msg>Add org mode export script<commit_after>import sys import re def import_file(lines): tags_label = "TAGS: " separator = 60*"-" idx = 0 while idx < len(lines): assert lines[idx].startswith(tags_label) tags = lines[idx][len(tags_label):].split(",") tags...
2a0ed84f9ce2077d352c0827c2dd5fac514cb91d
setup.py
setup.py
import multiprocessing # stop tests breaking tox from setuptools import setup import tvrenamr requires = ('pyyaml', 'requests') packages = ('tvrenamr',) setup_requires = ('minimock', 'mock', 'nose', 'pyyaml') setup( name = tvrenamr.__title__, version = tvrenamr.__version__, description = 'Rename tv sh...
import multiprocessing # stop tests breaking tox from setuptools import setup import tvrenamr requires = ('pyyaml', 'requests') packages = ('tvrenamr',) setup_requires = ('minimock', 'mock', 'nose', 'pyyaml') setup( name = tvrenamr.__title__, version = tvrenamr.__version__, description = 'Rename tv sh...
Add py3.3 to trove classifiers
Add py3.3 to trove classifiers
Python
mit
wintersandroid/tvrenamr,ghickman/tvrenamr
import multiprocessing # stop tests breaking tox from setuptools import setup import tvrenamr requires = ('pyyaml', 'requests') packages = ('tvrenamr',) setup_requires = ('minimock', 'mock', 'nose', 'pyyaml') setup( name = tvrenamr.__title__, version = tvrenamr.__version__, description = 'Rename tv sh...
import multiprocessing # stop tests breaking tox from setuptools import setup import tvrenamr requires = ('pyyaml', 'requests') packages = ('tvrenamr',) setup_requires = ('minimock', 'mock', 'nose', 'pyyaml') setup( name = tvrenamr.__title__, version = tvrenamr.__version__, description = 'Rename tv sh...
<commit_before>import multiprocessing # stop tests breaking tox from setuptools import setup import tvrenamr requires = ('pyyaml', 'requests') packages = ('tvrenamr',) setup_requires = ('minimock', 'mock', 'nose', 'pyyaml') setup( name = tvrenamr.__title__, version = tvrenamr.__version__, description ...
import multiprocessing # stop tests breaking tox from setuptools import setup import tvrenamr requires = ('pyyaml', 'requests') packages = ('tvrenamr',) setup_requires = ('minimock', 'mock', 'nose', 'pyyaml') setup( name = tvrenamr.__title__, version = tvrenamr.__version__, description = 'Rename tv sh...
import multiprocessing # stop tests breaking tox from setuptools import setup import tvrenamr requires = ('pyyaml', 'requests') packages = ('tvrenamr',) setup_requires = ('minimock', 'mock', 'nose', 'pyyaml') setup( name = tvrenamr.__title__, version = tvrenamr.__version__, description = 'Rename tv sh...
<commit_before>import multiprocessing # stop tests breaking tox from setuptools import setup import tvrenamr requires = ('pyyaml', 'requests') packages = ('tvrenamr',) setup_requires = ('minimock', 'mock', 'nose', 'pyyaml') setup( name = tvrenamr.__title__, version = tvrenamr.__version__, description ...
f6ee98e4ed4529b0d699f3cf2d107a1ed8faa6f0
designate/backend/impl_powerdns/migrate_repo/versions/012_records_drop_duped_index.py
designate/backend/impl_powerdns/migrate_repo/versions/012_records_drop_duped_index.py
# Copyright 2015 NetEase, Inc. # # Author: Zhang Gengyuan <stanzgy@gmail.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 # # Unless re...
Remove duplicated index on table 'records' of pDNS backend
Remove duplicated index on table 'records' of pDNS backend Remove duplicated index `rec_name_index` on table 'records' of pDNS backend. Change-Id: I9e8723b464522a588f0e0ef6ff261b71609b0726 Closes-Bug: 1446980
Python
apache-2.0
kiall/designate-py3,cneill/designate,kiall/designate-py3,ionrock/designate,tonyli71/designate,muraliselva10/designate,cneill/designate,grahamhayes/designate,kiall/designate-py3,ramsateesh/designate,cneill/designate,cneill/designate-testing,tonyli71/designate,kiall/designate-py3,openstack/designate,openstack/designate,m...
Remove duplicated index on table 'records' of pDNS backend Remove duplicated index `rec_name_index` on table 'records' of pDNS backend. Change-Id: I9e8723b464522a588f0e0ef6ff261b71609b0726 Closes-Bug: 1446980
# Copyright 2015 NetEase, Inc. # # Author: Zhang Gengyuan <stanzgy@gmail.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 # # Unless re...
<commit_before><commit_msg>Remove duplicated index on table 'records' of pDNS backend Remove duplicated index `rec_name_index` on table 'records' of pDNS backend. Change-Id: I9e8723b464522a588f0e0ef6ff261b71609b0726 Closes-Bug: 1446980<commit_after>
# Copyright 2015 NetEase, Inc. # # Author: Zhang Gengyuan <stanzgy@gmail.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 # # Unless re...
Remove duplicated index on table 'records' of pDNS backend Remove duplicated index `rec_name_index` on table 'records' of pDNS backend. Change-Id: I9e8723b464522a588f0e0ef6ff261b71609b0726 Closes-Bug: 1446980# Copyright 2015 NetEase, Inc. # # Author: Zhang Gengyuan <stanzgy@gmail.com> # # Licensed under the Apache Li...
<commit_before><commit_msg>Remove duplicated index on table 'records' of pDNS backend Remove duplicated index `rec_name_index` on table 'records' of pDNS backend. Change-Id: I9e8723b464522a588f0e0ef6ff261b71609b0726 Closes-Bug: 1446980<commit_after># Copyright 2015 NetEase, Inc. # # Author: Zhang Gengyuan <stanzgy@gm...
d6ef33d682008bbdbb00117266670607c4f66056
choosealicense/test/test_show.py
choosealicense/test/test_show.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license show` function """ from click.testing import CliRunner from choosealicense.main import show def test_show_all_the_licenses(): runner = CliRunner() result = runner.invoke(show) it_should_be = ('agpl-3.0, apache-2.0, artistic-2....
Add test for `license show` function
Add test for `license show` function
Python
mit
lord63/choosealicense-cli
Add test for `license show` function
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license show` function """ from click.testing import CliRunner from choosealicense.main import show def test_show_all_the_licenses(): runner = CliRunner() result = runner.invoke(show) it_should_be = ('agpl-3.0, apache-2.0, artistic-2....
<commit_before><commit_msg>Add test for `license show` function<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license show` function """ from click.testing import CliRunner from choosealicense.main import show def test_show_all_the_licenses(): runner = CliRunner() result = runner.invoke(show) it_should_be = ('agpl-3.0, apache-2.0, artistic-2....
Add test for `license show` function#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license show` function """ from click.testing import CliRunner from choosealicense.main import show def test_show_all_the_licenses(): runner = CliRunner() result = runner.invoke(show) it_should_be =...
<commit_before><commit_msg>Add test for `license show` function<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the `license show` function """ from click.testing import CliRunner from choosealicense.main import show def test_show_all_the_licenses(): runner = CliRunner() result...
6a6f7a6c6abe78094eb69b447b1b60960bf855ed
animation.py
animation.py
import numpy as np from matplotlib import pyplot as plt from matplotlib import animation from numpy.random import randn from matplotlib import cm from datetime import datetime as dt from Bedau.Evolution import Evolution # First set up the figure, the axis, and the plot element we want to animate # world_size = 128 po...
Add file to experiment with plotting of world
Add file to experiment with plotting of world
Python
mit
LapoFrati/GeneticAlgorithms
Add file to experiment with plotting of world
import numpy as np from matplotlib import pyplot as plt from matplotlib import animation from numpy.random import randn from matplotlib import cm from datetime import datetime as dt from Bedau.Evolution import Evolution # First set up the figure, the axis, and the plot element we want to animate # world_size = 128 po...
<commit_before><commit_msg>Add file to experiment with plotting of world<commit_after>
import numpy as np from matplotlib import pyplot as plt from matplotlib import animation from numpy.random import randn from matplotlib import cm from datetime import datetime as dt from Bedau.Evolution import Evolution # First set up the figure, the axis, and the plot element we want to animate # world_size = 128 po...
Add file to experiment with plotting of worldimport numpy as np from matplotlib import pyplot as plt from matplotlib import animation from numpy.random import randn from matplotlib import cm from datetime import datetime as dt from Bedau.Evolution import Evolution # First set up the figure, the axis, and the plot eleme...
<commit_before><commit_msg>Add file to experiment with plotting of world<commit_after>import numpy as np from matplotlib import pyplot as plt from matplotlib import animation from numpy.random import randn from matplotlib import cm from datetime import datetime as dt from Bedau.Evolution import Evolution # First set up...
37e0d6ae04da6b127e214afba1d8d1adabfa707e
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_admin.py
import pytest from django.urls import reverse from {{ cookiecutter.project_slug }}.users.models import User pytestmark = pytest.mark.django_db class TestUserAdmin: def test_changelist(self, admin_client): url = reverse("admin:users_user_changelist") response = admin_client.get(url) asser...
Add test for the UserAdmin
Add test for the UserAdmin
Python
bsd-3-clause
pydanny/cookiecutter-django,ryankanno/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,pydanny/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,pydanny/cookiecutter-django,trungdong/cookiecutter-django,trungdong/cookiecutter-dja...
Add test for the UserAdmin
import pytest from django.urls import reverse from {{ cookiecutter.project_slug }}.users.models import User pytestmark = pytest.mark.django_db class TestUserAdmin: def test_changelist(self, admin_client): url = reverse("admin:users_user_changelist") response = admin_client.get(url) asser...
<commit_before><commit_msg>Add test for the UserAdmin<commit_after>
import pytest from django.urls import reverse from {{ cookiecutter.project_slug }}.users.models import User pytestmark = pytest.mark.django_db class TestUserAdmin: def test_changelist(self, admin_client): url = reverse("admin:users_user_changelist") response = admin_client.get(url) asser...
Add test for the UserAdminimport pytest from django.urls import reverse from {{ cookiecutter.project_slug }}.users.models import User pytestmark = pytest.mark.django_db class TestUserAdmin: def test_changelist(self, admin_client): url = reverse("admin:users_user_changelist") response = admin_cli...
<commit_before><commit_msg>Add test for the UserAdmin<commit_after>import pytest from django.urls import reverse from {{ cookiecutter.project_slug }}.users.models import User pytestmark = pytest.mark.django_db class TestUserAdmin: def test_changelist(self, admin_client): url = reverse("admin:users_user_...
38abc2d155492e1dadb507a63a484f2147118163
setup.py
setup.py
from distutils.core import setup setup( name='python-evrythng', version='0.1', packages=['evrythng', 'evrythng.entities'], package_dir={'': 'src'}, url='https://github.com/GooeeIOT/python-evrythng', license='MIT', author='Lyle Scott, III', author_email='lyle@digitalfoo.net', descrip...
Create a pip installable project
Create a pip installable project
Python
mit
GooeeIOT/python-evrythng
Create a pip installable project
from distutils.core import setup setup( name='python-evrythng', version='0.1', packages=['evrythng', 'evrythng.entities'], package_dir={'': 'src'}, url='https://github.com/GooeeIOT/python-evrythng', license='MIT', author='Lyle Scott, III', author_email='lyle@digitalfoo.net', descrip...
<commit_before><commit_msg>Create a pip installable project<commit_after>
from distutils.core import setup setup( name='python-evrythng', version='0.1', packages=['evrythng', 'evrythng.entities'], package_dir={'': 'src'}, url='https://github.com/GooeeIOT/python-evrythng', license='MIT', author='Lyle Scott, III', author_email='lyle@digitalfoo.net', descrip...
Create a pip installable projectfrom distutils.core import setup setup( name='python-evrythng', version='0.1', packages=['evrythng', 'evrythng.entities'], package_dir={'': 'src'}, url='https://github.com/GooeeIOT/python-evrythng', license='MIT', author='Lyle Scott, III', author_email='l...
<commit_before><commit_msg>Create a pip installable project<commit_after>from distutils.core import setup setup( name='python-evrythng', version='0.1', packages=['evrythng', 'evrythng.entities'], package_dir={'': 'src'}, url='https://github.com/GooeeIOT/python-evrythng', license='MIT', auth...
f38c8fe1736e870a29f8c44a20c903f65579976b
taggert/tdata.py
taggert/tdata.py
from gi.repository import GObject class TData(GObject.GObject): imagedir = GObject.property(type=str) lasttrackfolder = GObject.property(type=str) tracktimezone = GObject.property(type=str) alwaysthistimezone = GObject.property(type=bool, default=False) markersize = GObje...
Add TData class implementing GObject.GObject, meant for runtime data storage
Add TData class implementing GObject.GObject, meant for runtime data storage
Python
apache-2.0
tinuzz/taggert
Add TData class implementing GObject.GObject, meant for runtime data storage
from gi.repository import GObject class TData(GObject.GObject): imagedir = GObject.property(type=str) lasttrackfolder = GObject.property(type=str) tracktimezone = GObject.property(type=str) alwaysthistimezone = GObject.property(type=bool, default=False) markersize = GObje...
<commit_before><commit_msg>Add TData class implementing GObject.GObject, meant for runtime data storage<commit_after>
from gi.repository import GObject class TData(GObject.GObject): imagedir = GObject.property(type=str) lasttrackfolder = GObject.property(type=str) tracktimezone = GObject.property(type=str) alwaysthistimezone = GObject.property(type=bool, default=False) markersize = GObje...
Add TData class implementing GObject.GObject, meant for runtime data storagefrom gi.repository import GObject class TData(GObject.GObject): imagedir = GObject.property(type=str) lasttrackfolder = GObject.property(type=str) tracktimezone = GObject.property(type=str) alwaysthistimezone...
<commit_before><commit_msg>Add TData class implementing GObject.GObject, meant for runtime data storage<commit_after>from gi.repository import GObject class TData(GObject.GObject): imagedir = GObject.property(type=str) lasttrackfolder = GObject.property(type=str) tracktimezone = GObject....
c8df2f29359661c538cf07afe8f639c9c6159d00
py/construct-the-rectangle.py
py/construct-the-rectangle.py
class Solution(object): def constructRectangle(self, area): """ :type area: int :rtype: List[int] """ ans = None W = 1 while W * W <= area: if area % W == 0: ans = [area / W, W] W += 1 return ans
Add py solution for 492. Construct the Rectangle
Add py solution for 492. Construct the Rectangle 492. Construct the Rectangle: https://leetcode.com/problems/construct-the-rectangle/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 492. Construct the Rectangle 492. Construct the Rectangle: https://leetcode.com/problems/construct-the-rectangle/
class Solution(object): def constructRectangle(self, area): """ :type area: int :rtype: List[int] """ ans = None W = 1 while W * W <= area: if area % W == 0: ans = [area / W, W] W += 1 return ans
<commit_before><commit_msg>Add py solution for 492. Construct the Rectangle 492. Construct the Rectangle: https://leetcode.com/problems/construct-the-rectangle/<commit_after>
class Solution(object): def constructRectangle(self, area): """ :type area: int :rtype: List[int] """ ans = None W = 1 while W * W <= area: if area % W == 0: ans = [area / W, W] W += 1 return ans
Add py solution for 492. Construct the Rectangle 492. Construct the Rectangle: https://leetcode.com/problems/construct-the-rectangle/class Solution(object): def constructRectangle(self, area): """ :type area: int :rtype: List[int] """ ans = None W = 1 while W...
<commit_before><commit_msg>Add py solution for 492. Construct the Rectangle 492. Construct the Rectangle: https://leetcode.com/problems/construct-the-rectangle/<commit_after>class Solution(object): def constructRectangle(self, area): """ :type area: int :rtype: List[int] """ ...
29c6d5b78e06e8487d9eccb47070b0fb36cbb821
scenarios/dindind_execute.py
scenarios/dindind_execute.py
#!/usr/bin/env python # Copyright 2018 The Kubernetes Authors. # # 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 appli...
Add a scenario to initiliaze nested dind
Add a scenario to initiliaze nested dind
Python
apache-2.0
jlowdermilk/test-infra,dims/test-infra,michelle192837/test-infra,monopole/test-infra,jlowdermilk/test-infra,monopole/test-infra,kargakis/test-infra,abgworrall/test-infra,michelle192837/test-infra,fejta/test-infra,kargakis/test-infra,ixdy/kubernetes-test-infra,jessfraz/test-infra,BenTheElder/test-infra,michelle192837/te...
Add a scenario to initiliaze nested dind
#!/usr/bin/env python # Copyright 2018 The Kubernetes Authors. # # 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 appli...
<commit_before><commit_msg>Add a scenario to initiliaze nested dind<commit_after>
#!/usr/bin/env python # Copyright 2018 The Kubernetes Authors. # # 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 appli...
Add a scenario to initiliaze nested dind#!/usr/bin/env python # Copyright 2018 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/...
<commit_before><commit_msg>Add a scenario to initiliaze nested dind<commit_after>#!/usr/bin/env python # Copyright 2018 The Kubernetes Authors. # # 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 a...
8db2f138c83a998d0fa23b1e13f27d0823eba42e
utils/convert.py
utils/convert.py
import json import argparse import heapq import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from src.model.message import Message from datetime import datetime from collections import namedtuple # For storing messages in an object that the heap can sort MessageTuple = namedtuple('Messa...
Add message format conversion utility script
Add message format conversion utility script
Python
apache-2.0
5agado/conversation-analyzer
Add message format conversion utility script
import json import argparse import heapq import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from src.model.message import Message from datetime import datetime from collections import namedtuple # For storing messages in an object that the heap can sort MessageTuple = namedtuple('Messa...
<commit_before><commit_msg>Add message format conversion utility script<commit_after>
import json import argparse import heapq import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from src.model.message import Message from datetime import datetime from collections import namedtuple # For storing messages in an object that the heap can sort MessageTuple = namedtuple('Messa...
Add message format conversion utility scriptimport json import argparse import heapq import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from src.model.message import Message from datetime import datetime from collections import namedtuple # For storing messages in an object that the he...
<commit_before><commit_msg>Add message format conversion utility script<commit_after>import json import argparse import heapq import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from src.model.message import Message from datetime import datetime from collections import namedtuple # For ...
7b48044f19a50e4b84810a5e98d93cd537bea5c9
ichnaea/gunicorn_config.py
ichnaea/gunicorn_config.py
# This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum number of simultaneo...
# This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum number of simultaneo...
Increase gunicorn max_requests to avoid process churn at high request rates.
Increase gunicorn max_requests to avoid process churn at high request rates.
Python
apache-2.0
mozilla/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea
# This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum number of simultaneo...
# This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum number of simultaneo...
<commit_before># This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum numbe...
# This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum number of simultaneo...
# This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum number of simultaneo...
<commit_before># This file contains gunicorn configuration setttings, as described at # http://docs.gunicorn.org/en/latest/settings.html # The file is loaded via the -c ichnaea.gunicorn_config command line option # Use our own Gevent worker worker_class = "ichnaea.gunicorn_worker.LocationGeventWorker" # Maximum numbe...
cdd238e7fefbe4dc57db89f8362fa7dce7094f92
tests/test_time_utils.py
tests/test_time_utils.py
from datetime import datetime import unittest from pypercube import time_utils class TestMetric(unittest.TestCase): def setUp(self): self.now = datetime(2012, 7, 6, 20, 33, 16, 573225) def test_yesterday(self): self.assertEqual(time_utils.yesterday(self.now), datetime(2012, 7...
Add unit tests for time_utils.
Add unit tests for time_utils.
Python
bsd-3-clause
sbuss/pypercube
Add unit tests for time_utils.
from datetime import datetime import unittest from pypercube import time_utils class TestMetric(unittest.TestCase): def setUp(self): self.now = datetime(2012, 7, 6, 20, 33, 16, 573225) def test_yesterday(self): self.assertEqual(time_utils.yesterday(self.now), datetime(2012, 7...
<commit_before><commit_msg>Add unit tests for time_utils.<commit_after>
from datetime import datetime import unittest from pypercube import time_utils class TestMetric(unittest.TestCase): def setUp(self): self.now = datetime(2012, 7, 6, 20, 33, 16, 573225) def test_yesterday(self): self.assertEqual(time_utils.yesterday(self.now), datetime(2012, 7...
Add unit tests for time_utils.from datetime import datetime import unittest from pypercube import time_utils class TestMetric(unittest.TestCase): def setUp(self): self.now = datetime(2012, 7, 6, 20, 33, 16, 573225) def test_yesterday(self): self.assertEqual(time_utils.yesterday(self.now), ...
<commit_before><commit_msg>Add unit tests for time_utils.<commit_after>from datetime import datetime import unittest from pypercube import time_utils class TestMetric(unittest.TestCase): def setUp(self): self.now = datetime(2012, 7, 6, 20, 33, 16, 573225) def test_yesterday(self): self.asser...
e577d53840137d7849b68420553d16a942280ea0
cax/clear.py
cax/clear.py
f import config def copy(f1, f2, server, username): util.log_to_file('ssh.log') ssh = SSHClient() ssh.load_system_host_keys() ssh.connect(server, username=username) # SCPCLient takes a paramiko transport as its only argument scp = SCPClient(ssh.get_transport...
Clear DAQ if enough copies
Clear DAQ if enough copies
Python
isc
XENON1T/cax,XENON1T/cax
Clear DAQ if enough copies
f import config def copy(f1, f2, server, username): util.log_to_file('ssh.log') ssh = SSHClient() ssh.load_system_host_keys() ssh.connect(server, username=username) # SCPCLient takes a paramiko transport as its only argument scp = SCPClient(ssh.get_transport...
<commit_before><commit_msg>Clear DAQ if enough copies<commit_after>
f import config def copy(f1, f2, server, username): util.log_to_file('ssh.log') ssh = SSHClient() ssh.load_system_host_keys() ssh.connect(server, username=username) # SCPCLient takes a paramiko transport as its only argument scp = SCPClient(ssh.get_transport...
Clear DAQ if enough copiesf import config def copy(f1, f2, server, username): util.log_to_file('ssh.log') ssh = SSHClient() ssh.load_system_host_keys() ssh.connect(server, username=username) # SCPCLient takes a paramiko transport as its only argument scp = S...
<commit_before><commit_msg>Clear DAQ if enough copies<commit_after>f import config def copy(f1, f2, server, username): util.log_to_file('ssh.log') ssh = SSHClient() ssh.load_system_host_keys() ssh.connect(server, username=username) # SCPCLient takes a paramiko t...
616af50809bbc1eb64175a233f08c06426e8b636
Designs/shopping_list.py
Designs/shopping_list.py
from person import Person class ShoppingList: def create(self,list_name,description): with open('shopping_list.txt','a') as sl: sl.write(list_name+' ' +' '+description) sl.write('\n') def show(self): slist=[] with open('shopping_list.txt','r') as sl: ...
Add shopping list class to
[Chore] Add shopping list class to
Python
mit
AndersonMasese/Myshop,AndersonMasese/Myshop,AndersonMasese/Myshop
[Chore] Add shopping list class to
from person import Person class ShoppingList: def create(self,list_name,description): with open('shopping_list.txt','a') as sl: sl.write(list_name+' ' +' '+description) sl.write('\n') def show(self): slist=[] with open('shopping_list.txt','r') as sl: ...
<commit_before><commit_msg>[Chore] Add shopping list class to<commit_after>
from person import Person class ShoppingList: def create(self,list_name,description): with open('shopping_list.txt','a') as sl: sl.write(list_name+' ' +' '+description) sl.write('\n') def show(self): slist=[] with open('shopping_list.txt','r') as sl: ...
[Chore] Add shopping list class tofrom person import Person class ShoppingList: def create(self,list_name,description): with open('shopping_list.txt','a') as sl: sl.write(list_name+' ' +' '+description) sl.write('\n') def show(self): slist=[] with open('sh...
<commit_before><commit_msg>[Chore] Add shopping list class to<commit_after>from person import Person class ShoppingList: def create(self,list_name,description): with open('shopping_list.txt','a') as sl: sl.write(list_name+' ' +' '+description) sl.write('\n') def show(self...
5b8ca7bf4a3383eaddc148caffcf89e73efc743d
tests/test_converters.py
tests/test_converters.py
import pytest from netsgiro.converters import value_or_none, truthy_or_none, to_bool values = [ (int, None, None, None), (int, 1, 1, 1), (int, 1.5, 1, 1), (float, 1.5, 1.5, 1.5), (bool, 1.5, True, True), (bool, 0, False, None), # different ] @pytest.mark.parametrize('c, v, v1, v2', values) ...
Add tests for untested converters
tests: Add tests for untested converters
Python
apache-2.0
otovo/python-netsgiro
tests: Add tests for untested converters
import pytest from netsgiro.converters import value_or_none, truthy_or_none, to_bool values = [ (int, None, None, None), (int, 1, 1, 1), (int, 1.5, 1, 1), (float, 1.5, 1.5, 1.5), (bool, 1.5, True, True), (bool, 0, False, None), # different ] @pytest.mark.parametrize('c, v, v1, v2', values) ...
<commit_before><commit_msg>tests: Add tests for untested converters<commit_after>
import pytest from netsgiro.converters import value_or_none, truthy_or_none, to_bool values = [ (int, None, None, None), (int, 1, 1, 1), (int, 1.5, 1, 1), (float, 1.5, 1.5, 1.5), (bool, 1.5, True, True), (bool, 0, False, None), # different ] @pytest.mark.parametrize('c, v, v1, v2', values) ...
tests: Add tests for untested convertersimport pytest from netsgiro.converters import value_or_none, truthy_or_none, to_bool values = [ (int, None, None, None), (int, 1, 1, 1), (int, 1.5, 1, 1), (float, 1.5, 1.5, 1.5), (bool, 1.5, True, True), (bool, 0, False, None), # different ] @pytest.m...
<commit_before><commit_msg>tests: Add tests for untested converters<commit_after>import pytest from netsgiro.converters import value_or_none, truthy_or_none, to_bool values = [ (int, None, None, None), (int, 1, 1, 1), (int, 1.5, 1, 1), (float, 1.5, 1.5, 1.5), (bool, 1.5, True, True), (bool, 0,...
ab23323eb253b732c8f3ed08420be754790d2e76
utils/glediator_patch.py
utils/glediator_patch.py
import sys if (len(sys.argv) <= 3): print "Usage: %s <IP> <width> <height>" % (sys.argv[0]) sys.exit() ip = sys.argv[1].split(".") if (len(ip) < 4): print "IP should be of the form: xxx.xxx.xxx.xxx" sys.exit() width = int(sys.argv[2]) height = int(sys.argv[3]) pixels = width * height bytes = pixels * 3 max_bytes_pe...
Add patch-file generator for GLEDiator
Add patch-file generator for GLEDiator
Python
mit
Frans-Willem/LEDMatrixHUB75,Frans-Willem/LEDMatrixHUB75,Frans-Willem/LEDMatrixHUB75,Frans-Willem/LEDMatrixHUB75
Add patch-file generator for GLEDiator
import sys if (len(sys.argv) <= 3): print "Usage: %s <IP> <width> <height>" % (sys.argv[0]) sys.exit() ip = sys.argv[1].split(".") if (len(ip) < 4): print "IP should be of the form: xxx.xxx.xxx.xxx" sys.exit() width = int(sys.argv[2]) height = int(sys.argv[3]) pixels = width * height bytes = pixels * 3 max_bytes_pe...
<commit_before><commit_msg>Add patch-file generator for GLEDiator<commit_after>
import sys if (len(sys.argv) <= 3): print "Usage: %s <IP> <width> <height>" % (sys.argv[0]) sys.exit() ip = sys.argv[1].split(".") if (len(ip) < 4): print "IP should be of the form: xxx.xxx.xxx.xxx" sys.exit() width = int(sys.argv[2]) height = int(sys.argv[3]) pixels = width * height bytes = pixels * 3 max_bytes_pe...
Add patch-file generator for GLEDiatorimport sys if (len(sys.argv) <= 3): print "Usage: %s <IP> <width> <height>" % (sys.argv[0]) sys.exit() ip = sys.argv[1].split(".") if (len(ip) < 4): print "IP should be of the form: xxx.xxx.xxx.xxx" sys.exit() width = int(sys.argv[2]) height = int(sys.argv[3]) pixels = width * ...
<commit_before><commit_msg>Add patch-file generator for GLEDiator<commit_after>import sys if (len(sys.argv) <= 3): print "Usage: %s <IP> <width> <height>" % (sys.argv[0]) sys.exit() ip = sys.argv[1].split(".") if (len(ip) < 4): print "IP should be of the form: xxx.xxx.xxx.xxx" sys.exit() width = int(sys.argv[2]) he...
08f7cb8832ea361888a915c3e9532d8ff2cbd718
usr/examples/lbp_desc.py
usr/examples/lbp_desc.py
import sensor, time, image sensor.reset() # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.HQVGA) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By default this will use all stages, lower satges is faster but less accurate. fa...
Add LBP descriptor example script
Add LBP descriptor example script
Python
mit
iabdalkader/openmv,kwagyeman/openmv,iabdalkader/openmv,iabdalkader/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv
Add LBP descriptor example script
import sensor, time, image sensor.reset() # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.HQVGA) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By default this will use all stages, lower satges is faster but less accurate. fa...
<commit_before><commit_msg>Add LBP descriptor example script<commit_after>
import sensor, time, image sensor.reset() # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.HQVGA) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By default this will use all stages, lower satges is faster but less accurate. fa...
Add LBP descriptor example scriptimport sensor, time, image sensor.reset() # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.HQVGA) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By default this will use all stages, lower satge...
<commit_before><commit_msg>Add LBP descriptor example script<commit_after>import sensor, time, image sensor.reset() # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.HQVGA) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By defa...
75d58ad792380c182a6842c6695f537268932113
scripts/supersegger_trials.py
scripts/supersegger_trials.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ supersegger_trials ^^^^^^^^^^^^^^^^^^ Example to test/use supersegger files """ from tunacell import Experiment, Parser, Observable from tunacell.plotting.samples import SamplePlot def iterate(exp): count = 0 for cell in exp.iter_cells(): ...
Add example script to use supersegger io module
Add example script to use supersegger io module
Python
mit
LeBarbouze/tunacell
Add example script to use supersegger io module
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ supersegger_trials ^^^^^^^^^^^^^^^^^^ Example to test/use supersegger files """ from tunacell import Experiment, Parser, Observable from tunacell.plotting.samples import SamplePlot def iterate(exp): count = 0 for cell in exp.iter_cells(): ...
<commit_before><commit_msg>Add example script to use supersegger io module<commit_after>
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ supersegger_trials ^^^^^^^^^^^^^^^^^^ Example to test/use supersegger files """ from tunacell import Experiment, Parser, Observable from tunacell.plotting.samples import SamplePlot def iterate(exp): count = 0 for cell in exp.iter_cells(): ...
Add example script to use supersegger io module#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ supersegger_trials ^^^^^^^^^^^^^^^^^^ Example to test/use supersegger files """ from tunacell import Experiment, Parser, Observable from tunacell.plotting.samples import SamplePlot def iterate(exp): cou...
<commit_before><commit_msg>Add example script to use supersegger io module<commit_after>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ supersegger_trials ^^^^^^^^^^^^^^^^^^ Example to test/use supersegger files """ from tunacell import Experiment, Parser, Observable from tunacell.plotting.samples impo...
39d0261d8a325be1c6d50d3a47e0563f3dcdfa8e
netbox/tenancy/tests/test_filters.py
netbox/tenancy/tests/test_filters.py
from django.test import TestCase from tenancy.filters import TenantFilter, TenantGroupFilter from tenancy.models import Tenant, TenantGroup class TenantGroupTestCase(TestCase): queryset = TenantGroup.objects.all() @classmethod def setUpTestData(cls): groups = ( TenantGroup(name='Ten...
Add tests for tenancy filters
Add tests for tenancy filters
Python
apache-2.0
digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox
Add tests for tenancy filters
from django.test import TestCase from tenancy.filters import TenantFilter, TenantGroupFilter from tenancy.models import Tenant, TenantGroup class TenantGroupTestCase(TestCase): queryset = TenantGroup.objects.all() @classmethod def setUpTestData(cls): groups = ( TenantGroup(name='Ten...
<commit_before><commit_msg>Add tests for tenancy filters<commit_after>
from django.test import TestCase from tenancy.filters import TenantFilter, TenantGroupFilter from tenancy.models import Tenant, TenantGroup class TenantGroupTestCase(TestCase): queryset = TenantGroup.objects.all() @classmethod def setUpTestData(cls): groups = ( TenantGroup(name='Ten...
Add tests for tenancy filtersfrom django.test import TestCase from tenancy.filters import TenantFilter, TenantGroupFilter from tenancy.models import Tenant, TenantGroup class TenantGroupTestCase(TestCase): queryset = TenantGroup.objects.all() @classmethod def setUpTestData(cls): groups = ( ...
<commit_before><commit_msg>Add tests for tenancy filters<commit_after>from django.test import TestCase from tenancy.filters import TenantFilter, TenantGroupFilter from tenancy.models import Tenant, TenantGroup class TenantGroupTestCase(TestCase): queryset = TenantGroup.objects.all() @classmethod def set...
6288ec2dfff70667c7fcbfa76a25395f2aaed744
examples/train_mnist/run_experiments.py
examples/train_mnist/run_experiments.py
import fire from datetime import datetime from itertools import product from itertools import izip import os import subprocess # Dictionary of lists to list of dictionaries def dl_to_ld(dicts): return list(dict(izip(dicts, x)) for x in product(*dicts.itervalues())) def main(gpu=-1): #######################...
Make sample python script to run multiple experiments
Make sample python script to run multiple experiments
Python
mit
yuyu2172/ilv
Make sample python script to run multiple experiments
import fire from datetime import datetime from itertools import product from itertools import izip import os import subprocess # Dictionary of lists to list of dictionaries def dl_to_ld(dicts): return list(dict(izip(dicts, x)) for x in product(*dicts.itervalues())) def main(gpu=-1): #######################...
<commit_before><commit_msg>Make sample python script to run multiple experiments<commit_after>
import fire from datetime import datetime from itertools import product from itertools import izip import os import subprocess # Dictionary of lists to list of dictionaries def dl_to_ld(dicts): return list(dict(izip(dicts, x)) for x in product(*dicts.itervalues())) def main(gpu=-1): #######################...
Make sample python script to run multiple experimentsimport fire from datetime import datetime from itertools import product from itertools import izip import os import subprocess # Dictionary of lists to list of dictionaries def dl_to_ld(dicts): return list(dict(izip(dicts, x)) for x in product(*dicts.itervalue...
<commit_before><commit_msg>Make sample python script to run multiple experiments<commit_after>import fire from datetime import datetime from itertools import product from itertools import izip import os import subprocess # Dictionary of lists to list of dictionaries def dl_to_ld(dicts): return list(dict(izip(dic...
cd3a1b4cb31c30860734df7b16879e5f8ab46214
elephantblog/templatetags/elephantblog_tags.py
elephantblog/templatetags/elephantblog_tags.py
from django import template from elephantblog.models import Category, Entry register = template.Library() @register.assignment_tag def elephantblog_categories(): return Category.objects.all() @register.assignment_tag def elephantblog_archive_months(): return Entry.objects.active().dates('published_on', '...
Add tags for a blog sidebar
Add tags for a blog sidebar
Python
bsd-3-clause
sbaechler/feincms-elephantblog,michaelkuty/feincms-elephantblog,sbaechler/feincms-elephantblog,feincms/feincms-elephantblog,sbaechler/feincms-elephantblog,matthiask/feincms-elephantblog,feincms/feincms-elephantblog,matthiask/feincms-elephantblog,joshuajonah/feincms-elephantblog,matthiask/feincms-elephantblog,joshuajona...
Add tags for a blog sidebar
from django import template from elephantblog.models import Category, Entry register = template.Library() @register.assignment_tag def elephantblog_categories(): return Category.objects.all() @register.assignment_tag def elephantblog_archive_months(): return Entry.objects.active().dates('published_on', '...
<commit_before><commit_msg>Add tags for a blog sidebar<commit_after>
from django import template from elephantblog.models import Category, Entry register = template.Library() @register.assignment_tag def elephantblog_categories(): return Category.objects.all() @register.assignment_tag def elephantblog_archive_months(): return Entry.objects.active().dates('published_on', '...
Add tags for a blog sidebarfrom django import template from elephantblog.models import Category, Entry register = template.Library() @register.assignment_tag def elephantblog_categories(): return Category.objects.all() @register.assignment_tag def elephantblog_archive_months(): return Entry.objects.activ...
<commit_before><commit_msg>Add tags for a blog sidebar<commit_after>from django import template from elephantblog.models import Category, Entry register = template.Library() @register.assignment_tag def elephantblog_categories(): return Category.objects.all() @register.assignment_tag def elephantblog_archive...
a9c53bc97c0e62a959c1115ec61d0a28d71aac68
devtools/ci/update-versions.py
devtools/ci/update-versions.py
from __future__ import print_function import os import boto from boto.s3.key import Key import msmbuilder.version if msmbuilder.version.release: # The secret key is available as a secure environment variable # on travis-ci to push the build documentation to Amazon S3. AWS_ACCESS_KEY_ID = os.environ['AWS_AC...
from __future__ import print_function import os import pip import json from tempfile import NamedTemporaryFile import subprocess from msmbuilder import version from six.moves.urllib.request import urlopen if not any(d.project_name == 's3cmd' for d in pip.get_installed_distributions()): raise ImportError('The s3cmd ...
Fix script for updating version dropdown
Fix script for updating version dropdown
Python
lgpl-2.1
mpharrigan/mixtape,brookehus/msmbuilder,peastman/msmbuilder,peastman/msmbuilder,rafwiewiora/msmbuilder,dr-nate/msmbuilder,dr-nate/msmbuilder,msmbuilder/msmbuilder,peastman/msmbuilder,Eigenstate/msmbuilder,Eigenstate/msmbuilder,msultan/msmbuilder,msultan/msmbuilder,rmcgibbo/msmbuilder,msmbuilder/msmbuilder,msultan/msmbu...
from __future__ import print_function import os import boto from boto.s3.key import Key import msmbuilder.version if msmbuilder.version.release: # The secret key is available as a secure environment variable # on travis-ci to push the build documentation to Amazon S3. AWS_ACCESS_KEY_ID = os.environ['AWS_AC...
from __future__ import print_function import os import pip import json from tempfile import NamedTemporaryFile import subprocess from msmbuilder import version from six.moves.urllib.request import urlopen if not any(d.project_name == 's3cmd' for d in pip.get_installed_distributions()): raise ImportError('The s3cmd ...
<commit_before>from __future__ import print_function import os import boto from boto.s3.key import Key import msmbuilder.version if msmbuilder.version.release: # The secret key is available as a secure environment variable # on travis-ci to push the build documentation to Amazon S3. AWS_ACCESS_KEY_ID = os....
from __future__ import print_function import os import pip import json from tempfile import NamedTemporaryFile import subprocess from msmbuilder import version from six.moves.urllib.request import urlopen if not any(d.project_name == 's3cmd' for d in pip.get_installed_distributions()): raise ImportError('The s3cmd ...
from __future__ import print_function import os import boto from boto.s3.key import Key import msmbuilder.version if msmbuilder.version.release: # The secret key is available as a secure environment variable # on travis-ci to push the build documentation to Amazon S3. AWS_ACCESS_KEY_ID = os.environ['AWS_AC...
<commit_before>from __future__ import print_function import os import boto from boto.s3.key import Key import msmbuilder.version if msmbuilder.version.release: # The secret key is available as a secure environment variable # on travis-ci to push the build documentation to Amazon S3. AWS_ACCESS_KEY_ID = os....
e8d5306716cb0d2fbc88e79175098dc17e475e84
src/main/scala/find-unused.py
src/main/scala/find-unused.py
import os from re import * def read_file(name): with open(name, 'r') as f: return f.read() usage_regex = compile(r'Module\(\s*new\s+(\w+)') def usages(file_name): """Given a file, find all scala classes it uses""" if not file_name: return set() file = read_file(file_name) objects =...
Add script for finding unused files
Add script for finding unused files
Python
mit
martinhath/bnn
Add script for finding unused files
import os from re import * def read_file(name): with open(name, 'r') as f: return f.read() usage_regex = compile(r'Module\(\s*new\s+(\w+)') def usages(file_name): """Given a file, find all scala classes it uses""" if not file_name: return set() file = read_file(file_name) objects =...
<commit_before><commit_msg>Add script for finding unused files<commit_after>
import os from re import * def read_file(name): with open(name, 'r') as f: return f.read() usage_regex = compile(r'Module\(\s*new\s+(\w+)') def usages(file_name): """Given a file, find all scala classes it uses""" if not file_name: return set() file = read_file(file_name) objects =...
Add script for finding unused filesimport os from re import * def read_file(name): with open(name, 'r') as f: return f.read() usage_regex = compile(r'Module\(\s*new\s+(\w+)') def usages(file_name): """Given a file, find all scala classes it uses""" if not file_name: return set() file =...
<commit_before><commit_msg>Add script for finding unused files<commit_after>import os from re import * def read_file(name): with open(name, 'r') as f: return f.read() usage_regex = compile(r'Module\(\s*new\s+(\w+)') def usages(file_name): """Given a file, find all scala classes it uses""" if not f...
6a9ef33a996b40ca67b5b1d894c90396a8e5b158
busbus/provider/lawrenceks.py
busbus/provider/lawrenceks.py
from busbus.provider import ProviderBase from busbus.provider.gtfs import GTFSMixin class LawrenceTransitProvider(GTFSMixin, ProviderBase): gtfs_url = ("http://lawrenceks.org/assets/gis/google-transit/" "google_transit.zip") def __init__(self, engine=None): super(LawrenceTransitProvid...
Add Lawrence Transit (KS) GTFS provider
Add Lawrence Transit (KS) GTFS provider
Python
mit
spaceboats/busbus
Add Lawrence Transit (KS) GTFS provider
from busbus.provider import ProviderBase from busbus.provider.gtfs import GTFSMixin class LawrenceTransitProvider(GTFSMixin, ProviderBase): gtfs_url = ("http://lawrenceks.org/assets/gis/google-transit/" "google_transit.zip") def __init__(self, engine=None): super(LawrenceTransitProvid...
<commit_before><commit_msg>Add Lawrence Transit (KS) GTFS provider<commit_after>
from busbus.provider import ProviderBase from busbus.provider.gtfs import GTFSMixin class LawrenceTransitProvider(GTFSMixin, ProviderBase): gtfs_url = ("http://lawrenceks.org/assets/gis/google-transit/" "google_transit.zip") def __init__(self, engine=None): super(LawrenceTransitProvid...
Add Lawrence Transit (KS) GTFS providerfrom busbus.provider import ProviderBase from busbus.provider.gtfs import GTFSMixin class LawrenceTransitProvider(GTFSMixin, ProviderBase): gtfs_url = ("http://lawrenceks.org/assets/gis/google-transit/" "google_transit.zip") def __init__(self, engine=Non...
<commit_before><commit_msg>Add Lawrence Transit (KS) GTFS provider<commit_after>from busbus.provider import ProviderBase from busbus.provider.gtfs import GTFSMixin class LawrenceTransitProvider(GTFSMixin, ProviderBase): gtfs_url = ("http://lawrenceks.org/assets/gis/google-transit/" "google_transit...
61b1410af66bbdbdc3ac2bb222b43a2aebc9beb8
CodeFights/magicalWell.py
CodeFights/magicalWell.py
#!/usr/local/bin/python # Code Fights Growing Plant Problem def magicalWell(a, b, n): return sum([x * y for (x, y) in zip(range(a, a + n), range(b, b + n))]) def main(): tests = [ [1, 2, 2, 8], [1, 1, 1, 1], [6, 5, 3, 128] ] for t in tests: res = magicalWell(t[0], t[...
Solve Code Fights magical well problem
Solve Code Fights magical well problem
Python
mit
HKuz/Test_Code
Solve Code Fights magical well problem
#!/usr/local/bin/python # Code Fights Growing Plant Problem def magicalWell(a, b, n): return sum([x * y for (x, y) in zip(range(a, a + n), range(b, b + n))]) def main(): tests = [ [1, 2, 2, 8], [1, 1, 1, 1], [6, 5, 3, 128] ] for t in tests: res = magicalWell(t[0], t[...
<commit_before><commit_msg>Solve Code Fights magical well problem<commit_after>
#!/usr/local/bin/python # Code Fights Growing Plant Problem def magicalWell(a, b, n): return sum([x * y for (x, y) in zip(range(a, a + n), range(b, b + n))]) def main(): tests = [ [1, 2, 2, 8], [1, 1, 1, 1], [6, 5, 3, 128] ] for t in tests: res = magicalWell(t[0], t[...
Solve Code Fights magical well problem#!/usr/local/bin/python # Code Fights Growing Plant Problem def magicalWell(a, b, n): return sum([x * y for (x, y) in zip(range(a, a + n), range(b, b + n))]) def main(): tests = [ [1, 2, 2, 8], [1, 1, 1, 1], [6, 5, 3, 128] ] for t in tes...
<commit_before><commit_msg>Solve Code Fights magical well problem<commit_after>#!/usr/local/bin/python # Code Fights Growing Plant Problem def magicalWell(a, b, n): return sum([x * y for (x, y) in zip(range(a, a + n), range(b, b + n))]) def main(): tests = [ [1, 2, 2, 8], [1, 1, 1, 1], ...
450a670635d676005e598ae3a3d96eb5d80756af
leetcode/algorithms/edit-distance/solution.py
leetcode/algorithms/edit-distance/solution.py
#!/usr/bin/env python class Solution(object): def minDistance(self, a, b): """ Returns the edit distance between strings a and b. """ n = len(a) m = len(b) # If either string is empty, we need to add all characters from other # string. if n == 0 or ...
Implement Edit Distance in Python
Implement Edit Distance in Python
Python
mit
andreimaximov/algorithms,andreimaximov/algorithms,andreimaximov/algorithms,andreimaximov/algorithms
Implement Edit Distance in Python
#!/usr/bin/env python class Solution(object): def minDistance(self, a, b): """ Returns the edit distance between strings a and b. """ n = len(a) m = len(b) # If either string is empty, we need to add all characters from other # string. if n == 0 or ...
<commit_before><commit_msg>Implement Edit Distance in Python<commit_after>
#!/usr/bin/env python class Solution(object): def minDistance(self, a, b): """ Returns the edit distance between strings a and b. """ n = len(a) m = len(b) # If either string is empty, we need to add all characters from other # string. if n == 0 or ...
Implement Edit Distance in Python#!/usr/bin/env python class Solution(object): def minDistance(self, a, b): """ Returns the edit distance between strings a and b. """ n = len(a) m = len(b) # If either string is empty, we need to add all characters from other ...
<commit_before><commit_msg>Implement Edit Distance in Python<commit_after>#!/usr/bin/env python class Solution(object): def minDistance(self, a, b): """ Returns the edit distance between strings a and b. """ n = len(a) m = len(b) # If either string is empty, we nee...
129179d17e1ce1f866a57ef73a641abb9caccb03
dash-indexer.py
dash-indexer.py
#!/usr/bin/env python3 import argparse from collections import defaultdict from itertools import count from ts import TSPacket from isobmff import SidxBox, SidxReference, StypBox def index_media_segment(media_file_name, template, force, verbose): random_access_points = defaultdict(list) if verbose: pr...
Write initial code to walk through the MPEG-TS file and find byte offsets.
Write initial code to walk through the MPEG-TS file and find byte offsets.
Python
bsd-2-clause
brendanlong/dash-ts-tools,brendanlong/dash-ts-tools
Write initial code to walk through the MPEG-TS file and find byte offsets.
#!/usr/bin/env python3 import argparse from collections import defaultdict from itertools import count from ts import TSPacket from isobmff import SidxBox, SidxReference, StypBox def index_media_segment(media_file_name, template, force, verbose): random_access_points = defaultdict(list) if verbose: pr...
<commit_before><commit_msg>Write initial code to walk through the MPEG-TS file and find byte offsets.<commit_after>
#!/usr/bin/env python3 import argparse from collections import defaultdict from itertools import count from ts import TSPacket from isobmff import SidxBox, SidxReference, StypBox def index_media_segment(media_file_name, template, force, verbose): random_access_points = defaultdict(list) if verbose: pr...
Write initial code to walk through the MPEG-TS file and find byte offsets.#!/usr/bin/env python3 import argparse from collections import defaultdict from itertools import count from ts import TSPacket from isobmff import SidxBox, SidxReference, StypBox def index_media_segment(media_file_name, template, force, verbose...
<commit_before><commit_msg>Write initial code to walk through the MPEG-TS file and find byte offsets.<commit_after>#!/usr/bin/env python3 import argparse from collections import defaultdict from itertools import count from ts import TSPacket from isobmff import SidxBox, SidxReference, StypBox def index_media_segment(...
f98a20977c359189b506f765d6c2493fda7718a9
scripts/tests/off-center-rotation.py
scripts/tests/off-center-rotation.py
from paraview.simple import * import tonic from tonic import paraview as pv dataset_destination_path = '/Users/seb/spherical' # Initial ParaView scene setup Cone(Center=[2,4,8]) Show() view = Render() view.CameraFocalPoint = [2,4,8] view.CameraPosition = [2,4,0] view.CenterOfRotation = [2,4,8] view.CameraViewUp = [0...
Add a test for spherical camera with off center object
test(CenterOfRotation): Add a test for spherical camera with off center object
Python
bsd-3-clause
Kitware/tonic-data-generator,Kitware/tonic-data-generator
test(CenterOfRotation): Add a test for spherical camera with off center object
from paraview.simple import * import tonic from tonic import paraview as pv dataset_destination_path = '/Users/seb/spherical' # Initial ParaView scene setup Cone(Center=[2,4,8]) Show() view = Render() view.CameraFocalPoint = [2,4,8] view.CameraPosition = [2,4,0] view.CenterOfRotation = [2,4,8] view.CameraViewUp = [0...
<commit_before><commit_msg>test(CenterOfRotation): Add a test for spherical camera with off center object<commit_after>
from paraview.simple import * import tonic from tonic import paraview as pv dataset_destination_path = '/Users/seb/spherical' # Initial ParaView scene setup Cone(Center=[2,4,8]) Show() view = Render() view.CameraFocalPoint = [2,4,8] view.CameraPosition = [2,4,0] view.CenterOfRotation = [2,4,8] view.CameraViewUp = [0...
test(CenterOfRotation): Add a test for spherical camera with off center objectfrom paraview.simple import * import tonic from tonic import paraview as pv dataset_destination_path = '/Users/seb/spherical' # Initial ParaView scene setup Cone(Center=[2,4,8]) Show() view = Render() view.CameraFocalPoint = [2,4,8] view.C...
<commit_before><commit_msg>test(CenterOfRotation): Add a test for spherical camera with off center object<commit_after>from paraview.simple import * import tonic from tonic import paraview as pv dataset_destination_path = '/Users/seb/spherical' # Initial ParaView scene setup Cone(Center=[2,4,8]) Show() view = Render...
d752c73ec278eb36005dfe5ca62596e111970614
test/integration/ggrc/services/test_custom_attributes.py
test/integration/ggrc/services/test_custom_attributes.py
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for PUT and POST requests for objects with custom attributes These tests include: - Creating an object with custom attributes (POST request). - Editing existing custom attributes on an object. - Ad...
Add tests for new CA post api
Add tests for new CA post api
Python
apache-2.0
josthkko/ggrc-core,kr41/ggrc-core,josthkko/ggrc-core,edofic/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,josthkko/ggrc-core,kr41/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,plamut/ggrc-core,VinnieJohns...
Add tests for new CA post api
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for PUT and POST requests for objects with custom attributes These tests include: - Creating an object with custom attributes (POST request). - Editing existing custom attributes on an object. - Ad...
<commit_before><commit_msg>Add tests for new CA post api<commit_after>
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for PUT and POST requests for objects with custom attributes These tests include: - Creating an object with custom attributes (POST request). - Editing existing custom attributes on an object. - Ad...
Add tests for new CA post api# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for PUT and POST requests for objects with custom attributes These tests include: - Creating an object with custom attributes (POST request). - Editing existing custom ...
<commit_before><commit_msg>Add tests for new CA post api<commit_after># Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for PUT and POST requests for objects with custom attributes These tests include: - Creating an object with custom attributes (...
c9b21c0076ee00364a7bc94f44671612402211f0
crt_sh.py
crt_sh.py
import urllib import requests from bs4 import BeautifulSoup def req_crtsh(search_string): subdomain_list = [] base_url = "https://crt.sh/?q=%25." + search_string print("[+] Requesting URL %s" % base_url) r = requests.get(url=base_url, headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40...
Add subdomain check using crt.sh
Add subdomain check using crt.sh * Removes wildcard * Gets all ssl certs for possible subdomains
Python
unlicense
nethunteros/punter
Add subdomain check using crt.sh * Removes wildcard * Gets all ssl certs for possible subdomains
import urllib import requests from bs4 import BeautifulSoup def req_crtsh(search_string): subdomain_list = [] base_url = "https://crt.sh/?q=%25." + search_string print("[+] Requesting URL %s" % base_url) r = requests.get(url=base_url, headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40...
<commit_before><commit_msg>Add subdomain check using crt.sh * Removes wildcard * Gets all ssl certs for possible subdomains<commit_after>
import urllib import requests from bs4 import BeautifulSoup def req_crtsh(search_string): subdomain_list = [] base_url = "https://crt.sh/?q=%25." + search_string print("[+] Requesting URL %s" % base_url) r = requests.get(url=base_url, headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40...
Add subdomain check using crt.sh * Removes wildcard * Gets all ssl certs for possible subdomainsimport urllib import requests from bs4 import BeautifulSoup def req_crtsh(search_string): subdomain_list = [] base_url = "https://crt.sh/?q=%25." + search_string print("[+] Requesting URL %s" % base_url) ...
<commit_before><commit_msg>Add subdomain check using crt.sh * Removes wildcard * Gets all ssl certs for possible subdomains<commit_after>import urllib import requests from bs4 import BeautifulSoup def req_crtsh(search_string): subdomain_list = [] base_url = "https://crt.sh/?q=%25." + search_string prin...
c0cebba170b8e3ea5e62e335536cf974bbbf08ec
zun/tests/unit/objects/test_fields.py
zun/tests/unit/objects/test_fields.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Add tests for custom object fields
Add tests for custom object fields Change-Id: Ie2534fa1297f5260257bd5fc063af0629115a51f
Python
apache-2.0
kevin-zhaoshuai/zun,kevin-zhaoshuai/zun,kevin-zhaoshuai/zun
Add tests for custom object fields Change-Id: Ie2534fa1297f5260257bd5fc063af0629115a51f
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before><commit_msg>Add tests for custom object fields Change-Id: Ie2534fa1297f5260257bd5fc063af0629115a51f<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Add tests for custom object fields Change-Id: Ie2534fa1297f5260257bd5fc063af0629115a51f# 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/LICEN...
<commit_before><commit_msg>Add tests for custom object fields Change-Id: Ie2534fa1297f5260257bd5fc063af0629115a51f<commit_after># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
0cccff9b6a72b61a1b6cdfeb3ed5be525e74b822
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup __about__ = {} with open("nacl/__about__.py") as fp: exec(fp.read(), None, __about__) try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_modules = [nacl.n...
#!/usr/bin/env python from setuptools import setup __about__ = {} with open("nacl/__about__.py") as fp: exec(fp.read(), None, __about__) try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_modules = [nacl.n...
Remove old and uneeded test dependencies
Remove old and uneeded test dependencies
Python
apache-2.0
dstufft/pynacl,xueyumusic/pynacl,dstufft/pynacl,pyca/pynacl,lmctv/pynacl,scholarly/pynacl,dstufft/pynacl,alex/pynacl,Insoleet/cutecoin,xueyumusic/pynacl,JackWink/pynacl,reaperhulk/pynacl,lmctv/pynacl,scholarly/pynacl,xueyumusic/pynacl,hoffmabc/pynacl,JackWink/pynacl,ucoin-io/cutecoin,lmctv/pynacl,JackWink/pynacl,xueyum...
#!/usr/bin/env python from setuptools import setup __about__ = {} with open("nacl/__about__.py") as fp: exec(fp.read(), None, __about__) try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_modules = [nacl.n...
#!/usr/bin/env python from setuptools import setup __about__ = {} with open("nacl/__about__.py") as fp: exec(fp.read(), None, __about__) try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_modules = [nacl.n...
<commit_before>#!/usr/bin/env python from setuptools import setup __about__ = {} with open("nacl/__about__.py") as fp: exec(fp.read(), None, __about__) try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_mo...
#!/usr/bin/env python from setuptools import setup __about__ = {} with open("nacl/__about__.py") as fp: exec(fp.read(), None, __about__) try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_modules = [nacl.n...
#!/usr/bin/env python from setuptools import setup __about__ = {} with open("nacl/__about__.py") as fp: exec(fp.read(), None, __about__) try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_modules = [nacl.n...
<commit_before>#!/usr/bin/env python from setuptools import setup __about__ = {} with open("nacl/__about__.py") as fp: exec(fp.read(), None, __about__) try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_mo...
ae283eb36026dfe092c6f69d310055f8e373d953
setup.py
setup.py
# -*- coding: utf-8 -*- """installer script for pywikibot 2.0 framework""" # # (C) Pywikipedia team, 2009-2012 # __version__ = '$Id$' # # Distributed under the terms of the MIT license. # import sys from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages if sys.versi...
# -*- coding: utf-8 -*- """installer script for pywikibot 2.0 framework""" # # (C) Pywikipedia team, 2009-2012 # __version__ = '$Id$' # # Distributed under the terms of the MIT license. # import sys from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages if sys.versi...
Add simplejson as a required module
Add simplejson as a required module https://mediawiki.org/wiki/Special:Code/pywikipedia/11666
Python
mit
smalyshev/pywikibot-core,xZise/pywikibot-core,TridevGuha/pywikibot-core,wikimedia/pywikibot-core,happy5214/pywikibot-core,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,h4ck3rm1k3/pywikibot-core,magul/pywikibot-core,hasteur/g13bot_tools_new,trishnaguha/pywikibot-core,h4ck3rm1k3/pywikibot-core,npdoty/pywikibot,magul/...
# -*- coding: utf-8 -*- """installer script for pywikibot 2.0 framework""" # # (C) Pywikipedia team, 2009-2012 # __version__ = '$Id$' # # Distributed under the terms of the MIT license. # import sys from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages if sys.versi...
# -*- coding: utf-8 -*- """installer script for pywikibot 2.0 framework""" # # (C) Pywikipedia team, 2009-2012 # __version__ = '$Id$' # # Distributed under the terms of the MIT license. # import sys from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages if sys.versi...
<commit_before># -*- coding: utf-8 -*- """installer script for pywikibot 2.0 framework""" # # (C) Pywikipedia team, 2009-2012 # __version__ = '$Id$' # # Distributed under the terms of the MIT license. # import sys from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_package...
# -*- coding: utf-8 -*- """installer script for pywikibot 2.0 framework""" # # (C) Pywikipedia team, 2009-2012 # __version__ = '$Id$' # # Distributed under the terms of the MIT license. # import sys from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages if sys.versi...
# -*- coding: utf-8 -*- """installer script for pywikibot 2.0 framework""" # # (C) Pywikipedia team, 2009-2012 # __version__ = '$Id$' # # Distributed under the terms of the MIT license. # import sys from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages if sys.versi...
<commit_before># -*- coding: utf-8 -*- """installer script for pywikibot 2.0 framework""" # # (C) Pywikipedia team, 2009-2012 # __version__ = '$Id$' # # Distributed under the terms of the MIT license. # import sys from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_package...
0ea6f45792a3e1ce321f774a8582171fe4d39ad0
demo/python-overview/intro.py
demo/python-overview/intro.py
# Hello world print('Hello, world!') # Indentation is important in Python! x = 1 if x == 1: print('x is 1') # Numbers and Strings my_int = 8 print(my_int) my_float = 1.4 print(my_float) a, b, c = 1, 2, 3 print(a, b, c) my_string = 'hello' print(my_string) my_string = "hello" print(my_string) # Operators ...
Add basic python for notes
Add basic python for notes
Python
mit
HackBinghamton/club,HackBinghamton/club,HackBinghamton/club
Add basic python for notes
# Hello world print('Hello, world!') # Indentation is important in Python! x = 1 if x == 1: print('x is 1') # Numbers and Strings my_int = 8 print(my_int) my_float = 1.4 print(my_float) a, b, c = 1, 2, 3 print(a, b, c) my_string = 'hello' print(my_string) my_string = "hello" print(my_string) # Operators ...
<commit_before><commit_msg>Add basic python for notes<commit_after>
# Hello world print('Hello, world!') # Indentation is important in Python! x = 1 if x == 1: print('x is 1') # Numbers and Strings my_int = 8 print(my_int) my_float = 1.4 print(my_float) a, b, c = 1, 2, 3 print(a, b, c) my_string = 'hello' print(my_string) my_string = "hello" print(my_string) # Operators ...
Add basic python for notes# Hello world print('Hello, world!') # Indentation is important in Python! x = 1 if x == 1: print('x is 1') # Numbers and Strings my_int = 8 print(my_int) my_float = 1.4 print(my_float) a, b, c = 1, 2, 3 print(a, b, c) my_string = 'hello' print(my_string) my_string = "hello" print...
<commit_before><commit_msg>Add basic python for notes<commit_after># Hello world print('Hello, world!') # Indentation is important in Python! x = 1 if x == 1: print('x is 1') # Numbers and Strings my_int = 8 print(my_int) my_float = 1.4 print(my_float) a, b, c = 1, 2, 3 print(a, b, c) my_string = 'hello' pr...
0241bbc9b370545d7d1270fa391fd9347b9c39a6
test/os_linux_ubuntu.py
test/os_linux_ubuntu.py
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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 ...
Add basic unit tests for Ubuntu specific platform
Add basic unit tests for Ubuntu specific platform
Python
apache-2.0
mtmtech/mbed-ls,jupe/mbed-ls,mazimkhan/mbed-ls,jjones646/mbed-ls,jupe/mbed-ls,jjones646/mbed-ls,mtmtech/mbed-ls,mazimkhan/mbed-ls
Add basic unit tests for Ubuntu specific platform
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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 ...
<commit_before><commit_msg>Add basic unit tests for Ubuntu specific platform<commit_after>
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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 ...
Add basic unit tests for Ubuntu specific platform#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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/lic...
<commit_before><commit_msg>Add basic unit tests for Ubuntu specific platform<commit_after>#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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 ...
b2479b41672b0fafaabd42dc3dde56328f77ab0b
tests/test_addresses.py
tests/test_addresses.py
import json import random import pytest from zephyrus.addresses import Participants from zephyrus.exceptions import ImproperlyConfigured @pytest.fixture(scope='session') def config_json(): return { "simulation": "tcp://127.0.0.1:7000", "strategy": "tcp://127.0.0.1:5000", "tester": "tcp://127.0...
Add tests to addresses module
Add tests to addresses module
Python
mit
wairton/zephyrus-mas
Add tests to addresses module
import json import random import pytest from zephyrus.addresses import Participants from zephyrus.exceptions import ImproperlyConfigured @pytest.fixture(scope='session') def config_json(): return { "simulation": "tcp://127.0.0.1:7000", "strategy": "tcp://127.0.0.1:5000", "tester": "tcp://127.0...
<commit_before><commit_msg>Add tests to addresses module<commit_after>
import json import random import pytest from zephyrus.addresses import Participants from zephyrus.exceptions import ImproperlyConfigured @pytest.fixture(scope='session') def config_json(): return { "simulation": "tcp://127.0.0.1:7000", "strategy": "tcp://127.0.0.1:5000", "tester": "tcp://127.0...
Add tests to addresses moduleimport json import random import pytest from zephyrus.addresses import Participants from zephyrus.exceptions import ImproperlyConfigured @pytest.fixture(scope='session') def config_json(): return { "simulation": "tcp://127.0.0.1:7000", "strategy": "tcp://127.0.0.1:5000",...
<commit_before><commit_msg>Add tests to addresses module<commit_after>import json import random import pytest from zephyrus.addresses import Participants from zephyrus.exceptions import ImproperlyConfigured @pytest.fixture(scope='session') def config_json(): return { "simulation": "tcp://127.0.0.1:7000", ...
f290736a1b5c8dd4616462d97fdf7809d78604ad
tests/test_lotka_volterra.py
tests/test_lotka_volterra.py
#! /usr/bin/env python from nose.tools import assert_equal, assert_almost_equal, assert_true from numpy.testing import assert_array_equal import os import tables import numpy as np from tools import check_cmd from helper import table_exist, find_ids, exit_times def test_minimal_cycle(): """Tests simulations with ...
Add a test file for Lotka-Volterra simulation.
Add a test file for Lotka-Volterra simulation.
Python
bsd-3-clause
Baaaaam/cyclus,gidden/cyclus,Baaaaam/cyclus,gidden/cyclus,hodger/cyclus,hodger/cyclus,mbmcgarry/cyclus,gidden/cyclus,hodger/cyclus,Baaaaam/cyclus,mbmcgarry/cyclus,gidden/cyclus,mbmcgarry/cyclus,hodger/cyclus,hodger/cyclus,rwcarlsen/cyclus,rwcarlsen/cyclus,mbmcgarry/cyclus,rwcarlsen/cyclus,rwcarlsen/cyclus
Add a test file for Lotka-Volterra simulation.
#! /usr/bin/env python from nose.tools import assert_equal, assert_almost_equal, assert_true from numpy.testing import assert_array_equal import os import tables import numpy as np from tools import check_cmd from helper import table_exist, find_ids, exit_times def test_minimal_cycle(): """Tests simulations with ...
<commit_before><commit_msg>Add a test file for Lotka-Volterra simulation.<commit_after>
#! /usr/bin/env python from nose.tools import assert_equal, assert_almost_equal, assert_true from numpy.testing import assert_array_equal import os import tables import numpy as np from tools import check_cmd from helper import table_exist, find_ids, exit_times def test_minimal_cycle(): """Tests simulations with ...
Add a test file for Lotka-Volterra simulation.#! /usr/bin/env python from nose.tools import assert_equal, assert_almost_equal, assert_true from numpy.testing import assert_array_equal import os import tables import numpy as np from tools import check_cmd from helper import table_exist, find_ids, exit_times def test_m...
<commit_before><commit_msg>Add a test file for Lotka-Volterra simulation.<commit_after>#! /usr/bin/env python from nose.tools import assert_equal, assert_almost_equal, assert_true from numpy.testing import assert_array_equal import os import tables import numpy as np from tools import check_cmd from helper import tabl...
cc9f7d0715d104868684d9213c1ca84f7b75aadb
tests/fileformats/test_linereader.py
tests/fileformats/test_linereader.py
import glob from mrs.fileformats import LineReader import sys try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO PY3 = sys.version_info[0] == 3 def test_dickens(): with open('tests/data/dickens/split1.txt', 'rb') as f: reader = LineReader(f) lines =...
Add some tests for the LineReader class
Add some tests for the LineReader class
Python
apache-2.0
kseppi/mrs-mapreduce,byu-aml-lab/mrs-mapreduce
Add some tests for the LineReader class
import glob from mrs.fileformats import LineReader import sys try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO PY3 = sys.version_info[0] == 3 def test_dickens(): with open('tests/data/dickens/split1.txt', 'rb') as f: reader = LineReader(f) lines =...
<commit_before><commit_msg>Add some tests for the LineReader class<commit_after>
import glob from mrs.fileformats import LineReader import sys try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO PY3 = sys.version_info[0] == 3 def test_dickens(): with open('tests/data/dickens/split1.txt', 'rb') as f: reader = LineReader(f) lines =...
Add some tests for the LineReader classimport glob from mrs.fileformats import LineReader import sys try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO PY3 = sys.version_info[0] == 3 def test_dickens(): with open('tests/data/dickens/split1.txt', 'rb') as f: ...
<commit_before><commit_msg>Add some tests for the LineReader class<commit_after>import glob from mrs.fileformats import LineReader import sys try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO PY3 = sys.version_info[0] == 3 def test_dickens(): with open('tests/data...
9621789c86743f6f75096760827d7c4458973f1a
tests/web/test_web_visual_testing.py
tests/web/test_web_visual_testing.py
# -*- coding: utf-8 -*- u""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. 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/lic...
Add an example test with visual testing asserts
Add an example test with visual testing asserts
Python
apache-2.0
Telefonica/toolium-examples
Add an example test with visual testing asserts
# -*- coding: utf-8 -*- u""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. 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/lic...
<commit_before><commit_msg>Add an example test with visual testing asserts<commit_after>
# -*- coding: utf-8 -*- u""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. 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/lic...
Add an example test with visual testing asserts# -*- coding: utf-8 -*- u""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. 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 o...
<commit_before><commit_msg>Add an example test with visual testing asserts<commit_after># -*- coding: utf-8 -*- u""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance ...
7bd561d72fc79927ed8960f2528af671b0fc45c8
gwtsa/imports/import_series.py
gwtsa/imports/import_series.py
# -*- coding: utf-8 -*- """ Created on Tue May 10 11:33:13 2016 @author: ruben """ from gwtsa.imports.dinodata import DinoGrondwaterstand from gwtsa.imports.knmidata import KnmiStation from pyproj import Proj, transform class ImportSeries: def __init__(self, fname, filetype, variable = None): if filetype=...
Add import file from Ruben
Add import file from Ruben
Python
mit
pastas/pasta,gwtsa/gwtsa,pastas/pastas
Add import file from Ruben
# -*- coding: utf-8 -*- """ Created on Tue May 10 11:33:13 2016 @author: ruben """ from gwtsa.imports.dinodata import DinoGrondwaterstand from gwtsa.imports.knmidata import KnmiStation from pyproj import Proj, transform class ImportSeries: def __init__(self, fname, filetype, variable = None): if filetype=...
<commit_before><commit_msg>Add import file from Ruben<commit_after>
# -*- coding: utf-8 -*- """ Created on Tue May 10 11:33:13 2016 @author: ruben """ from gwtsa.imports.dinodata import DinoGrondwaterstand from gwtsa.imports.knmidata import KnmiStation from pyproj import Proj, transform class ImportSeries: def __init__(self, fname, filetype, variable = None): if filetype=...
Add import file from Ruben# -*- coding: utf-8 -*- """ Created on Tue May 10 11:33:13 2016 @author: ruben """ from gwtsa.imports.dinodata import DinoGrondwaterstand from gwtsa.imports.knmidata import KnmiStation from pyproj import Proj, transform class ImportSeries: def __init__(self, fname, filetype, variable = N...
<commit_before><commit_msg>Add import file from Ruben<commit_after># -*- coding: utf-8 -*- """ Created on Tue May 10 11:33:13 2016 @author: ruben """ from gwtsa.imports.dinodata import DinoGrondwaterstand from gwtsa.imports.knmidata import KnmiStation from pyproj import Proj, transform class ImportSeries: def __i...
10dfd1ca4ab8e3bd7956c60a98abb31d3fb58405
tests/test_multi_open_file.py
tests/test_multi_open_file.py
import nose import angr import os import logging l = logging.getLogger("angr_tests") test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_test_file_struct_funcs(): test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/test_multi_open_file") b = angr.Project(test_bin) pg...
Test for opening same file multiple times
Test for opening same file multiple times
Python
bsd-2-clause
f-prettyland/angr,axt/angr,angr/angr,axt/angr,iamahuman/angr,schieb/angr,iamahuman/angr,tyb0807/angr,schieb/angr,schieb/angr,f-prettyland/angr,chubbymaggie/angr,angr/angr,angr/angr,tyb0807/angr,axt/angr,tyb0807/angr,f-prettyland/angr,iamahuman/angr,chubbymaggie/angr,chubbymaggie/angr
Test for opening same file multiple times
import nose import angr import os import logging l = logging.getLogger("angr_tests") test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_test_file_struct_funcs(): test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/test_multi_open_file") b = angr.Project(test_bin) pg...
<commit_before><commit_msg>Test for opening same file multiple times<commit_after>
import nose import angr import os import logging l = logging.getLogger("angr_tests") test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_test_file_struct_funcs(): test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/test_multi_open_file") b = angr.Project(test_bin) pg...
Test for opening same file multiple timesimport nose import angr import os import logging l = logging.getLogger("angr_tests") test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_test_file_struct_funcs(): test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/test_multi_open_file...
<commit_before><commit_msg>Test for opening same file multiple times<commit_after>import nose import angr import os import logging l = logging.getLogger("angr_tests") test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_test_file_struct_funcs(): test_bin = os.path.join(test_location, "../../b...
e869407e1b8c9a7e8d3d1ad1578bb83541dd7ffa
tests/test_07_client_clone.py
tests/test_07_client_clone.py
"""Test :meth:`icat.client.Client.clone`. """ from __future__ import print_function import pytest import icat import icat.config from conftest import getConfig def test_clone_minimal(setupicat): """Clone a simple client. Not logged in, no ids. """ client, conf = getConfig(ids=False) clone = client.c...
Add a test for Client.clone().
Add a test for Client.clone().
Python
apache-2.0
icatproject/python-icat
Add a test for Client.clone().
"""Test :meth:`icat.client.Client.clone`. """ from __future__ import print_function import pytest import icat import icat.config from conftest import getConfig def test_clone_minimal(setupicat): """Clone a simple client. Not logged in, no ids. """ client, conf = getConfig(ids=False) clone = client.c...
<commit_before><commit_msg>Add a test for Client.clone().<commit_after>
"""Test :meth:`icat.client.Client.clone`. """ from __future__ import print_function import pytest import icat import icat.config from conftest import getConfig def test_clone_minimal(setupicat): """Clone a simple client. Not logged in, no ids. """ client, conf = getConfig(ids=False) clone = client.c...
Add a test for Client.clone()."""Test :meth:`icat.client.Client.clone`. """ from __future__ import print_function import pytest import icat import icat.config from conftest import getConfig def test_clone_minimal(setupicat): """Clone a simple client. Not logged in, no ids. """ client, conf = getConfig(i...
<commit_before><commit_msg>Add a test for Client.clone().<commit_after>"""Test :meth:`icat.client.Client.clone`. """ from __future__ import print_function import pytest import icat import icat.config from conftest import getConfig def test_clone_minimal(setupicat): """Clone a simple client. Not logged in, no id...
3c4c0ed8c5b3e6b64e360d6c9a2ef6937a0a5269
source/tyr/tests/integration/endpoints_test.py
source/tyr/tests/integration/endpoints_test.py
# coding: utf-8 # Copyright (c) 2001-2019, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public transport: # a non ending quest to...
Add tests for '/' and '/status'
Add tests for '/' and '/status'
Python
agpl-3.0
pbougue/navitia,kinnou02/navitia,CanalTP/navitia,xlqian/navitia,pbougue/navitia,CanalTP/navitia,Tisseo/navitia,xlqian/navitia,CanalTP/navitia,CanalTP/navitia,Tisseo/navitia,kinnou02/navitia,xlqian/navitia,Tisseo/navitia,xlqian/navitia,pbougue/navitia,pbougue/navitia,CanalTP/navitia,kinnou02/navitia,Tisseo/navitia,Tisse...
Add tests for '/' and '/status'
# coding: utf-8 # Copyright (c) 2001-2019, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public transport: # a non ending quest to...
<commit_before><commit_msg>Add tests for '/' and '/status'<commit_after>
# coding: utf-8 # Copyright (c) 2001-2019, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public transport: # a non ending quest to...
Add tests for '/' and '/status'# coding: utf-8 # Copyright (c) 2001-2019, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public transpo...
<commit_before><commit_msg>Add tests for '/' and '/status'<commit_after># coding: utf-8 # Copyright (c) 2001-2019, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # powered by Canal TP (www.canaltp.fr). # Help us ...
daca76320aa72d03a1372139be234d03ccf8641b
sklearn/utils/ransac.py
sklearn/utils/ransac.py
import numpy as np def ransac(X, y, estimator_cls, min_samples, residual_threshold, is_data_valid=None, is_model_valid=None, max_trials=100, stop_n_inliers=np.inf, stop_score=1, estimator_kwargs={}): """Fit a model to data with the RANSAC (random sample consensus) algorithm. """ be...
Add implementation of RANSAC algorithm
Add implementation of RANSAC algorithm
Python
bsd-3-clause
Garrett-R/scikit-learn,nesterione/scikit-learn,procoder317/scikit-learn,rishikksh20/scikit-learn,Myasuka/scikit-learn,evgchz/scikit-learn,mugizico/scikit-learn,AlexanderFabisch/scikit-learn,Windy-Ground/scikit-learn,Barmaley-exe/scikit-learn,kjung/scikit-learn,yanlend/scikit-learn,nhejazi/scikit-learn,treycausey/scikit...
Add implementation of RANSAC algorithm
import numpy as np def ransac(X, y, estimator_cls, min_samples, residual_threshold, is_data_valid=None, is_model_valid=None, max_trials=100, stop_n_inliers=np.inf, stop_score=1, estimator_kwargs={}): """Fit a model to data with the RANSAC (random sample consensus) algorithm. """ be...
<commit_before><commit_msg>Add implementation of RANSAC algorithm<commit_after>
import numpy as np def ransac(X, y, estimator_cls, min_samples, residual_threshold, is_data_valid=None, is_model_valid=None, max_trials=100, stop_n_inliers=np.inf, stop_score=1, estimator_kwargs={}): """Fit a model to data with the RANSAC (random sample consensus) algorithm. """ be...
Add implementation of RANSAC algorithmimport numpy as np def ransac(X, y, estimator_cls, min_samples, residual_threshold, is_data_valid=None, is_model_valid=None, max_trials=100, stop_n_inliers=np.inf, stop_score=1, estimator_kwargs={}): """Fit a model to data with the RANSAC (random sample ...
<commit_before><commit_msg>Add implementation of RANSAC algorithm<commit_after>import numpy as np def ransac(X, y, estimator_cls, min_samples, residual_threshold, is_data_valid=None, is_model_valid=None, max_trials=100, stop_n_inliers=np.inf, stop_score=1, estimator_kwargs={}): """Fit a mode...
a038337824d88a01293711483390e67a2c969df0
catapult_base/__init__.py
catapult_base/__init__.py
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # All files in this directory should be moved to catapult/base/ after moving # to the new repo.
Add catapult_base folder to tools/telemetry to make the refactor easier.
Add catapult_base folder to tools/telemetry to make the refactor easier. This will make some of the refactoring more obvious and easy to review, as well as making the needed reafctoring after moving to the catapult repo easier. BUG=473414 Review URL: https://codereview.chromium.org/1168263002 Cr-Commit-Position: 97...
Python
bsd-3-clause
catapult-project/catapult,sahiljain/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,sahiljain/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,benschmaus/catapult,catapult-pr...
Add catapult_base folder to tools/telemetry to make the refactor easier. This will make some of the refactoring more obvious and easy to review, as well as making the needed reafctoring after moving to the catapult repo easier. BUG=473414 Review URL: https://codereview.chromium.org/1168263002 Cr-Commit-Position: 97...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # All files in this directory should be moved to catapult/base/ after moving # to the new repo.
<commit_before><commit_msg>Add catapult_base folder to tools/telemetry to make the refactor easier. This will make some of the refactoring more obvious and easy to review, as well as making the needed reafctoring after moving to the catapult repo easier. BUG=473414 Review URL: https://codereview.chromium.org/1168263...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # All files in this directory should be moved to catapult/base/ after moving # to the new repo.
Add catapult_base folder to tools/telemetry to make the refactor easier. This will make some of the refactoring more obvious and easy to review, as well as making the needed reafctoring after moving to the catapult repo easier. BUG=473414 Review URL: https://codereview.chromium.org/1168263002 Cr-Commit-Position: 97...
<commit_before><commit_msg>Add catapult_base folder to tools/telemetry to make the refactor easier. This will make some of the refactoring more obvious and easy to review, as well as making the needed reafctoring after moving to the catapult repo easier. BUG=473414 Review URL: https://codereview.chromium.org/1168263...
a8c97f609f2477ddc59cd0ec0f1eb7e3604468f4
product_feed.py
product_feed.py
products = [ 'AN4EF3', 'AE93CR', 'A9Q4MK', 'AC97HP', 'AK967J', 'AB2S93', 'AB2JT9', 'AN67HP', 'AK54VQ', 'AD53ZH']
Add products for product feed task
Add products for product feed task
Python
mit
coolshop-com/coolshop-application-assignment
Add products for product feed task
products = [ 'AN4EF3', 'AE93CR', 'A9Q4MK', 'AC97HP', 'AK967J', 'AB2S93', 'AB2JT9', 'AN67HP', 'AK54VQ', 'AD53ZH']
<commit_before><commit_msg>Add products for product feed task<commit_after>
products = [ 'AN4EF3', 'AE93CR', 'A9Q4MK', 'AC97HP', 'AK967J', 'AB2S93', 'AB2JT9', 'AN67HP', 'AK54VQ', 'AD53ZH']
Add products for product feed taskproducts = [ 'AN4EF3', 'AE93CR', 'A9Q4MK', 'AC97HP', 'AK967J', 'AB2S93', 'AB2JT9', 'AN67HP', 'AK54VQ', 'AD53ZH']
<commit_before><commit_msg>Add products for product feed task<commit_after>products = [ 'AN4EF3', 'AE93CR', 'A9Q4MK', 'AC97HP', 'AK967J', 'AB2S93', 'AB2JT9', 'AN67HP', 'AK54VQ', 'AD53ZH']
9ed2cbc57ca9cf370edc72cd2dc345a555e0ea96
CodeFights/findEmailDomain.py
CodeFights/findEmailDomain.py
#!/usr/local/bin/python # Code Fights Find Email Domain Problem def findEmailDomain(address): index = max([i for i, char in enumerate(address) if char == "@"]) return address[index + 1:] def main(): tests = [ ["prettyandsimple@example.com", "example.com"], ["<>[]:,;@\"!#$%&*+-/=?^_{}| ~....
Solve Code Fights find email domain problem
Solve Code Fights find email domain problem
Python
mit
HKuz/Test_Code
Solve Code Fights find email domain problem
#!/usr/local/bin/python # Code Fights Find Email Domain Problem def findEmailDomain(address): index = max([i for i, char in enumerate(address) if char == "@"]) return address[index + 1:] def main(): tests = [ ["prettyandsimple@example.com", "example.com"], ["<>[]:,;@\"!#$%&*+-/=?^_{}| ~....
<commit_before><commit_msg>Solve Code Fights find email domain problem<commit_after>
#!/usr/local/bin/python # Code Fights Find Email Domain Problem def findEmailDomain(address): index = max([i for i, char in enumerate(address) if char == "@"]) return address[index + 1:] def main(): tests = [ ["prettyandsimple@example.com", "example.com"], ["<>[]:,;@\"!#$%&*+-/=?^_{}| ~....
Solve Code Fights find email domain problem#!/usr/local/bin/python # Code Fights Find Email Domain Problem def findEmailDomain(address): index = max([i for i, char in enumerate(address) if char == "@"]) return address[index + 1:] def main(): tests = [ ["prettyandsimple@example.com", "example.com...
<commit_before><commit_msg>Solve Code Fights find email domain problem<commit_after>#!/usr/local/bin/python # Code Fights Find Email Domain Problem def findEmailDomain(address): index = max([i for i, char in enumerate(address) if char == "@"]) return address[index + 1:] def main(): tests = [ ["p...
cc0323b0eacb881ff8c83d14192f7dbf1bcb9419
astrobin/management/commands/migrate_donors_to_premium.py
astrobin/management/commands/migrate_donors_to_premium.py
from django.core.management.base import BaseCommand from datetime import date, timedelta from paypal.standard.ipn import models from subscription.models import Subscription, UserSubscription, Transaction class Command(BaseCommand): def __init__(self): self.premium_subscription = Subscription.objects.get...
Add script to migrate donors to premium
Add script to migrate donors to premium
Python
agpl-3.0
astrobin/astrobin,astrobin/astrobin,astrobin/astrobin,astrobin/astrobin
Add script to migrate donors to premium
from django.core.management.base import BaseCommand from datetime import date, timedelta from paypal.standard.ipn import models from subscription.models import Subscription, UserSubscription, Transaction class Command(BaseCommand): def __init__(self): self.premium_subscription = Subscription.objects.get...
<commit_before><commit_msg>Add script to migrate donors to premium<commit_after>
from django.core.management.base import BaseCommand from datetime import date, timedelta from paypal.standard.ipn import models from subscription.models import Subscription, UserSubscription, Transaction class Command(BaseCommand): def __init__(self): self.premium_subscription = Subscription.objects.get...
Add script to migrate donors to premiumfrom django.core.management.base import BaseCommand from datetime import date, timedelta from paypal.standard.ipn import models from subscription.models import Subscription, UserSubscription, Transaction class Command(BaseCommand): def __init__(self): self.premium_...
<commit_before><commit_msg>Add script to migrate donors to premium<commit_after>from django.core.management.base import BaseCommand from datetime import date, timedelta from paypal.standard.ipn import models from subscription.models import Subscription, UserSubscription, Transaction class Command(BaseCommand): ...
3e785db34bad58aa1300f66f05f4acad8d7b34c3
interactive_crop.py
interactive_crop.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import click from PIL import Image from utils import get_file_list @click.command() @click.argument('path', type=click.Path(exists=True)) @click.option('--x', type=click.INT, prompt=True) @click.option('--y', type=click.INT, prompt=True) @click.option('--w', type=click.I...
Add interactive version of crop script
Add interactive version of crop script
Python
mit
vladimirgamalian/pictools
Add interactive version of crop script
#!/usr/bin/env python # -*- coding: utf-8 -*- import click from PIL import Image from utils import get_file_list @click.command() @click.argument('path', type=click.Path(exists=True)) @click.option('--x', type=click.INT, prompt=True) @click.option('--y', type=click.INT, prompt=True) @click.option('--w', type=click.I...
<commit_before><commit_msg>Add interactive version of crop script<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- import click from PIL import Image from utils import get_file_list @click.command() @click.argument('path', type=click.Path(exists=True)) @click.option('--x', type=click.INT, prompt=True) @click.option('--y', type=click.INT, prompt=True) @click.option('--w', type=click.I...
Add interactive version of crop script#!/usr/bin/env python # -*- coding: utf-8 -*- import click from PIL import Image from utils import get_file_list @click.command() @click.argument('path', type=click.Path(exists=True)) @click.option('--x', type=click.INT, prompt=True) @click.option('--y', type=click.INT, prompt=T...
<commit_before><commit_msg>Add interactive version of crop script<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- import click from PIL import Image from utils import get_file_list @click.command() @click.argument('path', type=click.Path(exists=True)) @click.option('--x', type=click.INT, prompt=True) @cli...
aa2b62a19c8a988f2582a5e13475322e6efb4880
src/collectors/hbase/hbase.py
src/collectors/hbase/hbase.py
# coding=utf-8 """ Diamond collector for HBase metrics, see: """ from diamond.metric import Metric import diamond.collector import glob import re import os class HBaseCollector(diamond.collector.Collector): re_log = re.compile(r'^(?P<timestamp>\d+) (?P<name>\S+): (?P<metrics>.*)$') def get_default_config_...
Add a HBase metrics collector.
Add a HBase metrics collector. This change adds a basic hbase metrics collector that works in the same way that the hadoop collector does.
Python
mit
thardie/Diamond,python-diamond/Diamond,CYBERBUGJR/Diamond,Ssawa/Diamond,acquia/Diamond,Ormod/Diamond,acquia/Diamond,szibis/Diamond,Ssawa/Diamond,hvnsweeting/Diamond,actmd/Diamond,jumping/Diamond,saucelabs/Diamond,works-mobile/Diamond,signalfx/Diamond,signalfx/Diamond,stuartbfox/Diamond,russss/Diamond,CYBERBUGJR/Diamond...
Add a HBase metrics collector. This change adds a basic hbase metrics collector that works in the same way that the hadoop collector does.
# coding=utf-8 """ Diamond collector for HBase metrics, see: """ from diamond.metric import Metric import diamond.collector import glob import re import os class HBaseCollector(diamond.collector.Collector): re_log = re.compile(r'^(?P<timestamp>\d+) (?P<name>\S+): (?P<metrics>.*)$') def get_default_config_...
<commit_before><commit_msg>Add a HBase metrics collector. This change adds a basic hbase metrics collector that works in the same way that the hadoop collector does.<commit_after>
# coding=utf-8 """ Diamond collector for HBase metrics, see: """ from diamond.metric import Metric import diamond.collector import glob import re import os class HBaseCollector(diamond.collector.Collector): re_log = re.compile(r'^(?P<timestamp>\d+) (?P<name>\S+): (?P<metrics>.*)$') def get_default_config_...
Add a HBase metrics collector. This change adds a basic hbase metrics collector that works in the same way that the hadoop collector does.# coding=utf-8 """ Diamond collector for HBase metrics, see: """ from diamond.metric import Metric import diamond.collector import glob import re import os class HBaseCollector(...
<commit_before><commit_msg>Add a HBase metrics collector. This change adds a basic hbase metrics collector that works in the same way that the hadoop collector does.<commit_after># coding=utf-8 """ Diamond collector for HBase metrics, see: """ from diamond.metric import Metric import diamond.collector import glob im...
9f81fa58475a352aa009a5009dd31428f574fdd9
data/retrieve/retrieve.py
data/retrieve/retrieve.py
import os import urllib.request ''' Checks to see whether the data is present. To be used to check whether to download OR not. Insert the name in the following format 'os.path.isfile('NAME_OF_FILE') ''' if not os.path.isfile('../DNA_TEST_1.txt'): urllib.request.urlretrieve(url, 'DNA_TEST_1.txt')
Create basic structure for test data benchmark module
Create basic structure for test data benchmark module
Python
mit
bhaprayan/sagkocana
Create basic structure for test data benchmark module
import os import urllib.request ''' Checks to see whether the data is present. To be used to check whether to download OR not. Insert the name in the following format 'os.path.isfile('NAME_OF_FILE') ''' if not os.path.isfile('../DNA_TEST_1.txt'): urllib.request.urlretrieve(url, 'DNA_TEST_1.txt')
<commit_before><commit_msg>Create basic structure for test data benchmark module<commit_after>
import os import urllib.request ''' Checks to see whether the data is present. To be used to check whether to download OR not. Insert the name in the following format 'os.path.isfile('NAME_OF_FILE') ''' if not os.path.isfile('../DNA_TEST_1.txt'): urllib.request.urlretrieve(url, 'DNA_TEST_1.txt')
Create basic structure for test data benchmark moduleimport os import urllib.request ''' Checks to see whether the data is present. To be used to check whether to download OR not. Insert the name in the following format 'os.path.isfile('NAME_OF_FILE') ''' if not os.path.isfile('../DNA_TEST_1.txt'): urllib.request.urlr...
<commit_before><commit_msg>Create basic structure for test data benchmark module<commit_after>import os import urllib.request ''' Checks to see whether the data is present. To be used to check whether to download OR not. Insert the name in the following format 'os.path.isfile('NAME_OF_FILE') ''' if not os.path.isfile('...
de52670eebc4d78aee94cdbabdcb31fcaad31fc3
linkprojects.py
linkprojects.py
import os rootdir = '/Users/work/development/repositories/pet-projects' languageDirectories = next(os.walk(rootdir))[1] if not os.path.islink("all"): os.symlink(rootdir, "all") else: print "Link to ", "all", "exists already" for directory in languageDirectories: if(directory.startswith(".")): continue; projec...
Add script to create a "quick projects" directory, for fast access without having to dig into repo structure
Add script to create a "quick projects" directory, for fast access without having to dig into repo structure
Python
mit
heliosbryan/pet-projects,heliosbryan/pet-projects
Add script to create a "quick projects" directory, for fast access without having to dig into repo structure
import os rootdir = '/Users/work/development/repositories/pet-projects' languageDirectories = next(os.walk(rootdir))[1] if not os.path.islink("all"): os.symlink(rootdir, "all") else: print "Link to ", "all", "exists already" for directory in languageDirectories: if(directory.startswith(".")): continue; projec...
<commit_before><commit_msg>Add script to create a "quick projects" directory, for fast access without having to dig into repo structure<commit_after>
import os rootdir = '/Users/work/development/repositories/pet-projects' languageDirectories = next(os.walk(rootdir))[1] if not os.path.islink("all"): os.symlink(rootdir, "all") else: print "Link to ", "all", "exists already" for directory in languageDirectories: if(directory.startswith(".")): continue; projec...
Add script to create a "quick projects" directory, for fast access without having to dig into repo structureimport os rootdir = '/Users/work/development/repositories/pet-projects' languageDirectories = next(os.walk(rootdir))[1] if not os.path.islink("all"): os.symlink(rootdir, "all") else: print "Link to ", "all", ...
<commit_before><commit_msg>Add script to create a "quick projects" directory, for fast access without having to dig into repo structure<commit_after>import os rootdir = '/Users/work/development/repositories/pet-projects' languageDirectories = next(os.walk(rootdir))[1] if not os.path.islink("all"): os.symlink(rootdir...
adc1de57f41c6868f997a05a7410d72d523d6036
cgi-bin/request/gis/wou_outline.py
cgi-bin/request/gis/wou_outline.py
#!/mesonet/python/bin/python # Generate a shapefile of the WOU outline. # 28 Aug 2004 port to iem40 import shapelib, dbflib, mx.DateTime, zipfile, os, sys, shutil, cgi from pyIEM import wellknowntext, iemdb i = iemdb.iemdb() mydb = i["postgis"] mydb.query("SET TIME ZONE 'GMT'") # Get CGI vars form = cgi.FormContent...
Add tool as per request
Add tool as per request
Python
mit
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
Add tool as per request
#!/mesonet/python/bin/python # Generate a shapefile of the WOU outline. # 28 Aug 2004 port to iem40 import shapelib, dbflib, mx.DateTime, zipfile, os, sys, shutil, cgi from pyIEM import wellknowntext, iemdb i = iemdb.iemdb() mydb = i["postgis"] mydb.query("SET TIME ZONE 'GMT'") # Get CGI vars form = cgi.FormContent...
<commit_before><commit_msg>Add tool as per request<commit_after>
#!/mesonet/python/bin/python # Generate a shapefile of the WOU outline. # 28 Aug 2004 port to iem40 import shapelib, dbflib, mx.DateTime, zipfile, os, sys, shutil, cgi from pyIEM import wellknowntext, iemdb i = iemdb.iemdb() mydb = i["postgis"] mydb.query("SET TIME ZONE 'GMT'") # Get CGI vars form = cgi.FormContent...
Add tool as per request#!/mesonet/python/bin/python # Generate a shapefile of the WOU outline. # 28 Aug 2004 port to iem40 import shapelib, dbflib, mx.DateTime, zipfile, os, sys, shutil, cgi from pyIEM import wellknowntext, iemdb i = iemdb.iemdb() mydb = i["postgis"] mydb.query("SET TIME ZONE 'GMT'") # Get CGI vars...
<commit_before><commit_msg>Add tool as per request<commit_after>#!/mesonet/python/bin/python # Generate a shapefile of the WOU outline. # 28 Aug 2004 port to iem40 import shapelib, dbflib, mx.DateTime, zipfile, os, sys, shutil, cgi from pyIEM import wellknowntext, iemdb i = iemdb.iemdb() mydb = i["postgis"] mydb.que...
5ded544070c0f6c2a07a11e48e94ded92c79d141
pyudl/tds/test/test_catalog.py
pyudl/tds/test/test_catalog.py
from pyudl.tds import TDSCatalog class TestCatalog(object): baseURL = 'http://thredds-test.unidata.ucar.edu/thredds/' def test_basic(self): url = baseURL + 'catalog.xml' cat = TDSCatalog(url) assert 'Forecast Model Data' in cat.catalogRefs def test_access(self): url = bas...
Add some simple unit tests.
Add some simple unit tests.
Python
bsd-3-clause
MoonRaker/siphon,Unidata/siphon,dopplershift/siphon,dopplershift/siphon,hyoklee/siphon
Add some simple unit tests.
from pyudl.tds import TDSCatalog class TestCatalog(object): baseURL = 'http://thredds-test.unidata.ucar.edu/thredds/' def test_basic(self): url = baseURL + 'catalog.xml' cat = TDSCatalog(url) assert 'Forecast Model Data' in cat.catalogRefs def test_access(self): url = bas...
<commit_before><commit_msg>Add some simple unit tests.<commit_after>
from pyudl.tds import TDSCatalog class TestCatalog(object): baseURL = 'http://thredds-test.unidata.ucar.edu/thredds/' def test_basic(self): url = baseURL + 'catalog.xml' cat = TDSCatalog(url) assert 'Forecast Model Data' in cat.catalogRefs def test_access(self): url = bas...
Add some simple unit tests.from pyudl.tds import TDSCatalog class TestCatalog(object): baseURL = 'http://thredds-test.unidata.ucar.edu/thredds/' def test_basic(self): url = baseURL + 'catalog.xml' cat = TDSCatalog(url) assert 'Forecast Model Data' in cat.catalogRefs def test_acce...
<commit_before><commit_msg>Add some simple unit tests.<commit_after>from pyudl.tds import TDSCatalog class TestCatalog(object): baseURL = 'http://thredds-test.unidata.ucar.edu/thredds/' def test_basic(self): url = baseURL + 'catalog.xml' cat = TDSCatalog(url) assert 'Forecast Model Da...
82b5fbc30c31fa6c3ba5ec29a4088d539987e12b
dds_playground/generate_midimapping.py
dds_playground/generate_midimapping.py
def midi_to_freq(note): return (2**((note-69)/12)) * 440 print("const uint16_t notemappings[] PROGMEM = {") print(", ".join([str(round(midi_to_freq(note))) for note in range(0,128)])) print("};")
Add python script to generate MIDI note -> frequency tables
Add python script to generate MIDI note -> frequency tables
Python
mit
ArchimedesPi/synths,ArchimedesPi/synths,ArchimedesPi/synths
Add python script to generate MIDI note -> frequency tables
def midi_to_freq(note): return (2**((note-69)/12)) * 440 print("const uint16_t notemappings[] PROGMEM = {") print(", ".join([str(round(midi_to_freq(note))) for note in range(0,128)])) print("};")
<commit_before><commit_msg>Add python script to generate MIDI note -> frequency tables<commit_after>
def midi_to_freq(note): return (2**((note-69)/12)) * 440 print("const uint16_t notemappings[] PROGMEM = {") print(", ".join([str(round(midi_to_freq(note))) for note in range(0,128)])) print("};")
Add python script to generate MIDI note -> frequency tablesdef midi_to_freq(note): return (2**((note-69)/12)) * 440 print("const uint16_t notemappings[] PROGMEM = {") print(", ".join([str(round(midi_to_freq(note))) for note in range(0,128)])) print("};")
<commit_before><commit_msg>Add python script to generate MIDI note -> frequency tables<commit_after>def midi_to_freq(note): return (2**((note-69)/12)) * 440 print("const uint16_t notemappings[] PROGMEM = {") print(", ".join([str(round(midi_to_freq(note))) for note in range(0,128)])) print("};")
a6fba1b774d5ddeaa8eeab1b9a394a2d5ec0fdcf
tests/terminal_tests/__init__.py
tests/terminal_tests/__init__.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
Add module for Terminal tests
Add module for Terminal tests
Python
mit
PatrikValkovic/grammpy
Add module for Terminal tests
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
<commit_before><commit_msg>Add module for Terminal tests<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
Add module for Terminal tests#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
<commit_before><commit_msg>Add module for Terminal tests<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
7b6ad0ce2e6c3c623966c5568989ed5042fb9b1d
ports/nrf/modules/scripts/_mkfs.py
ports/nrf/modules/scripts/_mkfs.py
import uos, nrf try: from uos import VfsLfs1 uos.VfsLfs1.mkfs(nrf.Flash()) except ImportError: try: from uos import VfsLfs2 uos.VfsLfs2.mkfs(nrf.Flash()) except ImportError: try: from uos import VfsFat uos.VfsFat.mkfs(nrf.Flash()) except Import...
Add file system formatting script.
nrf/modules/scripts: Add file system formatting script. Add a helper script _mkfs.py which automatically formats the file system if nrf.Flash() is located and a VFS file system has been included in the compilation. The precedence is: first LFS1, LFS2 then FAT.
Python
mit
bvernoux/micropython,adafruit/circuitpython,adafruit/circuitpython,bvernoux/micropython,bvernoux/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,bvernoux/micropython,bvernoux/micropython
nrf/modules/scripts: Add file system formatting script. Add a helper script _mkfs.py which automatically formats the file system if nrf.Flash() is located and a VFS file system has been included in the compilation. The precedence is: first LFS1, LFS2 then FAT.
import uos, nrf try: from uos import VfsLfs1 uos.VfsLfs1.mkfs(nrf.Flash()) except ImportError: try: from uos import VfsLfs2 uos.VfsLfs2.mkfs(nrf.Flash()) except ImportError: try: from uos import VfsFat uos.VfsFat.mkfs(nrf.Flash()) except Import...
<commit_before><commit_msg>nrf/modules/scripts: Add file system formatting script. Add a helper script _mkfs.py which automatically formats the file system if nrf.Flash() is located and a VFS file system has been included in the compilation. The precedence is: first LFS1, LFS2 then FAT.<commit_after>
import uos, nrf try: from uos import VfsLfs1 uos.VfsLfs1.mkfs(nrf.Flash()) except ImportError: try: from uos import VfsLfs2 uos.VfsLfs2.mkfs(nrf.Flash()) except ImportError: try: from uos import VfsFat uos.VfsFat.mkfs(nrf.Flash()) except Import...
nrf/modules/scripts: Add file system formatting script. Add a helper script _mkfs.py which automatically formats the file system if nrf.Flash() is located and a VFS file system has been included in the compilation. The precedence is: first LFS1, LFS2 then FAT.import uos, nrf try: from uos import VfsLfs1 uos...
<commit_before><commit_msg>nrf/modules/scripts: Add file system formatting script. Add a helper script _mkfs.py which automatically formats the file system if nrf.Flash() is located and a VFS file system has been included in the compilation. The precedence is: first LFS1, LFS2 then FAT.<commit_after>import uos, nrf ...
735de8167d3e6b0085710d406c8c2976913baa43
tests/test_spider_mw.py
tests/test_spider_mw.py
import logging from testfixtures import LogCapture from twisted.trial.unittest import TestCase from twisted.internet import defer from scrapy import Spider, Request from scrapy.utils.test import get_crawler from tests.mockserver import MockServer class CommonTestCase(TestCase): @classmethod def setUpClass(...
Test for exceptions on process_spider_input
Test for exceptions on process_spider_input
Python
bsd-3-clause
pablohoffman/scrapy,wujuguang/scrapy,finfish/scrapy,eLRuLL/scrapy,starrify/scrapy,starrify/scrapy,eLRuLL/scrapy,eLRuLL/scrapy,wujuguang/scrapy,pawelmhm/scrapy,pawelmhm/scrapy,wujuguang/scrapy,pablohoffman/scrapy,elacuesta/scrapy,scrapy/scrapy,elacuesta/scrapy,finfish/scrapy,pablohoffman/scrapy,dangra/scrapy,scrapy/scra...
Test for exceptions on process_spider_input
import logging from testfixtures import LogCapture from twisted.trial.unittest import TestCase from twisted.internet import defer from scrapy import Spider, Request from scrapy.utils.test import get_crawler from tests.mockserver import MockServer class CommonTestCase(TestCase): @classmethod def setUpClass(...
<commit_before><commit_msg>Test for exceptions on process_spider_input<commit_after>
import logging from testfixtures import LogCapture from twisted.trial.unittest import TestCase from twisted.internet import defer from scrapy import Spider, Request from scrapy.utils.test import get_crawler from tests.mockserver import MockServer class CommonTestCase(TestCase): @classmethod def setUpClass(...
Test for exceptions on process_spider_input import logging from testfixtures import LogCapture from twisted.trial.unittest import TestCase from twisted.internet import defer from scrapy import Spider, Request from scrapy.utils.test import get_crawler from tests.mockserver import MockServer class CommonTestCase(Test...
<commit_before><commit_msg>Test for exceptions on process_spider_input<commit_after> import logging from testfixtures import LogCapture from twisted.trial.unittest import TestCase from twisted.internet import defer from scrapy import Spider, Request from scrapy.utils.test import get_crawler from tests.mockserver impo...
84494fc4db847523a88b70f8cd1c93c10b689ad1
chacha.py
chacha.py
#!/usr/bin/env python import argparse import atexit import logging DEFAULT_DOCKER_BASE_URL = 'unix://var/run/docker.sock' DOCKER_BASE_URL_HELP = ('Refers to the protocol+hostname+port where the ' 'Docker server is hosted. Defaults to %s') % DEFAULT_DOCKER_BASE_URL DEFAULT_DOCKER_API_VERSION = 'auto' DOCKER_API_V...
Add docker client options to argparse
Add docker client options to argparse All docker-py client options are handled through argparse, except the ssl options.
Python
mit
aleasoluciones/docker-image-cleaner,aebm/docker-image-cleaner
Add docker client options to argparse All docker-py client options are handled through argparse, except the ssl options.
#!/usr/bin/env python import argparse import atexit import logging DEFAULT_DOCKER_BASE_URL = 'unix://var/run/docker.sock' DOCKER_BASE_URL_HELP = ('Refers to the protocol+hostname+port where the ' 'Docker server is hosted. Defaults to %s') % DEFAULT_DOCKER_BASE_URL DEFAULT_DOCKER_API_VERSION = 'auto' DOCKER_API_V...
<commit_before><commit_msg>Add docker client options to argparse All docker-py client options are handled through argparse, except the ssl options.<commit_after>
#!/usr/bin/env python import argparse import atexit import logging DEFAULT_DOCKER_BASE_URL = 'unix://var/run/docker.sock' DOCKER_BASE_URL_HELP = ('Refers to the protocol+hostname+port where the ' 'Docker server is hosted. Defaults to %s') % DEFAULT_DOCKER_BASE_URL DEFAULT_DOCKER_API_VERSION = 'auto' DOCKER_API_V...
Add docker client options to argparse All docker-py client options are handled through argparse, except the ssl options.#!/usr/bin/env python import argparse import atexit import logging DEFAULT_DOCKER_BASE_URL = 'unix://var/run/docker.sock' DOCKER_BASE_URL_HELP = ('Refers to the protocol+hostname+port where the ' ...
<commit_before><commit_msg>Add docker client options to argparse All docker-py client options are handled through argparse, except the ssl options.<commit_after>#!/usr/bin/env python import argparse import atexit import logging DEFAULT_DOCKER_BASE_URL = 'unix://var/run/docker.sock' DOCKER_BASE_URL_HELP = ('Refers t...
16e27029f32ae0329a7da022efd06625987d1622
itunes.py
itunes.py
#!/usr/bin/env python3 from collections import defaultdict from dateutil.parser import parse from pathlib import Path import xml.etree.ElementTree as ET LIBRARY = Path.home() / "Music/iTunes/iTunes Library.xml" def plist_iter(iterable, all_dicts=False): a = iter(iterable) for k, v in zip(a, a): asse...
Add iTunes script for making year playlists
Add iTunes script for making year playlists
Python
mit
mk12/scripts,mk12/scripts,mk12/scripts,mk12/scripts
Add iTunes script for making year playlists
#!/usr/bin/env python3 from collections import defaultdict from dateutil.parser import parse from pathlib import Path import xml.etree.ElementTree as ET LIBRARY = Path.home() / "Music/iTunes/iTunes Library.xml" def plist_iter(iterable, all_dicts=False): a = iter(iterable) for k, v in zip(a, a): asse...
<commit_before><commit_msg>Add iTunes script for making year playlists<commit_after>
#!/usr/bin/env python3 from collections import defaultdict from dateutil.parser import parse from pathlib import Path import xml.etree.ElementTree as ET LIBRARY = Path.home() / "Music/iTunes/iTunes Library.xml" def plist_iter(iterable, all_dicts=False): a = iter(iterable) for k, v in zip(a, a): asse...
Add iTunes script for making year playlists#!/usr/bin/env python3 from collections import defaultdict from dateutil.parser import parse from pathlib import Path import xml.etree.ElementTree as ET LIBRARY = Path.home() / "Music/iTunes/iTunes Library.xml" def plist_iter(iterable, all_dicts=False): a = iter(iterab...
<commit_before><commit_msg>Add iTunes script for making year playlists<commit_after>#!/usr/bin/env python3 from collections import defaultdict from dateutil.parser import parse from pathlib import Path import xml.etree.ElementTree as ET LIBRARY = Path.home() / "Music/iTunes/iTunes Library.xml" def plist_iter(iterab...
0bc2a9851f695418ce99d6a7b83fcb7843a28f88
osf/migrations/0043_set_share_title.py
osf/migrations/0043_set_share_title.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-08-03 15:07 """Sets the share_title field on production PreprintProviders. Makes no updates if the listed providers don't exist in the current envirionment. """ from __future__ import unicode_literals from django.db import migrations # _id => share_title SH...
Add migration to set share_title for PreprintProviders on prod
Add migration to set share_title for PreprintProviders on prod
Python
apache-2.0
leb2dg/osf.io,mattclark/osf.io,saradbowman/osf.io,cslzchen/osf.io,binoculars/osf.io,caneruguz/osf.io,erinspace/osf.io,sloria/osf.io,caseyrollins/osf.io,baylee-d/osf.io,caseyrollins/osf.io,HalcyonChimera/osf.io,adlius/osf.io,adlius/osf.io,pattisdr/osf.io,leb2dg/osf.io,chennan47/osf.io,aaxelb/osf.io,binoculars/osf.io,bri...
Add migration to set share_title for PreprintProviders on prod
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-08-03 15:07 """Sets the share_title field on production PreprintProviders. Makes no updates if the listed providers don't exist in the current envirionment. """ from __future__ import unicode_literals from django.db import migrations # _id => share_title SH...
<commit_before><commit_msg>Add migration to set share_title for PreprintProviders on prod<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-08-03 15:07 """Sets the share_title field on production PreprintProviders. Makes no updates if the listed providers don't exist in the current envirionment. """ from __future__ import unicode_literals from django.db import migrations # _id => share_title SH...
Add migration to set share_title for PreprintProviders on prod# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-08-03 15:07 """Sets the share_title field on production PreprintProviders. Makes no updates if the listed providers don't exist in the current envirionment. """ from __future__ import unicode_liter...
<commit_before><commit_msg>Add migration to set share_title for PreprintProviders on prod<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-08-03 15:07 """Sets the share_title field on production PreprintProviders. Makes no updates if the listed providers don't exist in the current envirionment....
82fa4a85a1171fd62cab68f90ec7e8ab8fbbc862
tools/detect_multiple_usage.py
tools/detect_multiple_usage.py
# JN 2016-04-08 """ First read do_sort_neg.txt, CheetahLogFile_*.csv, and channel_names.csv. Then check if any channel in do_sort_neg.txt are using the same reference. Warning: This assumes that all channels have been renamed to the CSCxy.ncs format """ from __future__ import print_function, division, absolute_imp...
Add tool to detect multiple use of a negative unit
Add tool to detect multiple use of a negative unit The script tools/detect_multiple_usage.py automatically parses 'do_sort_neg.txt' and checks whether the same reference channel occurs more than once.
Python
mit
jniediek/combinato
Add tool to detect multiple use of a negative unit The script tools/detect_multiple_usage.py automatically parses 'do_sort_neg.txt' and checks whether the same reference channel occurs more than once.
# JN 2016-04-08 """ First read do_sort_neg.txt, CheetahLogFile_*.csv, and channel_names.csv. Then check if any channel in do_sort_neg.txt are using the same reference. Warning: This assumes that all channels have been renamed to the CSCxy.ncs format """ from __future__ import print_function, division, absolute_imp...
<commit_before><commit_msg>Add tool to detect multiple use of a negative unit The script tools/detect_multiple_usage.py automatically parses 'do_sort_neg.txt' and checks whether the same reference channel occurs more than once.<commit_after>
# JN 2016-04-08 """ First read do_sort_neg.txt, CheetahLogFile_*.csv, and channel_names.csv. Then check if any channel in do_sort_neg.txt are using the same reference. Warning: This assumes that all channels have been renamed to the CSCxy.ncs format """ from __future__ import print_function, division, absolute_imp...
Add tool to detect multiple use of a negative unit The script tools/detect_multiple_usage.py automatically parses 'do_sort_neg.txt' and checks whether the same reference channel occurs more than once.# JN 2016-04-08 """ First read do_sort_neg.txt, CheetahLogFile_*.csv, and channel_names.csv. Then check if any channe...
<commit_before><commit_msg>Add tool to detect multiple use of a negative unit The script tools/detect_multiple_usage.py automatically parses 'do_sort_neg.txt' and checks whether the same reference channel occurs more than once.<commit_after># JN 2016-04-08 """ First read do_sort_neg.txt, CheetahLogFile_*.csv, and cha...
0173086c95719e1ae12a431626f181e402f9e588
http_simulate_news_app.py
http_simulate_news_app.py
import random import gevent from locust import HttpLocust, TaskSet, task HTTP_USER = "test" HTTP_PASSWORD = "1" class NewsAppApi(TaskSet): def get_news(self): self.client.get("/news", auth=(HTTP_USER, HTTP_PASSWORD) ) def get_single_news(self, news_id): self.client.get("/news/{}".format(new...
Add news app user behavior simulator
Add news app user behavior simulator
Python
apache-2.0
drednout/locust_on_meetup
Add news app user behavior simulator
import random import gevent from locust import HttpLocust, TaskSet, task HTTP_USER = "test" HTTP_PASSWORD = "1" class NewsAppApi(TaskSet): def get_news(self): self.client.get("/news", auth=(HTTP_USER, HTTP_PASSWORD) ) def get_single_news(self, news_id): self.client.get("/news/{}".format(new...
<commit_before><commit_msg>Add news app user behavior simulator<commit_after>
import random import gevent from locust import HttpLocust, TaskSet, task HTTP_USER = "test" HTTP_PASSWORD = "1" class NewsAppApi(TaskSet): def get_news(self): self.client.get("/news", auth=(HTTP_USER, HTTP_PASSWORD) ) def get_single_news(self, news_id): self.client.get("/news/{}".format(new...
Add news app user behavior simulatorimport random import gevent from locust import HttpLocust, TaskSet, task HTTP_USER = "test" HTTP_PASSWORD = "1" class NewsAppApi(TaskSet): def get_news(self): self.client.get("/news", auth=(HTTP_USER, HTTP_PASSWORD) ) def get_single_news(self, news_id): s...
<commit_before><commit_msg>Add news app user behavior simulator<commit_after>import random import gevent from locust import HttpLocust, TaskSet, task HTTP_USER = "test" HTTP_PASSWORD = "1" class NewsAppApi(TaskSet): def get_news(self): self.client.get("/news", auth=(HTTP_USER, HTTP_PASSWORD) ) def ...
5c2da7acfa53a179328d1aa2106c298533047af0
lintcode/Medium/187_Gas_Station.py
lintcode/Medium/187_Gas_Station.py
class Solution: # @param gas, a list of integers # @param cost, a list of integers # @return an integer def canCompleteCircuit(self, gas, cost): # write your code here # Solution 1 total_left_gas = 0 sum = 0 res = 0 for i in range(len(gas)): s...
Add solution to lintcode question 187
Add solution to lintcode question 187
Python
mit
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
Add solution to lintcode question 187
class Solution: # @param gas, a list of integers # @param cost, a list of integers # @return an integer def canCompleteCircuit(self, gas, cost): # write your code here # Solution 1 total_left_gas = 0 sum = 0 res = 0 for i in range(len(gas)): s...
<commit_before><commit_msg>Add solution to lintcode question 187<commit_after>
class Solution: # @param gas, a list of integers # @param cost, a list of integers # @return an integer def canCompleteCircuit(self, gas, cost): # write your code here # Solution 1 total_left_gas = 0 sum = 0 res = 0 for i in range(len(gas)): s...
Add solution to lintcode question 187class Solution: # @param gas, a list of integers # @param cost, a list of integers # @return an integer def canCompleteCircuit(self, gas, cost): # write your code here # Solution 1 total_left_gas = 0 sum = 0 res = 0 fo...
<commit_before><commit_msg>Add solution to lintcode question 187<commit_after>class Solution: # @param gas, a list of integers # @param cost, a list of integers # @return an integer def canCompleteCircuit(self, gas, cost): # write your code here # Solution 1 total_left_gas = 0 ...
1abe318ffc8ece592d07ca9657146a42517a16f2
tests/test52.py
tests/test52.py
import judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64bfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 (complete): 4f4d13ed-7d1c-cbee-638d-6aee5188c929 # 2 (timeout) : 720ebe41-5987-b9...
Add demo w/ context manager and lifetime
Add demo w/ context manager and lifetime
Python
mit
suchow/judicious,suchow/judicious,suchow/judicious
Add demo w/ context manager and lifetime
import judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64bfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 (complete): 4f4d13ed-7d1c-cbee-638d-6aee5188c929 # 2 (timeout) : 720ebe41-5987-b9...
<commit_before><commit_msg>Add demo w/ context manager and lifetime<commit_after>
import judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64bfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 (complete): 4f4d13ed-7d1c-cbee-638d-6aee5188c929 # 2 (timeout) : 720ebe41-5987-b9...
Add demo w/ context manager and lifetimeimport judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64bfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 (complete): 4f4d13ed-7d1c-cbee-638d-6aee5...
<commit_before><commit_msg>Add demo w/ context manager and lifetime<commit_after>import judicious judicious.seed("cc722bf6-e319-cf63-a671-cbae64bfdb0f") # 1 (complete): 3799aa89-ccae-c268-d0e8-cc4e9ddddee4 # 2 (timeout) : 4d30601d-dfe3-ee53-8594-7fc0aa8e68ec # 3 (complete): fe07a885-53c3-9a22-c93e-91436e5d8f0c # 1 ...
4dea108334acb98cc11a45cfa362f372bb052c79
galleries/migrations/0008_auto_20170503_1704.py
galleries/migrations/0008_auto_20170503_1704.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-04 00:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('galleries', '0007_refresh_all_media_records'), ] operations = [ migrations.Al...
Add a migration for the previous commit
Add a migration for the previous commit
Python
mit
DylanMcCall/stuartmccall.ca,DylanMcCall/stuartmccall.ca,DylanMcCall/stuartmccall.ca
Add a migration for the previous commit
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-04 00:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('galleries', '0007_refresh_all_media_records'), ] operations = [ migrations.Al...
<commit_before><commit_msg>Add a migration for the previous commit<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-04 00:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('galleries', '0007_refresh_all_media_records'), ] operations = [ migrations.Al...
Add a migration for the previous commit# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-04 00:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('galleries', '0007_refresh_all_media_records'), ] ...
<commit_before><commit_msg>Add a migration for the previous commit<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-04 00:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('galleries', '0...
10f14597a84a25565f5485ae452ae95c361a2b1d
integrations/node_js/my_first_test.py
integrations/node_js/my_first_test.py
from seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("http://xkcd.com/353/") self.wait_for_element("div#comic") self.click('a[rel="license"]') text = self.wait_for_element('center').text self.assertTrue("reuse any of my drawings" i...
Add an example test to run
Add an example test to run
Python
mit
possoumous/Watchers,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,possoumous/Watchers,possoumous/Watchers,ktp420/SeleniumBase,mdmintz/seleniumspot,ktp420/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,possoumous/Watchers,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,ktp420/SeleniumBa...
Add an example test to run
from seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("http://xkcd.com/353/") self.wait_for_element("div#comic") self.click('a[rel="license"]') text = self.wait_for_element('center').text self.assertTrue("reuse any of my drawings" i...
<commit_before><commit_msg>Add an example test to run<commit_after>
from seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("http://xkcd.com/353/") self.wait_for_element("div#comic") self.click('a[rel="license"]') text = self.wait_for_element('center').text self.assertTrue("reuse any of my drawings" i...
Add an example test to runfrom seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("http://xkcd.com/353/") self.wait_for_element("div#comic") self.click('a[rel="license"]') text = self.wait_for_element('center').text self.assertTrue("r...
<commit_before><commit_msg>Add an example test to run<commit_after>from seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("http://xkcd.com/353/") self.wait_for_element("div#comic") self.click('a[rel="license"]') text = self.wait_for_element(...
9b0c0e0ceedde081846a2360c45eb6f14b9cd9f5
elasticsearch_django/migrations/0003_auto_20160926_2021.py
elasticsearch_django/migrations/0003_auto_20160926_2021.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('elasticsearch_django', '0002_searchquery_duration'), ] operations = [ migrations.AlterModelOptions( name='search...
Add migration for SearchQuery meta options
Add migration for SearchQuery meta options
Python
mit
yunojuno/elasticsearch-django
Add migration for SearchQuery meta options
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('elasticsearch_django', '0002_searchquery_duration'), ] operations = [ migrations.AlterModelOptions( name='search...
<commit_before><commit_msg>Add migration for SearchQuery meta options<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('elasticsearch_django', '0002_searchquery_duration'), ] operations = [ migrations.AlterModelOptions( name='search...
Add migration for SearchQuery meta options# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('elasticsearch_django', '0002_searchquery_duration'), ] operations = [ migrations.A...
<commit_before><commit_msg>Add migration for SearchQuery meta options<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('elasticsearch_django', '0002_searchquery_duration'), ]...
fcdb3bbc64f7ecb2761ccc00bff5ed8472e4d65d
faadata/airports/management/commands/ourairports_import.py
faadata/airports/management/commands/ourairports_import.py
import csv import os from decimal import Decimal from django.contrib.gis.geos import Point from django.core.cache import cache from django.core.management.base import BaseCommand from optparse import make_option from faadata.airports.models import Airport class Command(BaseCommand): # pragma: no cover option...
Add an importer for the dataset from OurAirports, usable instead of the FAA’s data.
Add an importer for the dataset from OurAirports, usable instead of the FAA’s data.
Python
bsd-3-clause
adamfast/faadata,adamfast/faadata,adamfast/faadata
Add an importer for the dataset from OurAirports, usable instead of the FAA’s data.
import csv import os from decimal import Decimal from django.contrib.gis.geos import Point from django.core.cache import cache from django.core.management.base import BaseCommand from optparse import make_option from faadata.airports.models import Airport class Command(BaseCommand): # pragma: no cover option...
<commit_before><commit_msg>Add an importer for the dataset from OurAirports, usable instead of the FAA’s data.<commit_after>
import csv import os from decimal import Decimal from django.contrib.gis.geos import Point from django.core.cache import cache from django.core.management.base import BaseCommand from optparse import make_option from faadata.airports.models import Airport class Command(BaseCommand): # pragma: no cover option...
Add an importer for the dataset from OurAirports, usable instead of the FAA’s data.import csv import os from decimal import Decimal from django.contrib.gis.geos import Point from django.core.cache import cache from django.core.management.base import BaseCommand from optparse import make_option from faadata.airports....
<commit_before><commit_msg>Add an importer for the dataset from OurAirports, usable instead of the FAA’s data.<commit_after>import csv import os from decimal import Decimal from django.contrib.gis.geos import Point from django.core.cache import cache from django.core.management.base import BaseCommand from optparse i...
bd3506c158c9aa03fabcd15d165bd1bc2b0845da
src/app_engine/analytics_enums_test.py
src/app_engine/analytics_enums_test.py
# Copyright 2014 Google Inc. All Rights Reserved. import unittest from analytics_enums import BigquerySchemaClass from analytics_enums import EnumClass class AnalyticsEnumsTest(unittest.TestCase): """Test the EnumClass behaves as expected.""" def testEnumClass(self): value_dict = { 'FOO': 10, ...
Add test for classes in analytics_enums module.
Add test for classes in analytics_enums module. Includes tests for classes that convert dictionaries into attributed classes.
Python
bsd-3-clause
jiayliu/apprtc,webrtc/apprtc,82488059/apprtc,shelsonjava/apprtc,virajs/apprtc,arnauorriols/apprtc,aadebuger/docker-apprtc,webrtc/apprtc,todotobe1/apprtc,aadebuger/docker-apprtc,YouthAndra/apprtc,TheKnarf/apprtc,bpyoung92/apprtc,JiYou/apprtc,mvenkatesh431/apprtc,arnauorriols/apprtc,procandi/apprtc,mvenkatesh431/apprtc,v...
Add test for classes in analytics_enums module. Includes tests for classes that convert dictionaries into attributed classes.
# Copyright 2014 Google Inc. All Rights Reserved. import unittest from analytics_enums import BigquerySchemaClass from analytics_enums import EnumClass class AnalyticsEnumsTest(unittest.TestCase): """Test the EnumClass behaves as expected.""" def testEnumClass(self): value_dict = { 'FOO': 10, ...
<commit_before><commit_msg>Add test for classes in analytics_enums module. Includes tests for classes that convert dictionaries into attributed classes.<commit_after>
# Copyright 2014 Google Inc. All Rights Reserved. import unittest from analytics_enums import BigquerySchemaClass from analytics_enums import EnumClass class AnalyticsEnumsTest(unittest.TestCase): """Test the EnumClass behaves as expected.""" def testEnumClass(self): value_dict = { 'FOO': 10, ...
Add test for classes in analytics_enums module. Includes tests for classes that convert dictionaries into attributed classes.# Copyright 2014 Google Inc. All Rights Reserved. import unittest from analytics_enums import BigquerySchemaClass from analytics_enums import EnumClass class AnalyticsEnumsTest(unittest.Test...
<commit_before><commit_msg>Add test for classes in analytics_enums module. Includes tests for classes that convert dictionaries into attributed classes.<commit_after># Copyright 2014 Google Inc. All Rights Reserved. import unittest from analytics_enums import BigquerySchemaClass from analytics_enums import EnumClass...
6bab44116eb343b5103b6ed23797a83bc1feedbd
shopify/wsgi.py
shopify/wsgi.py
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config") os.environ.setdefault("DJANGO_CONFIGURATION", "Local") from configurations.wsgi import get_wsgi_application application = get_wsgi_application()
Add a WSGI application file
Add a WSGI application file
Python
bsd-3-clause
CorbanU/corban-shopify,CorbanU/corban-shopify
Add a WSGI application file
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config") os.environ.setdefault("DJANGO_CONFIGURATION", "Local") from configurations.wsgi import get_wsgi_application application = get_wsgi_application()
<commit_before><commit_msg>Add a WSGI application file<commit_after>
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config") os.environ.setdefault("DJANGO_CONFIGURATION", "Local") from configurations.wsgi import get_wsgi_application application = get_wsgi_application()
Add a WSGI application fileimport os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config") os.environ.setdefault("DJANGO_CONFIGURATION", "Local") from configurations.wsgi import get_wsgi_application application = get_wsgi_application()
<commit_before><commit_msg>Add a WSGI application file<commit_after>import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config") os.environ.setdefault("DJANGO_CONFIGURATION", "Local") from configurations.wsgi import get_wsgi_application application = get_wsgi_application()
2101fd89059f73078bf5cfc8aa1399fda7ea567e
examples/corpus_reader.py
examples/corpus_reader.py
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals import csv class TSVOpener: def __init__(self, opt={}): self.name = opt.get('name') self.file_reader = opt.get('reader', csv) self.delimiter = opt.get('delimeter', b'\t') self.tsv = self.open_tsv_and_...
Add simple TSV reader for HUWiki corpus
Add simple TSV reader for HUWiki corpus
Python
apache-2.0
davidpgero/hungarian-nltk
Add simple TSV reader for HUWiki corpus
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals import csv class TSVOpener: def __init__(self, opt={}): self.name = opt.get('name') self.file_reader = opt.get('reader', csv) self.delimiter = opt.get('delimeter', b'\t') self.tsv = self.open_tsv_and_...
<commit_before><commit_msg>Add simple TSV reader for HUWiki corpus<commit_after>
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals import csv class TSVOpener: def __init__(self, opt={}): self.name = opt.get('name') self.file_reader = opt.get('reader', csv) self.delimiter = opt.get('delimeter', b'\t') self.tsv = self.open_tsv_and_...
Add simple TSV reader for HUWiki corpus#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals import csv class TSVOpener: def __init__(self, opt={}): self.name = opt.get('name') self.file_reader = opt.get('reader', csv) self.delimiter = opt.get('delimeter', b'\t'...
<commit_before><commit_msg>Add simple TSV reader for HUWiki corpus<commit_after>#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals import csv class TSVOpener: def __init__(self, opt={}): self.name = opt.get('name') self.file_reader = opt.get('reader', csv) se...
26202bffe9f36bb35efed30d4a64e17a56c78cf9
scuole/districts/management/commands/dedupedistrictslugs.py
scuole/districts/management/commands/dedupedistrictslugs.py
from django.core.management.base import BaseCommand from django.db.models import Count from scuole.districts.models import District class Command(BaseCommand): help = "Dedupe District slugs by adding the county name to the end." def handle(self, *args, **options): duplicate_slugs = ( Dis...
Add dedupe district slug management command
Add dedupe district slug management command
Python
mit
texastribune/scuole,texastribune/scuole,texastribune/scuole,texastribune/scuole
Add dedupe district slug management command
from django.core.management.base import BaseCommand from django.db.models import Count from scuole.districts.models import District class Command(BaseCommand): help = "Dedupe District slugs by adding the county name to the end." def handle(self, *args, **options): duplicate_slugs = ( Dis...
<commit_before><commit_msg>Add dedupe district slug management command<commit_after>
from django.core.management.base import BaseCommand from django.db.models import Count from scuole.districts.models import District class Command(BaseCommand): help = "Dedupe District slugs by adding the county name to the end." def handle(self, *args, **options): duplicate_slugs = ( Dis...
Add dedupe district slug management commandfrom django.core.management.base import BaseCommand from django.db.models import Count from scuole.districts.models import District class Command(BaseCommand): help = "Dedupe District slugs by adding the county name to the end." def handle(self, *args, **options): ...
<commit_before><commit_msg>Add dedupe district slug management command<commit_after>from django.core.management.base import BaseCommand from django.db.models import Count from scuole.districts.models import District class Command(BaseCommand): help = "Dedupe District slugs by adding the county name to the end." ...
a31461138d20673f718e0bd9fb4bb7aa9c1ff993
tools/check_ecs_deps/check_ecs_deps.py
tools/check_ecs_deps/check_ecs_deps.py
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' Verifies that builds of the embedded content_shell do not included unnecessary dependencies.''' import getopt import os import re ...
Add a tool to validate ecs library dependencies.
Add a tool to validate ecs library dependencies. The embedded content_shell starting point for applications such as the ChromeCast shell must not include dependencies that would increase its memory footprint. This script automatically tests that it does not contain undesired dependencies. BUG=none Review URL: https:...
Python
bsd-3-clause
jaruba/chromium.src,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,M4sse/chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk-efl,patrickm/chromium.src,anirudhSK/chromium,Pluto...
Add a tool to validate ecs library dependencies. The embedded content_shell starting point for applications such as the ChromeCast shell must not include dependencies that would increase its memory footprint. This script automatically tests that it does not contain undesired dependencies. BUG=none Review URL: https:...
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' Verifies that builds of the embedded content_shell do not included unnecessary dependencies.''' import getopt import os import re ...
<commit_before><commit_msg>Add a tool to validate ecs library dependencies. The embedded content_shell starting point for applications such as the ChromeCast shell must not include dependencies that would increase its memory footprint. This script automatically tests that it does not contain undesired dependencies. B...
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. ''' Verifies that builds of the embedded content_shell do not included unnecessary dependencies.''' import getopt import os import re ...
Add a tool to validate ecs library dependencies. The embedded content_shell starting point for applications such as the ChromeCast shell must not include dependencies that would increase its memory footprint. This script automatically tests that it does not contain undesired dependencies. BUG=none Review URL: https:...
<commit_before><commit_msg>Add a tool to validate ecs library dependencies. The embedded content_shell starting point for applications such as the ChromeCast shell must not include dependencies that would increase its memory footprint. This script automatically tests that it does not contain undesired dependencies. B...
7c249b245406198aa1c2bc38012f2ae404b757aa
backend/scripts/tiffconvert.py
backend/scripts/tiffconvert.py
#!/usr/bin/env python from PIL import Image import rethinkdb as r from optparse import OptionParser import sys import os import errno def datafile_dir(mcdir, datafile_id): pieces = datafile_id.split("-") return os.path.join(mcdir, pieces[1][0:2], pieces[1][2:4]) def mkdirp(path): try: os.makedir...
Add utility to batch convert tiff files.
Add utility to batch convert tiff files.
Python
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
Add utility to batch convert tiff files.
#!/usr/bin/env python from PIL import Image import rethinkdb as r from optparse import OptionParser import sys import os import errno def datafile_dir(mcdir, datafile_id): pieces = datafile_id.split("-") return os.path.join(mcdir, pieces[1][0:2], pieces[1][2:4]) def mkdirp(path): try: os.makedir...
<commit_before><commit_msg>Add utility to batch convert tiff files.<commit_after>
#!/usr/bin/env python from PIL import Image import rethinkdb as r from optparse import OptionParser import sys import os import errno def datafile_dir(mcdir, datafile_id): pieces = datafile_id.split("-") return os.path.join(mcdir, pieces[1][0:2], pieces[1][2:4]) def mkdirp(path): try: os.makedir...
Add utility to batch convert tiff files.#!/usr/bin/env python from PIL import Image import rethinkdb as r from optparse import OptionParser import sys import os import errno def datafile_dir(mcdir, datafile_id): pieces = datafile_id.split("-") return os.path.join(mcdir, pieces[1][0:2], pieces[1][2:4]) def m...
<commit_before><commit_msg>Add utility to batch convert tiff files.<commit_after>#!/usr/bin/env python from PIL import Image import rethinkdb as r from optparse import OptionParser import sys import os import errno def datafile_dir(mcdir, datafile_id): pieces = datafile_id.split("-") return os.path.join(mcdir...
e98fc8302cb9f8d435b197cd3fc47db23e498929
skvideo/examples/measure.py
skvideo/examples/measure.py
from skvideo.io import VideoCapture from skvideo.metrics import ssim, psnr, vifp import sys import json filename1, filename2 = sys.argv[1], sys.argv[2] cap1 = VideoCapture(filename1) cap1.open() print str(cap1.get_info()) cap2 = VideoCapture(filename2) cap2.open() print str(cap2.get_info()) def rgb_to_y(img): r...
Add example that compares two files with every metric
Add example that compares two files with every metric
Python
bsd-3-clause
aizvorski/scikit-video
Add example that compares two files with every metric
from skvideo.io import VideoCapture from skvideo.metrics import ssim, psnr, vifp import sys import json filename1, filename2 = sys.argv[1], sys.argv[2] cap1 = VideoCapture(filename1) cap1.open() print str(cap1.get_info()) cap2 = VideoCapture(filename2) cap2.open() print str(cap2.get_info()) def rgb_to_y(img): r...
<commit_before><commit_msg>Add example that compares two files with every metric<commit_after>
from skvideo.io import VideoCapture from skvideo.metrics import ssim, psnr, vifp import sys import json filename1, filename2 = sys.argv[1], sys.argv[2] cap1 = VideoCapture(filename1) cap1.open() print str(cap1.get_info()) cap2 = VideoCapture(filename2) cap2.open() print str(cap2.get_info()) def rgb_to_y(img): r...
Add example that compares two files with every metricfrom skvideo.io import VideoCapture from skvideo.metrics import ssim, psnr, vifp import sys import json filename1, filename2 = sys.argv[1], sys.argv[2] cap1 = VideoCapture(filename1) cap1.open() print str(cap1.get_info()) cap2 = VideoCapture(filename2) cap2.open()...
<commit_before><commit_msg>Add example that compares two files with every metric<commit_after>from skvideo.io import VideoCapture from skvideo.metrics import ssim, psnr, vifp import sys import json filename1, filename2 = sys.argv[1], sys.argv[2] cap1 = VideoCapture(filename1) cap1.open() print str(cap1.get_info()) c...
27810a25f7d11d95fac92138ad8c9af24cb65304
scripts/data_download/higher_education/create_all_files.py
scripts/data_download/higher_education/create_all_files.py
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() for year in range(2009, 2015): print "python scripts/data_download/...
Add download all year to higher education.
Add download all year to higher education.
Python
mit
DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site
Add download all year to higher education.
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() for year in range(2009, 2015): print "python scripts/data_download/...
<commit_before><commit_msg>Add download all year to higher education.<commit_after>
import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() for year in range(2009, 2015): print "python scripts/data_download/...
Add download all year to higher education.import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" exit() for year in range(2009, 2015)...
<commit_before><commit_msg>Add download all year to higher education.<commit_after>import os import commands import time import logging import sys if len(sys.argv) != 3 or (sys.argv[1:][0] not in ['pt', 'en']): print "ERROR! Use:\n python scripts/data_download/higher_education/create_files.py en/pt output_path\n" ...
11fc2b74ca8df0475f3d2a42be0a4c30d865f2e8
instance/eucalyptus_upgrade.py
instance/eucalyptus_upgrade.py
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Soft...
Add helper functions to upgrade production instances to Eucalyptus.
Add helper functions to upgrade production instances to Eucalyptus.
Python
agpl-3.0
open-craft/opencraft,open-craft/opencraft,open-craft/opencraft,open-craft/opencraft,open-craft/opencraft
Add helper functions to upgrade production instances to Eucalyptus.
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Soft...
<commit_before><commit_msg>Add helper functions to upgrade production instances to Eucalyptus.<commit_after>
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Soft...
Add helper functions to upgrade production instances to Eucalyptus.# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
<commit_before><commit_msg>Add helper functions to upgrade production instances to Eucalyptus.<commit_after># -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # This program is free software: you can redistribute it...
e8343a21ba302e986a51673b42cda054cfb2e32a
shivyc.py
shivyc.py
#!/usr/bin/env python3 """Main executable for ShivyC compiler """ import argparse def get_arguments(): """Set up the argument parser and return an object storing the argument values. return - An object storing argument values, as returned by argparse.parse_args() """ parser = argparse.Arg...
Add argument parsing to main executable
Add argument parsing to main executable
Python
mit
ShivamSarodia/ShivyC,ShivamSarodia/ShivyC,ShivamSarodia/ShivyC
Add argument parsing to main executable
#!/usr/bin/env python3 """Main executable for ShivyC compiler """ import argparse def get_arguments(): """Set up the argument parser and return an object storing the argument values. return - An object storing argument values, as returned by argparse.parse_args() """ parser = argparse.Arg...
<commit_before><commit_msg>Add argument parsing to main executable<commit_after>
#!/usr/bin/env python3 """Main executable for ShivyC compiler """ import argparse def get_arguments(): """Set up the argument parser and return an object storing the argument values. return - An object storing argument values, as returned by argparse.parse_args() """ parser = argparse.Arg...
Add argument parsing to main executable#!/usr/bin/env python3 """Main executable for ShivyC compiler """ import argparse def get_arguments(): """Set up the argument parser and return an object storing the argument values. return - An object storing argument values, as returned by argparse.parse_arg...
<commit_before><commit_msg>Add argument parsing to main executable<commit_after>#!/usr/bin/env python3 """Main executable for ShivyC compiler """ import argparse def get_arguments(): """Set up the argument parser and return an object storing the argument values. return - An object storing argument valu...
8f74688fdf73c0a61b30083a616aa5c097854e42
src/python/site/remove_arg.py
src/python/site/remove_arg.py
import sys program, first, *rest = sys.argv args = [] result = 1 for arg in rest: if arg == first: result = 0 else: quoted = f'"{arg}"' args.append(quoted) print(" ".join(args)) sys.exit(result)
Add python script to remove an arg
Add python script to remove an arg
Python
mit
jalanb/jab,jalanb/jab
Add python script to remove an arg
import sys program, first, *rest = sys.argv args = [] result = 1 for arg in rest: if arg == first: result = 0 else: quoted = f'"{arg}"' args.append(quoted) print(" ".join(args)) sys.exit(result)
<commit_before><commit_msg>Add python script to remove an arg<commit_after>
import sys program, first, *rest = sys.argv args = [] result = 1 for arg in rest: if arg == first: result = 0 else: quoted = f'"{arg}"' args.append(quoted) print(" ".join(args)) sys.exit(result)
Add python script to remove an argimport sys program, first, *rest = sys.argv args = [] result = 1 for arg in rest: if arg == first: result = 0 else: quoted = f'"{arg}"' args.append(quoted) print(" ".join(args)) sys.exit(result)
<commit_before><commit_msg>Add python script to remove an arg<commit_after>import sys program, first, *rest = sys.argv args = [] result = 1 for arg in rest: if arg == first: result = 0 else: quoted = f'"{arg}"' args.append(quoted) print(" ".join(args)) sys.exit(result)
05d04680f3a25a86fa9d8ac3c232d8dfb538d67e
iscc_bench/utils.py
iscc_bench/utils.py
# -*- coding: utf-8 -*- import io import time from functools import lru_cache def timing(func): """Decorator to measure and print runtime of a function""" def wrap(*args): start = time.time() ret = func(*args) end = time.time() print(f"{func.__name__} function took {(end - sta...
Add module with some generic utility functions
Add module with some generic utility functions
Python
bsd-2-clause
coblo/isccbench
Add module with some generic utility functions
# -*- coding: utf-8 -*- import io import time from functools import lru_cache def timing(func): """Decorator to measure and print runtime of a function""" def wrap(*args): start = time.time() ret = func(*args) end = time.time() print(f"{func.__name__} function took {(end - sta...
<commit_before><commit_msg>Add module with some generic utility functions<commit_after>
# -*- coding: utf-8 -*- import io import time from functools import lru_cache def timing(func): """Decorator to measure and print runtime of a function""" def wrap(*args): start = time.time() ret = func(*args) end = time.time() print(f"{func.__name__} function took {(end - sta...
Add module with some generic utility functions# -*- coding: utf-8 -*- import io import time from functools import lru_cache def timing(func): """Decorator to measure and print runtime of a function""" def wrap(*args): start = time.time() ret = func(*args) end = time.time() pri...
<commit_before><commit_msg>Add module with some generic utility functions<commit_after># -*- coding: utf-8 -*- import io import time from functools import lru_cache def timing(func): """Decorator to measure and print runtime of a function""" def wrap(*args): start = time.time() ret = func(*ar...
f74051f18dc0ee76f8add85978893a1a42324c40
emotools/plays.py
emotools/plays.py
"""Functions to generate data about entities that can be used for visualizations. """ from collections import Counter import numpy as np import re def get_characters(speakerturns): """Return a list of characters based a list of speaker turns.""" characters = Counter() for turn in speakerturns: # ...
Move entity extraction functions to emotools
Move entity extraction functions to emotools The entity extraction functions defined in the generate_liwc_data.py script were moved to the emotools module, because I want to use these functions in the visualization app. The next step is to update the generate_liwc_data script to reflect these changes.
Python
apache-2.0
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
Move entity extraction functions to emotools The entity extraction functions defined in the generate_liwc_data.py script were moved to the emotools module, because I want to use these functions in the visualization app. The next step is to update the generate_liwc_data script to reflect these changes.
"""Functions to generate data about entities that can be used for visualizations. """ from collections import Counter import numpy as np import re def get_characters(speakerturns): """Return a list of characters based a list of speaker turns.""" characters = Counter() for turn in speakerturns: # ...
<commit_before><commit_msg>Move entity extraction functions to emotools The entity extraction functions defined in the generate_liwc_data.py script were moved to the emotools module, because I want to use these functions in the visualization app. The next step is to update the generate_liwc_data script to reflect thes...
"""Functions to generate data about entities that can be used for visualizations. """ from collections import Counter import numpy as np import re def get_characters(speakerturns): """Return a list of characters based a list of speaker turns.""" characters = Counter() for turn in speakerturns: # ...
Move entity extraction functions to emotools The entity extraction functions defined in the generate_liwc_data.py script were moved to the emotools module, because I want to use these functions in the visualization app. The next step is to update the generate_liwc_data script to reflect these changes."""Functions to g...
<commit_before><commit_msg>Move entity extraction functions to emotools The entity extraction functions defined in the generate_liwc_data.py script were moved to the emotools module, because I want to use these functions in the visualization app. The next step is to update the generate_liwc_data script to reflect thes...
f19a982d25e44762298fd6def44b9566b4e0d6e0
tests/test_build_model_rpm.py
tests/test_build_model_rpm.py
#! /usr/bin/python from build_model_rpm import BuildModelRPM from nose.tools import * @raises(TypeError) def test_fail_with_no_parameters(): BuildModelRPM(None) @raises(TypeError) def test_fail_with_one_parameter(): BuildModelRPM("hydrotrend") def test_hydrotrend_version_none(): BuildModelRPM("hydrotren...
Include nose tests for hydrotrend
Include nose tests for hydrotrend
Python
mit
csdms/rpm_models
Include nose tests for hydrotrend
#! /usr/bin/python from build_model_rpm import BuildModelRPM from nose.tools import * @raises(TypeError) def test_fail_with_no_parameters(): BuildModelRPM(None) @raises(TypeError) def test_fail_with_one_parameter(): BuildModelRPM("hydrotrend") def test_hydrotrend_version_none(): BuildModelRPM("hydrotren...
<commit_before><commit_msg>Include nose tests for hydrotrend<commit_after>
#! /usr/bin/python from build_model_rpm import BuildModelRPM from nose.tools import * @raises(TypeError) def test_fail_with_no_parameters(): BuildModelRPM(None) @raises(TypeError) def test_fail_with_one_parameter(): BuildModelRPM("hydrotrend") def test_hydrotrend_version_none(): BuildModelRPM("hydrotren...
Include nose tests for hydrotrend#! /usr/bin/python from build_model_rpm import BuildModelRPM from nose.tools import * @raises(TypeError) def test_fail_with_no_parameters(): BuildModelRPM(None) @raises(TypeError) def test_fail_with_one_parameter(): BuildModelRPM("hydrotrend") def test_hydrotrend_version_non...
<commit_before><commit_msg>Include nose tests for hydrotrend<commit_after>#! /usr/bin/python from build_model_rpm import BuildModelRPM from nose.tools import * @raises(TypeError) def test_fail_with_no_parameters(): BuildModelRPM(None) @raises(TypeError) def test_fail_with_one_parameter(): BuildModelRPM("hydr...
7cea3bbcb844bd29ee14bb490217d990213620d0
scripts/make_changelog.py
scripts/make_changelog.py
#! /usr/bin/env python from __future__ import print_function import os import sys import subprocess from collections import defaultdict import jinja2 CHANGELOG = """ # Change Log All notable changes to PyMT will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and t...
Add script to auto-generate a Change Log.
Add script to auto-generate a Change Log.
Python
mit
csdms/pymt,csdms/coupling,csdms/coupling
Add script to auto-generate a Change Log.
#! /usr/bin/env python from __future__ import print_function import os import sys import subprocess from collections import defaultdict import jinja2 CHANGELOG = """ # Change Log All notable changes to PyMT will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and t...
<commit_before><commit_msg>Add script to auto-generate a Change Log.<commit_after>
#! /usr/bin/env python from __future__ import print_function import os import sys import subprocess from collections import defaultdict import jinja2 CHANGELOG = """ # Change Log All notable changes to PyMT will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and t...
Add script to auto-generate a Change Log.#! /usr/bin/env python from __future__ import print_function import os import sys import subprocess from collections import defaultdict import jinja2 CHANGELOG = """ # Change Log All notable changes to PyMT will be documented in this file. The format is based on [Keep a Cha...
<commit_before><commit_msg>Add script to auto-generate a Change Log.<commit_after>#! /usr/bin/env python from __future__ import print_function import os import sys import subprocess from collections import defaultdict import jinja2 CHANGELOG = """ # Change Log All notable changes to PyMT will be documented in this ...
086b3a92f8d9390d44d2d25cd236cfa2194a0364
bleh.py
bleh.py
from os import environ class ConfigMeta(type): def __new__(cls, class_name, parents, attrs, app_name=None): cls._app_name = app_name.upper() if app_name else None attrs = {a.upper(): attrs[a] for a in attrs if not a.startswith('_')} return super().__new__(cls, class_name, parents, attrs) ...
Add a little config test file (will do more later)
Add a little config test file (will do more later)
Python
mit
foxscotch/foxrollbot
Add a little config test file (will do more later)
from os import environ class ConfigMeta(type): def __new__(cls, class_name, parents, attrs, app_name=None): cls._app_name = app_name.upper() if app_name else None attrs = {a.upper(): attrs[a] for a in attrs if not a.startswith('_')} return super().__new__(cls, class_name, parents, attrs) ...
<commit_before><commit_msg>Add a little config test file (will do more later)<commit_after>
from os import environ class ConfigMeta(type): def __new__(cls, class_name, parents, attrs, app_name=None): cls._app_name = app_name.upper() if app_name else None attrs = {a.upper(): attrs[a] for a in attrs if not a.startswith('_')} return super().__new__(cls, class_name, parents, attrs) ...
Add a little config test file (will do more later)from os import environ class ConfigMeta(type): def __new__(cls, class_name, parents, attrs, app_name=None): cls._app_name = app_name.upper() if app_name else None attrs = {a.upper(): attrs[a] for a in attrs if not a.startswith('_')} return ...
<commit_before><commit_msg>Add a little config test file (will do more later)<commit_after>from os import environ class ConfigMeta(type): def __new__(cls, class_name, parents, attrs, app_name=None): cls._app_name = app_name.upper() if app_name else None attrs = {a.upper(): attrs[a] for a in attrs ...
017d33a8fdcf55272613550c5360a998f201ad3d
services/gunicorn_conf.py
services/gunicorn_conf.py
import multiprocessing preload_app = True workers = multiprocessing.cpu_count() * 2 + 1 worker_class = 'gevent' keepalive = 60 timeout = 900 max_requests = 600 # defaults to 30 sec, setting to 5 minutes to fight `GreenletExit`s graceful_timeout = 5*60 # cryptically, setting forwarded_allow_ips (to the ip of the hqproxy...
import multiprocessing preload_app = True workers = multiprocessing.cpu_count() * 2 + 1 worker_class = 'gevent' keepalive = 60 timeout = 900 max_requests = 120 # defaults to 30 sec, setting to 5 minutes to fight `GreenletExit`s graceful_timeout = 5*60 # cryptically, setting forwarded_allow_ips (to the ip of the hqproxy...
Revert "bump gunicorn max_requests to 600"
Revert "bump gunicorn max_requests to 600" This reverts commit ffbfe0d6f2ca83346693a788b14562eb332d0cbd.
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,gmimano/commcaretest,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedso...
import multiprocessing preload_app = True workers = multiprocessing.cpu_count() * 2 + 1 worker_class = 'gevent' keepalive = 60 timeout = 900 max_requests = 600 # defaults to 30 sec, setting to 5 minutes to fight `GreenletExit`s graceful_timeout = 5*60 # cryptically, setting forwarded_allow_ips (to the ip of the hqproxy...
import multiprocessing preload_app = True workers = multiprocessing.cpu_count() * 2 + 1 worker_class = 'gevent' keepalive = 60 timeout = 900 max_requests = 120 # defaults to 30 sec, setting to 5 minutes to fight `GreenletExit`s graceful_timeout = 5*60 # cryptically, setting forwarded_allow_ips (to the ip of the hqproxy...
<commit_before>import multiprocessing preload_app = True workers = multiprocessing.cpu_count() * 2 + 1 worker_class = 'gevent' keepalive = 60 timeout = 900 max_requests = 600 # defaults to 30 sec, setting to 5 minutes to fight `GreenletExit`s graceful_timeout = 5*60 # cryptically, setting forwarded_allow_ips (to the ip...
import multiprocessing preload_app = True workers = multiprocessing.cpu_count() * 2 + 1 worker_class = 'gevent' keepalive = 60 timeout = 900 max_requests = 120 # defaults to 30 sec, setting to 5 minutes to fight `GreenletExit`s graceful_timeout = 5*60 # cryptically, setting forwarded_allow_ips (to the ip of the hqproxy...
import multiprocessing preload_app = True workers = multiprocessing.cpu_count() * 2 + 1 worker_class = 'gevent' keepalive = 60 timeout = 900 max_requests = 600 # defaults to 30 sec, setting to 5 minutes to fight `GreenletExit`s graceful_timeout = 5*60 # cryptically, setting forwarded_allow_ips (to the ip of the hqproxy...
<commit_before>import multiprocessing preload_app = True workers = multiprocessing.cpu_count() * 2 + 1 worker_class = 'gevent' keepalive = 60 timeout = 900 max_requests = 600 # defaults to 30 sec, setting to 5 minutes to fight `GreenletExit`s graceful_timeout = 5*60 # cryptically, setting forwarded_allow_ips (to the ip...
44eb353b6efae0f0459b82e0ec7c171fc2ce9ba6
dependency-graph/unity-dump.py
dependency-graph/unity-dump.py
#!/usr/bin/env python import argparse import os import re def locate_header_file(fname, include_paths): for p in include_paths: fullname = p + '/' + fname if os.path.exists(fullname): return fullname raise RuntimeError('File not found: %s' % fname) def preprocess_file(fname, inc...
Add a Python script to dump a "unity build" of any test program.
Add a Python script to dump a "unity build" of any test program. This script works around the fact that I don't have a conforming C++17 compiler on my laptop (yet!). Using this script I can turn a ten-line test program into a standalone "unity build" suitable for cutting and pasting into Wandbox. dependency-graph...
Python
mit
Quuxplusone/from-scratch,Quuxplusone/from-scratch,Quuxplusone/from-scratch
Add a Python script to dump a "unity build" of any test program. This script works around the fact that I don't have a conforming C++17 compiler on my laptop (yet!). Using this script I can turn a ten-line test program into a standalone "unity build" suitable for cutting and pasting into Wandbox. dependency-graph...
#!/usr/bin/env python import argparse import os import re def locate_header_file(fname, include_paths): for p in include_paths: fullname = p + '/' + fname if os.path.exists(fullname): return fullname raise RuntimeError('File not found: %s' % fname) def preprocess_file(fname, inc...
<commit_before><commit_msg>Add a Python script to dump a "unity build" of any test program. This script works around the fact that I don't have a conforming C++17 compiler on my laptop (yet!). Using this script I can turn a ten-line test program into a standalone "unity build" suitable for cutting and pasting into Wan...
#!/usr/bin/env python import argparse import os import re def locate_header_file(fname, include_paths): for p in include_paths: fullname = p + '/' + fname if os.path.exists(fullname): return fullname raise RuntimeError('File not found: %s' % fname) def preprocess_file(fname, inc...
Add a Python script to dump a "unity build" of any test program. This script works around the fact that I don't have a conforming C++17 compiler on my laptop (yet!). Using this script I can turn a ten-line test program into a standalone "unity build" suitable for cutting and pasting into Wandbox. dependency-graph...
<commit_before><commit_msg>Add a Python script to dump a "unity build" of any test program. This script works around the fact that I don't have a conforming C++17 compiler on my laptop (yet!). Using this script I can turn a ten-line test program into a standalone "unity build" suitable for cutting and pasting into Wan...
54bbc3ea51e1242b7553883e28e3e792b987063a
move_emails_to_folders.py
move_emails_to_folders.py
import logging from csv_email import get_move_folder, type_accepts_message from settings import get_csv_file_types, get_email_client, LOGGING_KWARGS logger = logging.getLogger(__name__) def get_message_folder_name(message, csv_file_types): for csv_type in csv_file_types: match_dict = type_accepts_message(messag...
Add move emails from inbox script
Add move emails from inbox script
Python
mit
AustralianAntarcticDataCentre/save_emails_to_files,AustralianAntarcticDataCentre/save_emails_to_files
Add move emails from inbox script
import logging from csv_email import get_move_folder, type_accepts_message from settings import get_csv_file_types, get_email_client, LOGGING_KWARGS logger = logging.getLogger(__name__) def get_message_folder_name(message, csv_file_types): for csv_type in csv_file_types: match_dict = type_accepts_message(messag...
<commit_before><commit_msg>Add move emails from inbox script<commit_after>
import logging from csv_email import get_move_folder, type_accepts_message from settings import get_csv_file_types, get_email_client, LOGGING_KWARGS logger = logging.getLogger(__name__) def get_message_folder_name(message, csv_file_types): for csv_type in csv_file_types: match_dict = type_accepts_message(messag...
Add move emails from inbox scriptimport logging from csv_email import get_move_folder, type_accepts_message from settings import get_csv_file_types, get_email_client, LOGGING_KWARGS logger = logging.getLogger(__name__) def get_message_folder_name(message, csv_file_types): for csv_type in csv_file_types: match_d...
<commit_before><commit_msg>Add move emails from inbox script<commit_after>import logging from csv_email import get_move_folder, type_accepts_message from settings import get_csv_file_types, get_email_client, LOGGING_KWARGS logger = logging.getLogger(__name__) def get_message_folder_name(message, csv_file_types): ...